Posted on

Tweet Using Bash

Yep, continuing the yesterday’s post about how to tweet via terminal, now, I’ll give you another example to tweet via terminal. It’s still using curl, but, now we’ll tweet by calling a file with bash command inside. It (still)looks cool, and you don’t have to type a looong command in terminal just to tweet (in a case you don’t like to memorize the looong command)😆 Use this script:

#!/bin/bash
read -p "Username: " username
stty -echo
read -p "Password: " password;echo
stty echo
read -p "Status: " status
curl -u $username:$password -d status="$status" http://twitter.com/statuses/update.xml 1> /dev/null
echo "Status updated! ;)"

Save and name it whatever-you-wish-to-name-it continued with sh extension, so it will be like “i-wish-to-name-it-like-this.sh”. After that, give this file ability to be run, with command “chmod +x i-wish-to-name-it-like-this.sh”. Then just try run “./i-wish-to-name-it-like-this.sh”.

It should look like this, when you’re try to run it:

About septoadhi

seru, seram, menggairahkan!!!

7 responses to “Tweet Using Bash

  1. tambahin alias biar lebih singkat
    1. Open terminal
    2. Bikin alias seperti di bawah
    alias tweet=”./i-wish-to-name-it-like-this.sh $1″

    OKE! saatnya mengetes dengan alias baru

    tweet “Testing alias, curl script and terminal tweeter !”

  2. Pingback: Tweets that mention Tweet Using Bash « Septo Adhi -- Topsy.com

  3. wi2d ⋅

    Kie kowe dolanan bash arep ge mendukung skripsimu po iseng-iseng berhadiah?

  4. wew, ngeri euy,
    maenannya bash, terminal, dan command
    nampaknya pas lulus jadi jagoan nih..😀

  5. septoadhi

    iyo sal, jelas, ahli nge-twit😆

  6. ejak

    Wah nais share ni mas, kebetulan aq ngajar pemrograman shell, jadi ntar mw q bagi2 ma yg laen, heheee

  7. burk

    it doesnt work anymore ha?

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s