Manual Reference Pages - RANDOM (6)
- random lines from a file or random numbers
has two distinct modes of operations.
The default is to read in lines
from the standard input and randomly write them out
to the standard output with a probability of
for this mode of operation is 2, giving each line a 50/50 chance of
The second mode of operation is to read in a file from
and randomize the contents of the file and send it back out to
The contents can be randomized based off of newlines or based off of
space characters as determined by
for this mode of operation is 1, which gives each line a chance to be
displayed, but in a
The options are as follows:
option is specified,
does not read or write anything, and simply exits with a random
exit value of 0 to
- 1, inclusive.
option is used to specify the
to read from.
Standard input is used if
is set to
Randomize the input via newlines (the default).
option guarantees that the output is unbuffered.
that it is okay for it to reuse any given line or word when creating a
not to select the same line or word from a file more than once (the
This does not guarantee uniqueness if there are two of the
same tokens from the input, but it does prevent selecting the same
token more than once.
Randomize words separated by
instead of newlines.
functionality to randomizing lines and words was added in 2003 by
.An Sean Chittenden Aq seanc@FreeBSD.org .
No index is used when printing out tokens from the list which
makes it rather slow for large files (10MB+).
files, however, it should still be quite fast and efficient.
Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.