On Tuesday, January 6, 2004, at 09:57 PM, Stephan Hochhaus <[EMAIL PROTECTED]> wrote:

Is there a way to read out my WAN IP address in Mac OS X (maybe extract it from
a logfile) and write it to a file?

FWIW, I use http://checkip.dyndns.org/ for this purpose; its output is easy to parse. I do it with a small shell script:


#!/bin/sh
# hostip - print WAN-side IP address
wget -O - http://checkip.dyndns.org/ 2>/dev/null | sed '1s/[^0-9.]//g'

I am sorry if this is too basic a question, I just started my long journey to
become a Perl monger.

Don't worry; basic questions are fine. In fact, I like to see basic questions because they're much easier to answer. :-)


HTH,

Paul.

--
Paul Hoffman :: Taubman Medical Library :: Univ. of Michigan
[EMAIL PROTECTED] :: [EMAIL PROTECTED] :: http://www.nkuitse.com/



Reply via email to