I found a post here How can I run mogrify, but prefix the filename? which is talking about resizing a batch of images.
In it there's a for in
shell script. How do I except some single file(s) while iterate most rest of them.
for image in *.png; do convert "$image" -resize 29.5% "$(dirname $image)/th_$(basename $image)"; done
For example:
I have those files in my folder (the don't have any common names like a same prefix):
example_1_some_suffix.png
some_prefix_example_2.png
example_3.png
example_4.png
example_a.png
I can use for images in *.png
to iterate all, but what if I want only to do things with the first four files while leave the fifth one out?