A command line tool to generate random numbers.
git clone https://github.com/noClaps/random.git && cd random/
make release
install ./random ~/.local/bin/ # or somewhere else in your PATHUsage: random [-i] [min|max] [max]
random --coin
A command line tool to generate random numbers.
Arguments:
[min|max] The minimum value for the random number generator. If only one
argument is provided, it is set to be the max. (default: 0.0)
[max] The maximum value for the random number generator. (default: 1.0)
Options:
-i Should the output be an integer?
-c, --coin Flip a coin instead of generating a number.
-h, --help Show help information.
You can use the tool simply by running:
random # generates a random number between 0 and 1You can also pass in limits. The defaults are 0 and 1.
random 10 # generates a random number between 0 and 10If you want to generate integers, you can enable the -i flag.
random -i 5 10 # generates a random integer between 5 and 10If you want to flip a coin, you can use the -c or --coin flag.
random -c # returns either Heads or Tails
random --coinYou can view the help by using -h or --help:
random -h # shows the help menu for the command
random --help