In this article I will show you a bunch of oneliners that return your external IP address.

One:
$ curl -s icanhazip.com
Two:
$ curl -s ip.appspot.com
Three:
$ curl -s whatismyip.org
OR:
$ wget -O - -q whatismyip.org
Four:
$ curl -s ifconfig.me
Sometimes you may need to get your IP address inside a bash script, so this commands are quite usefull.