Script - Expression not complete more tokens expected


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Script - Expression not complete more tokens expected
# 8  
Old 02-12-2010
Quote:
Originally Posted by methyl
Thanks cfajohnson. I was wrong about $TIME (thinking of another O/S). Thankfully the script doesn't contain $SECONDS !

The $T substitution in $TIME rather than ${TIME} is still an issue.

$TIME is the same as ${TIME} and will never be interpreted as ${T}IME

There are too many other things wrong with the script that could affect it adversely.
# 9  
Old 02-12-2010
Sorry cfajohnson. You are correct again. Some issues that I have seen and avoid in the past definitely do not apply to the script under examination.
I am left with the command line expanding to a line which is too long to process in the shell. It would help to see the input data.

We also don't know which shell version we are dealing with. On IBM machines it is quite easy to be running ksh88 when we might expect at least ksh93.
# 10  
Old 02-15-2010
Thanks for your reply folks!

This script is on a UNIX server, using ksh93.

It's a script which has been around for ages, not written by me (not that I'm trying to avoid blame!) and has previously worked fine.

This is the contents of FILE3:
Code:
128.11.82.3 - - [12/Feb/2010:00:00:00 +0000] "HEAD / HTTP/1.1" 200 -
163.238.11.120 - - [12/Feb/2010:00:00:01 +0000] "GET /Buy/Main/aw?awr=j&awsn=awpoll HTTP/1.1" 200 46
133.20.81.54 - - [12/Feb/2010:00:00:00 +0000] "POST /Buy/Main/ad/login/SSOActions?awr=1 HTTP/1.1" 302 80

It sounds like the script is a bit cowboy-ish? Either way, I'm just after getting it working rather than a complete re-write (unless of course a re-write is required to get it working).

I've amended FILES to FILEZ as a quick test - but again, the same error.

Any more thoughts?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Getting error in bash script; expr $a + 1: integer expression expected

Hi, I am new to shell/bash script. I am trying to run below script #!/bin/bash a=0 b=10 if then echo "a is equal to be" else echo "a is not equal to be" fi MAX=10 while do echo $a a='expr $a + 1' done (1 Reply)
Discussion started by: Mallikgm
1 Replies

2. 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

3. 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

4. UNIX for Dummies Questions & Answers

Integer expression expected error in script

When i run the following code i get an error that says Integer expression expected! How do i fix this? #!/bin/bash if ;then echo "wrong" exit 1 fi if ;then for i in /dev;do if ;then echo $i ls -l fi (4 Replies)
Discussion started by: kotsos13
4 Replies

5. Shell Programming and Scripting

Integer expression expected: with regular expression

CA_RELEASE has a value of 6. I need to check if that this is a numeric value. if not error. source $CA_VERSION_DATA if * ] then echo "CA_RELESE $CA_RELEASE is invalid" exit -1 fi + source /etc/ncgl/ca_version_data ++ CA_PRODUCT_ID=samxts ++ CA_RELEASE=6 ++ CA_WEEK_NO=7 ++... (3 Replies)
Discussion started by: ketkee1985
3 Replies

6. Shell Programming and Scripting

if script error: integer expression expected

Hi, i am making a simple program with a optional -t as the 3rd parameter. Submit course assignment -t dir In the script, i wrote: #!/bin/bash echo "this is course: ${1}" echo "this is assignment #: ${2}" echo "late? : ${3}" if then echo "this is late" fi but this gives me a :... (3 Replies)
Discussion started by: leonmerc
3 Replies

7. Shell Programming and Scripting

:integer expression expected

Hi, echo $i until || do read NUM if && ; then printf "$FBOLD\nInvalid number, please enter valid backup number: $FREG" fi done Getting below error : ./import_location.sh: line 234: [: : integer expression expected ./import_location.sh: line 234: [: :... (5 Replies)
Discussion started by: milink
5 Replies

8. Shell Programming and Scripting

+: 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... (4 Replies)
Discussion started by: senormarquez
4 Replies

9. Fedora

"integer expression expected" error with drive space monitoring script

Hi guys, I am still kinda new to Linux. Script template I found on the net and adapted for our environment: #!/bin/sh #set -x ADMIN="admin@mydomain.com" ALERT=10 df -H | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{ print $5 " " $1 }' | while read output; do #echo $output ... (2 Replies)
Discussion started by: wbdevilliers
2 Replies

10. 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
Login or Register to Ask a Question