jq Filters and Transformations/Generate numeric range

Create a sequence of integers.

Section: Numbers and Math

Generate numeric range

bash
bash
jq -n '[range(0; 5)]'
Explanation

Great for synthetic data and loops.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Numbers and Math
Floor number
Round down to nearest integer.
OpenIn sheetbashsame section
Ceiling number
Round up to nearest integer.
OpenIn sheetbashsame section
Round number
Round to the nearest integer.
OpenIn sheetbashsame section
Absolute value
Return the absolute value of a number.
OpenIn sheetbashsame section
Bucket numbers
Convert numbers into 10-point buckets.
OpenIn sheetbashsame section
Logical AND
Filter items that satisfy two conditions.
OpenIn sheetbash1 tag match