This is an old revision of the document!
With 'curl':
curl ifconfig.me
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