euglug.org

[Eug-lug] simple script?

작성자

카테고리:



Cory PetkovsekSun Jun 20 16:55:32 PDT 2004

On Sun, Jun 20, 2004 at 04:48:41PM -0700, Mr O wrote:
> How do I add an argument to a simple shell script without fully
> editing the script? I want to be able to connect to various
> sites to pull down game maps and have the basic argument saved
> and able to run but get an error saying no URL specified when
> simply trying to append the site name on the command line.


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

shell arguments are $1, $2, $3.... $@ for all, $0 for program name  (ie
./myscript.sh if that is what you typed).

Cory

-- 
Cory Petkovsek                                       Adapting Information
Adaptable IT Consulting                                Technology to Your
(858) 705-1655                                                   Business
cory at AdaptableIT.com                                  www.AdaptableIT.com