Get Your Public IP Address with WGET
-
Once in a great while some crazy person built the server that you are working on and curl is not available, but you still need to pull your public IP from an external source. On that rare occasion when you have wget but not curl, which we faced just the other day, you can just do this:
wget http://ipecho.net/plain -O - -q ; echo
-
@scottalanmiller said in Get Your Public IP Address with WGET:
Once in a great while some crazy person built the server that you are working on and curl is not available, but you still need to pull your public IP from an external source. On that rare occasion when you have wget but not curl, which we faced just the other day, you can just do this:
wget http://ipecho.net/plain -O - -q ; echo
I can confirm that this works in Windows from bash.
-
A bit shorter
wget -qO- icanhazip.com