$1 will hold the first argument

Martin Visser ,CISSP
Network and Security Consultant 
Consulting & Integration
Technology Solutions Group - HP Services

3 Richardson Place 
North Ryde, Sydney NSW 2113, Australia 

Phone: +61-2-9022-1670    
Mobile: +61-411-254-513
Fax: +61-2-9022-1800     
E-mail: martin.visserAThp.com
 
 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Voytek
> Sent: Tuesday, 3 August 2004 9:17 AM
> To: slug
> Subject: [SLUG] passing parameter to a shell script
> 
> How do I pass a parameter to a script, I have something like, 
> and, I'd like to run it as:
> 
> awstatsproc thisdomain.tld
> 
> # cat awstatsproc
> #Script Start
> 
> for j in `seq -w 1 12`; do
>   for i in `seq -w 1 31`; do
>     if [ -s /home/%name.com.au%/logs/2004-$j-$i-access.rog ] ; then
>       /usr/local/awstats/wwwroot/cgi-bin/awstats.pl 
> -logfile=/home/%name.c om.au%/logs/2004-$j-$i-access.rog 
> -config=www.%name.com.au% -update
>     fi
>       let i=i+1
>   done
>     let j=j+1
> done
> 
> #Finished
> 
> btw, whats a good reference site for shell scripts info ?
> 
> 
> 
> 
> --
> Voytek
> --
> SLUG - Sydney Linux User's Group Mailing List - 
> http://slug.org.au/ Subscription info and FAQs: 
> http://slug.org.au/faq/mailinglists.html
> 
> 
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to