Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tpkn/filtercsv
CLI filters the contents of the csv file according to the filters from the another file.
https://github.com/tpkn/filtercsv
Last synced: 6 days ago
JSON representation
CLI filters the contents of the csv file according to the filters from the another file.
- Host: GitHub
- URL: https://github.com/tpkn/filtercsv
- Owner: tpkn
- Created: 2021-12-02T00:16:30.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-12-02T00:20:14.000Z (about 3 years ago)
- Last Synced: 2024-11-14T14:32:45.759Z (2 months ago)
- Language: Go
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# filtercsv
CLI filters the contents of the csv file according to the filters from the another file. Made to process big files by a lots of filters.
By default, the results include lines that match the filters. Add `--exclude` flag to exclude lines matching filters.
```text
+---------------------+---------------+------------------+
| | | |
+---------------------+---------------+------------------+
| ID,City | 901007 | ID,City |
| 901023,Chelyabinsk | 901055 | 901007,Habarovsk |
| 901019,Ekaterinburg | 999999 | 901055,Izhevsk |
| 901007,Habarovsk | | |
| 901055,Izhevsk | | |
| 901009,Kaliningrad | | |
| 901035,Krasnoyarsk | | |
+---------------------+---------------+------------------+
```## Usage
```shell
cat | filtercsv [-options] >
```## Options
```text
-i Source csv file path (if you are not satisfied with pipes)
-d Fields delimiter (default: ",")
-f, --filters File with a list of filters
-c, --column Column index (starting from 1)
-h, --skip-header Keep header intact (default: false)
-e, --exclude Inversed filtering (default: false)
--help Help
--cpu Max CPU cores (default: max)
-v, --version Print current version number
```