100 Useful Command-Line Utilities

by Oliver; 2014

38. seq

seq prints a sequence of numbers.

Display numbers 1 through 5:
$ seq 1 5
1
2
3
4
5
You can achieve the same result with:
$ echo {1..5} | tr " " "\n"
1
2
3
4
5
If you add a number in the middle of your seq range, this will be the "step":
$ seq 1 2 10
1
3
5
7
9

<PREV   NEXT>