helpTextVerbose
immutable
auto helpTextVerbose =
q"EOS
Synopsis: tsv-select [options] [file...]
tsv-select reads files or standard input and writes selected fields to
standard output. Fields are written in the order listed. This is similar
to Unix 'cut', but with the ability to reorder fields.
Fields can be specified by field number or, for files with header lines,
by field name. Use '--H|header' to enable selection by name. This also
manages header lines from multiple files, retaining only the first header.
Field numbers start with one. The field list is comma separated. Fields
can be repeated and ranges can be used. Wildcards can be used when
specifying fields by name, and escapes can be used to specify fields names
containing special characters. Run '--help-fields' for details.
Fields can be excluded using '--e|exclude'. All fields not excluded are
output. Fields not included in the '--f|fields' option can be selected as
a group using '--r|rest'. '--f|fields' and '--r|rest' can be used with
'--e|exclude' to reorder non-excluded fields.
Examples:
# Keep the first field from two files
tsv-select -f 1 file1.tsv file2.tsv
# Keep fields 1 and 2, retaining the header from only the first file
tsv-select -H -f 1,2 file1.tsv file2.tsv
# Keep the 'time' field
tsv-select -H -f time file1.tsv
# Keep all fields ending '_date' or '_time'
tsv-select -H -f '*_date,*_time' file.tsv
# Drop all the '*_time' fields
tsv-select -H --exclude '*_time' file.tsv
# Field reordering and field ranges
tsv-select -f 3,2,1 file.tsv
tsv-select -f 1,4-7,11 file.tsv
tsv-select -f 1,7-4,11 file.tsv
# Repeating fields
tsv-select -f 1,2,1 file.tsv
tsv-select -f 1-3,3-1 file.tsv
# Move fields to the front
tsv-select -f 5 --rest last file.tsv
tsv-select -H -f Date,Time --rest last file.tsv
# Move fields to the end
tsv-select -f 4,5 --rest first file.tsv
tsv-select -f '*_time' --rest first file.tsv
# Move field 2 to the front and drop fields 10-15
tsv-select -f 2 -e 10-15 file.tsv
# Move field 2 to the end, dropping fields 10-15
tsv-select -f 2 -rest first -e 10-15 file.tsv
Use '--help-fields' for detailed help on field lists.
Notes:
* One of '--f|fields' or '--e|exclude' is required.
* Fields specified by '--f|fields' and '--e|exclude' cannot overlap.
* When '--f|fields' and '--e|exclude' are used together, the effect is to
specify '--rest last'. This can be overridden by using '--rest first'.
* Each input line must be long enough to contain all fields specified
with '--f|fields'. This is not necessary for '--e|exclude' fields.
* Specifying names of fields containing special characters may require
escaping the special characters. See '--help-fields' for details.
* Output is buffered by default to improve performance. Use
'--line-buffered' to have each line immediately written out.
Options:
EOS";
tsv_utils tsv_select
enumsfunctionsstatic variablesstructsvariables