Created
September 8, 2013 07:14
-
-
Save random-robbie/6482606 to your computer and use it in GitHub Desktop.
Tweet From Bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# tweet | |
# | |
# This script sends tweets | |
# Use: | |
# tweet "String to be tweeted" | |
# Special characters may not be used if your string is not delimited by quotes | |
# | |
# Author: San Bergmans | |
# www.sbprojects.com | |
# | |
# Configuration variables | |
TWIT_USER="" | |
TWIT_SECRET="" | |
# Other variables | |
TWIT_URL="http://api.supertweet.net/1.1/statuses/update.json" | |
TWEET=$(echo "$*"|cut -c -140) | |
curl -u $TWIT_USER:$TWIT_SECRET -d "status=$TWEET" $TWIT_URL -s > /dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment