Jan Engelhardt wrote:
Hi,
21:39 ichi:~ > ifconfig lo lo Link 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 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0 RX bytes:108107 (105.5 Kb) TX bytes:108107 (105.5 Kb)

21:39 ichi:~ > LC_MESSAGES=de_DE ifconfig lo
lo Protokoll:Lokale Schleife inet Adresse:127.0.0.1 Maske: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 dropped:0 overruns:0 carrier:0
collisions:0 Sendewarteschlangenlänge:0 RX bytes:108107 (105.5 Kb) TX bytes:108107 (105.5 Kb)

As you can see:

          inet addr:127.0.0.1  Mask:255.0.0.0
          inet Adresse:127.0.0.1  Maske:255.0.0.0

and whoops, things like /bin/cut -b or head/tail --bytes are not
accurate anymore.



Jan
Hi again,

You could have shown an interface which actually has a hardware address ;-), but I get your point;
A grep for HWaddr is not valid since it changes name over different locales.

However, I still think something like:
/sbin/ifconfig [interface] | head -n1 | tail --bytes=20 | head --bytes=17

would always apply, since different locales does not change the position of the output of the address itself (as far as i know)
Hence it would always be 1. line, last 20 chars (-3 "empty" at the end).

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

Reply via email to