The following bash script works fine to print numbers from 1 to 10:
for i in {1..10}
do
echo "$i"
done
But if I want to make the upper limit a variable, then this script does not works.
i=10
for j in {1..$i}
do
echo "$j"
done
Can anyone suggest please how to make the second script work?