Twitter & bash

Using twitter is not really one of my hobbies, but sometimes it can be usefull to leave a message.

So I wrote this little function that writes someting to my twitter account.

Add this to your .bashrc file

twit ()
{ a=$@
   curl -u username:password  -d status="$a" http://twitter.com/statuses/update.xml >/dev/null 2>&1

}

So in order to post a message, simply type somthing like    twit hi everyone

or if you are really lazy (like me) automatically post a 'fortune'  like this:

twit `fortune -n140`

(and don't tell anyone i use Cronjob to post my messages ;)

Next week I'll try to make a scipt that uses Markov-chains and and creates messages based on a collection of twitter accounts. Then we'll see if a thousand monkeys actually are capable of writing a novel :)