-
-
Save 2bj/122554 to your computer and use it in GitHub Desktop.
bash client for www.hi.kg (URL shorter)
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
#!/usr/bin/env bash | |
# bash client for www.hi.kg (URL shorter) | |
# @author 2bj (dev2bj at gmail) | |
# @todo: | |
# - add error exceptions | |
if [ $# -ne 1 ] | |
then | |
echo 'hey, give me URL' | |
exit | |
fi | |
r=`curl -A Googlebot -s -d url=$1 http://hi.kg/ | grep '<h1>' | tr -d '\011' | sed 's@</\?h1>@@g'` | |
echo ----------------------- | |
echo "short: $r" | |
echo ----------------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment