DESCRIPTION
The
seq utility prints a sequence of numbers, one per line (default), from
first (default 1), to near
last as possible, in increments of
incr (default 1). When
first is larger than
last the default
incr is -1.
All numbers are interpreted as floating point.
Normally integer values are printed as decimal integers.
The seq utility accepts the following options:
-
-f format
-
Use a printf(3) style format to print each number. Only the A, a, E, e, F, f, G, g, and % conversion characters are valid, along with any optional flags and an optional numeric mimimum field width or precision. The format can contain character escape sequences in backslash notation as defined in ANSI X3.159-1989 (“ANSI C”). The default is %g.
-
-s string
-
Use string to separate numbers. The string can contain character escape sequences in backslash notation as defined in ANSI X3.159-1989 (“ANSI C”). The default is \n.
-
-t string
-
Use string to terminate sequence of numbers. The string can contain character escape sequences in backslash notation as defined in ANSI X3.159-1989 (“ANSI C”). This option is useful when the default separator does not contain a \n.
-
-w
-
Equalize the widths of all numbers by padding with zeros as necessary. This option has no effect with the -f option. If any sequence numbers will be printed in exponential notation, the default conversion is changed to %e.
The seq utility exits 0 on success and non-zero if an error occurs.