Forking / Multi-Threaded Processes | Bash
In bash scripts (non-interactive) by default JOB CONTROL is disabled so you can’t do the the commands: job, fg, and bg. Here is what works well for me: #!/bin/sh set -m # Enable Job Control for i in `seq 30`; do # start 30 jobs in parallel sleep 3 & done # Wait for all …