Skip to content

Instantly share code, notes, and snippets.

@jzawodn
Created December 30, 2008 16:25
Show Gist options
  • Save jzawodn/41653 to your computer and use it in GitHub Desktop.
Save jzawodn/41653 to your computer and use it in GitHub Desktop.
#!/bin/bash
T_USER=twitter_username
T_PASS=twitter_password
T_URL=http://twitter.com/statuses/update.xml
cd $HOME
LAST_IP=`cat .last_ip`
IP=`curl -s -o - http://jeremy.zawodny.com/ip.php`
if [ $LAST_IP != $IP ];
then
# echo "new ip: $IP"
curl -s -o /dev/null -u $T_USER:$T_PASS -d status="$IP" $T_URL
echo "$IP" > .last_ip
else
# echo "ip unchanged"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment