In response to a comment of mine to this question on SF the OP asserts that the for i in {1..$NUM}expands correctly in bash. I have access to bash 4.0.33 (Ubuntu), 3.2.25 (Centos) and 3.00.16(1) (solaris 10). None of these will expand the {1..$NUM}. Does anyone know which versions of bash do the expansion? If it's not bash what is it ? I know zsh will do the expansion but in the OP's script the shebang should remove the possibility of an alias ?
Which bash will expand  {1..$VAR} in the same way that zsh does
bash
I'm pretty sure the person asking the question on server fault is wrong. They're either leaving out some detail intentionally or are unaware of some weird configuration on the machine (/bin/bash as a link to something else). I tried on the two-week-old bash 4.2 release, on bash 3.2 from CentOS 5, and on bash 2.05a (from 2001)  which I built myself just now to try.The oldest source on ftp.gnu.org is 1.14, but that doesn't build cleanly, and I'm not sure trying it is worthwhile. The documentation for that release contains the exact same key phrases as in the modern documentation:  The order of expansions is: brace  expansion,  tilde  expan- sion, parameter, variable, command, and arithmetic substitu- tion (done in a left-to-right fashion), word splitting,  and pathname expansion.But actually, now that I think of it, that's pointless, since the {x..y} syntax was added in bash 3.0, making looking before that useless.So, let me try 3.0 ... right. Same behavior.So yeah. I'm extremely skeptical. Something doesn't add up.(Later...)Aha! The server-fault questioner admits Sorry. my mistake. I've put for actual number in i in {1..10}, so it worked well. So, there ya go.The answer to this question is no version of bash works like that. :)