title: bash, getting the mime type of a file handle
body: <p>How would i get the mime type of a file-handle without saving it to disk?</p>
  
  <p>What i mean is a file that is not saved to disk, rather: i extracted it from an archive and plan on piping it to another script. </p>
  
  <p>Say i extracted the file like this:</p>
  
  <pre><code>tar -xOzf images.tar.gz images/logo.jpg | myscript
  </code></pre>
  
  <p>Now inside myscript I would like to check the mime type of the file before further processing it. How would it go about this?</p>