Last active
April 17, 2019 03:46
-
-
Save sayham-sjb/5216295abef89e6b32b1fa701d1f95d6 to your computer and use it in GitHub Desktop.
Get your IP Address #txt
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
echo `ifconfig $(netstat -nr | grep -e default -e "^0\.0\.0\.0" | head -1 | awk '{print $NF}') | grep -e "inet " | sed -e 's/.*inet //' -e 's/ .*//' -e 's/.*\://'` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment