nuance

Since I have the memory of a goldfish, this will basically used to catalog/archive things so that I can use it as a reference. Maybe someone might find it helpful. It will mostly revolve around tech/linux stuff.

Friday, March 6, 2009

twitter from the command line using curl

#!/bin/bash

uid=""
pw=""
maxLen=140
tweet="$*"
len=${#tweet}
if [ ${#tweet} -gt $maxLen ]
then
   echo "Tweet too long"
   exit
fi

curl -u $uid:$pw -d status="$*" http://twitter.com/statuses/update.xml >
/dev/null 2>&1
if [  $? -ne 0 ]
then
   echo "failed to tweet"
else
   echo "Tweeted"
fi
Posted by danwald at 15:46
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ►  2014 (2)
    • ►  February (2)
  • ►  2013 (3)
    • ►  July (2)
    • ►  April (1)
  • ►  2012 (1)
    • ►  June (1)
  • ►  2011 (5)
    • ►  July (1)
    • ►  March (2)
    • ►  January (2)
  • ►  2010 (8)
    • ►  December (1)
    • ►  October (1)
    • ►  April (3)
    • ►  February (3)
  • ▼  2009 (11)
    • ►  November (1)
    • ►  October (1)
    • ►  September (1)
    • ►  August (1)
    • ►  May (1)
    • ▼  March (2)
      • acroread will not print to cups 'lpq unknown printer'
      • twitter from the command line using curl
    • ►  February (2)
    • ►  January (2)
  • ►  2008 (17)
    • ►  December (4)
    • ►  October (1)
    • ►  September (7)
    • ►  August (5)

About Me

danwald
View my complete profile
Awesome Inc. theme. Powered by Blogger.