SUMMARY:Help on Scripting

From: <mr.shiv_at_sify.com>
Date: Wed Jun 06 2001 - 04:13:23 EDT
Hi All, Almost I got plenty of reply for my posting. Some said will not work change to grep options adn etc..,
With all your inputs I got my problem solved. I have replaced PS value like this:
PS=`ps -ef|grep "pmon" | grep -v "instance_name" | grep -v grep
if [ "$PS" == "instance_name" ]
worked...

Thanks for all, appreciate for all your options and inputs
it was really nice to see different idea.

Cheers,
Shiva.
------------ Orginal Question ----------
Hi All,
-------------------------------------------------
#!/bin/sh
#set -x
echo "<Oracle_Instance_Name Up? : \c"
PS=`ps -ef | grep <Instance_Name>`
if [ "$PS" -eq training ]
then
echo "Yes"
else
echo "No"
fi                 
-------------------------------------------------                   
Above script is not showing me the oracle instance UP or DOWN. If my training instance is up it should say me its UP. Can any one help me on this script where iam doing wrong.         

Thanks in Advance,
Shiva.


-------------------------------------------------
This mail sent through : http://mail.sify.com

Received on Wed Jun 6 09:13:23 2001

This archive was generated by hypermail 2.1.8 : Wed Mar 23 2016 - 16:24:56 EDT