s6-portable-utils: the s6-seq program
Keywords: s6-portable-utils command s6-seq seq numbers loop

s6-portable-utils
Software
skarnet.org

# The `s6-seq` program

s6-seq prints a sequence of numbers.

## Interface

         s6-seq [ -w ] [ -s separator ] limits

- limits can be one, two or three arguments.
  - Three arguments are interpreted as first, increment and last, in this order.
  - Two arguments are interpreted as first and last, and increment defaults to 1.
  - One argument is interpreted as last, and first and increment both default to 1.
- s6-seq prints all unsigned integers from first to last inclusive, with a step of increment, with a newline after each integer. It then exits 0.

## Options

- `-w` : fixed width. The numbers will all be printed with the same width; smaller numbers will have leading `0` characters.
- `-s` sep : print sep after each number. Default is a newline. If sep is the empty string, a null character will be printed.

## Notes

s6-seq is similar to the GNU `seq` program. However, it does not handle negative numbers, floating point numbers or printf-style formatting.