mistress
dice.6
1.Dd $Mdocdate$
2.Dt DICE 6
3.Os
4.Sh NAME
5.Nm dice
6.Nd dice roller and coin flipper
7.Sh SYNOPSIS
8.Nm
9.Fl C
10.Op Fl q
11.Nm
12.Fl S
13.Op Fl q
14.Nm
15.Op Fl q
16.Ar expr
17.Sh DESCRIPTION
18The
19.Nm
20utility displays pseudorandom results of specified dice roll or coinflip
21expressions. It accepts the following flags:
22.Bl -tag -width Ds
23.It Fl C
24Flip a coin, displaying
25.Dq heads
26or
27.Dq tails .
28If
29.Fl q
30is specified, display
31.Dq 0
32or
33.Dq 1
34instead.
35.It Fl S
36Parse a line read from standard input instead of
37.Ar expr .
38.It Fl q
39Be quieter.
40.El
41.Pp
42If
43.Fl c
44is not specified, an expression in the form
45.Em x Ns d Ns Em y Ns [ Ns + Ns Em x Ns d Ns Em y Ns ] Ns ...
46is parsed and randomly evaluated. Unless
47.Fl q
48is specified, the expression is printed before the result, followed by an
49equals sign.
50.Sh EXIT STATUS
51.Ex -std
52.Sh SEE ALSO
53.Xr random 6