I am writing a bash script, that needs to check the different mime-types of different files. The files should support rdf4j REST API (http://docs.rdf4j.org/rest-api/#_content_types).
Normally, using file --mime-type <file>
provides the correct mime type. However, when running on a .ttl file, it returns wrong:
foo.ttl: text/plain
instead of text/turtle
Does it exist a better way to solve this, then checking every file-ending, for each file?