[CentOS] GRabbing MAC address

Stephen Harris lists at spuddy.org
Thu Feb 28 14:39:54 UTC 2008


On Thu, Feb 28, 2008 at 08:56:49AM -0500, Max Hetrick wrote:
> Toby Bluhm wrote:
> > ifconfig | grep eth0 | tr -s ' ' ' ' | cut -d ' ' -f 5
> ifconfig | grep eth0 | cut -d ' ' -f 11

ifconfig | sed -n 's/^eth0.*HWaddr \([^ ]*\).*$/\1/p'

-- 

rgds
Stephen



More information about the CentOS mailing list