https://github.com/thehowl/cutcsv
cut, but for csv - the csv swiss army knife. Mirror of repository at https://zxq.co/rosa/cutcsv
https://github.com/thehowl/cutcsv
command-line command-line-tool csv csv-filter cut
Last synced: 3 months ago
JSON representation
cut, but for csv - the csv swiss army knife. Mirror of repository at https://zxq.co/rosa/cutcsv
- Host: GitHub
- URL: https://github.com/thehowl/cutcsv
- Owner: thehowl
- License: mit
- Created: 2022-04-21T17:45:50.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2025-11-13T10:35:53.000Z (4 months ago)
- Last Synced: 2025-11-13T12:19:47.000Z (4 months ago)
- Topics: command-line, command-line-tool, csv, csv-filter, cut
- Language: C
- Homepage:
- Size: 47.9 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- License: LICENSE
Awesome Lists containing this project
README
cutcsv - the csv swiss army knife (version 0.2.3)
Usage: cutcsv OPTION... [FILE...]
Print selected CSV fields from each specified FILE to standard output.
Select one or more fields using -c and/or -f. At least one must be selected.
With no FILE, or when FILE is -, read standard input.
-f Print the specified comma-separated list of fields or ranges
-c Select fields whose column name (value of the first line)
matches COLUMN.
-d Use CHAR as a delimiter (defaults to ',')
-D Use STRING as the output separator (in case of multiple fields).
Defaults to the input delimiter.
-r Skip one row from the top of the file (header).
-h Show this help message.
-v Be verbose
Each LIST is made up of one range, or many ranges separated by commas,
in a similar fashion to the UNIX 'cut' program.
Selected input is written in the same order that it is read, and is written
exactly once. Each range is one of:
N N'th field, counted from 1
N- from N'th field, to end of line
N-M from N'th to M'th (included) field
-M from first to M'th (included) field
https://zxq.co/rosa/cutcsv
Copyright (c) 2021-2022 Morgan Bazalgette under the MIT license
Installation:
Build script will work with gcc. There are no external dependencies.
Clone the repository, and run `./tool build`, then move the file to wherever
you want (`~/bin`, or `/usr/bin` typically.)