I went to the terminal, dialed ifconfig . At the exit I have information on adapters in the system. I need to get a mac address. In the output from ipconfig I see a representation of the form 00:1e:ec... , and I need a tenth representation. How do i get it?

  • But why do you need a decimal representation of the MAC address, if not a secret?) so you can write a script on analysis .. - BaZZiliO 1

1 answer 1

like so

 a=`ifconfig eth0|grep HW |awk '{print $5}'|tr -d ':'`; echo $((0x$a))