I have a command:
python test.py -i input_file -p parameter_1 -o output_file
I want to run this for multiple input files, 4 input files at a time (in parallel) and once they finish run the next 4 and so on using a bash script.
I am not able to find the right answer.
I am trying the following but I am not sure if it is right
for (( n=0; n<12; n++ ))
do
((j=j%4)); ((j++==0)) && wait
python test.py -i input_list[n] -p parameter_1 -o output_$n &
done
Thanks in advance!