At 11:50 PM 6/7/01 +0000, scott lutz wrote:
>I have a this fancy bit of recursive search and replace code that I picked 
>up somewhere, but I would greatly appreciate it if one of the gurus could 
>explain it in English for me:
>
>find . -type f -print0 | xargs -0 perl -pi -e 's/<<your original text
>here>>/<<your new text here>>/g'

John already did a fine job of explaining this, but I wanted to add that it 
is a great expression that I find myself using almost daily.  You might 
look at the man pages for find and xargs to learn more about what is 
happening.  You'll find a lot of cool things like other values for -type 
(like 'd' for directory), other switches (like -name... modify the above to 
catch files ending in .html with -name "*.html") and -exec and more.

Enjoy!

Cheers,
Jeff



Reply via email to