Created
September 7, 2013 12:57
-
-
Save finger-berlin/6475362 to your computer and use it in GitHub Desktop.
sed / gsed script to convert PHP code into ruby: <?php echo $camelCase ?> into <%= snake_case %>
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ gsed -e 's|<?php echo \(.*\) ?>|<%= \1 %>|g' -e 's/$\([a-z]*\)\([A-Z]\)/\1_\l\2/g' old_php_view.php > new_rails_view.erb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment