Here is my "sendtweet.sh" script:
------------------------------------------------------
#!/bin/bash
if [ ! $1 ]
then
echo "Send Tweet. Usage:"
echo "$0 message"
echo
echo "This $0 script sends twitter status updates"
echo
echo "Make sure you escape anything but alphanumerics"
echo
exit
fi
curl -u twitter_username:twitter_password -d status="$*" http://twitter.com/statuses/update.xml
------------------------------------------------------
The if look is just to prevent me from doing anything stupid. You have to escape anything but alphanumerics, so usage is like:
sendtweet.sh Cool\, I\'m sending tweets from bash\!\!\!
Thought you all would enjoy that ;)
No comments:
Post a Comment