Reputation: 41
How do I use variable from loop as a parameter for wget?
#!/bin/bash
for i in {1..100}
do
for j in {1..1000}
do
wget -q [http://www.sitename.com/i/j.jpg]
done
done
the idea is to download all the image files from some site whose data was heavily corrupted (returns image or 404)
Upvotes: 1
Views: 152
Reputation: 224944
Use $i
and $j
to use the variables:
wget -q "http://www.sitename.com/$i/$j.jpg"
Upvotes: 2