6

awk search file then pipe to mail

view full story
linux-howto

http://www.unix.com – I need to write a script to search a static file (file1) in the form Name Email tim tfxo@gmail.[email protected] bob [email protected] and then mail them another file (file2) that is input from the command line. The command line would be: script.awk who file2 subject and the result would be mail -s subject who < file2 My centos is old and mail does not support -a I am a novice so if there is a better way without awk please let me know. Thanks in advance. (HowTos)