in reply to Is this normal for File::Find or where did I go wrong.
If you wanted to limit it to html files only, then afind /the/start/dir -type f -exec perl -i~ \ -e 's/origtext/changedtext/g;print' {} \;
would have worked. In fact, using sed or tr instead of Perl would work, 'cept I don't know how to do inplace editing with them.find /the/start/dir -type f -name '*.html' ...
Of course, this doesn't have the reusability factor of your solution; but in this case I would have sacrificed it for quickness.
A big part of administration is knowing the right tool for the job.
|
|---|