Created
April 5, 2019 19:09
-
-
Save cbejensen/61d752c93237c25dfac756c4bab7d086 to your computer and use it in GitHub Desktop.
Easily get and read your IP address
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
function ips | |
set eth (ipconfig getifaddr en0) | |
echo "Ethernet: $eth" | |
set wifi (ipconfig getifaddr en1) | |
echo "Wireless: $wifi" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is for fish shell specifically, but can obviously be translated to other shells as well. Output of running
ips
: