[wplug] wget

Chris vze2f6h6 at verizon.net
Thu Mar 20 09:12:25 EST 2003


I tried chaning it from 00000000 99999999 to 00000000 22222222 think that I
ran out of memory.  I still get the same error but it said 8 bytes.  I know
that the system can handle that.  I will try the sleep command

Chris Romano

-----Original Message-----
From: wplug-admin at wplug.org [mailto:wplug-admin at wplug.org] On Behalf Of Mike
Griffin
Sent: Thursday, March 20, 2003 9:08 AM
To: wplug at wplug.org
Subject: Re: [wplug] wget

You probably ran out of system memory ;)

The script below will open a seperate instance of wget each time the 
script loops.
If you want to use a script as such, i'd recommend putting a sleep in 
there.

I don't know exactly how long each wget takes to download the file it's 
getting, you'd be a better judge of that.
construct the script something like this.

#!/bin/bash
for i in `seq --equal-width 00000000 99999999`; do wget 
http://some/url/$i.exe; sleep 30; done
exit 0

#!/bin/csh -f
foreach i ( `seq --equal-width 00000000 99999999` )
   wget http://some/url/$i.exe
   sleep 30
end
exit 0

This will cause the script to sleep for 30 seconds between every loop. 
( Will wait for 30 seconds before initiating a new instance of wget )

Mike Griffin
Director of Network Services
DMR Networks
412.798.2525 x117
mike at dmrnetworks.com
http://www.dmrnetworks.com

On Thursday, March 20, 2003, at 08:54 AM, Chris wrote:

> Wait,
>
> I thought that the script worked, however, it quit.  I got the 
> following
> error:
> test.sh: xrealloc: connot reallocate 268435456 bytes
>
> Is there a limit on how much data wget will retrieve or is it based on 
> RAM?
>
> Chris Romano
>
> -----Original Message-----
> From: wplug-admin at wplug.org [mailto:wplug-admin at wplug.org] On Behalf 
> Of Mike
> Griffin
> Sent: Wednesday, March 19, 2003 9:21 PM
> To: wplug at wplug.org
> Subject: Re: [wplug] wget
>
> Why not script it!? ;)
>
> Here's a couple of examples, with just a few lines of code under 
> different
> shells, to do this.
>
> Example 1:
> #!/bin/bash
>
> # Let's change into our working directory
> cd /some/directory
>
> # This is assuming that the file needs the padding zeros.
> for i in `seq --equal-width 00000000 99999999`; do wget 
> /some/url/$i.exe;
> done
>
> exit 0
>
> Example 2:
> #!/bin/csh -f
>
> # Let's change into our working directory
> cd /some/directory
>
> # This is assuming that the file needs the padding zeros
> foreach i ( `seq --equal-width 00000000 99999999` )
>   wget /some/url/$i.exe
> end
>
> exit 0
>
>
> Mike
>
>
>
>
>
>
>
> On Wednesday 19 March 2003 16:39, Chris wrote:
>> I have been reading the man pages on this but can't seem to find what 
>> I am
>> looking for.  I might have missed it.  I don't know.  How do you use
>> wildcards for file names?  There are many files in a directory that I 
>> want
>> to download.  They are all named with numbers.  I tried path/*.exe, 
>> but I
>> get an error saying that wildcards are not allowed.  All the files 
>> that I
>> want are going to change from time to time, but should still be named 
>> with
>> numbers.  Am I going to have to write a script that just goes from
>> 00000000.exe to 99999999.exe?  I hope not.
>>
>>
>>
>> Thanks,
>>
>>
>>
>> Chris Romano
>>
>> Atlas Brokerage Company, L.P.
>>
>> cromano at atlasbd.com
>>
>> 724.743.7900
>>
>> ext 221
>
> _______________________________________________
> wplug mailing list
> wplug at wplug.org
> http://www.wplug.org/mailman/listinfo/wplug
>
> _______________________________________________
> wplug mailing list
> wplug at wplug.org
> http://www.wplug.org/mailman/listinfo/wplug
>
>

_______________________________________________
wplug mailing list
wplug at wplug.org
http://www.wplug.org/mailman/listinfo/wplug




More information about the wplug mailing list