Skip to content

Tag: command Line

A Command Line Twitter Client for you

You can have a command-line based tweeter!

type the following into /usr/bin/tweet

then type chmod +x /usr/bin/tweet (changing the username and password)

#!/bin/bash

#     This is a command line Twitter Client
#    Set Username and Password –user “<username>:<Password>”
#     Usage:  tweet “Content of Tweet up to 127 chars”

#    Shorten the String to just 126 Chars (just in case)
STATUS=$(echo $1 | awk ‘{print substr($0,1,126)}’)

curl -silent -o /dev/null –basic –user “Username:Password” –data-ascii “status=$STATUS” “http://twitter.com/statuses/update.json”