Sponsored Content
Full Discussion: +: more tokens expected
Top Forums Shell Programming and Scripting +: more tokens expected Post 302431630 by senormarquez on Tuesday 22nd of June 2010 09:56:38 AM
Old 06-22-2010
+: more tokens expected

Hey everyone, i needed some help with this one. We move into a new file system (which should be the same as the previous one, other than the name directory has changed) and the script worked fine in the old file system and not the new. I'm trying to add the results from one with another but i'm getting this token error. Could anyone be kind to see what i'm doing wrong.

HERE ARE THE RESULTS
Code:
NUM1b = 8
NUM1a = 0
./magADD.ksh[77]: +: more tokens expected
NUM1 = 0 and NUM2= 8
ERROR- failed to run.

See detail in log file below:

Here is the shell script
Code:
TMPFILE1=${TMPDIR}/mag_tmp1_9686.out
67 echo "${TMPFILE1}"
68 TMPFILE2=${TMPDIR}/mag_tmp2_9686.out
69 echo "${TMPFILE2}"
70 TMPFILE3=${TMPDIR}/mag_cnt.txt
71 echo "${TMPFILE3}"
72 #check db access
73 NUM1b=`grep "ORA-00942" ${TMPFILE2} |wc -l`
74 echo "NUM1b = $NUM1b"
75 NUM1a=`grep "Table dropped" ${TMPFILE1} |wc -l`
76 echo "NUM1a = $NUM1a"
77 let NUM1=$NUM1b + `grep "Table dropped" ${TMPFILE1} |wc -l`
78 NUM2=`grep "Table created" ${TMPFILE1} |wc -l`
79 echo "NUM1 = $NUM1 and NUM2=$NUM2"
80 if [ "${NUM1}" != "${NUM2}" ]
81 then
82 echo "ERROR- failed to run. See detail in log file below:\n" >> $LOGFILE
83 exit
84 fi
85
86 echo "Done ${MAIN_SQL}.\n"
87 exit


Here is the content on each tmp file
Code:
$ more mag_tmp1_9686.out
ORA-00942
ORA-00942
ORA-00942
ORA-00942
ORA-00942
ORA-00942
ORA-00942
Table created
Table created
Table created
Table created
Table created
Table created
Table created
Table created
 
 
$ more mag_tmp2_9686.out
ORA-00942
ORA-00942
ORA-00942
ORA-00942
ORA-00942
ORA-00942
ORA-00942
ORA-00942

I hope i provide enough info.

Last edited by Franklin52; 06-22-2010 at 11:09 AM.. Reason: Please use code tags
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

tokens in unix ?

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)
Discussion started by: seaten
6 Replies

2. Shell Programming and Scripting

reverse tokens with sed

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)
Discussion started by: markc
1 Replies

3. Shell Programming and Scripting

: + : more tokens expected

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)
Discussion started by: Nomaad
3 Replies

4. Shell Programming and Scripting

selecting tokens from a string...

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)
Discussion started by: c_d
1 Replies

5. Shell Programming and Scripting

Replacing tokens

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)
Discussion started by: abhinav192
3 Replies

6. Shell Programming and Scripting

Script - Expression not complete more tokens expected

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)
Discussion started by: daveaasmith
9 Replies

7. Shell Programming and Scripting

Need tokens in shell script

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)
Discussion started by: AB10
3 Replies

8. Shell Programming and Scripting

AIX 6.1 Error: 0403-053 Expression is not complete; more tokens expected.

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)
Discussion started by: nitinkatipn
5 Replies

9. Shell Programming and Scripting

Getting error -: more tokens expected in shell script

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)
Discussion started by: makigate
5 Replies

10. Programming

Reading tokens

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
UNLOG(1)						       AFS Command Reference							  UNLOG(1)

NAME
unlog - Discards all of the issuer's tokens SYNOPSIS
unlog [-cell <cell name>+] [-help] unlog [-c <cell name>+] [-h] DESCRIPTION
The unlog command by default discards all tokens that the issuer currently holds. To discard tokens for certain cells only, name them with the -cell argument. Since a token pertains to one client machine only, destroying tokens on one machine has no effect on tokens on another machine. CAUTIONS
Specifying one or more cell names can cause a brief authentication outage during which the issuer has no valid tokens in any cell. This is because the command actually discards all tokens and then restores the ones for cells not named by the -cell argument. The outage can sometimes interrupt the operation of jobs that require authentication. OPTIONS
-cell <cell name>+ Specifies each cell for to discard the token. If this argument is omitted, the Cache Manager discards all tokens. Provide the fully qualified domain name, or a shortened form, in which case successful resolution depends on the availability of a name resolution service (such as the Domain Name Service or a local host table) at the time the command is issued. -help Prints the online help for this command. All other valid options are ignored. EXAMPLES
The following command discards all tokens. % unlog The following command discards only the tokens for the "abc.com" and "stateu.edu" cells. % unlog -cell abc.com stateu PRIVILEGE REQUIRED
None SEE ALSO
klog(1), tokens(1) COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved. This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell. OpenAFS 2012-03-26 UNLOG(1)
All times are GMT -4. The time now is 01:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy