This, of course, works:
$ echo {1..5}
1 2 3 4 5
But when i attempt to substitute the number 5
with a variable, this no longer works:
$ f=5; echo {1..$f}
{1..5}
$ f=5; echo {1..${f}}
{1..5}
$ f=5; echo {1..f}
{1..f}
Is there a way to substitute the number within a variable before the {#..#}
construct is parsed?
seq
instead. – John1024 Oct 29 '16 at 06:53