linux下查看公網ip

方法一:
curl http://iframe.ip138.com/ic.asp 2>/dev/null |grep '\[*\]' |cut -d "[" -f2 |cut -d "]" -f1

方法二:
w3m http://www.ip138.com/ip2city.asp
(沒有w3m,請先安裝,後執行)

方法三:
wget http://members.3322.org/dyndns/getip
cat getip

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章