Print a sequence of numbers to standard output

      seq [options]... [FIRST [STEP]] LAST...


     Print all numbers using FORMAT; default `%g'.  FORMAT must contain
     exactly one of the standarding float output formats `%e', `%f', or

     Separate numbers with STRING; default is a newline.  The output
     always terminates with a newline.

     Print all numbers with the same width, by padding with leading
     zeroes.  (To have other kinds of padding, use `--format').

`seq' prints the numbers from FIRST to LAST by STEP.

By default, FIRST and STEP are both 1, and each number is printed on its own line. All numbers can be reals, not just integers.


Produce a sequence of numbers from 1 to 100

$ seq 100

You can also produce a sequence with the for command

for ((myseq=0; myseq<50; myseq++))
echo The sequence is ${myseq}

“The idea of a Being who interferes with the sequence of events in the world is absolutely impossible” ~ Albert Einstein

Related linux commands:

expr - Evaluate expressions
for - Expand words, and execute commands
nl - Number lines and write files
Equivalent Windows commands: FOR /L - Numeric loop.

Copyright © 1999-2019
Some rights reserved