Input file:
85CD3F1F:U5791.001.99B03HF-P1-C08:bpr06cd01dn:5:noneCI 10/100/1000Mbps Ethernet UTP 2-port
Desired output:
83C3D1F:U5791:001:99B03HF1:C08:bpr06cd01dn:5:noneCI 10/100/1000Mbps Ethernet UTP 2-port
Could someone assist with a substitution query. The idea is to replace the following first two characters "." and "-" ONLY to a ":"
This replaces the first occurance
sed 's/\./:/1' inputfile
Is there a method to replace the first two occurances in one hit.
Thanks
85CD3F1F:U5791.001.99B03HF-P1-C08:bpr06cd01dn:5:noneCI 10/100/1000Mbps Ethernet UTP 2-port
Desired output:
83C3D1F:U5791:001:99B03HF1:C08:bpr06cd01dn:5:noneCI 10/100/1000Mbps Ethernet UTP 2-port
Could someone assist with a substitution query. The idea is to replace the following first two characters "." and "-" ONLY to a ":"
This replaces the first occurance
sed 's/\./:/1' inputfile
Is there a method to replace the first two occurances in one hit.
Thanks