dorian-csv-each
Run a Ruby snippet for each CSV row.
Install
gem install dorian-csv-eachAlso included in the aggregate gem:
gem install dorianUsage
csv-each [options] [file ...] "ruby code"Run csv-each -h for generated option details and csv-each -v for the installed version.
Notes
- Sets
itto each row array. With--headers,itis a struct keyed by header name.
Examples
Print the second column
echo a,b,c | csv-each "puts it[1]"Output:
b