The project is in a healthy, maintained state
plucks each line of the csv input
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

dorian-csv-pluck

Select columns from CSV input.

Install

gem install dorian-csv-pluck

Also included in the aggregate gem:

gem install dorian

Usage

csv-pluck [options] key [key ...] [file ...]

Run csv-pluck -h for generated option details and csv-pluck -v for the installed version.

Notes

  • Keys can be zero-based column indexes or header names. --print-headers/-p includes a generated header row.

Examples

Print the second column

echo a,b,c | csv-pluck 1

Output:

b

Pluck by header

printf 'id,name\n1,Dorian\n' | csv-pluck name