Skip to content

Instantly share code, notes, and snippets.

@peterjaap
Created October 30, 2013 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save peterjaap/7233448 to your computer and use it in GitHub Desktop.
Save peterjaap/7233448 to your computer and use it in GitHub Desktop.
Replace short open tag PHP with full form ones. Note; does not account for short open tags followed by a line break. <? to <?php, <?// to <?php //, <?/* to <?php /*, <?= to <?php echo
find . -type f -print0 |xargs -0 sed -i -e 's/<? /<?php /g' -e 's/<?\/\//<?php \/\//g' -e 's/<?\/\*/<?php \/\*/g' -e 's/<?\=/<?php echo/g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment