Skip to content

Instantly share code, notes, and snippets.

@RJ
Created December 3, 2009 14:26
Show Gist options
  • Save RJ/248191 to your computer and use it in GitHub Desktop.
Save RJ/248191 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Hacky 'IRCCat for twitter' (see http://github.com/RJ/irccat)
# Usage: ./twittercat.sh
# echo "my tweet" | nc -q0 localhost 9999
PORT=9999
USERNAME="your_twitter_name"
PASSWORD="your_twitter_password"
while [ 1 ]
do
tweet=`nc -q0 -l -p $PORT`
if [ -n $tweet ]
then
echo "Tweeting: $tweet"
curl -u ${USERNAME}:${PASSWORD} -d status="$tweet" http://twitter.com/statuses/update.xml &
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment