im trying to remove all occurences of " OF xyz " in a file where xyz could be any word assuming xyz is the last word on the line but I won't always be.
at the moment I have sed 's/OF.*//'
but I want a nicer solution which could be in pseudo code
sed 's/OF.* (next token)//'
Is... (6 Replies)
I currently use this bash for loop below to reverse a set of tokens, example "abc def ghi" to "ghi def abc" but in looking at various sed one liner postings I notice two methods to reverse lines of text from a file (emulating tac) and reversing letters in a string (emulating rev) so I've spent some... (1 Reply)
Hello-
Trying to add two numbers in a ksh shell scripts and i get this error every time I execute
stat1_ex.ksh: + : more tokens expected
stat1=`cat .stat1a.tmp | cut -f2 -d" "`
stat2=`cat .stat2a.tmp | cut -f2 -d" "`
j=$(($stat1 + $stat2)) # < Here a the like the errors out
echo $j... (3 Replies)
i store the output of ls in a variable FL
$FL=`ls`
$echo $FL
f1.txt f2.txt f3.txt f4.txt f5.txt script.sh script.sh~ test.txt
now if i want to retrive the sub-string "f1.txt" from $FL we were taught that this is what i have to do
$set $FL
$echo $1
f1.txt
and echo $2 would give... (1 Reply)
Hi all,
I have a variable with value
DateFileFormat=NAME.CODE.CON.01.#.S001.V1.D$.hent.txt
I want this variable to get replaced with :
var2 is a variable with string value
DateFileFormat=NAME\\.CODE\\.CON\\.01\\.var2\\.S001\\.V1\\.D+\\.hent\\.txt\\.xml$
Please Help (3 Replies)
I have the following script to output a report of response times - but it is throwing the error:
./jobname: -: 0403-053 Expression is not complete; more tokens expected.
Here is the code, any ideas what the problem is?
(line 46 is simply, LC=0)
FILE2=/templogs/access_log... (9 Replies)
Hi All,
Im writing a shell script in which I want to get the folder names in one folder to be used in for loop.
I have used:
packsName=$(cd ~/packs/Acquisitions; ls -l| awk '{print $9}')
echo $packsName
o/p: opt temp user1 user2
ie. Im getting the output as a string.
But I want... (3 Replies)
Hi
I have been trying every possible solution available for this error on this Forum but could not resolve it.
When i am running the below script i get this error.:mad:
sh diskMonitor.sh
diskMonitor.sh: -: 0403-053 Expression is not complete; more tokens expected.
diskMonitor.sh: -:... (5 Replies)
Hi
can someone help me to resolve the error
for this condition
if ] && ]; then
i am passing the values $k and $kkm
i am getting the error like "-: more tokens expected"
Thanks in Advance (5 Replies)
I have a String class with a function that reads tokens using a delimiter.
For example
String sss = "6:8:12:16";
nfb = sss.nfields_b (':');
String tkb1 = sss.get_token_b (':');
String tkb2 = sss.get_token_b (':');
String tkb3 = sss.get_token_b (':');
String tkb4 =... (1 Reply)
Discussion started by: kristinu
1 Replies
LEARN ABOUT DEBIAN
afslog
AFSLOG(1) BSD General Commands Manual AFSLOG(1)NAME
afslog -- obtain AFS tokens
SYNOPSIS
afslog [-h | --help] [--no-v4] [--no-v5] [-u | --unlog] [-v | --verbose] [--version] [-c cell | --cell=cell] [-k realm | --realm=realm] [-P
principal | --principal=principal] [-p path | --file=path] [cell | path ...]
DESCRIPTION
afslog obtains AFS tokens for a number of cells. What cells to get tokens for can either be specified as an explicit list, as file paths to
get tokens for, or be left unspecified, in which case afslog will use whatever magic krb_afslog(3) decides upon.
Supported options:
--no-v4
This makes afslog not try using Kerberos 4.
--no-v5
This makes afslog not try using Kerberos 5.
-P principal, --principal principal
select what Kerberos 5 principal to use.
--cache cache
select what Kerberos 5 credential cache to use. --principal overrides this option.
-u, --unlog
Destroy tokens instead of obtaining new. If this is specified, all other options are ignored (except for --help and --version).
-v, --verbose
Adds more verbosity for what is actually going on.
-c cell, --cell=cell
This specified one or more cell names to get tokens for.
-k realm, --realm=realm
This is the Kerberos realm the AFS servers live in, this should normally not be specified.
-p path, --file=path
This specified one or more file paths for which tokens should be obtained.
Instead of using -c and -p, you may also pass a list of cells and file paths after any other options. These arguments are considered files if
they are either the strings ``.'' or ``..'' or they contain a slash, or if there exists a file by that name.
EXAMPLES
Assuming that there is no file called ``openafs.org'' in the current directory, and that /afs/openafs.org points to that cell, the follwing
should be identical:
$ afslog -c openafs.org
$ afslog openafs.org
$ afslog /afs/openafs.org/some/file
SEE ALSO krb_afslog(3)HEIMDAL November 26, 2002 HEIMDAL