Easy shell sh loop within a range:

$ for i in $(seq 1 3); do echo $i; done
1
2
3