Hi ,
I have a XML data file which has numbers with trailing zeroes.
<amount>100.000000</amount>
<amount>99.0000</amount>
<amount>100.000001</amount>
<amount>7.007000</amount>
<amount>98.100000</amount>
<amount>100.000000</amount>
I can eliminate all zeroes in places like (100.000000 and 99.0000) by saying
s/\.[0]*</</g
But am not able to get rid of the trailing zeroes on 7.007000 and 98.100000
The number of zeroes is variable. I am free to use AWK as well if it can be done using AWK.
Thanks
I have a XML data file which has numbers with trailing zeroes.
<amount>100.000000</amount>
<amount>99.0000</amount>
<amount>100.000001</amount>
<amount>7.007000</amount>
<amount>98.100000</amount>
<amount>100.000000</amount>
I can eliminate all zeroes in places like (100.000000 and 99.0000) by saying
s/\.[0]*</</g
But am not able to get rid of the trailing zeroes on 7.007000 and 98.100000
The number of zeroes is variable. I am free to use AWK as well if it can be done using AWK.
Thanks