wait

Wait for background jobs

low risk

interactive breakdown — edit the command and press Explain
$ 
What it does

Pauses until the given background jobs finish and returns their exit status.

Examples
sleep 5 & waitWait for a background job · explain & risk-check →
wait $pidWait for a specific PID · explain & risk-check →
Related
jobs bg fg
Open the full explainer →More in Shell & Scripting

Reference text is hand-written and may be incomplete — check man wait for your version. Test destructive commands on a non-production system first.