Shell has some built-in variables :
$! PID of the last background command
$? status of execution of last command
$$ PID of the current runnin process
$# number of arguments passed to the running script
$PWD current workin directory
etc...
man sh; man ksh or even what shell you are using for more infos
The difference between "[tt]wait[/tt]" and "[tt]wait $ps_id[/tt]" is that the "[tt]wait[/tt]" will wait for all subprocesses of this process to end, where the "[tt]wait $ps_id[/tt]" is waiting for a specific process to end, the one who's PID was captured in the variable "[tt]ps_id[/tt]".
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.