I don’t know why I always forget how to do ranges, but I do. I guess it has something to do with the fact that I don’t expect it to be like C at all, and I don’t need to use it often enough to remember. I always assume it to be some oddball syntax like x in range 2..6 or something.
Do this:
for ((x=2;x<=6;x++)); do echo $x; done
And the output will be:
2 3 4 5 6