11
8
How can I write a bash script that is going to do the following:
URL = "example.com/imageID="
while (1..100)
wget URL + $i #it will wget example.com/imageID=1, then 2, then 3, etc
done
So I have a number of loops to perform, a URL which is ended with a number from the loop. I need to wget
all of these.
As a matter of principle, you should enclose the
$i
in quotes:wget "example.com/imageID=$i"
– Scott – 2018-09-24T05:22:33.810this probably works great. however, i start from "00008000" and the wget shoots errors because for some reasn it skips the first four zeroes. – esaruoho – 2019-12-10T05:47:38.123