tokuhirom
7/9/2009 - 8:03 AM

.bashrc

# put this in ~/.netrc
machine twitter.com
login USERNAME
password PASSWORD
# $ tweet Hi mom!
#
# Put this in ~/.bashrc or wherever.
# If it doesn't work, make sure your ~/.netrc is right
#
# (Thanks to @anildigital and @grundprinzip for curl-fu)

function tweet {
  curl -n -d status="$*" https://twitter.com/statuses/update.xml --insecure &> /dev/null
  echo "tweet'd"
}