Last active
December 22, 2015 01:49
-
-
Save sigwo/6399471 to your computer and use it in GitHub Desktop.
Send a tweet from CLI using Linux.
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 | |
# | |
# Script by Steven Grove (@sigwo) | |
# www.sigwo.com | |
# | |
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |
# THE SOFTWARE. | |
# Configuration variables | |
TWIT_USER="YOURTWITTERUSERNAME" | |
TWIT_SECRET="YOURSUPERTWEETPASSWORD" | |
# 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