There are always things to wait for on a Linux system – for upgrades to complete, for a process to finish, for coworkers to log in and help resolve a problem, or for a status report to be ready. Fortunately, you don’t have to sit twiddling your thumbs. Instead, you can get Linux to do the waiting and let you know when the work is done. You can do this by crafting the waiting and the condition for which you are waiting in a script, or you can use the wait command – a bash builtin that will watch for a process running in the background to complete.
Crafting waiting within scripts
There are many ways to craft waiting within a script. Here’s a simple example of simply waiting for a period of time before moving on to the next task:
Source:: Network World – Data Center