R
Ron M.
I have a Perl script that searches through a directory and its
subdirectories and finds all files with a certain string in the
filename. Then it replaces some text in each of those files. The
script is below. This is how it would appear to operate on all ".html"
files, replacing "oldstring" with "newstring":
perl -i.bak -pe 's/oldstring/newstring/g' `find . -name *.html\*`
My question is this: the script creates a backup of EVERY file with
the suffix ".bak" and I don't want it to do this. How do I modify the
above script so that this won't happen?
Thanks,
Ron M.
subdirectories and finds all files with a certain string in the
filename. Then it replaces some text in each of those files. The
script is below. This is how it would appear to operate on all ".html"
files, replacing "oldstring" with "newstring":
perl -i.bak -pe 's/oldstring/newstring/g' `find . -name *.html\*`
My question is this: the script creates a backup of EVERY file with
the suffix ".bak" and I don't want it to do this. How do I modify the
above script so that this won't happen?
Thanks,
Ron M.