Skip to content

Instantly share code, notes, and snippets.

@dcb9
Last active June 6, 2016 08:50
Show Gist options
  • Save dcb9/cb79a52182cb496deefa to your computer and use it in GitHub Desktop.
Save dcb9/cb79a52182cb496deefa to your computer and use it in GitHub Desktop.
get WAN IP script using ip138
@dcb9
Copy link
Author

dcb9 commented Jun 6, 2016

curl -s http://1212.ip138.com/ic.asp | iconv -f gb2312 -t utf-8 | grep body | awk -F'>' '{print $3}' | awk -F'<' '{print $1}'

@dcb9
Copy link
Author

dcb9 commented Jun 6, 2016

curl ip.cn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment