By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,592 Members | 1,005 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,592 IT Pros & Developers. It's quick & easy.

mailx problem

P: 1
Hi Experts,
This is my scripts.the scripts checks whether my database is up or not if it is up then its ok if not , then the alert should be send to my groups mail id.
Expand|Select|Wrap|Line Numbers
  1. DBALIST="";export DBALIST
  2. #DBA_LIST="";export DBALIST
  3. rm listener
  5. ps -ef|grep pmon >listener
  6. if [ $# -ne 0 ]
  7. #if cat  listener|grep PROD
  8. then
  9. echo "listener is up"
  10. else
  11.  echo "listener is down" | mailx -s $DBALIST
  13. fi
The scripts is ok the problem is mailx command i think whenever i run the script i am getting an error:
the error i have pasted below
Expand|Select|Wrap|Line Numbers
  1. [oracle@lxorarac1 ~]$ ./listener1
  2. You must specify direct recipients with -s, -c, or -b.
could you guys help me out...

Feb 19 '08 #1
Share this Question
Share on Google+
1 Reply

P: 11

Try with this...

echo "listener is down" | mailx -s "<some_subject>" $DBALIST
Sep 28 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.