Using wget
wget -q -O – checkip.dyndns.org|sed -e ‘s/.*Current IP Address: //’ -e ‘s/<.*$//’
Using curl
curl -s checkip.dyndns.org|sed -e ‘s/.*Current IP Address: //’ -e ‘s/<.*$//’
curl -s http://whatismyip.org/
Using Lynx
lynx -dump checkip.dyndns.org
lynx -dump www.whatismyip.com | grep ‘Your IP’
Crédito : http://go2linux.garron.me/what-is-my-public-ip-address-with-linux
Deixe um comentário