FAQ

Does tsvpeek load the complete file into memory?

Normally, no. Records are read and processed sequentially. Operations such as sorting may require matching records to be retained.

How are malformed rows handled?

Normal mode reports malformed input where it can be detected and continues when recovery is possible. --strict stops at the first malformed record. --skip-bad discards malformed records and continues.

What is considered a malformed TSV row?

TSV itself does not require every record to have the same field count. Use --expected-fields N when a fixed number of fields is required.

How are quoted CSV fields handled?

In --csv mode, quoted delimiters and escaped quote characters are parsed according to conventional CSV rules. Newlines inside quoted fields are accepted.

Can I use a delimiter other than tab or comma?

Yes. --delimiter accepts one character. For example, --delimiter '|' parses pipe-delimited input.

What character encodings are supported?

UTF-8 is the default. The --encoding option also accepts utf-8-bom, latin1, windows-1252 and utf-16le.

What happens with invalid UTF-8?

In UTF-8 mode, invalid byte sequences are reported as malformed input. Strict mode terminates processing. Skip mode discards the affected record where record boundaries remain identifiable.

Does a UTF-8 byte-order mark affect the first field?

No. A UTF-8 byte-order mark at the start of the input is removed before the first field is parsed.

Are filters regular expressions?

No. The ~ operator performs literal substring matching. Filter expressions do not interpret regular-expression syntax.

Are comparisons numeric?

They are textual unless :num is attached to the column reference. For example, size:num>100 performs numeric comparison.

Why is sorting more memory-intensive?

A globally sorted result cannot be emitted until the relevant input has been examined. Matching rows therefore need to be retained before they can be ordered.

Does table output change the underlying values?

No. Table mode affects presentation only. Long display cells may be shortened according to --max-width, but the source value is not modified.

Can tsvpeek read from a pipe?

Yes. Omit the file argument or use -. Input is then read from standard input.

How large can a single field be?

There is no small fixed field-size limit. Extremely large individual records still require memory proportional to the record currently being parsed.

How can throughput be improved?

Avoid table rendering when output is consumed by another program. Select only required columns, apply restrictive filters early and avoid sorting unless ordering is required. Increasing --buffer may help when input arrives in large sequential reads.