Thursday, January 29, 2004

Replace a string over a directory tree...

I received this tip from a coworker of mine, John Sutherland. Ever need to search and replace a string over a directory tree?

find . -name '*.html' -exec perl -pi -e 's/old text/new text/g' {} \;

No comments: