1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/csvformat.md

25 lines
488 B
Markdown
Raw Normal View History

2016-01-21 18:03:08 -05:00
# csvformat
> Convert a CSV file to a custom output format.
> Included in csvkit.
- Convert to a tab-delimited file (TSV):
2016-01-21 18:03:08 -05:00
`csvformat -T {{data.csv}}`
- Convert delimiters to a custom character:
`csvformat -D "{{custom_character}}" {{data.csv}}`
- Convert line endings to carriage return (^M) + line feed:
2016-01-21 18:03:08 -05:00
`csvformat -M "{{\r\n}}" {{data.csv}}`
- Minimize use of quote characters:
2016-01-21 18:03:08 -05:00
`csvformat -U 0 {{data.csv}}`
- Maximize use of quote characters:
2016-01-21 18:03:08 -05:00
`csvformat -U 1 {{data.csv}}`