Twit
This is a very simple Twitter status message update client for the command-line. You can pipe text into this using a standard shell pipeline. You can also pass the status text as arguments to this script. The username and password can be stored in environment variables; passed on the command-line; or prompted interactively.
This is the simplest way to use this script:
twit -u my_username -p my_password This is a test status message.
This will prompt you for your password:
twit -u my_username This is a test status message.
This accepts text from a stdin pipeline. Here I echo a status message into the script:
echo "Hello status message" | twit -u my_username -p my_password
Note that by default `twit` will silently truncate your message at 140 characters. If you want to use this in a situation were you would rather catch and report oversized message, then you can specify the -r option. With the -r option `twit` will not send the message and will return with an exit code of 1. For example, this will be rejected:
twit -r -u my_username -p my_password This message is over 140 characters in length. It will be rejected and an exit code of 1 will be returned to the caller instead of the usual 0 exit code for success.