if you use:
 file --brief --mime "$file"
 you would get too little practically unusable info.
 file --brief "$file"
 would give you what you need when it comes to pdf files (yes, the
structure of pdf files depend on their version), but with images it
gives you data relating to the specific file, such as:

 org/wikipedia/en/Big_Bang_files/16px-He1523a.jpg|JPEG image data,
baseline, precision 8, 16x18, components 3
 org/wikipedia/en/East_Germany_files/20px-DDR_-_helfer_der_volkspolizei.jpg|JPEG
image data, baseline, precision 8, 20x13, components 3
 
org/wikipedia/en/Country_code_top-level_domain_files/23px-Flag_of_Hong_Kong.png|PNG
image data, 23 x 15, 8-bit colormap, non-interlaced
 
org/wikipedia/en/Country_code_top-level_domain_files/45px-Flag_of_Venezuela.png|PNG
image data, 45 x 30, 8-bit colormap, non-interlaced

 is there a way to go:
 file --brief --no-specifics "$file"

 to just get:

 JPEG image data, baseline, precision 8, components 3
 PNG image data, 8-bit colormap, non-interlaced

Reply via email to