On Tue, 13 Mar 2001, Marc Mutz wrote:
> Philips wrote:
> > 
> <snip>
> >         find -type f -iname '*.c' -exec perl -i~ -p -e 's/suxx/rulezz/ig' {} \;
> <snip>
> 
> This is extremely slow, because it starts a new perl interpreter for
> each file. Better is
> 
> find . -name '*.c' | xargs perl -pi\~ -e 's/suxx/rulezz/g;'
> 
> You'll love xargs once you know it...
> 
> Marc
> 

Umm, many thanks!   

Either way, it's a couple of orders of magnitude quicker than changing 100+ 
HTML docs by hand....        ;-)

This here Linux box is just so full of neat tricks.....    :)

Chris
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.linux-learn.org/faqs

Reply via email to