I have the following snippet in a bash script
#!/bin/bash
for ((i=100; i>=70; i--))
do
convert test.png -quality "$i" -sampling-factor 1x1 test_libjpeg_q"$i".jpg
done
How can I execute a for loop in parallel using all cpu cores. I saw gnu parallel, but here I need the name of the output file in a specific naming scheme, as shown above.
source
share