You'll need to delete all the backup versions of the files afterward with this command, BTW. I don't think BSD sed will permit in-place editing using stdin.
The complete command is therefore:
% cd path/to/ZendFramework/library
% find . -name '*.php' | grep -v './Loader/Autoloader.php' | \
xargs sed -E -i~ 's/(require_once)/\/\/ \1/g'
% find . -name '*.php~' | xargs rm -f
-Matt
On Mon, Jun 29, 2009 at 7:03 PM, Matthew Ratzloff
<matt@...> wrote:
The documentation assumes GNU versions of find and sed, and should probably note that. The equivalent BSD command (which will of course work on Mac OS X) is:
% cd path/to/ZendFramework/library
% find . -name '*.php' | grep -v './Loader/Autoloader.php' | \
xargs sed -E -i~ 's/(require_once)/\/\/ \1/g'
I've tested this and it works. It might be good to add this to the documentation.
-Matt