>I'm trying to do, I have a list of users that I need to send an email >to in a file. the problem is that I need to customize the subject >line. so what the input file looks like is this: > >email <tab> subject <cr> >email <tab> subject <cr> >... > >I want to loop through the file and use the mail command > >mail $email -s $subject < email.txt
while read email subject; do mail -s "$subject" "$email" <email.txt done <input_file
Ken Pizzini
documented on: 1999.09.24 Fri 11:11:31