Posted By:
Anonymous
Posted On:
Wednesday, April 23, 2008 05:17 PM
Hi Amar,
If u require only the shell script then it will be like this.
Suppose ur text file is abc.txt
and containts
-----------------------------
mar,amar.tumma@yahoo.com
kumar,ss@yy.com
-----------------------------
the script to read and mail is,
***************start**************
#!/usr/bin/ksh
#this is to cut the specific fields
while read line
do
export name=`cut -f1 -d, $line`
export email_id=`cut -f2 -d, $line`
#this is to send the mail to email_ids
echo "Hi ${name} test mails"|mailx -s "test" ${email_id}
done < abc.txt
**************end***************
thanks
Priya