https://github.com/adamdecaf/csvq
CLI tool to parse and transform CSV files
https://github.com/adamdecaf/csvq
cli csv csv-converter csv-files csv-transformer jq
Last synced: about 1 year ago
JSON representation
CLI tool to parse and transform CSV files
- Host: GitHub
- URL: https://github.com/adamdecaf/csvq
- Owner: adamdecaf
- License: apache-2.0
- Created: 2022-10-27T20:25:31.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-09-04T14:00:44.000Z (over 1 year ago)
- Last Synced: 2025-03-18T08:48:07.060Z (about 1 year ago)
- Topics: cli, csv, csv-converter, csv-files, csv-transformer, jq
- Language: Go
- Homepage: https://ashannon.us/csvq/
- Size: 1.57 MB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# csvq
[](https://godoc.org/github.com/adamdecaf/csvq)
[](https://github.com/adamdecaf/csvq/actions)
[](https://codecov.io/gh/adamdecaf/csvq)
[](https://goreportcard.com/report/github.com/adamdecaf/csvq)
[](https://raw.githubusercontent.com/adamdecaf/csvq/master/LICENSE)
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](https://github.com/adamdecaf/csvq/releases/latest).
## Usage
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
```
## Supported and tested platforms
- 64-bit Linux (Ubuntu, Debian), macOS, and Windows
## License
Apache License 2.0 - See [LICENSE](LICENSE) for details.