[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#822221: ITP: flipcoin -- flip an adjustable coin for random exit status



Hi,

> Package: wnpp
> Severity: wishlist
> Owner: Rudi Cilibrasi <cilibrar@alumni.caltech.edu>
>
> * Package name    : flipcoin
>   Version         : 1.0.0
>   Upstream Author : Rudi Cilibrasi <cilibrar@alumni.caltech.edu>
> * URL             : https://github.com/rudi-cilibrasi/flipcoin
> * License         : MIT/X
>   Programming Lang: C
>   Description     : flip an adjustable coin for random exit status
>
> This command-line utility can be used to simulate a coin flip to get
> a random exit status.  The probability of success is adjustable using
> an optional command line parameter.
[...]
> if flipcoin ; then echo heads ; else echo tails ; fi

A package for this functionality seems like overkill to me. shuf(1) is
part of the GNU coreutils:

if test `shuf -i 0-9 -n 1` -lt 5; then echo head ; else echo tails; fi

leo


Reply to: