LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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, 09: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 09:11 PM.
 
Old 02-08-2009, 01:24 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
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, 02: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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 03:23 PM
Simple script question Elvisclone Programming 2 12-01-2004 10:13 AM
Simple VI/Script Question shaggz Linux - General 2 07-05-2003 07:55 PM
simple question on shell script gsbarry Linux - General 2 05-23-2003 05:09 AM
simple shell script question mathfeel Linux - General 12 03-06-2003 12:23 PM


All times are GMT -5. The time now is 07:05 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration