Hi All...
I am trying to execute below script to check the count of multiple files in the MAIN folder. And if the count is 2 then send an email with the file name. If there are two files with line count 2 then send 2 emails with respective filnames.
I was given this code for my previous post. I am trying to execute this and getting an error wc: cannot open /home/folder/MAIN/
Script:
wc -l /home/folder/MAIN/* > /dev/null | while
Read nr name;do test
$NR -eq 1 && mutt -a "$name" -s "the count of the $name is one" tom345@yahoomail.com;
done
Thanks in advance..
I am trying to execute below script to check the count of multiple files in the MAIN folder. And if the count is 2 then send an email with the file name. If there are two files with line count 2 then send 2 emails with respective filnames.
I was given this code for my previous post. I am trying to execute this and getting an error wc: cannot open /home/folder/MAIN/
Script:
wc -l /home/folder/MAIN/* > /dev/null | while
Read nr name;do test
$NR -eq 1 && mutt -a "$name" -s "the count of the $name is one" tom345@yahoomail.com;
done
Thanks in advance..