[EMAIL PROTECTED] wrote on 02/08/2004 01:16:09 PM:

> 
> Voytek said:
> > how can I refine target to be more specific, and, avoid mishits, not 
all
> > dirs below '/home' are web roots; ideally, I'd like to run the loop 
only
> > if 'logs' dir exists, I'm getting
> >
> > ...
> > ./logsproc: /home/voytek/logs/2004-08-01-access.log: No such file or
> > directory
> 
> 
> I think I worked it out, I'm no longer getting mishits
> (just need to see if I still get hits on correct logs, though..)
> 
> I've added:
> 
> if [ -s /home/$i/logs/$DATE-access.log ] ; then
> (logresolve stuff)
> fi
> 
That will do it.
it doesn't actually check if it exists, it checks if its greater then 0 
bytes (which is probably a better check then -e).

Cheers,

Scott

-- 
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