####################################################### Twitter # Usage: # # Twitter I am eating sushi right now # Twitter() { local USERNAME=myusername local PASSWORD=mypassword
# Verify that you have URI::Escape perl module. if perl -MURI::Escape -e exit; then true else echo "perl Module URI::Escape missing. You need to install it." 1>&2 return 1 fi
MESSAGE=$(echo -n "$@" | perl -MURI::Escape -ne 'print uri_escape( $_ )')
COMMAND="curl --basic --user $USERNAME:$PASSWORD --data-ascii status=$MESSAGE