- Home
- Contact
-
Articles / Code
- HTML/CSS (2)
-
Scripts (17)
- Twitter & bash
- Generate sitemaps
- random floating point in bash
- Gmail script
- Python http POST requests
- Bashrc enhancements
- commandline <> nautilus
- Word Definitions
- Synonyms
- mysqld monitor
- remote server
- links and emailaddresses
- Apache Analyser
- remote ipaddress
- OOP Python
- mysql tuning
- diskspace notification
- Server Configuration (6)
- ICT-security (2)
Twitter & bash
» Articles / Code » Scripts » Twitter & bash
Using twitter is not really one of my hobbies, but sometimes it can be usefull to leave a message.
So I wrote this little function that writes someting to my twitter account.
Add this to your .bashrc file
twit ()
{ a=$@
curl -u username:password -d status="$a" http://twitter.com/statuses/update.xml >/dev/null 2>&1
}
So in order to post a message, simply type somthing like twit hi everyone
or if you are really lazy (like me) automatically post a 'fortune' like this:
twit `fortune -n140`
(and don't tell anyone i use Cronjob to post my messages ;)
Next week I'll try to make a scipt that uses Markov-chains and and creates messages based on a collection of twitter accounts. Then we'll see if a thousand monkeys actually are capable of writing a novel :)