csv2tsv

command module
v0.0.0-...-9e80811 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2023 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Csv2tsv converts comma-separated value (CSV) input to tab-separated value (TSV) output.

Usage:

csv2tsv [-c comment] [-o output] [-t tab] [file...]

Csv2tsv reads the named files, or else standard input, as comma-separated value data and prints that data in tab-separated form to standard output.

The -c flag specifies a comment character. Input lines beginning with this character will be elided.

The -o flag specifies the name of a file to write instead of using standard output.

The -t flag specifies a string to use in place of the tab character.

Before printing the data, csv2tsv replaces every newline or occurrence of the tab string with a single space.

Example

To print the second and fourth fields of a CSV file using awk:

csv2tsv data.csv | awk -F'\t' '{print $2, $4}'

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL