I am trying to download some files using:

$ for i in `seq 1234 1250`;
    torify wget -A.mp4 http://www.my_example.com/video.php?id=$i&dl=1


Clearly these all downloads will be started simultaneously. How can I dowmload one by one. Though I am not sure but I think that wget exit successfully with a exit status of 8 but am unable to come up with the appropriate if or while/untill statements.

Would somebody help??


You've fallen afoul of shell special characters. With shell quoting, the line:

torify wget -A.mp4 http://www.my_example.com/video.php?id=$i&dl=1


torify wget -A.mp4 http://www.my_example.com/video.php\?id=$i\&dl=1

which will NOT go into the background, and will execute one at a time.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.