/ Published in: Bash
Use wget and sed to get your public IP adress (instead of firing up firefox and visting whatismyip.com). Usefull in scripts where you need your public IP adres.
There are probably better ways, maybe even a GNUtool that I missed?
There are probably better ways, maybe even a GNUtool that I missed?
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
wget --quit -O - checkip.dyndns.org | sed -e 's/[^:]*: //' -e 's/<.*$//'
URL: http://www.go2linux.org/what-is-my-public-ip-address-with-linux