apt-get install cupsys-bsd
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.
Wednesday, March 25, 2009
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
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
Subscribe to:
Posts (Atom)