I have a bunch of images that I'd like to rename as follows:
*.png.png --> *.png
*.jpeg.jpg --> *.jpg
*.JPEG --> *.jpg
The only thing I've tried thus far is mv *.png.png *.png
, but I knew that wouldn't work, but took a chance nevertheless.
Is there a simple (or maybe not) way to batch rename files with this pattern?
mmv
. It allows to specify wildcards; make sure you use quotes so that the shell does not expand those wildcards andmmv
can act on those.