Created
May 23, 2014 06:35
-
-
Save daz/10010044378bf49224d5 to your computer and use it in GitHub Desktop.
grep and awk to get the local network IP from ifconfig
This file contains 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
ifconfig | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment