This is a short tutorial explaining how to post to Twitter using command-line in Linux, without needing to even open up your web browser. |
First, install the curl package: sudo apt-get install curl Next, create a script anywhere in your $PATH, for example twitter.sh inside ~/bin, where ~ is your home directory (make sure ~/bin is included in your $PATHvariable, in case echo $PATH doesn't return it, edit~/.bashrc and add a line like this: export PATH=/home/USER/bin/:$PATH). The script twitter.sh should contain the following: #!/bin/bash curl -u USER:PASS -d status="$*" http://twitter.com/statuses/update.xml > /dev/null echo "Message sent!" Replace USER and PASS with your Twitter username and password, and then make the script executable: chmod 755 ~/bin/twitter.sh And now test it: twitter.sh Hello, world! This is a test. So just use it as: twitter.sh YOUR MESSAGE |
About Me
![My photo](http://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT4GZx7EorHj1VVz66Na-KFaV89VLywCY3c3kV6dBhxnGf70aqwVRSEaeXKlw6gAfVrT2XmT6c0W74PE3lbi1Rff2B38T9FLvhQq07st0N_FGozpYgTpABOW53To_P-A/s113/me.jpg)
- Kalyan Kumar Pasupuleti
- Kalyan Kumar Pasupuleti B-Tech(Information Technology). • AWS Certified Solutions Architect - Associate • RedHat Certified Engineer(RHCE) • Directory Services and Authentication Certificate of Expertise(LDAP) • Red Hat SELinux Policy Administration Certificate of Expertise(SELinux) • Network Services Security Certificate of Expertise (Network Services) • RedHat Certified Virtualization Administrator(RHCVA) • Red Hat Certified Security Specialist (RHCSS) Working as Cloud DevOps engineer
Thursday, April 28, 2011
Tweeting through Terminal (Ubuntu)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment