Hiya Voytek,

A lot of your scripting questions of late are answered in the Advanced Bash Scripting 
Guide.  The examples for each concept in the guide also introduce other ideas and 
examples of syntax, so it's worth giving it more than just a quick browse.
http://www.tldp.org/LDP/abs/html/

The bash guide for beginners provides a reasonably good primer, and covers a few 
tricks also.
http://www.tldp.org/LDP/Bash-Beginners-Guide/html/

Happy scripting, :)
- Rog

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Voytek Eymont
> Sent: Thursday, 19 August 2004 8:51 AM
> To: [EMAIL PROTECTED]
> Subject: [SLUG] testing for file existanace, and an 'and' in a script
> 
> I want to check if two files exists, if so, run awstats, how 
> do I put an 'and', and, is that the way to check it ?
> 
> 
> if [ -s /home/$DOMAIN/logs/2004-$j-$i-access.rog ] AND [ -s 
> /etc/awstats/awstats.www.$DOMAIN.conf ]; then 
> /usr/local/awstats/wwwroot/cgi-bin/awstats.pl  
> -config=www.$DOMAIN -update fi
> 
> 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