summaryrefslogtreecommitdiffstats
path: root/usr.bin/jot/jot.1
diff options
context:
space:
mode:
authordds <dds@FreeBSD.org>2006-11-06 13:55:11 +0000
committerdds <dds@FreeBSD.org>2006-11-06 13:55:11 +0000
commitc15edb9d96dd6a4461bd687f8dc8ad5388b02f02 (patch)
treee0b79f484145bfec4ce6f98acde0e8d2fe8ce25b /usr.bin/jot/jot.1
parent13dc4f1b111e5d9cb42399807ff15d52a0b75793 (diff)
downloadFreeBSD-src-c15edb9d96dd6a4461bd687f8dc8ad5388b02f02.zip
FreeBSD-src-c15edb9d96dd6a4461bd687f8dc8ad5388b02f02.tar.gz
Do What I Mean when the user asks for random integers or characters.
Up to now jot would fail to generate the last character in the range or skew the integer distribution in a way that would generate the numbers in the range's limits with half the probability of the rest. This modification fixes the program, rather than documenting the strange behavior, as suggested in docs/54879. Also, correctly specify the range of random(3). PR: docs/54879 MFC after: 2 weeks
Diffstat (limited to 'usr.bin/jot/jot.1')
-rw-r--r--usr.bin/jot/jot.119
1 files changed, 18 insertions, 1 deletions
diff --git a/usr.bin/jot/jot.1 b/usr.bin/jot/jot.1
index e1e98ac..1aa0d62 100644
--- a/usr.bin/jot/jot.1
+++ b/usr.bin/jot/jot.1
@@ -32,7 +32,7 @@
.\" @(#)jot.1 8.1 (Berkeley) 6/6/93
.\" $FreeBSD$
.\"
-.Dd June 6, 1993
+.Dd November 6, 2006
.Dt JOT 1
.Os
.Sh NAME
@@ -145,6 +145,23 @@ when no seed is specified,
and through
.Xr random 3
when a seed is given.
+When
+.Nm
+is asked to generate random integers or characters with begin
+and end values in the range of the random number generator function
+and no format is specified with one of the
+.Fl w ,
+.Fl b ,
+or
+.Fl p
+options,
+.Nm
+will arrange for all the values in the range to appear in the output
+with an equal probability.
+In all other cases be careful to ensure that the output format's
+rounding or truncation will not skew the distribution of output
+values in an unintended way.
+.Pp
The name
.Nm
derives in part from
OpenPOWER on IntegriCloud