Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .