Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi
I have a script where i need to input a list of cell phone numbers to be mailed to eg:
0845472182
0837891718
0938948948
0238840848
called smslist.txt
My needs to read the numbers from the list to do this
mailx -s "$smslist.txt" -r emailaddress@co.za smsaddress@.co.za <test filethanks
Hamim

I'm not sure I understand your request.
To send the entire list:
cat smlist | mailx -s "Enter subject text" emailaddress@domian.comTo loop through the list and send each number individually:
for num in `cat smlist`do
echo $num | mailx -s "Enter subject text" emailaddress@domian.com
done

I got it to work with one number eg:
mailx -s 0845472183 -r emailaddress@co.za smsaddress@.co.za <test fileI now need to read the smslist.txt file

![]() |
![]() |
![]() |
| Login or Register to Reply | |
| Login | Register |
| Ads by Google |