How to Tweet from Shell Script

Hi guys,
recently i turned to be an avid twitter user and i found that it is too difficult to open the browser or some other app to tweet every time.So i made a small shell script to tweet.I shared the code below.

#LICENSE : Just send a mail.I will be so happy if you do 😉

#coded by
user='<Your Twitter User Name>’;
pass='<Your Twitter Password>’;
mess=`zenity –title=”Enter the Tweet” –text=”Tweet Tweet Tweet ” –entry`;
if [ -z “$mess” ]
zenity –title=”Tweet Result” –timeout=3 –text=”Tweet canceled” –info;
curl –basic –user “$user:$pass” –data-ascii “status=$mess”;
zenity –title=”Tweet Result” –timeout=3 –text=”Successfully Tweeted” –info;

Just copy the code and save it as a shell file and just make shortcut of it to your desktop or run it at constant intervals with the help of sleep command.It really helps me tweet often.I used the “curl” tool to post the http request and found Zenity is quite handy for this purpose.

Screen shot :

BalaTwitSoon Screenshot

Happy tweeting.Your experiences are most welcomed 😉


2 thoughts on “How to Tweet from Shell Script

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s