random bool

For random.

Generate a random boolean value.

Command Type

built-in

Signature

> random bool {flags}

Flags

  • --bias, -b {number}: Adjusts the probability of a “true” outcome.

Input/output types:

input output
nothing bool

Examples

Generate a random boolean value.

> random bool

Generate a random boolean value with a 75% chance of “true”.

> random bool --bias 0.75

Ported from nushell/nushell.github.io. Copyright (c) 2021 Nushell Project. MIT License.