On Feb 16 2007 16:15, Sylvester Lykkehus wrote:
>> >
>> > I could fiddle with `hwinfo --network` or try parse `ip l sh dev br0`
>> > output, but what's actually best? [Using sh.]
>>
>> How about this?
>>
>> % cat /sys/class/net/eth?/address
Wonderul, many thanks.
> Or the long version:
> /sbin/ifconfig [interface] | grep HWaddr | tail --bytes=20 | head --bytes=17
^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
That is what I wanted to avoid because it will totally break when the locale
changes.
> This will work on other dists aswell, where as /sys/class/net/eth?/address
> does
> not exists on e.g. debian iirc.
Did you really need to mention the worst example!
(Anyway, even debian 3.1r4/2.6.8 has that sysfs file.)
Jan
--
ft: http://freshmeat.net/p/chaostables/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]