NAME

ranline - print lines selected at random


SYNOPSIS

randline [-h | --no-filename] [-H | --with-filename] [--help] [--irs | --input-read-separator s] [-p | --percent pct] [-n | --pick number] [--seed number] [--version] [file]...


DESCRIPTION

randline chooses lines at random from its input and outputs them. By default it picks one line from all the input files (or stdin if no files are specified). In all cases it does this using a single pass over the input, without saving the whole thing in memory.


OPTIONS

-h, --no-filename

Never prepend the input file name to lines output. Normally it's output when there's more than one input file.

-H, --with-filename

Always output the input file name.

--help

Show the usage message and die.

--irs, --input-read-separator s

Specify a different input record separator (really, terminator) (default newline).

-p, --percent pct

Choose pct percent of the input lines, rather than a fixed number.

-n, --pick number

Choose number lines from the input rather than 1.

--seed number

Use number as the seed for the random number generator. Normally you wouldn't want to specify this, instead you'd let the program pick the seed. The --seed switch is useful to achieve repeatability for debugging. If you use the same seed and other inputs randline will pick the same lines to output.

--version

Show the version number and exit.


AUTHOR

Roderick Schertler <roderick@argon.org>