Created
December 6, 2015 21:27
-
-
Save ttlequals0/a26d5fe734a249175a1a to your computer and use it in GitHub Desktop.
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
ip addr |grep inet |grep 192 |awk {'print $2'} |sed 's/\/23//' | |
ip addr | grep 'inet' | grep -v inet6 | grep -vE '127\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | grep -o -E '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | head -1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment