This script was built around the requirement of having a large volume of files in the /root/pictures/ directory – named with the naming format july-123.jpgwhich I wished to rename to holiday-123.jpg (Though you can adjust the below as required to achieve your required outcome).
for f in /root/pictures/july*; do
a=”$(echo $f | sed s/july/holiday/)”
mv “$f” “$a”
chmod +x /scripts/bulk-rename
You should now be able to run this script as below, which will go through and bulk rename all of your files starting with july to holiday. (eg holiday-123.jpg)