Skip to content

Instantly share code, notes, and snippets.

@sayham-sjb
Last active April 17, 2019 03:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sayham-sjb/5216295abef89e6b32b1fa701d1f95d6 to your computer and use it in GitHub Desktop.
Save sayham-sjb/5216295abef89e6b32b1fa701d1f95d6 to your computer and use it in GitHub Desktop.
Get your IP Address #txt
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