Created
July 11, 2013 13:52
-
-
Save ryran/5975615 to your computer and use it in GitHub Desktop.
Another tiny bash function for quickly showing local system IP addrs.
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
#!/bin/bash | |
# Simply prints non-127 ip addresses | |
function myips { | |
echo "$(hostname) IP addrs:" >&2 | |
ip a | awk '/inet / {if ($2 !~ /^127/) print " "$2}' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment