1

In bash, is it possible to use an integer variable in the loop control of a for loop?

view story
linux-howto

http://unix.stackexchange.com – I have the following bash script: #!/bin/bash upperlim=10 for i in {0..10} do echo $i done for i in {0..$upperlim} do echo $i done The first for loop (without the variable upperlim in the loop control) works fine, but the second for loop (with the variable upperlim in the loop control) does not. Is there any way that I can modify the second for loop so that it works? Thanks for your time. (HowTos)