?
Solved

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

Posted on 2014-02-25
4
Medium Priority
?
557 Views
Last Modified: 2014-02-25
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
0
Comment
Question by:LindaC
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 40

Accepted Solution

by:
omarfarid earned 2000 total points
ID: 39885471
can you replace || with -o and try again?
0
 
LVL 8

Author Comment

by:LindaC
ID: 39885501
ok.
0
 
LVL 8

Author Closing Comment

by:LindaC
ID: 39885511
Now it worked.
Thank you
0
 
LVL 40

Expert Comment

by:omarfarid
ID: 39885676
Welcome
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question