linux ubuntu

Perl recursive replace in files

While working on a ZF application, i had some models under the wrong namespace, and changing all the files from Default namespace to Application would have taken me ages. After a bit of google-ing i’ve found this great perl onliner:

perl -p -i -e 's/Default_/Application_/g' `find ./ -name '*.php'`

1 reply on “Perl recursive replace in files”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.