grabbing the mac address from ifconfig output

It's lowercased because it just seems better that way.

ifconfig eth0 | grep HWaddr |awk '{print$5}' | sed 's/:/-/g' | tr [:upper:] [:lower:]

French lessons are progressing.

D

Comments

thegrit said…
Updated for Fedora 23! Replace with your correct interface name!

ifconfig wlp4s0 | grep ether |awk '{print$2}' | sed 's/:/-/g' | tr [:upper:] [:lower:]

Popular Posts