I am trying to do a global replacement of a value in a directory. The command I am using is
"perl -p -i -e 's|<old text>|<new text>|g' *"
This of course touches all files in the directory and I am getting errors on executable programs that it pass through. Is there a way to select just the ones that need changing and then do the perl command just on that one? Such as
grep "<old text>" * |exec perl -p -i -e 's|<old text>|<new text>|g' $1
or something like that.
"perl -p -i -e 's|<old text>|<new text>|g' *"
This of course touches all files in the directory and I am getting errors on executable programs that it pass through. Is there a way to select just the ones that need changing and then do the perl command just on that one? Such as
grep "<old text>" * |exec perl -p -i -e 's|<old text>|<new text>|g' $1
or something like that.