Finding MAC address on apple Mac

LCD


Joined
Mar 6, 2009
Messages
1
Reaction score
0
Points
1
I am writing a widget and I want to be able to obtain the user's user name and mac address.

This bit of code works fine for finding the user name:

var userName = widget.system("/usr/bin/id -un", null).outputString;

But when I try to get the mac address using this bit of code:

var macAddress=widget.system('/sbin/ifconfig | grep "ether"', null).outputString;

macAddress is undefined.

Can anybody help me?

Thanks
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top