1 Sep
2023
1 Sep
'23
10:40
On Fri, 1 Sep 2023 07:59:55 +0000 (UTC), Robert Webb via openSUSE Users <users@lists.opensuse.org> wrote:
$ find . -maxdepth 1 -name '*.JPG' -exec sh -c 'F={} ;convert "$F" -quality 50 -verbose "${F%.JPG}.png"' \;
Excuse me. The filename that 'find' substitutes for "{}" above is unprotected, and this will fail in many cases. Using more quotes will help, but it will still fail for filenames with quotes. Try this instead: $ find . -maxdepth 1 -name '*.JPG' -exec sh -c \ 'convert "$1" -quality 50 -verbose "${1%.JPG}.png"' convert '{}' \; -- Robert Webb