Hi Voytek,

I think you are possibly after the '&&' control operator (check your
shell's man page).

e.g.

if [ -s /path1/file1 ] && [ -s /path2/file2 ]; then
        # do stuff
fi

Hope that helps,


        Dave.

On Thu, 2004-08-19 at 08:51, Voytek Eymont wrote:
> 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

Reply via email to