分享一行获得t.cn短链接的bash命令

in 默认分类 with 0 comment

curl 'https://service.weibo.com/share/share.php?url=https://hunsh.net&title=1' |grep 'short_url ' | sed -r 's/.*(http\:.*) "./\1/g'

https://hunsh.net替换成自己想要的url就可以了
示例输出:
http://t.cn/A6wTNLis

Responses