LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-07-2009, 08:10 PM   #1
mike2010
Member
 
Registered: Jan 2009
Posts: 132

Rep: Reputation: 15
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.

Last edited by mike2010; 02-07-2009 at 08:11 PM.
 
Old 02-08-2009, 12:24 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
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;
 
Old 02-08-2009, 01:54 AM   #3
mike2010
Member
 
Registered: Jan 2009
Posts: 132

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by colucix View Post
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
simple awk script question adam_blackice Programming 9 09-03-2007 02:23 PM
Simple script question Elvisclone Programming 2 12-01-2004 09:13 AM
Simple VI/Script Question shaggz Linux - General 2 07-05-2003 06:55 PM
simple question on shell script gsbarry Linux - General 2 05-23-2003 04:09 AM
simple shell script question mathfeel Linux - General 12 03-06-2003 11:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration