Archives
-
展开 shorturl 的脚本
鉴于 bitly 从我们的正常视野消失,我刚刚写了一个脚本,从http://untr.im 扩展原始的URL, 内容如下: #!/bin/bash URL=$1 if [ -z "$URL" ] then echo “Usage : fullurl ” exit fi TS=`date +”%s”` FILE=/tmp/fullurl-$TS wget -q -O “$FILE” –post-data “url=$1″ http://untr.im/api/ajax/api awk -F ‘href=”‘ ‘{print $3}’ “$FILE” | awk -F ‘” rel=”‘ ‘{print $1}’ rm “$FILE”
Oct 13th, 2009 | Filed under 技术快餐