Quote:
Originally Posted by drjones
For a slightly safer version of that command, that will back up your files, and only try to modify .html files, try this.. should run from the document root of your webserver.
perl -pi'.orig' -e 's/$FIND/$REPLACE/g' `find ./ -name "*.html"`
It will back up the all the original files with a .orig extension as it runs, so if you make a mistake with the regex you can start over. The files with the text substitution will have the original file name.
|
I realize now that I had meant for that to be cat *.html and not just the wilcard. It was late when I posted that...
I like your solution better than mine though.. I need to get more comfortable with perl.