#!/bin/bash for img in *.JPG; do mv -- "$img" "${img%.JPG}.jpg" done exit