[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2014-02-25
4
Medium Priority
?
565 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
  • 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses
Course of the Month18 days, 22 hours left to enroll

834 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