Created
November 7, 2020 21:27
-
-
Save shebin512/de9a26724187408364be67060e095a01 to your computer and use it in GitHub Desktop.
Get IP details of your system
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 myip() { | |
curl http://icanhazip.com | |
ip addr | grep inet$IP | \ | |
cut -d"/" -f 1 | \ | |
grep -v 127\.0 | \ | |
grep -v \:\:1 | \ | |
awk '{$1=$1};1' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment