While I don’t necessarily think CamelCase is the best way to name your coffeescript files, I was unhappy that we weren’t consistent on my project.
I was going to write a pure find/sed/mv script but found Mac OS X’s sed doesn’t support text transforms like L so I finally delved into ruby -n:
find . -iname *_*.coffee | ruby -ne 'puts "mv #{$_.chomp} #{$_.gsub(/_(.)/) { $1.upcase }}"' | bash
About the Author