Bulk rename file extensions in bash

Sun, 02 April 2017

rename.sh
#!/bin/sh

# In this example, I'm renaming .jpeg to .jpg

for f; do
    mv "$f" "${f%.jpeg}.jpg"
done