|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
bash mail script
Hi, I have the following bash script that I want to use to send email to more than one respondent, and I keep getting an error
"syntax error near unexpected token `mailx' " Can someone pls tell me what I'm doing wrong? #!/usr/bin/bash -f set $all="`cat list`" for x in $all; mailx -s "Subject Line Here" $x < mesg; end |
|
#2
|
|||
|
|||
|
Change:
mailx -s "Subject Line Here" $x < mesg; To: cat mesg | mailx -s "Subject Line Here" $x But this might be even faster (even works from the command line): cat mesg | mailx -s "Subject line" `cat list` |
![]() |
| Viewing: Dev Shed Forums > Web Site Management > Scripts > bash mail script |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|