Solved

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

Posted on 2014-02-25
4
541 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 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.:

910 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now