Linux Command - A Practical Reference
Welcome! OmniNerd's content is generated by you, the reader. Through voting and moderation we strive to highlight the nerdiest of what's around and provide content that's a little more thought provoking than other sites.
Alternative to mail by wyldeling :: NR6 :: Show
[[www.linux.com Linux.com]] has an article sending complex emails from the cmd line (or, scripts) using an alternative to mail: email. I don't know how well it works. Personally, I've just used mail directly in scripts.
In bash, I set up the fcn:
function msg { # the -s switch in mail specifies that the 1st arg passed to it is the subject # Alternatively, the email address could be specified as another fcn param mail -s "${1}" someone@example.com << EOM ${2} EOM }which I use to notify me of errors and when calculations complete.