Skip to content

Instantly share code, notes, and snippets.

@jtickle
Created February 11, 2015 01:13
Show Gist options
  • Save jtickle/d5c324a9dd687845ad64 to your computer and use it in GitHub Desktop.
Save jtickle/d5c324a9dd687845ad64 to your computer and use it in GitHub Desktop.
Parses 'ip addr' and shows you what you are really looking for - IP per interface.
ip -o -4 addr | awk '/.* ([a-zA-Z0-9]+)/ {print $2 "\t" $4}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment