MAC Address on Linux

Mark Talluto userev at canelasoftware.com
Sat Oct 9 12:42:48 EDT 2004


> On 10/8/04 3:45 PM, "Mark Talluto" <userev at canelasoftware.com> 
> wrote:
>
> > Thanks for the tip!  It worked like a charm.  Once I get the parsing 
> of
> > the returned data down, I'll update Ken with the Linux bit.
>
> Thanks, Mark! I'd appreciate that...
>

Ken,

Here is the snippet for finding the MAC Address on Linux.  I had to 
learn some basics on PCRE syntax.  Took a while, but was worth the 
knowledge.

case "Linux"
     if there is a file("/sbin/ifconfig") then
       put shell("/sbin/ifconfig") into temp
       get matchText(temp,"HWaddr[* ]([0-9A-Z:]*)",retVal)
     else
       return "An error has occured."
     end if
     break


-- 
Best regards,
Mark Talluto
http://www.canelasoftware.com


More information about the use-livecode mailing list