Monday, February 8, 2016

send text file contents throught mail in bash mail



turns out it is quite simple:

for example:

mail -s 'Uptime Report' you@mail.com -c copy@mail.com < /tmp/output.txt





taken from: http://www.cyberciti.biz/faq/email-howto-send-text-file-using-unix-appleosx-bsd/

No comments:

Post a Comment

cancel script completely on ctrl-c

I found this question interesting: basically how to cancel completely a script and all child processes : You do this by creating a subro...