8000 GitHub - noClaps/random: A command line tool to generate random numbers · GitHub
[go: up one dir, main page]

Skip to content
noClapsPublic

About

A command line tool to generate random numbers

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

random

A command line tool to generate random numbers.

Build instructions

git clone https://github.com/noClaps/random.git && cd random/
make release
install ./random ~/.local/bin/ # or somewhere else in your PATH

Usage

Usage: 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 1

You can also pass in limits. The defaults are 0 and 1.

random 10 # generates a random number between 0 and 10

If you want to generate integers, you can enable the -i flag.

random -i 5 10 # generates a random integer between 5 and 10

If you want to flip a coin, you can use the -c or --coin flag.

random -c # returns either Heads or Tails
random --coin

You can view the help by using -h or --help:

random -h # shows the help menu for the command
random --help

About

A command line tool to generate random numbers

Resources

Stars

0 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages

0