solaris 5.10 - test.sh: line 10: 16: command not found

LindaC
LindaC used Ask the Experts™
on
Hi experts.
I have the following script which is returning an error.

solaris 5.10

log=`cat /tmp/LOGCOLDCHURN`
TXTERROR=/export/home/oracle/dba/scripts/text_error.txt
TXTDEPLOY=/export/home/oracle/dba/scripts/text_deploy.txt
cd /export/home/oracle/dba/logs/
ATTFILE=`cat /tmp/LOGCOLDCHURN`
SUBJECT="Churn coldbackup log"
MAILTO=mail@mail.com
PARAM1=`(egrep -c "ORA-|rejected|Killed|ERR|skipping|lof" "$log")`
PARAM2=`(egrep -i -c "Server status = 0" "$log")`
if [ "$PARAM1"  -gt 0 || "$PARAM2"  -ne 14 ] ; then
    (cat $TXTERROR;uuencode $ATTFILE Coldbackup-log-Error.txt) | mailx -s "$SUBJECT" $MAILTO
fi


+ '[' 0 -gt 0
test.sh: line 10: [: missing `]'
+ 16 -ne 14 ']'
test.sh: line 10: 16: command not found
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2007
Commented:
can you replace || with -o and try again?

Author

Commented:
ok.

Author

Commented:
Now it worked.
Thank you
Top Expert 2007

Commented:
Welcome

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial