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 12:15 PM
Mailx problem FredSmith UNIX for Dummies Questions & Answers 5 07-12-2007 09:10 AM
problem with mailx shriashishpatil UNIX for Advanced & Expert Users 7 03-02-2006 05:13 AM
Problem with mailx command when sending attachment. miltony Shell Programming and Scripting 2 12-02-2005 12:43 PM
mailx problem djbartkow UNIX for Dummies Questions & Answers 1 06-27-2005 05:11 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-11-2005
iastorms iastorms is offline
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!
  #2 (permalink)  
Old 05-11-2005
bhargav's Avatar
bhargav bhargav is offline Forum Advisor  
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.
  #3 (permalink)  
Old 05-11-2005
Ygor's Avatar
Ygor Ygor is offline Forum Staff  
Moderator
  
 

Join Date: Oct 2003
Location: -31.96,115.84
Posts: 1,409
Or to send one message to all...
Code:
mailx -s "subject" $(<elist) < file1

Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:56 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0