Skip to content

Instantly share code, notes, and snippets.

@georgefs
Last active December 20, 2015 17:49
Show Gist options
  • Select an option

  • Save georgefs/6171288 to your computer and use it in GitHub Desktop.

Select an option

Save georgefs/6171288 to your computer and use it in GitHub Desktop.
linux 查對外ip
function myip {
result=`wget -qO- http://myip.is/|grep "The IP used to connect to this webserver is "|sed 's/The IP used to connect to this webserver is//'`
echo $result
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment