seq
ShellFundamentals In simulator In real LinuxPrint a sequence of numbers
Name: seq = sequence
You can practise it right away in the simulator, and use it in real Linux mode too.
Description
seq prints a sequence of numbers with optional start and step; -w pads them to equal width. Scripts use it with for loops or xargs; in bash {1..10} works too.
Syntax
seq [FIRST [INCREMENT]] LASTCommon options
| FIRST INCREMENT LAST | Start, step and end |
| -w / --equal-width | Pad with zeros to equal width (01 02 … 10) |
| -s / --separator STRING | Separate the numbers with STRING (a newline by default), e.g. seq -s, 5 |
| -f / --format FORMAT | Use a printf format, e.g. -f "file%03g" |