I got a shell variable holding this path
/usr/share/man/man1/bitmap.1
There COULD be a file named bitmap.1, but it could also be bitmap.1.z, bitmap.1.gz, bitmap.1.Z.
Now I want to pass the real file to a function while at the same time resolving the correct file, like
function process {
# do something
}
path="/usr/share/man/man1/bitmap.1"
process ${path}.(z|Z|gz) # here the shell shall resolve the real filename
Is there a way to do it elegantly or to I have to test if bitmap.1, bitmap.1.z etc. exit and then pass that file to the function???
Forget to mention I'm restricted to the Bourne-Shell, so no Brace Expansion at hand -,-.