xref: /original-bsd/games/random/random.6 (revision 3413c235)
1.\" Copyright (c) 1994
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" %sccs.include.redist.man%
5.\"
6.\"     @(#)random.6	8.2 (Berkeley) 03/31/94
7.\"
8.Dd
9.Dt RANDOM 6
10.Os BSD 4
11.Sh NAME
12.Nm random
13.Nd random lines from a file or random numbers
14.Sh SYNOPSIS
15.Nm random
16.Op Fl er
17.Op Ar denominator
18.Sh DESCRIPTION
19.Nm Random
20reads lines from the standard input and copies them to the standard
21output with a probability of 1/denominator.
22The default value for
23.Ar denominator
24is 2.
25.Pp
26The options are as follows:
27.Bl -tag -width Ds
28.It Fl e
29If the
30.Fl e
31option is specified,
32.Nm random
33does not read or write anything, and simply exits with a random
34exit value of 0 to
35.Ar denominator
36\&- 1, inclusive.
37.It Fl r
38The
39.Fl r
40option guarantees that the output is unbuffered.
41.El
42.Sh SEE ALSO
43.Xr fortune 6
44