This is a follow-up question to this one.
So far, I've cobbled together the following find command, which is intended to print (and once properly tested, -delete) all JPGs that are 200 x 200px or lower:
find . -iname "*.jpg" -type f -exec bash -c 'for i; do size=($(identify -format "%wx%h" "$i")); (( size[1] < 200 && size[2] < 200 )); done;' \; -print
However, piping the command through wc -l indicates that it's selecting every image in the target set.
Breaking it down to the for loop itself shows that it's looping through images much larger than 200px:
for i in *.jpg; do size=($(identify -format "%wx%h" "$i")); (( size[1] < 200 || size[2] < 200 )); echo $size; done;
210x163
1920x1200
1920x1200
240x240
246x138
215x215
1920x1200
1920x1200
240x240
240x240
1920x1200
To me this seems to indicate identify is probably the culprit here in failing to match only those images that are lower than the specified dimensions, but as far as I've been able to tell, the syntax for the matching is correct.
Anyone have an idea what could be causing this?