So like many out there, I've been eagerly waiting on Cable service in my area. I'm too lazy to go checking every day if it's available so I've put together this shell script for all you linux/mac users:
if [[ $1 == *teksavvy.com* ]] && [[ $2 != "" ]] && [[ $3 == *@* ]]
echo "Syntax: ./teksavvy_cable_avail.sh <URL> <POSTAL_CODE> <EMAIL>"
OUTPUT=`wget -qO- $URL --post-data="postal=$POSTALCODE&submit=Submit" |grep Congratulations`
if [[ $OUTPUT == *"is available"* ]]
echo $OUTPUT |mailx -s "Teksavvy Cable Internet Is Here!" $EMAIL
So then I'd add the following in my crontab to check at 8 am everyday:
0 8 * * * /home/ewu/teksavvy_cable_avail.sh http://teksavvy.com/en/checkontariocable.asp <postal_code> <[email protected]>
Once it is available, I'll get an email. Remember your system has to have working outgoing mail transport.
Note: Please don't check every minute guys...we don't want to give Teksavvy workers a hard time...lol.