csv2tsv
CSV to tab-separated values converter
TLDR
Convert CSV to TSV
SYNOPSIS
csv2tsv [options] [file...]
DESCRIPTION
csv2tsv converts comma-separated values (CSV) files to tab-separated values (TSV) format. TSV is often easier to process with Unix tools like cut, awk, and sort since tabs are less common in data than commas.
The tool properly handles CSV quoting rules, preserving data integrity when fields contain commas, newlines, or quotes. Quoted fields are converted to unquoted TSV output where possible, with embedded tabs escaped if necessary.
csv2tsv is useful as a preprocessing step for CSV data before using standard Unix text processing tools, or for importing data into systems that prefer tab-delimited input.
PARAMETERS
FILE
Input CSV file(s). Uses stdin if not specified.-d CHAR, --delimiter CHAR
Input field delimiter (default: comma).--crlf
Handle Windows-style line endings.-h, --help
Display help information.-v, --version
Display version information.
CAVEATS
Fields containing literal tabs require special handling. Very large files are processed in streaming mode for memory efficiency. The tool assumes UTF-8 encoding unless specified otherwise. Malformed CSV may produce unexpected results.
HISTORY
csv2tsv was created as part of various Unix toolkits for CSV processing. It addresses the common need to convert between delimited formats while properly handling CSV quoting conventions that simpler tools like sed or tr cannot manage.
