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?