A small expansion to the twitter script: Howto Twitter From the Command Line in Ubuntu!
You still just “twitter Im a dooche” to post your every though.. But you dont have to worry about posting a +140 character message..
bin/twitter
# Post to TwitterUser=””
Pass=””
Twitter_Length=140# Check msg length
text=$@if [ ${#text} -gt $Twitter_Length ]
then
echo Error – Twitter only allows $Twitter_Length charachters; you have ${#text}
exit 1
fi#Post it like its hot
curl -s –basic –user “$User:$Pass” –data-ascii “status=`echo $text|tr ‘ ‘ ‘+’`” “http://twitter.com/statuses/update.json” -o /dev/null
echo “Twittered ${#text} characters to $User”
Adds a check to the twitter script to see if the message length isnt too long, hides the curl output even more & gives an expanded final message.. You still need to slash your special characters like !,&,>,.. but there s no getting around that.