mailx problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • daniesh1981
    New Member
    • Feb 2008
    • 1

    mailx problem

    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.
    Code:
    DBALIST="daniesh.shaikh@idhasoft.com";export DBALIST
    #DBA_LIST="daniesh.shaikh@idhasoft.com";export DBALIST
    rm listener
    
    ps -ef|grep pmon >listener
    if [ $# -ne 0 ]
    #if cat  listener|grep PROD
    then
    echo "listener is up"
    else
     echo "listener is down" | mailx -s $DBALIST
    
    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
    Code:
    [oracle@lxorarac1 ~]$ ./listener1
    You must specify direct recipients with -s, -c, or -b.
    could you guys help me out...

    thanks,
    Daniesh
    Last edited by Nepomuk; Oct 11 '10, 09:49 AM. Reason: Please use [CODE] tags
  • Vinarashi
    New Member
    • Sep 2010
    • 11

    #2
    Hi,

    Try with this...

    echo "listener is down" | mailx -s "<some_subject> " $DBALIST

    Comment

    Working...