Skip to content

Instantly share code, notes, and snippets.

@lincank
Created October 6, 2012 06:26
Show Gist options
  • Save lincank/3844219 to your computer and use it in GitHub Desktop.
Save lincank/3844219 to your computer and use it in GitHub Desktop.
Get Your Router IP and your public IP with shell
# 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