I am using a script for converting all the images in my folder to flop operation. The script is like this:
for f in *.jpg; do
new="${f%%.jpg}_flop.jpg";
convert "$f" -flop -quality 100 "$new";
done
Now I have found that there may be also images with the extension .JPG
I thought of adding a new for loop that looks like this:
for f in *.JPG; do
new="${f%%.jpg}_flop.jpg";
convert "$f" -flop -quality 100 "$new";
done
I think that there is a syntax for ignoring the case, and this way I can do a single loop instead of 2, any help?
More, if there will also be the extensions .jpeg
or .JPEG
, is there a syntax for this, too?