Im learning shell scripting from an outdated textbook, and it seems to me like it'd be really usefull to have a program that just returns a string of numbers delimited by spaces something like
$ range 10 20
10 11 12 13 14 15 16 17 18 19 20
Then, if youre doing a shell script you can have
for i in `range 10 20`; do some stuff with numbers in that range;done
does such a thing exist, or do I need to write it myself?
range
withseq
in your example. default separator is newline, to have spaces:seq -s " " 10 20
for
loop—or even any general command that splits arguments—unless you've set the IFS differently.seq
as it is not specified by POSIX.