LinuxCommandLibrary

csvtool

Utility to filter and extract data from CSV formatted sources.

TLDR

Extract the second column from a CSV file

$ csvtool --column [2] [path/to/file.csv]
copy


Extract the second and fourth columns from a CSV file
$ csvtool --column [2,4] [path/to/file.csv]
copy


Extract lines from a CSV file where the second column exactly matches 'Foo'
$ csvtool --column [2] --search '[^Foo$]' [path/to/file.csv]
copy


Extract lines from a CSV file where the second column starts with 'Bar'
$ csvtool --column [2] --search '[^Bar]' [path/to/file.csv]
copy


Find lines in a CSV file where the second column ends with 'Baz' and then extract the third and sixth columns
$ csvtool --column [2] --search '[Baz$]' [path/to/file.csv] | csvtool --no-header --column [3,6]
copy

SYNOPSIS

csvtool [options] command [command-args] input.csv...

DESCRIPTION

This manual page documents briefly the csvtool command.

This manual page was written for the Debian distribution because the original program does not have a manual page. Instead, it has documentation accessible with the --help option.

csvtool is a tool for performing manipulations on CSV files from shell scripts.

OPTIONS

-help --help

Show help.

COPYRIGHT


Copyright © 2008 Stephane Glondu

AUTHOR

This manual page was written by Stephane Glondu <steph@glondu.net> for the Debian system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation.

On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.

Copied to clipboard