Re: help with script

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



Mark Snyder wrote:

I am doing a md5sum to verify nightly transfer of files between servers and want to email the results to support.

1st suggestion: use rsync to transfer the files and you don't have to double-check the results, just the exit status of the command or its stderr output. It will know whether the tranfer worked or not.



Is this a cronjob? If so, then don't bother using 'mail'; just echo to stdout
and let cron handle the mailing.


Yes you are right about setting a variable, but this was supposed to be a quick and dirty.

Quick and dirty things don't write files and have to worry about filenames. See if you can do it all through pipes if you do this at all.

I will want it to be a cronjob when its working, how can I get it to mail the output of the diff? and not just the stdout of the cronjob? The whole point of this is the get the output of the diff to someone.

It's your script, make it say what you want (and nothing else) on stdout.

--
  Les Mikesell
   lesmikesell@xxxxxxxxx

_______________________________________________
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