tEcHrAjEsH's sPaCe

my life within and outside computers…

Tweet via linux terminal : the geek way

Do you work most of the time via terminal? Do you hardlay get chance to switch to GUI from CLI?  Do you want to look like geek working in terminal even to tweet ur posts? Yes, there is a way now to do it. Below is a step by step instruction on how to do that:

Install a package called Curl (for Debian/Ubuntu) with the command

sudo apt-get install curl

Then, create a file named ‘twitter’ in /usr/bin using the command.

gedit /usr/bin/twitter

Now in the file ‘twitter’, paste the below code by replacing yourusername and yourpassword with your actual twitter username and password respectively.

curl –basic –user “yourusername:yourpasswd” –data-ascii “status=`echo $@|tr ‘ ‘ ‘+’`” “http://twitter.com/statuses/update.json” -o /dev/null; echo Message Sent!

Now give the file executable permission by using the command:

sudo chmod +x /usr/bin/twitter

Thats it. You’re done. Just start tweeting now in the command line by typing twitter{space}{your message}

My first command like tweet reads like:

techrajesh@techrajesh-laptop:~$ twitter my first command line tweet! For command line tweeting, vist www.techrajesh.wordpress.com

What did your first command line tweet read like?

June 21, 2009 Posted by | How to, Social Engineering, Tips and Tricks, Ubuntu | , , , , | 2 Comments

   

Follow

Get every new post delivered to your Inbox.