diff options
Diffstat (limited to 'man/man1/maybe.1df')
-rw-r--r-- | man/man1/maybe.1df | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/man/man1/maybe.1df b/man/man1/maybe.1df new file mode 100644 index 00000000..5a94a59e --- /dev/null +++ b/man/man1/maybe.1df @@ -0,0 +1,25 @@ +.B maybe +\- possibly exit with success +.SH USAGE +.B maybe +.br +.B maybe +DENOMINATOR +.br +.B maybe +NUMERATOR DENOMINATOR +.SH DESCRIPTION +Like true(1) or false(1), but exits with success randomly with a given +probability. Good for using in tests. Exits with 2 rather than 1 on usage +errors. +.P +The numerator default to 1 and the denominator to 2 for a roughly equal chance +of success or failure. rndi(1df) is used for the randomness. +.P + $ maybe + $ maybe 3 + $ maybe 2 5 +.SH SEE ALSO +true(1), false(1), try(1df), rndi(1df) +.SH AUTHOR +Tom Ryder <tom@sanctum.geek.nz> |