Skip to content

Instantly share code, notes, and snippets.

@dcb9
Created April 2, 2015 09:02
Show Gist options
  • Save dcb9/45b6fa16e8f0d35cb556 to your computer and use it in GitHub Desktop.
Save dcb9/45b6fa16e8f0d35cb556 to your computer and use it in GitHub Desktop.
获取本机的外网出口IP是多少
curl http://1111.ip138.com/ic.asp 2>/dev/null | grep '\[' | awk -F'[' '{print $2}' | awk -F']' '{print $1}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment