Re: GRabbing MAC address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]





On Thu, Feb 28, 2008 at 8:47 AM, Jerry Geis <geisj@xxxxxxxxxxxxxxx> wrote:
I am trying to grab the mac address for eth0 on centos 5.1 with

ifconfig | grep eth0 | cut -d ' ' -f 5 and I dont get anything.

What am I not doing right?

ifconfig | grep eth0 | cut -d ' ' -f 1 gives me eth0 but anything else
like -f 2, -f 3 etc
I get nothing.


ifconfig -a | awk '/eth0/ {print $5}'

should work even if eth0 is not 'UP'
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux