Is there a way to find out the MIME type (or is it called \"Content-Type\"?) of a file in a Linux bash script?
The reason I need it is because ImageShack appears to
one of the other tool (besides file) you can use is xdg-mime
eg xdg-mime query filetype
if you have yum,
yum install xdg-utils.noarch
An example comparison of xdg-mime and file on a Subrip(subtitles) file
$ xdg-mime query filetype subtitles.srt
application/x-subrip
$ file --mime-type subtitles.srt
subtitles.srt: text/plain
in the above file only show it as plain text.