Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Convert .rhtml templates to .html.erb (See related posts)

// run this shell command from within the dir you want to change. You will need to change the hg line to use which ever version control you are using, or if you're not use version control (naughty!) then leave out the hg letters altogether.

for f in $(find . -name '*.rhtml') ; do c=$(dirname $f)/$(basename $f .rhtml).html.erb ; hg mv $f $c ; done

You need to create an account or log in to post comments to this site.


Click here to browse all 5140 code snippets

Related Posts