I have the following while loop that runs in parallel. ( The logProcess is a function that I define earlier in my script. )
while read LINE; do
logProcess $LINE &
done <<< "$ELS_LOGS"
wait
I need to find a way to limit the number of processes running. I know there are parallel processes running. How do I convert the loop to use that command?