dorian-csv-map
Map CSV rows to a new CSV stream with Ruby.
Install
gem install dorian-csv-mapAlso included in the aggregate gem:
gem install dorianUsage
csv-map [options] [file ...] "ruby code"Run csv-map -h for generated option details and csv-map -v for the installed version.
Notes
- Mutate
itinside the snippet. With--headers, headers are preserved anditis a struct.
Examples
Uppercase one column
echo a,b,c | csv-map "it[1].upcase!"Output:
a,B,c