Finding the Public IP address in a shell script
curl ifconfig.me
curl ifconfig.me/ip
(for just the ip)
curl ifconfig.me/all
(for more info, takes time)
For more commands visit: http://ifconfig.me/#cli_wrap
You can request myip.opendns.com
. from OpenDNS. dig @208.67.222.220 myip.opendns.com