Hi Everyone
I am a newbie at Linux. Appreciate if anyone of you guys can help me out..
I am trying to send out the daily log files generated from our application. Currently there is a file - "log_req" containing all the files that need to be sent daily. As a test, the log_req file contains 2 file names. I need to know whether we can use a combination of awk and mail commands to send based on redirection.
The command I am trying to figure out is this:-
awk 'BEGIN{while (getline line_data < "log_req") "mail
patrick.chuang@abc.com" < line_data}'
I do not encounter any syntax errors but somehow I dont receive any email. I tested with the print command and the information from the log_req files are retrieved.
awk 'BEGIN{while (getline line_data < "log_req") print}'
What i want to achieve would be to send all the files in the log_req file to the receipient.
Grateful if you can advice.
Thanks
Patrick..