eBay / tsv-utils

eBay's TSV Utilities: Command line tools for large, tabular data files. Filtering, statistics, sampling, joins and more.
https://ebay.github.io/tsv-utils/
Boost Software License 1.0
1.43k stars 80 forks source link

tsv-filter field lists #259

Closed jondegenhardt closed 4 years ago

jondegenhardt commented 4 years ago

This PR adds field list support to tsv-filter. This allows multiple fields to be specified using the same filter. Examples:

$ # Ensure that fields 1-10 are not blank
$ tsv-filter --not-blank 1-10

$ # Ensure that fields 1, 3, and 5 are not zero.
$ tsv-filter --ne 1,3,5:0

$ # Ensure that fields 1-30 are not blank and not "NA"
tsv-filter --not-blank 1-30 --str-ne 1-30:'NA'

Field list support is already available in most of the other tools in the tsv-utils toolset.