Text Processing
seq
Print a sequence of numbers with configurable start, step, and end.
Synopsis
syntax
seq [OPTION]... [FIRST [INCREMENT]] LAST
Examples
Print numbers 1 to 10
seq 10
Print even numbers 0 to 20
seq 0 2 20
Zero-padded sequence
seq -w 01 100
Comma-separated sequence: 1, 2, 3, 4, 5
seq -s', ' 1 5
Common options
| Flag | Description |
|---|---|
| -w | Equalize width by padding with leading zeros |
| -s | Use specified separator (default: newline) |
| -f | Use printf-style format |
About seq
The `seq` command print a sequence of numbers with configurable start, step, and end. Text processing commands transform, format, and generate text output.
Linux's philosophy of small composable tools shines here — these commands are designed to be piped together to build complex text-processing workflows. They are indispensable for scripting, log analysis, and data transformation tasks.
The command accepts 3 commonly used flags shown above, though the full set of options is available in the man page (`man seq`). The 4 examples on this page cover typical real-world usage patterns that you can copy and adapt for your own workflows.
Related commands
More Text Processing Commands
Other commands in the Text Processing category