I have file names in the following format:
images.jpeg-028
I would like to transform the file name of every file in a directory from the format above to the following format:
images-028.jpeg
All the numbers at the end of the filenames are three digits long.
Based on this thread on another forum, I am thinking of something along the lines of:
for i in *; do mv "$i"\-(\d+) \-(\d+)"$i"; done
But am open to other Bash-based approaches.