LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

tsv-filter

Filter TSV files by column values

TLDR

Filter by column value
$ tsv-filter --eq [1]:[value] [file.tsv]
copy
Greater than
$ tsv-filter --gt [2]:[100] [file.tsv]
copy
String contains
$ tsv-filter --str-in-fld [1]:[pattern] [file.tsv]
copy
Multiple conditions
$ tsv-filter --ge [2]:[10] --le [2]:[100] [file.tsv]
copy
Invert filter
$ tsv-filter --invert --eq [1]:[value] [file.tsv]
copy

SYNOPSIS

tsv-filter [--eq col:val] [--gt col:val] [options] [file]

DESCRIPTION

tsv-filter selects rows from tab-separated value files based on column conditions. It supports both numeric comparisons (equal, greater than, less than) and string operations (contains, exact match), allowing precise filtering of structured data.Multiple conditions can be combined, and they are joined with AND logic by default — all conditions must match for a row to be included. The --invert flag reverses the selection to output non-matching rows instead.Part of the tsv-utils suite, tsv-filter is written in D for high performance on large datasets. Column numbers are 1-based, and the -H flag enables header-aware processing.

PARAMETERS

--eq COL:VAL

Equal to value.
--gt COL:VAL
Greater than.
--lt COL:VAL
Less than.
--str-in-fld COL:PAT
String contains.
--invert
Invert match.
-H
Has header.

CAVEATS

TSV format. Column numbers start at 1. Part of tsv-utils.

HISTORY

tsv-filter is part of tsv-utils, a collection of high-performance command-line tools for TSV files.

SEE ALSO

awk(1), cut(1), miller(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid