Is there any built in feature in bash to wait for any process to finish? We use " wait" only for the child processes to finish. I would like to know if there is any way to wait for any process to finish before proceeding in any script.
A mechanical way to do this is as follows but I would like to know if there is any built in feature in bash.
while ps -p cat $PID_FILE
> /dev/null; do sleep 1; done