Jon Forsberg wrote...

> file -b --mime-type NONEXISTING_FILE > mimetype.txt && echo "success"
> 
> will print "success" even though NONEXISTING_FILE does not exist, and
> the string "cannot open `NONEXISTING_FILE' (No such file or directory)"
> will be written to mimetype.txt, and nothing will be printed to
> stderr.

It's a feature, see upstream discussion at
http://mx.gw.com/pipermail/file/2014/001317.html and the links
provided there.

Use file's -E option.

    Christoph

Attachment: signature.asc
Description: Digital signature

Reply via email to