Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How can I write a bash script that is going to do the following:

URL = ""
while (1..100)
   wget URL + $i #it will wget, than 2, than 3 and so on

So I have a number of loops to perform, a URL which is ended with a number from the loop. I need to wget all of these.

share|improve this question

2 Answers 2

up vote 6 down vote accepted

if you are using Bash 4.0, you can do this:

share|improve this answer

It's fairly easy, even for someone with not much programming experience. When in doubt always read the Bash manual:

for i in {1..100}
    wget ""$i
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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