Geek Stuff
| Twitter'ing from the linux command line |
|
|
|
| Written by Frank Emmons |
| Wednesday, 05 August 2009 22:53 |
|
Got your console open and curl installed? Then tweet away with lightening fast speed by typing the following at the command line:
Substitute <twitter username here> for your twitter login and <twitter password here> for your twitter password and then press enter. When you look at your twitter page now - you can see just how 133t you are and now everybody else knows it. But that can get tiresome to type all that every time you feel the urge to tweet. That's why you can slap together a really simple bash script and let it do the grunt work for you.
I saved the bash script in /usr/bin as a file called 'tweet'. Then I made it executable by doing:
Again, substitute in your username and password. You might notice that the string to set your status is now "`echo $@|tr ' ' '+'`". That tells bash to grab whatever string that you pass to the command when calling your script and use it as your status update. Now to be quick on the draw with your tweets, all you have to type at the command line now is : 'tweet <unsert whatever updated status you want>'. |
| Last Updated on Wednesday, 05 August 2009 23:15 |