twitter script for linux

Well let me give you an interesting script i found on Tech Republic………..

Its how to Tweet from the command line using cURL, its very simple and to the point….just like a script should be
if [ $(echo "${tweet}" | wc -c) -gt 140 ]; then
echo "FATAL: The tweet is longer than 140 characters!"
exit 1
curl -k -u ${user}:${pass} -d status="${tweet}" >/dev/null 2>&1
if [ "$?" == "0" ]; then
echo "Successful tweet!"

to us it just type this
$ ~/bin/tweet "social server rules"
the only other thing to worry about is you have to escape “?”, “!” -> “?”, “!”

One Response to twitter script for linux

  1. Hi i am kavin, its my first occasion to commenting anyplace, when i read this article i thought i
    could also make comment due to this good post.