现在的位置: 首页 > 综合 > 正文

Linux shell 获取本机公网地址

2012年05月12日 ⁄ 综合 ⁄ 共 165字 ⁄ 字号 评论关闭
curl -s www.ip138.com/ip2city.asp | iconv  -f gbk -t utf8|grep -Po '(?<=\[).*?(?=\])'
curl -x 127.0.0.1:8087 -s www.ip138.com/ip2city.asp | iconv -f gbk -t utf8|grep -Po '(?<=\[).*?(?=\])'

 

抱歉!评论已关闭.