[bash] How do I rename the extension for a bunch of files?

rename 's/\.html$/\.txt/' *.html

does exactly what you want.