bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] QuickStart tutorial


From: Ángel González
Subject: Re: [Bug-wget] QuickStart tutorial
Date: Thu, 14 Oct 2010 23:40:18 +0200
User-agent: Thunderbird

 Tony Lewis wrote:
> Having said all of that, you can more easily do the same thing with a shell
> script that invokes wget repeatedly. The downside of the shell script
> approach is that you won't be reusing the connection to the server.

You can do it with one connection by piping the input file:

( for i in `seq 1 10`; do echo http://rahulprasad.com/pics/img$i.jpg;
done ) | wget -i -

Or if you are not concerned with portability:
for ((i=1; i <= 10 ; i++))
do
echo http://rahulprasad.com/pics/img$i.jpg
done | wget -i -


If you have bash 4 it's even easier:
wget  http://rahulprasad.com/pics/img{1..10}.jpg

These tricks should be stored somewhere...




reply via email to

[Prev in Thread] Current Thread [Next in Thread]