Run one Ruby snippet against the whole CSV input.
gem install dorian-csv-allAlso included in the aggregate gem:
gem install doriancsv-all [options] [file ...] "ruby code"Run csv-all -h for generated option details and csv-all -v for the installed version.
- Sets
itto the parsed CSV rows. With--headers, rows are exposed as structs keyed by header name.
echo a,b,c | csv-all "puts it.first[1]"Output:
b