for i in *.JPG; 
do mv $i ${i%%.JPG}.jpg; 
done

