So I want to resize all jpg and png in 1 script
here is what is currently using, is there any way to run this for jpg and png at the same time?
find file/path -type f -name '*.PNG' -exec sips -Z 800 -s formatOptions 60 {} \;
"How to make find find files based on two different patterns": the -o ("or") option.
find file/path -type f \( -name '*.PNG' -o -name '*.JPG' \) -exec ...
Note that your question should have been phrased like that, as it has nothing to do with sips in particular.
Note that you can use -iname for case-insensitive matching, in case not all your file extensions are uppercase.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With