public
Last active

encurtador de urls gnu

  • Download Gist
gistfile1.sh
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#!/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:;'

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.