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

------------------
#Script Start
cd /home
export DATE=`date -d yesterday +"%Y-%m-%d"`
    for i in `ls` ; do
    if [ -s /home/$i/logs/$DATE-access.log ] ; then
        logresolve < /home/$i/logs/$DATE-access.log >
/home/$i/logs/$DATE-access
    fi
    done
#Finished



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