The eval Command


The wait Command

The wait command can be used to force a script to pause its execution of new commands until a background process completes.

Command syntax:


What was that PID?

To retrieve the PID of the last process started in the background, use “$!”.


Using $!

If you want to start three processes (s1, s2, s3) in the background and wait for only s1 & s2, you can use $!.


Complex Script Dependencies

Sometime you will have a number of scripts that are interdependent in different ways.  We will look at a few examples and how to address them in class.