adding zero's

Hi
I am comparing two files, 100th column have formatting issue
i mean 1 file have scale 4 and anothe file scale 2 ,if scale 2 need to add two zeros.Please any idea how to add two zers to 100th coulmn if scale is 2

file 1
.................1234.2000

file2

................1234.20

Thanks,
MR

> x1=1234.20
> echo $x1
1234.20
> echo $(printf "%.4f" "$x1")
1234.2000

something else to think about

> x2=1234.2000
> x3=$(echo "$x1"-"$x2" | bc)
> echo $x3
0

Perhaps one of these approaches will help you.

Hi
Thanks for your reply .when comparing two files this 100th filed giving differences due to formatting issue .Is there any way to achive using sed or awk

Thanks in advance
MR

Force awk to compare the string numerically...

echo 1234.2000 | awk '{print $0+0}'
1234.2
echo 1234.20 | awk '{print $0+0}'
1234.2