Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

select

Selects and reorders TSV fields.

Behavior:

  • One of --fields/-f or --exclude/-e is required.
  • --fields/-f keeps only the listed fields, in the order given.
  • --exclude/-e drops the listed fields and keeps all others.
  • Use --rest to control where unlisted fields appear in the output.

Input:

  • Reads from files or standard input.
  • Files ending in .gz are transparently decompressed.

Output:

  • By default, output is written to standard output.
  • Use --outfile to write to a file instead.

Header behavior:

  • Supports --header / -H and --header-hash1 modes.
  • In header mode, field names from the header can be used in field lists.

Field syntax:

  • Field lists support 1-based indices, ranges (1-3,5-7), header names, name ranges (run-user_time), and wildcards (*_time).
  • Run tva --help-fields for a full description shared across tva commands.

Examples:

  1. Select by name tva select input.tsv -H -f Name,Age

  2. Select by index tva select input.tsv -f 1,3

  3. Exclude columns tva select input.tsv -H -e Password,SSN