Skip to content

Instantly share code, notes, and snippets.

@shallowlong
Created February 14, 2020 16:08
Show Gist options
  • Save shallowlong/c541eeeca08cd2e2156c4050c9c56f3c to your computer and use it in GitHub Desktop.
Save shallowlong/c541eeeca08cd2e2156c4050c9c56f3c to your computer and use it in GitHub Desktop.
ip addr show eth0 | grep inet | awk '{ print $2; }' | sed 's/\/.*$//'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment