[wplug] wget

Mike Griffin mike at dmrnetworks.com
Wed Mar 19 21:20:50 EST 2003


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




More information about the wplug mailing list