I need to add a number just before the extension of the files with a Bash script. For example, I want to convert a file name like `abc.efg` to `abc.001.efg`. The problem is that I don't know what is the extension of the file (it is one of the parameters of the script).

I was looking for the quickest way of doing this.