I have a large number of filenames that have been poorly formatted, which I would like to clean up. The idea is to reformat the names so that they are more sensible.
Here are some examples:
01harpharm_3.1.aiff 1
01harpmute_2.6.aiff 1
01harpmute_2.6.aiff 2
01harpmute_2.6.aiff 3
01harpmute_2.6.aiff 4
If we look at the last example, the goal would be to rewrite
01harpmute_2.6.aiff 4
as 01harpmute_2.6.4.aiff
.
I would like to use bash for this, either via a script (for loop), find, rename, or a combination thereof. Would anyone have opinions on how to best tackle this?