I have a file with extensions:
f1=f1.e1.e2.e3.sh.pl.cpp
I have an array containing a list of extensions:
exts=(sh pl py)
I want to remove the extensions in exts from the filename's. Is there a trick to do it, I'm thinking of something of this kind:
${f1%.${exts[@]}}
It obviously does not work.