Skip to content

Instantly share code, notes, and snippets.

@murarisumit
Created May 19, 2017 07:02
Show Gist options
  • Save murarisumit/4ecc928b8a81f68741dbb4317afa14e1 to your computer and use it in GitHub Desktop.
Save murarisumit/4ecc928b8a81f68741dbb4317afa14e1 to your computer and use it in GitHub Desktop.
List only ip address
ip addr ls eth0 | awk '/inet / {print $2}' | cut -d"/" -f1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment