Wait for background jobs
low risk
Pauses until the given background jobs finish and returns their exit status.
sleep 5 & waitWait for a background job · explain & risk-check →wait $pidWait for a specific PID · explain & risk-check →Reference text is hand-written and may be incomplete — check man wait for your version. Test destructive commands on a non-production system first.