Here are 2 ways, to determine your public IP address using curl, sed and
grep. I recommend using the second one.
curl -s www.wieistmeineip.de | grep class=\"ip\" | sed -r 's#(.*>)(.*)(<.*)#\2#'
curl -s checkip.dyndns.org | sed -r 's#(.*: )([0-9.]*)(<.*)#\2#'