The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Problem while sending message and attachment with mailx nihar.dutta Shell Programming and Scripting 2 08-09-2007 08:15 AM
Mailx problem FredSmith UNIX for Dummies Questions & Answers 5 07-12-2007 05:10 AM
problem with mailx shriashishpatil UNIX for Advanced & Expert Users 7 03-02-2006 01:13 AM
Problem with mailx command when sending attachment. miltony Shell Programming and Scripting 2 12-02-2005 08:43 AM
mailx problem djbartkow UNIX for Dummies Questions & Answers 1 06-27-2005 01:11 PM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-10-2005
Registered User
 

Join Date: May 2005
Posts: 1
Exclamation mailx problem

Here is a question I have, maybe someone can help me out. I am new to this UNIX thing.

I have a file called elist. In this file is a list of 25 email adresses. How can I write a simple command line for that will read the names of the file and send it to each of the email addys. Can I pipe it in some way using mailx.

mailx -s "list" -r < elist
cat elist | mailx -s "list"

something along those lines.

please help!
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 05-10-2005
bhargav's Avatar
Registered User
 

Join Date: Sep 2004
Location: USA
Posts: 511
some thing like this ...

Code:
while read line
do
      mailx -s "subject" $line < file1

done <  elist
Note : Code not tested.
Reply With Quote
  #3 (permalink)  
Old 05-10-2005
Ygor's Avatar
Moderator
 

Join Date: Oct 2003
Location: -31.96,115.84
Posts: 1,226
Or to send one message to all...
Code:
mailx -s "subject" $(<elist) < file1
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 01:40 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0