I'm searching for a solution to a Bash 4 problem I have.
Bash 4 is able to iterate with leading zeros.
For the line:
for i in {001..005}; do echo -n $i" ";done;echo
the output is
001 002 003 004 005
but when I try this:
a="005"; for i in {001..${a}}; do echo $i;done
or something similar, the result is:
{001..005}
What am I missing?