Getting Your Twitter Status From the Shell

Here is a quick shell script i whipped up to pull twitter status from the command line. The eventual plan is to pop this in a cron job, pipe it into a file and include this in a php page. Easy status updates for a website headline

#!/bin/sh
USER=$1
wget -qO-
http://twitter.com/statuses/user_timeline/$USER.xml?count=1 |
xmlstarlet select -T -t -v '//text'

Call it like…

./twitter-status.sh <em>twitterid</em>

It needs:


The Twitter API…for lulz

So do you have any interesting uses for twitter?

This shell script was mostly for proof of concept  and playing with the twitter api.  I find the ease of use and hack-abilty to be excellent whenever I can quickly and easily get data to and from a simple script.  Do you have any other neat shell scripts for twitter?

Share

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre user="" computer="" escaped="">