Home > other >  Replace CSV delimiter by pipe character
Replace CSV delimiter by pipe character

Time:11-25

I need to change CSV delimiter -> ',' (comma) to '|' (pipe).

I'm not able to blindly replace all comma characters by pipe character since some values contain comma characters.

Any ideas?

CodePudding user response:

Use csvkit, you can change your delimiter safely:

https://csvkit.readthedocs.io/en/latest/

csvformat -D '[your delimiter here]' [file name]
  • Related