Issue
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 {} \;
Solution
"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.
Answered By - DevSolar Answer Checked By - Marie Seifert (WPSolving Admin)