Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

applescript/shell script - check if image

How do I check if a file is an image in applescript or shell script. I am aware of the file command but it doesn't say if it is an image or not.

like image 453
gadgetmo Avatar asked Apr 23 '26 03:04

gadgetmo


1 Answers

what about checking mime type of the file?

 file --mime
like image 126
Jan Vorcak Avatar answered Apr 24 '26 15:04

Jan Vorcak



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!