aboutsummaryrefslogblamecommitdiff
path: root/man/man1/maybe.1df
blob: a8658c7187daff248f5dbe8e23b99199612a8c15 (plain) (tree)
1
2
3
4
5
6
7
8
9
10

                                                    
        

                             
        
   
        

           
        
                     




                                                                         
                                                                               
                                                            
  


              
            
                                                

                               
.TH MAYBE 1df "October 2016" "Manual page for maybe"
.SH NAME
.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 defaults 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), chn(1df), try(1df), rndi(1df)
.SH AUTHOR
Tom Ryder <tom@sanctum.geek.nz>