I am using ImageMagick. I am trying to write a script which launch 'n' convert runs. 'n' is the number given by user. The script must wait for all 'n' background/concurrent processes to complete before launching a new set of 'n' processes (or the number of processors left if fewer than 'n'. Here is my code:   #!/bin/bash for(( i=1; i<$n; i++)) do    xload -update 1 &   convert ${dir}/*.jpg -flip -set filename:t '%d/%t-change' '%[filename:t].jpg'   wait  doneHow can I convert first 'n' files followed by the next 'n' files...so on
Writing a script which converts and use xload
bash;imagemagick;xming