euglug.org

[Eug-lug] simple script?

작성자

카테고리:



Bob MillerSun Jun 20 18:52:57 PDT 2004

Mr O wrote:

> This what I have:
> #!/bin/sh
> wget -r -l1 -nc --no-parent -A.pk3 

This is what you want.

#!/bin/sh
wget -r -l1 -nc --no-parent -A.pk3 "$@"

That will let you pull several sites in the same
command.

    ./myget.sh http://site1/foo http://site2/bar http://site3/baz

If you're tired of typing "http://", you could do this instead.

#!/bin/sh
wget -r -l1 -nc --no-parent -A.pk3 "http://$1"

    ./myget.sh site1/foo
    ./myget.sh site2/bar
    ./myget.sh site3/baz

-- 
Bob Miller                              K<bob>
kbobsoft software consulting
http://kbobsoft.com                     kbob at jogger-egg.com