Skip to main content

Output a sequence of numbers to stdout.

# To sequence from 1 to 10:
seq 10

# To every 3rd number from 5 to 20:
seq 5 3 20

# To separate the output with a space instead of a newline:
seq -s " " 5 3 20

# To format output width to a minimum of 4 digits padding with zeros as necessary:
seq -f "%04g" 5 3 20