Discussion:
Double substitution issue
f***@gmail.com
2018-11-21 04:16:47 UTC
Permalink
Thank you for explaining this fine point.

I have found a way to use double expansion, and of course this is not safe
in all contexts:

from=1;to=3;eval echo {$from..$to}

Regards,
Will
Greg Wooledge
2018-11-21 13:37:33 UTC
Permalink
Post by f***@gmail.com
I have found a way to use double expansion, and of course this is not safe
from=1;to=3;eval echo {$from..$to}
for ((i=from; i<=to; i++)); do
...
done.

Loading...