Hi,
I have numerous files which have data in the following format
I want to remove decimal point only if it is last character in a number.
O/p should be
I tried this
Problem with above is that it removes the '.' for Mr.
Also I want to remove '.' for last field in second line 45. should be 45
Basically any numeric filed which has a decimal but no number after decimal, should have decimal point removed
Thanks
I have numerous files which have data in the following format
Code:
A|B|123.|Mr.|45.66|33|zz
L|16.|33.45|AC.|45.
O/p should be
Code:
A|B|123|Mr.|45.66|33|zz
L|16|33.45|AC.|45
Code:
sed -e 's/.|/|/g'
Also I want to remove '.' for last field in second line 45. should be 45
Basically any numeric filed which has a decimal but no number after decimal, should have decimal point removed
Thanks