On Thu, Feb 28, 2008 at 2:56 PM, Max Hetrick maxhetrick@verizon.net wrote:
Toby Bluhm wrote:
There's multiple spaces in the output that cut is hitting - use tr to reduce them.
ifconfig | grep eth0 | tr -s ' ' ' ' | cut -d ' ' -f 5
Or:
ifconfig | grep eth0 | cut -d ' ' -f 11
For the sed people, this should also work :
ifconfig | grep eth0 | sed -e "s/^.*HWaddr (.*)$/\1/"
Regards, Tim