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
Solved

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

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
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.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

840 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