Created
January 12, 2021 09:34
-
-
Save surendharreddy/3bc601597fa5fa43d858676d337da585 to your computer and use it in GitHub Desktop.
Get my internal and external IP
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
| findme () { | |
| echo "Internal IP: $(ifconfig en0 inet | grep inet | awk '{print $2}')" | |
| echo "External IP: $(dig @resolver4.opendns.com myip.opendns.com +short)" | |
| } | |
| findme |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment