LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-22-2011, 08:31 AM   #1
jwwd
LQ Newbie
 
Registered: Jul 2011
Posts: 1

Rep: Reputation: Disabled
Unhappy problem with mail command


Hello,

I have a problem to make a shell, using mail command

DestMail= cat /opt/scripts/maillist.txt
mail -s"SUBJECT" $DestMail -- -r xxxxx@gmail.com < /opt/scripts/test.txt

where:
maillist.txt contain email adresse separated by comma
test.txt mail text

this script can eval DestMail variable!!

Any help please?

Thank you
 
Old 07-22-2011, 09:17 AM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Code:
while read -r DestMail
do
   <whatever you want>
done < /opt/scripts/maillist.txt
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Debian etch - Unable to send mail from command line or from php mail command lqforumuser Linux - Newbie 1 03-01-2009 06:56 AM
problem with mail command hopefull Linux - Newbie 6 01-18-2009 08:23 AM
Problem with mail command srihariv Linux - General 3 02-25-2008 02:20 AM
Problem with mail command Abhinav Kakkar Linux - Software 2 09-03-2007 04:23 AM
problem with mail command a5an0 Linux - Networking 2 05-09-2005 06:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:00 PM.

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