4 ms·
Try `seq 1 n`
by cauterize 9y ago
Try `seq 1 n`
- JdeBP 9y agoeuske may be using one of the operating systems (one such being mentioned on this very page) where there is no seq utility. JdeBP ~ $seq ksh: seq: not found JdeBP ~ $ Of course, on the one mentioned there is jot.
- moyix 9y agoAnd on bash you can simply use {1..n}: $ echo {1..5} 1 2 3 4 5 If you have Bash 4.0 or above, you can include a step size: $ echo {1..10..2} 1 3 5 7 9