Command reference
tsvpeek [flags] [file]| Flag | Argument | Default | Description |
|---|---|---|---|
-H, --header | — | off | Treat the first parsed row as column names. |
--no-header | — | off | Force the first row to be treated as data. |
-c, --columns | LIST | all | Select comma-separated columns by name or one-based position. |
-w, --where | EXPR | none | Add a row filter. May be specified more than once. |
-d, --delimiter | CHAR | \t | Set the input field delimiter. |
--output-delimiter | CHAR | input delimiter | Set the delimiter used for non-table output. |
--csv | — | off | Use comma-delimited CSV parsing with quoted field handling. |
--quote | CHAR | " | Set the CSV quote character. |
--comment | CHAR | none | Ignore input lines beginning with the specified character. |
-n, --limit | N | unlimited | Stop after emitting N matching records. |
--offset | N | 0 | Skip N matching records before output begins. |
-t, --table | — | off | Render output as an aligned terminal table. |
--max-width | N | 40 | Maximum displayed width of an individual table cell. |
--truncate | STRING | … | Suffix used when a displayed table cell is shortened. |
--no-align | — | off | Disable table-column padding. |
--sort | SPEC | none | Sort matching rows using column[:num][:asc|desc]. |
--unique | LIST | none | Emit only the first record for each selected key. |
--count | — | off | Print the matching row count instead of rows. |
--line-number | — | off | Prefix emitted records with the source line number. |
--strict | — | off | Stop when a malformed record is encountered. |
--skip-bad | — | off | Skip malformed records and continue processing. |
--expected-fields | N | automatic | Require each data record to contain N fields. |
--empty | STRING | empty string | Replacement text used when displaying empty fields. |
--encoding | NAME | utf-8 | Set input encoding. Supported values are documented in the FAQ. |
--buffer | SIZE | 1MiB | Set the buffered input size. |
--color | WHEN | auto | Set diagnostic color mode: auto, always or never. |
-q, --quiet | — | off | Suppress non-fatal diagnostic messages. |
--version | — | — | Print the version and exit. |
-h, --help | — | — | Print command help and exit. |
Filter syntax
column=value
column!=value
column>value
column>=value
column<value
column<=value
column~text
column!~textAppend :num to a column reference to request numeric comparison:
--where 'size:num>=4096'Sort syntax
name
name:desc
size:num
size:num:descSorting requires matching rows to be retained until input processing is complete.
Size values
The --buffer option accepts integer byte counts or the suffixes KiB, MiB and GiB.