Snippet for replacing certain code within PHP code
Replaces/searches by row on unix commandline:
find folder/* -type f -name \*.php -exec sed -i.bak.php "s/function_name('blahblah');/\$variable['blahblah'];/" {} \;
– searches in certain folder
– searches in .php files
– makes backup of modified files
NB! Some things must be escaped with \ mark
Fix for old code when GLOBALS are needed on newer PHP versions How to add publickey to Unix SSH when VNC like console lacks of copy/paste functionality