Whenever I see a script with a five or ten minute wait in it, I ask
myself what it's waiting for. I recently saw a script which started a
database, waited 10 minutes (using sleep 600), then started an app
server (sleep 600), then started another application (sleep 600, then
exit!). That script gets a lot of sleep. The
reason behind the delays was to wait for the previous process to
complete. But that could be confirmed in a few ways. Ordinarily, the
previous command will have an exit code which you can test for, or you
could...
[More]
Tags: 
wait
script
sleep