|shell script to check the lsitener [message #301096]
||Tue, 19 February 2008 03:30
Registered: February 2008
I am writing a script for one of the clients.
i got stuck could anybody help me out.
ps -ef|grep pmon >database.txt
if (grep "PROD" database.txt)
touch "no file"
echo "database is down"| mailx -s $dbalist
i am getting an error. i am not getting my mail to my id.
i am redirecting the o/p of ps -ef|grep to database.txt
then alse the o/p of that command get displayed on my screen
i want only database is down to my id .
could anyone explain me the better way to write the script.