aboutsummaryrefslogtreecommitdiff
path: root/man/man1/rndi.1
blob: 094a5f622784caaad100b030f618610cb7d2ecaa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
.TH RNDI 1 "August 2016" "Manual page for rndi"
.SH NAME
.B rndi
\- return a low-quality random integer
.SH SYNOPSIS
.B rndi
0 10
.br
.B rndi
0 10 "$(rnds)"
.SH DESCRIPTION
.B rndi
returns a random integer ranging from the first argument to the second argument
in a POSIX-compliant way (using awk), using the optional third argument as a
seed.
.P
The answer returned is low-quality; given some implementations of awk and no
properly random seed, it may even return the same result if run within the same
second. This should not be used in any sort of security or statistical context.
The author wrote it to support scripts to choose a random background image from
a directory.
.SH SEE ALSO
rnda(1), rndf(1), rndl(1), rnds(1), rndn(6)
.SH AUTHOR
Tom Ryder <tom@sanctum.geek.nz>