Sunday, 8 September 2013

SED (linux) issue with recursive

SED (linux) issue with recursive

I'm trying to replace the string $PHP_SELF by $_SERVER['PHP_SELF'] in all
php files. I've ran this command, but it simply remove the string and
replace by nothing:
cd /home/rg/public_html && find . -type f -print0 | xargs -0 perl -i.php
-pe "s/\\\$PHP_SELF/\$_SERVER['PHP_SELF']/g"
Any ideas?

No comments:

Post a Comment