[CentOS] Re: help with script
ssilva at sgvwater.com
Fri Nov 2 22:07:42 UTC 2007
on 11/2/2007 3:39 PM Mark Snyder spake the following:
> I am doing a md5sum to verify nightly transfer of files between servers
> and want to email the results to support.
> Everything works fine except reading the contents of the check file into
> Any suggestions or help would be much appreciated.
> cd /bak
> md5sum -b `date '+%m-%d-%y'`.tgz > `date '+%m-%d-%y'`.ver
> diff -s `date '+%m-%d-%y'`.md5 `date '+%m-%d-%y'`.ver > `date
> #outfile=`date '+%m-%d-%y'`.chk #setup name of file to read
> into mail
> mail -s 'file verify' me at mymailaddr.com <<MAIL_IN
> ~r `date '+%m-%d-%y'`.chk
> entering the same mail commands from a command prompt works.
Cron doesn't always have access to the same path and environment as a logged
in user. You might have to export some environment var's in the beginning of
MailScanner is like deodorant...
You hope everybody uses it, and
you notice quickly if they don't!!!!
More information about the CentOS