Skip to content

Instantly share code, notes, and snippets.

@random-robbie
Created September 8, 2013 07:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save random-robbie/6482606 to your computer and use it in GitHub Desktop.
Save random-robbie/6482606 to your computer and use it in GitHub Desktop.
Tweet From Bash
#! /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