Consider we have many photos with names like DSC_20170506_170809.JPEG. To rename the photos so that they follow the pattern Paris_20170506_170809.JPEG,
I've wrote the following script that works perfect.
for file in *.JPEG; do mv ${file} ${file/DSC/Paris}; done
My question is , how we can write this script using a whilewhile loop instead of a forfor loop?