Many of the staff here at Plexus are on Twitter. While it's hard to explain to other people (micro-blogging?!?!), we've embraced it as a way to share information, see what each other are doing, and, in some cases, decide on lunch plans.
While perusing an especially interesting query on Twitter's search today, I came across a tweet about using Twitter from the command line. Being the computer nerd that I am, this intrigued me. I did some Google-ing and found a few entries from people who had written scripts to make this possible. The best explanation I found was here. He just wrote a simple shell script that used curl to post a status via Twitter's API.
The code is pretty simple.
curl --basic --user "<User>:<Password>" --data-ascii "status=`echo $@|tr ' ' '+'`" "http://twitter.com/statuses/update.json"
Just create a file with that line of code, replace the user and password with your account info, save the file as "twitter", put it in your /usr/local/bin directory (Mac), and make it executable. Now you can run the following line in Terminal to post your status:
twitter "Command line status updates FTW!"





Post a Comment