Originally Posted by Yalla-One
I'm currently running rsync_slackware_patches.sh -q against the local mirror on a nightly basis and normally (when there's no patches) it outputs nothing, and when there is a patch, it outputs that entry in the changelog.
What is the best way to approach writing a wrapper-script around the rsync-script in order to email the output of the downloaded patches to me when something is changed and keep quiet when no news?
It is very easy. I run this script as a cron job every night. One nice feature of cron is that it will capture the output from the programs it runs and sends that text per email to the user account who runs the job.
No need for wrappers.
If root runs that script, then you can add an read mail address as email alias for root in /etc/mail/aliases (and run the command "newaliases" after the edit).