LinuxCommandLibrary

jot

TLDR

Generate sequence

$ jot [10]
copy
Generate range
$ jot [10] [1] [100]
copy
Generate with step
$ jot - [1] [100] [5]
copy
Random numbers
$ jot -r [5] [1] [100]
copy
Repeated string
$ jot -b [string] [5]
copy
Formatted output
$ jot -w "[%02d]" [10]
copy

SYNOPSIS

jot [options] [reps [begin [end [step]]]]

DESCRIPTION

jot generates sequential or random data. It produces numbers, characters, or formatted strings.
The tool is useful for generating test data and sequences. It supports various output formats.
jot generates data sequences.

PARAMETERS

REPS

Number of repetitions.
BEGIN
Starting value.
END
Ending value.
STEP
Increment.
-r
Random values.
-b STRING
Repeat string.
-w FORMAT
Printf format.
-s STRING
Separator.
--help
Display help information.

CAVEATS

BSD utility. Not in GNU coreutils. Use seq for portability.

HISTORY

jot originated in BSD Unix as a data generator utility. It provides more flexibility than seq.

SEE ALSO

seq(1), yes(1), printf(1)

Copied to clipboard