Description of problem: It'd be great if file could be used to check if file matches a specific file output pattern. Instead of doing 'file foo | grep -q "ELF"', you could do 'file --check="ELF" foo' and file would return either 0 or 1 depending on whether it's identification matches. That would allow file to be used to find files of a certain type, which is occasionally needed and users ask about [1]: find -exec file --check="LSB pie executable" {} \; would print all "LSB pie executable" matches. The argument would preferably be an pcre regexp, or a glob pattern. It would also be useful to do checks, e.g. 'file --check=stripped %{buildroot}/usr/bin/foo'. [1] https://unix.stackexchange.com/questions/483871/how-to-find-files-by-file-type
Interesting idea, I will try to implement this in (near) future.