Simple example of a bash builtin command named “wait”

ABOUT wait

wait waits for the process identified by process ID pid (or the job specified by job ID jobid), and
reports its termination status. If an ID is not given, wait waits for all currently active child
processes, and the return status is zero. If the ID is a job specification, wait waits for all processes
in the job's pipeline.

A TYPICAL SHELL EXPOSURE
[bash]
$sleep 10 &
[1] 7122
$wait 7122
[1]+ Done sleep 10
$sleep 20 &
[1] 7125
$wait 7125
[1]+ Done sleep 20
$sleep 20 &
[1] 7128
$wait 7128
[1]+ Done sleep 20
$sleep 20 &
[1] 7135
$wait 7135
[1]+ Done sleep 20
$wait
$wait
$

[/bash]

LINK
https://www.computerhope.com/unix/uwait.htm