[EMAIL PROTECTED] said:
> I'm not exactly sure what you mean but is this what you want:
>
> #Script Start
> cd /home
> export DATE=`date -d yesterday +"%Y-%m-%d"`
> for i in `ls` ; do
>         logresolve /home/$i/logs/$DATE.access.log
>>/home/$i/logs/$DATE.access.rog
> done
> #Finished

Scott,

many thanks, yes, that's what I needed !

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
./logsproc: /home/webmaster/logs/2004-08-01-access.log: No such file or
directory

my desired target is like 'if exists /home/$domain/logs'

#Script Start
cd /home
export DATE=`date -d yesterday +"%Y-%m-%d"`
    for i in `ls` ; do
        logresolve < /home/$i/logs/$DATE-access.log >
/home/$i/logs/$DATE-access
    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