- install herbalizer somewhere on your PATH, i put mine in
~/bin
cd ~/bin && wget http://openmbta.org/herbalizer && chmod +x herbalizer
- do a dry run to see if your renames look ok
find . -name '*haml' | xargs ruby -e 'ARGV.each { |i| puts "herbalizer < #{i} > #{i}.erb" }'
- if you're happy, pipe it to bash
find . -name '*haml' | xargs ruby -e 'ARGV.each { |i| puts "herbalizer < #{i} > #{i}.erb" }' | bash
- use
rename
to get rid of the.haml
part of the filename
brew install rename
if you dont have it
do a dry run with find . -name "*erb" | xargs rename -n -e 's/.haml//' ARGV
if it looks good, do it for real by removing -n
find . -name "*erb" | xargs rename -e 's/.haml//' ARGV