sethmason.com The internet resource for all things Seth Mason.

Posted:
Nov 05 2008 @ 5PM

Tagged:
,

Commandline Fun

Insprired by an article on ibm.com about using twitter from the command line, I wrote up a simple little script to get your friends updates.

Here it is:

curl -s -u username:password \
http://twitter.com/statuses/friends_timeline.xml |
awk '/<text/ {
  gsub(/<\/*text>/,"");
  text = $0;
}
/screen_name/ {
  gsub(/ *<\/*screen_name>/,"");
  print $0;
  print text;
}'

All it does it is use cURL to grab the timeline from twitter. Then it passes it through awk to extract the name and text from your buddies. Simple and silly, yes?

AddThis Social Bookmark Button

No comments yet.

I've left comments off for this article, but if you've got something add or say, feel free to send me an email.