Scroll to navigation

seq(1) General Commands Manual seq(1)

NAME

seq - Display numbers from FIRST to LAST, in steps of INCREMENT.

SYNOPSIS

seq [-s|--separator] [-t|--terminator] [-w|--equal-width] [-f|--format] [-h|--help] [-V|--version] [numbers]

DESCRIPTION

Display numbers from FIRST to LAST, in steps of INCREMENT.

OPTIONS

Separator character (defaults to \n)
Terminator character (defaults to \n)
Equalize widths of all numbers by padding with zeros
use printf style floating-point FORMAT
Print help
Print version
[numbers]

VERSION

v(uutils coreutils) 0.7.0

EXAMPLES

Print a sequence from 1 to 10:

seq 10

Print a sequence from 10 to 20:

seq 10 20

Print every 3rd number from 5 to 20:

seq 5 3 20

Separate the output with a space instead of a newline:

seq [-s|--separator] " " 5 3 20

Format output width to a minimum of 4 digits padding with zeros as necessary:

seq [-f|--format] "%04g" 5 3 20

Print all numbers with the same width:

seq [-w|--equal-width] 5 3 20

The examples are provided by the tldr-pages project <https://tldr.sh> under the CC BY 4.0 License. Please note that, as uutils is a work in progress, some examples might fail.

seq (uutils coreutils) 0.7.0