Hi Jan,

Try this in the command line:

ifconfig | awk -F "HWaddr " '{ if ($2!="") print $2 }'


If you have more than one NIC you can <grep> the ifconfig output 
with something like this:

ifconfig | grep eth0 | awk -F "HWaddr " '{ if ($2!="") print $2 }'

HTH,
Pedro 


-----Original Message-----
From: Jan Engelhardt [mailto:[EMAIL PROTECTED] 
Sent: sexta-feira, 16 de Fevereiro de 2007 13:33
To: [email protected]
Subject: [opensuse] Grabbing MAC address of interface

Hello,


now the question may seem simple ("how to grab the MAC address of a 
given interface"), but what is actually a "portable" way that does not 
potentially break when upgrading to a newer openSUSE?

I could fiddle with `hwinfo --network` or try parse `ip l sh dev br0` 
output, but what's actually best? [Using sh.]


Jan
-- 
-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to