Wing Ki (Catherine) Wong

PhD in Bioinformatics, Scientist in Antibody Development

Parallel in native bash

N=5
num_jobs="\j"
for F in ./*.txt
do
  	if [ -f ${F%.txt}.csv ]; then
                continue
        fi
	while (( ${num_jobs@P} >= N )); do
        wait -n
   done
       	echo ${F%.pip}.ht
        ../main.o -i ${F} -o ${F%.txt}.csv &
done