Tweet from command line
June 3, 2009
I came across this article Twittering from the Command Line. I found that it is interesting, so I decide to share with you.

Code:
#!/bin/sh
user="your_username"
pass="your_password"
curl="/usr/bin/curl"
$curl --basic --user "$user:$pass" --data-ascii \
"status=`echo $@ | tr ' ' '+'`" \
"http://twitter.com/statuses/update.json" > /dev/null 2>&1
exit 0
Usage:
./twitter.sh It is a beautiful day!
I modified the script a bit, so it will not output “junks”, after you update your status. At the end of day, it is a very short shell script and it lets you to update statuses only, but it is fun!
Entry Filed under: main. .
Trackback this post | Subscribe to the comments via RSS Feed