sending the output of a script through mail

Chris Norman cnorman at rnibncw.ac.uk
Thu Sep 21 13:46:36 UTC 2006


just do:
script-name | mail I think.

Or possibly:
script-name > address.txt
cat addr.txt | mail user
rm -f addr.txt

HTH.

Chris Norman
<!-- chris.norman4 at ntlworld.com -->
----- Original Message ----- 
From: "ankush grover" <ankushfedora at gmail.com>
To: "For users of Fedora Core releases" <fedora-list at redhat.com>
Sent: Thursday, September 21, 2006 6:55 AM
Subject: sending the output of a script through mail


> hey friends,
>
> I have written a script which shows the local and lan address of a system.
>
> #!/bin/sh
> test= ifconfig -a | grep addr: | awk '{print $2}'
>
>
> I want to send the output of this command to a user through mail. How
> can I achieven this ?
>
>
> Thanks & Regards
>
> Ankush Grover
>
> -- 
> fedora-list mailing list
> fedora-list at redhat.com
> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
> 





More information about the fedora-list mailing list