Whatismyip.sh

From WikiPaul - Paul Swanson's wiki

Jump to: navigation, search
#!/bin/bash

#rm index.html
#wget whatismyip.com
egrep -m 1 -o '([0-9]{1,3}\.){3}[0-9]{1,3}' index.html > temp.txt
if [ "`cat momsip.txt`" != "`cat temp.txt`" ]; then
        mv temp.txt momsip.txt
        mail -s "Mom's IP address" -t my@email.com
fi
Personal tools