#!/bin/bash # # This sends email summaries to my cell phone when I'm /away! # # It goes best with a .procmailrc rule somewhat like this: # :0 c # * ! ^FROM_DAEMON # * ^(To|Cc):.*(your@email.address.tld|your@other.address.tld) # |/home/bre/bin/emailsms.sh NUMBER=$(cat ~/.sms-number) if [ -e ~/www/html/irc-stats.html ]; then grep -c -i online ~/www/html/irc-stats.html >/dev/null && exit 0 fi #case $(date +%H) in # 01|02|03|04|05|06|07|08) exit 0 # ;; #esac /home/bre/bin/emailsms.pl $NUMBER 295 \ && echo "Successfully sent an SMS to $NUMBER." 1>&2 \ || echo "Failed to send an SMS to $NUMBER." 1>&2