[wplug] wget

Chris vze2f6h6 at verizon.net
Thu Mar 20 08:42:39 EST 2003


The globbing option didn't work.
The script did.

Thank you for you help.

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




More information about the wplug mailing list