help with script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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 mail.

Any suggestions or help would be much appreciated.

#!/bin/bash
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 '+%m-%d-%y'`.chk
#outfile=`date '+%m-%d-%y'`.chk          #setup name of file to read into mail
mail -s 'file verify' me@xxxxxxxxxxxxxx <<MAIL_IN
~r `date '+%m-%d-%y'`.chk

.
MAIL_IN

exit

entering the same mail commands from a command prompt works.

Mark

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux