Skip to content

kyanny/csvpick.rb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

csvpick.rb

Pick a column from a CSV file.

Usage

csvpick.rb -c COLUMN < file.csv

COLUMN is a column name or a 0-based index (negative indices are supported).

Examples

# By column name
csvpick.rb -c name < data.csv

# By index
csvpick.rb -c 0 < data.csv

# By negative index (last column)
csvpick.rb -c -1 < data.csv

Note

The first row is always consumed as a header. If the input has no header row, the first data row will be silently lost. Workaround: csvformat -H input.csv | csvpick.rb -c a

About

Pick a column from a CSV file

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages