Home » Infrastructure » Unix » Urgent help
Urgent help [message #108846] Sat, 19 February 2005 02:20 Go to next message
satya das
Messages: 6
Registered: July 2004
Junior Member
Hello Everybody,
can anyone help me out to understand the following unix code.

if [[[[ $(ps -ef|egrep "lgwr|smon|dbw|pmon"|grep $ORACLE_SID|wc -l|awk '{print $1}
') < 1 ]]]]
write_log "Database $ORACLE_SID not available" E
exit 1

I guess it something related to checking if the databse is up or down.its works perfect but it doesnot work when i try to check (<4) condition instead of (<1).

Do let me where i am wrong.....and why?

Thanks & Regards
Satya Das
Re: Urgent help [message #108984 is a reply to message #108846] Mon, 21 February 2005 03:49 Go to previous message
Frank Naude
Messages: 4566
Registered: April 1998
Senior Member
Try to use "-lt" instead of "<".

Best regrds.

Previous Topic: Oracle Connectivity with TC orTC++
Next Topic: Problem in Reading date from command line.
Goto Forum:

Current Time: Sat Jan 16 12:40:16 CST 2021