I'm looking for the regular expression to find all the files in a folder (and its subfolders) that do not have an extension and add the extension .mp3 to these files only (i.e. the files which already have the extension should not get an additional one)?
For example:
test is made into test.mp3
test1.mp3 remains as it is
An additional problem I have is that some of my file names have spaces.
So far I use the following expression for the first part (with maxdepth specifying the depth in terms of folder structure I want to have):
find . -maxdepth 1 ! -name "*.*" -o -name ".*[^.]*"
I cannot work out how to do the adding of the .mp3 extension.