Is this a bash or wget issue?
GNU bash, version 4.4.0(1)-release (x86_64-slackware-linux-gnu)
GNU Wget 1.18 built on linux-gnu.
If I run wget -O file localhost/{2..4} from the command line, it will download pages 2 to 4 and concatenate them to file - which is what I want.
If I put this in a script, it works.
But if I add variables to the script wget -O file localhost/{$1..$2} and run script 2 4 wget tries to download localhost/%7B2..4%7D
I've worked around this, but it would be better to know why/how the curly brackets are being converted to their unicode equivalents so I can get it to work as required in the first place.
Many thanks - eval is what I needed. Had to do the command substitution on the whole URL wget -O file $(eval echo localhost/{$1..$2}) , but it now works.
Should have known this because I've used eval before - must have had a mental block, but at least I've been prompted now to understand its use better.