Re: [opensuse] Grabbing MAC address of interface

2007-02-17 Thread Jan Engelhardt
On Feb 16 2007 23:04, Sylvester Lykkehus wrote: Jan Engelhardt wrote: Hi, 21:39 ichi:~ ifconfig lo loLink encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 [...] You could have shown an interface which actually has a hardware address ;-) ifconfig is broken. Heck, it

Re: [opensuse] Grabbing MAC address of interface

2007-02-17 Thread Alexey Eremenko
Please explain what you mean by portable ? from SUSE to other SUSE, from SUSE to Debian or from SUSE to Windows XP ? -Alexey -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

[opensuse] Grabbing MAC address of interface

2007-02-16 Thread Jan Engelhardt
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

Re: [opensuse] Grabbing MAC address of interface

2007-02-16 Thread eshsf
Hello, On Fri, 16 Feb 2007 14:33:12 +0100 (MET) Jan Engelhardt [EMAIL PROTECTED] wrote: 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?

Re: [opensuse] Grabbing MAC address of interface

2007-02-16 Thread Sylvester Lykkehus
eshsf wrote: Hello, On Fri, 16 Feb 2007 14:33:12 +0100 (MET) Jan Engelhardt [EMAIL PROTECTED] wrote: 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

RE: [opensuse] Grabbing MAC address of interface

2007-02-16 Thread Pedro Marques
: Jan Engelhardt [mailto:[EMAIL PROTECTED] Sent: sexta-feira, 16 de Fevereiro de 2007 13:33 To: opensuse@opensuse.org 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

Re: [opensuse] Grabbing MAC address of interface

2007-02-16 Thread Jan Engelhardt
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

Re: [opensuse] Grabbing MAC address of interface

2007-02-16 Thread Sylvester Lykkehus
Jan Engelhardt wrote: 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

Re: [opensuse] Grabbing MAC address of interface

2007-02-16 Thread Jan Engelhardt
Hi, On Feb 16 2007 21:16, Sylvester Lykkehus wrote: 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. How could a locale change break a grep for

Re: [opensuse] Grabbing MAC address of interface

2007-02-16 Thread Sylvester Lykkehus
Jan Engelhardt wrote: Hi, 21:39 ichi:~ ifconfig lo loLink encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:838 errors:0 dropped:0 overruns:0 frame:0 TX packets:838 errors:0

Re: [opensuse] Grabbing MAC address of interface

2007-02-16 Thread Randall R Schulz
On Friday 16 February 2007 12:40, Jan Engelhardt wrote: Hi, ... How could a locale change break a grep for HWaddr ? ... 21:39 ichi:~ ifconfig lo loLink encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 ... 21:39 ichi:~ LC_MESSAGES=de_DE ifconfig