The following works but I am sure ther must be a command :-

Ignore lo print first interface name plus ether address and ignore any that 
follow.
# ifconfig -a |grep -v lo | perl -ne 'if (/(^\w+0):\s+/) {print $1} if 
(/\s+ether(.*)/) { print $1."\n"; exit} '

Cheers.
 
 
This message posted from opensolaris.org
_______________________________________________
opensolaris-discuss mailing list
[email protected]

Reply via email to