finding local IP?

Ken Ray kray at
Tue Dec 21 13:20:56 EST 2004

On 12/21/04 3:14 AM, "Thierry Arbellot" <thierry.arbellot at> wrote:

> MacOS X
>      put replaceText(shell("/sbin/ifconfig en0 | head -3 | grep 'inet '
> | cut -d' ' -f 2"),"(\s|\(|\))","") into theIPAddress

I'd always used this:

     put shell("ipconfig getifaddr en0") into tIPAddress
     if tIPAddress contains "failure" then put "" into tIPAddress

I guess there's more than one way to skin a cat...


Ken Ray
Sons of Thunder Software
Web site:
Email: kray at

More information about the use-livecode mailing list