csvq

csvq is a CLI package for parsing and transforming CSV files. This is useful because often trimming down a CSV file can make processing it easier.
Install
Download the latest release for your architecture.
You can install from source:
go install github.com/adamdecaf/csvq/cmd/csvq@latest
Usage
Extract the score and name, sort by highest score
cat scores.csv | csvq -keep score,name | sort -r
Extract first_name and last_name columns (in that order). Sort results.
csvq -keep first_name,last_name ~/Downloads/report.csv | sort -u
Change delimiter used in report.csv.
csvq -d';' user_id,dob,email ~/Downloads/report.csv
Output CSV columns in a table.
csvq -keep first_name,last_name -format table
Combine multiple files.
csvq -keep user_id,email ~/Downloads/report1.csv ~/Downloads/report2.csv
- 64-bit Linux (Ubuntu, Debian), macOS, and Windows
License
Apache License 2.0 - See LICENSE for details.