On Mon, 27 Oct 2003 08:41:27 +0700
Fajar Priyanto <[EMAIL PROTECTED]> wrote:

FP> -----BEGIN PGP SIGNED MESSAGE-----
FP> Hash: SHA1
FP> 
FP> Dear All,
FP> I want to do some bash commands and then send the results by email
FP> from CLI, can I do that?
FP> 
FP> I tried this but didn't work:
FP> [EMAIL PROTECTED] Documents]# df > /home/fajar/Documents/df | mail -I -s
FP> df [EMAIL PROTECTED] ~r /home/fajar/Documents/df
FP> Null message body; hope that's ok
FP> 
FP> Seems that ~r option only works in the body of the message.
FP> Thanks.


 Think it this way

 > direct to file
 | direct to next command

 So you want it to be mailled, you should

 df | mail -s subject receivers_mail

 If you want it both mailed and saved as a file, you can use tee ("man tee" for more 
info)

 df | tee /where/you/want/the/file/be | mail -s subject receivers_mail


 HTH
-- 
 Onur Kucuk
 <[EMAIL PROTECTED]>

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to