Launching for example 100 wget in background (specify the downloads quantity manually)

By Oleksii

I have in my script a array with url.

All these urls I need download in background, but with managing number of downloads (100 downloads at the same time, or N-downloads at the same time).

How I can do that?

readarray -t NAME <<< "$(cat test | awk '{print $2}')"
for (( c=0; c< ${#NAME[*]}; c++))
do
    wget -P /home/ 'http://example.com/'${NAME[$a]}'' &
done

Source:: http://askubuntu.com/questions/870577/launching-for-example-100-wget-in-background-specify-the-downloads-quantity-man


Leave a Reply