Thanks a lot for getting the initial work done, however it will break some code or not catch all the shorthand if any of the following are met:
you will need regex lookahead, which sadly plain old sed doesn't support, you'll need ssed for this.
a quick install will fix this though and we can use perl like regexing.
apt-get install ssed
now our pattern
find . -iname '*.php' -type f -print0 | xargs -0 ssed -i -R -e 's/<\?\=/<?php echo /g' -e 's/<\?(?!php)(?!=)/<\?php /g'
This will cover
"<?=" to "<?php echo " "<?" to "<?php " .... but not "<?php"
Thanks a lot for getting the initial work done, however it will break some code or not catch all the shorthand if any of the following are met:
you will need regex lookahead, which sadly plain old sed doesn't support, you'll need ssed for this.
a quick install will fix this though and we can use perl like regexing.
now our pattern
This will cover