shell scrip question
Hi guys,
How can I change the format of number less than 10 to be 2 digits by adding "0" ahead of it? I mean by shell script.
Say I have a file a.txt with below contents
a-1.7.3
bc.2.3.11
cde_3.12.9.20
How can I get b.txt with contents like below
a-01.07.03
bc.02.03.11
cde_03.12.09.20
The number can be quoted with period ".". dash "-" or underscire "_"