Re: mailing output

From: Bill Verzal (BVerzal_at_KOMATSUNA.COM)
Date: 07/31/03

  • Next message: Green, Simon: "Re: AIX equivalent to HP's 'glance' cmd?"
    Date:         Thu, 31 Jul 2003 10:06:30 -0500
    To: aix-l@Princeton.EDU
    
    

    Odd - the command 'mail -s"subject line" root < somefile' works fine for
    me.

    BV
    --------------------------------------------------------

    Bill Verzal
    AIX Administrator, Komatsu America
    (847) 970-3726 - direct
    (847) 970-4184 - fax

    |---------+------------------------------>
    | | Shawn Bierman |
    | | <BiermanS@METHODIST|
    | | HEALTH.ORG> |
    | | Sent by: IBM AIX |
    | | Discussion List |
    | | <aix-l@Princeton.ED|
    | | U> |
    | | |
    | | |
    | | 07/31/2003 09:44 AM|
    | | Please respond to |
    | | IBM AIX Discussion |
    | | List |
    | | |
    |---------+------------------------------>
    >-------------------------------------------------------------------------------------------------------------------------------|
      | |
      | To: aix-l@Princeton.EDU |
      | cc: |
      | Subject: mailing output |
    >-------------------------------------------------------------------------------------------------------------------------------|

    Greetings,

    I am having a bit of trouble with a script that should email root the
    output of a command but also have a subject line.

    Currently we just run the command from cron and it gets sent to root's
    email but with a subject line. So, I thought i would make a script that
    added the subject.

    I was hoping for something as easy as:

     mail -s"subject line" root | ls -la

     even when I output the command to a file and then try to redirect I get
    failures.

     mail -s"subject line" root < somefile

     mail complains of unknow users 'subject' and 'line'.

     Is there a simple way?


  • Next message: Green, Simon: "Re: AIX equivalent to HP's 'glance' cmd?"

    Relevant Pages

    • Re: password protection of a file
      ... >> the trouble is that i want to use the command into a script. ... BTW, I haven't seen a single message from the OP, only the replies. ...
      (Debian-User)
    • rc.d/named
      ... I have quite a bit of trouble with the /etc/rc.d/named script. ... of the biggest issue was the rc_run_command was not issuing the run command ... However, when issuing /etc/rc.d/named ...
      (freebsd-questions)
    • Re: mailing output
      ... I am having a bit of trouble with a script that should email root the output of a command but also have a subject line. ...
      (AIX-L)
    • mailing output
      ... I am having a bit of trouble with a script that should email root the output of a command but also have a subject line. ...
      (AIX-L)
    • Re: usrlogon.cmg hangs
      ... trouble was occurring: ... output of that command and you may be able to see an error ... make sure that the script has "echo on" set. ... >> tried giving this user a new profile? ...
      (microsoft.public.win2000.termserv.clients)