Make new file called whatismyip.sh
put the following in the file.
#!/bin/bash
echo Your external IP Address is:
wget http://Www.whatismyip.com -O - -o /dev/null | grep '
' | sed -r 's/WhatIsMyIP\.com \- //g' | sed -r 's/<\/TITLE>//g'
exit 0
chmod +x whatismyip.sh after you save the file and run it like so ./whatismyip.sh