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.
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:
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.
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)