<s>
In	O
Unix	B-Application
shells	B-Operating_System
,	O
wait	O
is	O
a	O
command	B-Application
which	O
pauses	O
until	O
execution	O
of	O
a	O
background	B-Operating_System
process	I-Operating_System
has	O
ended	O
.	O
</s>
<s>
where	O
n	O
is	O
the	O
pid	B-Operating_System
or	O
job	O
ID	O
of	O
a	O
currently	O
executing	O
background	B-Operating_System
process	I-Operating_System
(	O
job	O
)	O
.	O
</s>
<s>
If	O
n	O
is	O
not	O
given	O
,	O
the	O
command	B-Application
waits	O
until	O
all	O
jobs	O
known	O
to	O
the	O
invoking	O
shell	O
have	O
terminated	O
.	O
</s>
<s>
wait	O
normally	O
returns	O
the	O
exit	B-Operating_System
status	I-Operating_System
of	O
the	O
last	O
job	O
which	O
terminated	O
.	O
</s>
<s>
This	O
command	B-Application
can	O
be	O
useful	O
where	O
part	O
of	O
a	O
script	O
can	O
execute	O
in	O
parallel	O
to	O
implement	O
a	O
barrier	O
where	O
an	O
upcoming	O
section	O
depends	O
on	O
the	O
successful	O
completion	O
of	O
the	O
preceding	O
sections	O
.	O
</s>
<s>
The	O
following	O
example	O
will	O
fetch	O
the	O
src/	O
directory	O
from	O
a	O
machine	O
named	O
iona	O
using	O
rsync	B-Application
and	O
simultaneously	O
update	O
the	O
libraries	O
on	O
which	O
this	O
program	O
depends	O
,	O
before	O
building	O
the	O
combination	O
.	O
</s>
