Conversation
Notices
-
Alexandre Oliva (moved to @lxo@gnusocial.jp) (lxo@gnusocial.net)'s status on Sunday, 08-Oct-2023 13:04:23 EDT
Alexandre Oliva (moved to @lxo@gnusocial.jp)
answering your question, I'd normally use GNU parallel to orchestrate shell commands over multiple files. to skip already-converted files, I'd just add a conditional to the parallel command, something like:
parallel < input-list --gnu -j<N> test -f {.}.<ext> '||' <convert> {}
the {} notation saves a lot of trouble with whitespace quoting as well
and if you have the files as an argument list rather than in a file, use ::: "$@" at the end instead of < file