Files
seta75D ff309bfe1c Init
2021-10-11 18:37:13 -03:00

38 lines
840 B
Groff

.\" @(#)random.6 1.1 94/10/31 SMI;
.TH RANDOM 6 "17 March 1987"
.SH NAME
random \- select lines randomly from a file
.SH SYNOPSIS
.B /usr/games/random
[
.B \-re
] [
.I divisor
]
.SH DESCRIPTION
.I Random
acts as a text filter, randomly selecting lines from its standard input
to write to the standard output. The probability that a given line is
selected is normally 1/2; if a
.I divisor
is specified, it is treated as a floating-point number, and the
probability is
.RI 1/ divisor
instead.
.SH OPTIONS
.TP
.B \-r
Don't buffer the output. If
.B \-r
is not used, output is buffered in blocks, or
line-buffered if the standard output is a terminal.
.TP
.B \-e
Don't read the standard input or write to the standard output.
Instead, exit with a random exit status between 0 and 1, or between 0
and
.IR divisor -1
if
.I divisor
is specified.