Code I Like: Batch Subversion Rename (Replace Underscore with Hyphen), Bash Script
That's an unwieldy title, if I ever saw (wrote?) one. Still it describes the code in question exactly, so unwieldy will have to do for this post.
Anyway, for SEO purposes I've wanted to rename some of my files from underscore delineated (_) to hyphen delineated (-) for a couple of years now. I chose wrong when I originally launched this site, and since it's huge (something like 400 static pages), I never wanted to actually go through with the renaming. And that was before I got the site into Subversion. With Subversion in place I couldn't even use one of the many little file renaming apps out there. I'd have to do the work within SVN or else things would be bad. Very bad.
A disheartening problem.
(more…)