Tweeting from Shell using Twitter API
Twitter’s API is easy to use:
curl -u username:password -d status="Tweeting msg" http://twitter.com/statuses/update.xml
or
curl -u username -d status="Tweeting msg" http://twitter.com/statuses/update.xml
Then type in password.
I have written a script twitter:
#!/bin/bash username=USERNAME password=PASSWORD curl -u $username:$password -d status="$*" http://twitter.com/statuses/update.xml
Change the USERNAME and PASSWORD to the account’s username and password. Then put this script into ~/bin/ and add x mod to it by:
$ chmod +x ~/bin/twitter
When tweeting:
$ twitter Tweeting message is here
Enjoy it!