This is an old revision of the document!
dig +short myip.opendns.com @resolver1.opendns.com
or
dig TXT +short o-o.myaddr.l.google.com @ns1.google.com
host myip.opendns.com resolver1.opendns.com
curl ifconfig.me
or
curl ipinfo.io/ip
Using the 'lynx' text web browser:
lynx --dump http://www.whatismyip.com/ | grep -o '[0-9].*\.[0-9].*\.[0-9].*\.[0-9].*' -m1
or
elinks --dump http://www.whatismyip.com/ | grep -o '[0-9].*\.[0-9].*\.[0-9].*\.[0-9].*' -m1