I have a list of mac addresses in this format:
412010000018
412010000026
412010000034
I want this output:
41:20:10:00:00:18
41:20:10:00:00:26
41:20:10:00:00:34
I tried this, but did not work:
sed 's/([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/\1:\2:\3:\4/g' mac_list
How should I do it?
This might work for you (GNU sed):
sed 's/..\B/&:/g' file
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With