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++))
    wget -P /home/ ''${NAME[$a]}'' &


Leave a Reply