LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   wget command help (https://www.linuxquestions.org/questions/linux-newbie-8/wget-command-help-250582/)

munkeevegetable 11-03-2004 07:52 AM

wget command help
 
Hi, got a real newbie question here..
When using wget, what are the wildcards in the command?
it doesn't seem to say anything about wildcards in the help..

i.e. if i want to get pages foo1.html to foo19.html from http://www.randomsite.com/~jim/foo???.html
what are the wildcards i put instead of ???

edit: removed extra q'n /edit

thanks,
--munkeevegetable

acid_kewpie 11-03-2004 08:00 AM

wget can't do that... lok at curl though, that'll do exactly what you're after.

munkeevegetable 11-03-2004 08:02 AM

heh, i know that it does it, because my brother always uses wget to save that way.. i just wish i could remember the wildcards he used..

munkeevegetable 11-03-2004 08:06 AM

Quote:

Originally posted by munkeevegetable
heh, i know that it does it, because my brother always uses wget to save that way.. i just wish i could remember the wildcards he used..
just remembered, twas maybe images he saved, not websites... not sure.. it works for one website, and recursively for images..
hmmms..

acid_kewpie 11-03-2004 08:08 AM

wget can do recursive gets using the -m option, but i really don't think it can actually handle patterns

munkeevegetable 11-03-2004 08:08 AM

okee doke. thanks for your help :)
ill have a go.. if it doesnt work, ill just go thru one by one.. or have a look at curl
--m.v

kenlinux 11-03-2004 09:23 AM

In fact....
you can use shell script to do that
For example:

#!/bin/bash

for (( i = 1; i <= 19; i++ ))
do
wget -c -t 0 http://www.randomsite.com/~jim/foo$i.html
done
:D :D

robert644 11-03-2004 01:15 PM

wget -r -l 2 http://www.randomsite.com/~jim/

Genesee 11-03-2004 06:37 PM

Quote:

Originally posted by robert644
wget -r -l 2 http://www.randomsite.com/~jim/
but I believe that will pull everything 2 levels down from that URL, that might be much more than the specific files munkee was looking to grab.... (pls correct me if I'm wrong)


All times are GMT -5. The time now is 04:26 PM.