Created
September 13, 2013 15:22
-
-
Save buger/6552123 to your computer and use it in GitHub Desktop.
Collection of useful code snipplets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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