Last active
August 29, 2015 14:14
-
-
Save mcdruid/0e0d444845fed6c4ea46 to your computer and use it in GitHub Desktop.
Example report-by-email script suitable for running on cron
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# space separate multiple e-mails | |
mail_recipients='drew.webber@acquia.com drew.webber+test@acquia.com' | |
mail_subject="Monthly report for $(hostname +s) on $(date +'%F')" | |
report_commands='df -h /mnt/gfs' | |
sh -c "$report_commands" | mail -s "$mail_subject" $mail_recipients |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment