This one time, at band camp, Voytek Eymont wrote:
>just another dumb question:
>
>I often use a 'runfor' utility, which I do not seem to have on the Linux
>machine, how do I make a simple loop to catch up processing of web logs
>with logresolve:
>
>I have a bunch of web logs in the format of:
>
>2004-05-31-access.log  2004-06-26-access.log  2004-07-11-access.log
>2004-06-01-access.log  2004-06-27-access.log  2004-07-12-access.log
>...
>
>I would like to logresolve them into say:
>
>2004-??-??-access_r.log
>
>like:
>logresolve < 2004-05-31-access.log > 2004-05-31-access_r.log
>
>but, not quite sure how to loop it...?

for i in *; do f=`echo $i | sed 's/.log/_r.log/'`; logresolve $i > $f; done

-- 
[EMAIL PROTECTED]                           http://spacepants.org/jaq.gpg
-- 
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