Juan C. Bravo Celis Juan C. Bravo Celis - 1 year ago 88
Linux Question

how to replace decimal in linux

I have a csv file with error in one field, the fields are separated by

but the error is in decimal field, for example
i need replace by

and replace by
is not option, others fields will modified.

Answer Source

Check that the character before ," is not a double quote, and if it's not, add the double quote:

sed 's/\([^"]\),"/\1","/'
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download