I need to write a script to search a static file (file1) that is in the form:
Name Email
tim tfxo@gmail.com
bob bob@sss.com
and then mail another file (file2) that is input from the command line.
The command line would be:
script who file2 subject
for example: script bob file2 'montly changes report'
and the result would be
mail -s 'monthly changes report' bob@sss.com < file2
My centos is old and mail does not support -a
I am a novice so if there is a better way please let me know.
Thanks in advance.