x=10
for i in {1..$x}; do echo $i; done
The above code give me
{1..10}, rather than printing numbers from 1 to 10. I'm wondering how to use variable in a range? -- Regards, Peng
x=10
for i in {1..$x}; do echo $i; done
The above code give me
{1..10}, rather than printing numbers from 1 to 10. I'm wondering how to use variable in a range? -- Regards, Peng