csvkitHow to change the delimiter in csvkit?
The delimiter in csvkit can be changed using the csvformat
command.
Example code
csvformat -D '|' input.csv > output.csv
This command will change the delimiter from the default comma (,
) to a pipe (|
) in the input.csv
file and save the output to output.csv
.
Code explanation
csvformat
: the command used to change the delimiter-D
: the flag used to specify the delimiter'|'
: the delimiter to be usedinput.csv
: the input fileoutput.csv
: the output file
Helpful links
More of Csvkit
- How to convert a tsv file to csv with csvkit?
- How to split a csv file with csvkit?
- How to select specific columns with csvkit?
- How to remove duplicates with csvkit?
- How to reorder columns with csvkit?
- How to convert JSON to CSV using csvkit?
- How to convert a csv file to tab delimited with csvkit?
- How to sort a csv file with csvkit?
- How to rename a column with csvkit?
- How to merge columns with csvkit?
See more codes...