Random Numbers With jot

Generate random integers for games, sampling and test data on macOS.

macOSrandomscriptingLow risk
Run jot -r 6 1 49 to print six random numbers between 1 and 49.

01Command

Command
$ jot -r 6 1 49

02What it does

jot prints a sequence of values; with -r it generates random numbers in a range. The first argument is how many values, followed by the low and high bounds. On Linux the equivalent is seq or shuf.

03Risk

RiskLow risk
CompatibilitymacOS (built-in)
!Warning: jot is a BSD tool and is not present on Linux by default; use seq or shuf there instead.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • jot(1) — FreeBSD manual
    FreeBSD · technical · 2026-09-20
    Evidence: Prints sequential or random values; -r selects random mode.

Last verified: 2026-09-20 · Category: Developer