wait -n blocks until any one of the shell's background jobs completes and then returns its status, available since Bash 5.1. It lets a script run several jobs in parallel and reap them as they finish. Plain wait with no argument waits for all of them.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.