-6

Tip #264   MAC address conversion using only awk.


# awk 'BEGIN{FS=""}{for(i=1;i<=NF;i+=2){ r=r $i $(i+1)":"}}END{sub(/:$/,"",r);print r}' file