Simply prints out the IP address:
dig -4 TXT +short o-o.myaddr.l.google.com @ns1.google.com | sed 's/"//g'A solution that depends on akamai:
curl -s http://whatismyip.akamai.com/ \
| grep -E '^(\d|\.)+$' \
| xargs -I{} sh -c 'echo "IP: {}";