LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   simple script question.. (https://www.linuxquestions.org/questions/linux-newbie-8/simple-script-question-703033/)

mike2010 02-07-2009 08:10 PM

simple script question..
 
hello, I have a simple bash script im using to email me whenever my server load reaches a certain level. The initial script only allowed input for 1 email though.

Quote:

mail -s "Alert: $curload Load for `hostname` on `date` " myemail@msn.com < /tmp/tmp.00;
If I wanted to add another email address, would I add it next to the first one with some kind of seperator... Or should I just add the whole line again underneath the first one ?

I appreciate the help very much.

colucix 02-08-2009 12:24 AM

Usually multiple addresses are put on the same line, separated by spaces:
Code:

mail -s "Alert: $curload Load for `hostname` on `date` " myemail@msn.com another@gmail.com < /tmp/tmp.00;

mike2010 02-08-2009 01:54 AM

Quote:

Originally Posted by colucix (Post 3435818)
Usually multiple addresses are put on the same line, separated by spaces:
Code:

mail -s "Alert: $curload Load for `hostname` on `date` " myemail@msn.com another@gmail.com < /tmp/tmp.00;

thanks bud, it worked.


All times are GMT -5. The time now is 11:50 AM.