ifconfig | grep netmask | grep -v 127.0.0.1 | awk '{printf "IP: %s\n", $2 }' # Find the IP address the world sees me as. # This will use setproxy that was downloaded from the internet to fill in environment # varialbes so that curl will work when a proxy is being used. # http://www.bl0rg.net/software/frucht/ if [ -x /usr/local/bin/setproxy ] ; then eval `/usr/local/bin/setproxy` fi curl -s http://checkip.dyndns.org/ | sed 's/[a-zA-Z<>/ :]//g' | \ awk ' { sExt = "External IP"; sExtIP = $0; iExt = length(sExtIP); if (iExt > 0) { printf("Ex: %-21s\n", sExtIP); } } '