Not being an sed expert, I need to replace all instances of the string $PHP_SELF with $_SERVER['PHP_SELF'] globally in a directory.
This is an "old school" osCommerce application that I need to resurrect temporarily for a showcase.
Not being an sed expert, I need to replace all instances of the string $PHP_SELF with $_SERVER['PHP_SELF'] globally in a directory.
This is an "old school" osCommerce application that I need to resurrect temporarily for a showcase.
Copyright © 2021 Jogjafile Inc.
seddoesn't recurse on it's own so you'll need to use another tool for that,findis generally the right answer.Run this in the top-level directory.
sedwill make a backup of each file it reads with a.bakextension (regardless if it actually does a replacement). If you don't want the backup behavior, use-iinstead of-i.bakI recommend you first try this on a test directory to make sure it meets expectations.