helpText
auto helpText =
q"EOS
Synopsis: tsv-sample [options] [file...]
Samples or randomizes input lines. There are several modes of operation:
* Randomization (Default): Input lines are output in random order.
* Stream sampling (--r|rate): Input lines are sampled based on a sampling
rate. The order of the input is unchanged.
* Distinct sampling (--k|key-fields, --r|rate): Sampling is based on the
values in the key field. A portion of the keys are chosen based on the
sampling rate (a distinct set). All lines with one of the selected keys
are output. Input order is unchanged.
* Weighted sampling (--w|weight-field): Input lines are selected using
weighted random sampling, with the weight taken from a field. Input
lines are output in the order selected, reordering the lines.
The '--n|num' option limits the sample sized produced. It speeds up the
randomization and weighted sampling cases significantly.
Use '--help-verbose' for detailed information.
Options:
EOS";
tsv_sample
functionsstructsvariables