csvformat -D '|' data.csv

Category: Data Science & Analysis

csvformat -D '|' data.csv

Convert a CSV to pipe-delimited output

The -D flag sets a custom output delimiter, here the pipe character, producing pipe-delimited text. Delimiters inside quoted fields are preserved correctly because csvformat rewrites quoting as needed. This is handy for formats that must not contain commas, such as certain report exports. The -T flag is the shortcut for the tab variant.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.