I have the following in a script:
#!/usr/bin/env bash
...
for i in {1..$N}
<loop content>
The above doesn't work and is only executed once where i
has the value {1..5}
(if 5
was provided as argument).
If I replace the above with:
for i in $(seq 1 1 $N)
.. then things work as expected. Why is that?