seq

Name

seq -- generate a sequence of numbers

Synopsis

/usr/bin/seq [-f fmt_str] [-s sep_str] [first_num] [inc_num] last_num

Description

The seq command shall output a sequence of numbers from first_num to last_num, stepping by the increment inc_num. The first_num and last_num parameters may be omitted, and default to 1 even when first_num is greater than last_num. Floating-point values may be specified for first_num, inc_num, and last_num.

The fmt_str parameter is a floating point format string like the one used for the printf() function in C.

The sep_str parameter string separates the values that are output. The default is a newline character (/n).

Note: If first_num is less than last_num and inc_num is negative, or first_num is greater than last_num and inc_num is positive, seq shall not generate any output.

Standard Options

-f fmt_str 

Format the numbers in the output sequence according to fmt_str, a floating point format string like the one used for the printf() function in C.

-s sep_str 

Separate the numbers in the output sequence with sep_str. The default separator string is a newline character (\n).

first_num 

The first number in the output sequence. Defaults to 1. May be a floating point value.

inc_num 

The increment for the output sequence. Defaults to 1. May be a floating point value.

last_num 

The last number in the output sequence. May be a floating point value.