I need to create a script that returns the default app to be used for a given file extension (including the path). I had a look at the
file command which can return the mime type and
xdg-open which would open a file. But what I'd like to get is
How do I do that?