Skip to content

Instantly share code, notes, and snippets.

@sc137 sc137/makeTINY.sh
Created Mar 8, 2018

Embed
What would you like to do?
Get a tiny url from their api
#!/bin/sh
read -p "Enter the url to shorten: " URL
if [ ! -z $URL ]; then
shorty=`curl http://tinyurl.com/api-create.php?url=$URL`
echo $shorty
echo $shorty | pbcopy
echo "tinyurl copied to pasteboard"
else
echo "no URL entered"
fi
echo ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.