|
Trimmng leading 0's from amount fields
Hi
I need to remove leading zeros if that filed is amount filed and trimmimg leading and trailing spaces
U | U|1999-01-01|000004384|000002192|0000000000000000.0000|0000000000000000.0000| U|XXX|0000000000000685.5800| FIXED |U
Tried with this command ,I am not getting expected o/p
sed -e 's/ *|/|/g' -e 's/[ ]*^//g' -e 's/|00*\/|0\./g' file
o/p
U|U|1999-01-01|000004384|000002192|0.0000|0.0000|U|XXX|685.5800|FIXED|U
Thanks in advance
Mohan
|