[X-Unix] Re: My ip address

lj Palmer darwin at ljsworld.com
Thu Feb 17 16:40:08 PST 2005


On Feb 17, 2005, at 15:36, Craig wrote:

>
> On Feb 17, 2005, at 2:02 AM, Peter Dyballa wrote:
>
> here's two that rely on the whatismyip.com website:
>
> #using lynx --dump:
> url="whatismyip.com"
> /sw/bin/lynx --nocolor --dump $url | head -10 |  grep "Your IP" |  awk 
> '{print $4}'
>
> # using curl:
> curl -s "http://whatismyip.com" | grep "Your IP" | awk '{print $4}'

This shows the IP seen from the outside of your network, which may not 
be the one used by your machine on your local network. The original 
question was for the local IP address. However this is a great for 
seeing what your external address is.
..lj



More information about the X-Unix mailing list