Suppose I do the following:
$ echo {10..20}
10 11 12 13 14 15 16 17 18 19 20
$ A=10
$ B=20
$ echo {${A}..${B}}
{10..20}
Why does this not expand as it did the first time?
I am trying to set up a "for" loop in a script:
for i in {10..20}
do
echo ${i}
done
10
11
12
13
14
15
16
17
18
19
20
But if I use variables...
for i in {${A}..${B}}
do
echo ${i}
done
{10..20}
I tried using "eval". Didn't work.
for i in `eval {${A}..${B}}`
...
I tried parentheses. Didn't work.
for i in "{${A}..${B}}"
...
What else can I try, other than
seq ${A} ${B}
?