Created
October 6, 2012 06:26
-
-
Save lincank/3844219 to your computer and use it in GitHub Desktop.
Get Your Router IP and your public IP with shell
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
# get internal ip of the router | |
netstat -rn | grep UG | |
# get your public ip | |
wget -q -O - checkip.dyndns.org | grep -Eo "([0-9\.]+)" | |
#get filesize using the command | |
curl -sI $url | grep Content-Length | cut -d ' ' -f 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment