Skip to content

Instantly share code, notes, and snippets.

@buger
Created September 13, 2013 15:22
Show Gist options
  • Save buger/6552123 to your computer and use it in GitHub Desktop.
Save buger/6552123 to your computer and use it in GitHub Desktop.
Collection of useful code snipplets
# Get IP address of eth0 interface
ip -o -4 addr list eth0 | perl -n -e 'if (m{inet\s([\d\.]+)\/\d+\s}xms) { print $1 }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment