Searching around I found few ways to do that while using Linux console. Upon entering the script , the prompt will return the public IP address
~$ wget -qO- whatismyip.org && echo
~$ wget -q -O - whatismyip.org;echo
~$ wget -q -O - checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//'
~$ wget -qO- whatismyip.org && echo
~$ wget -q -O - whatismyip.org;echo
~$ wget -q -O - checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//'