Register
It is currently Sun Sep 21, 2014 12:03 am

tweet, a bash Twitter - tweeter.


All times are UTC - 6 hours


Post new topic Reply to topic  [ 1 post ] 
Author Message
 PostPosted: Thu Mar 11, 2010 2:50 pm   
Site Admin
User avatar

Joined: Sun May 15, 2005 9:36 pm
Posts: 667
Location: Des Moines, Iowa
Follow me on my twitter account: http://twitter.com/bashscripts

Tweet from your bash shell.
Change USERNAME and PASSWORD of course ;)

Code:
#!/bin/bash                                                                                                                 
# tweet. Crouse's bash tweeter for twitter.                                                                                 
read -p "Enter Your Tweet: " TWEET           
countme()
{
    count=`echo "$TWEET" | wc -m`;
    [[ $count -gt 140 ]] && echo "Tweet is $count characters, the maximum is 140 characters! Your TWEET was NOT sent!" && exit
}
countme
echo "SENDING ...."
curl -u USERNAME:PASSWORD -d status="$TWEET" http://twitter.com/statuses/update.xml -o /dev/null
echo "SUCCESS ! Your tweet was tweeted."
exit 0



Top
 Profile WWW  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP