Skip to content

Instantly share code, notes, and snippets.

@rogersguedes
Last active November 11, 2015 14:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rogersguedes/509d78ed1541e604eb8a to your computer and use it in GitHub Desktop.
Save rogersguedes/509d78ed1541e604eb8a to your computer and use it in GitHub Desktop.
Get the eth0 ip
ip addr|grep -i "eth0:" -A2|grep "inet"|sed "s/^\s*inet\s\([0-9\.]\+\).*/\1/ig"|tr -d "\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment