Skip to content

Instantly share code, notes, and snippets.

@voyeg3r
Created March 27, 2010 10:52
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 voyeg3r/345929 to your computer and use it in GitHub Desktop.
Save voyeg3r/345929 to your computer and use it in GitHub Desktop.
encurtador de urls gnu
#!/usr/bin/env bash
# command line url-shorten
# by using ur1.ca
# $USER, Aug 2009
if [ -z $1 ];then
echo "insira a url a ser abreviada":
read URL
LONG=$URL
else
LONG=$1
fi
UR1='http://ur1.ca/'
/usr/bin/env curl -s $UR1 -d"longurl=$LONG"| sed -e '/Your ur1/!d;s: *::g;s:<[^>]*>::g;s:^.*Yourur1is\:h:h:;'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment