I want to download a multitude of files while also downloading them in order and assigning a custom name to them.
The code I have is this:
iterator=1;
while read p; do
curl "$p" -o $((iterator++)).jpg;
done < ../outProfileImages;
This seems to be very slow compared to wget's "input file" mode, but I was not able to figure out a way to have a numbered custom name while also keeping the correct order of downloaded files using wget.
The reason I want custom names, with just the number of the order of the file, is mostly because the files have too large names when downloaded, but it would also be convenient to know the order just by looking at the filenames.
i
could stay1
.i=0
and into the loop:((i++))
andcurl ... ${i}.jpg &
(and be sure that you don't send too many requests...)