What is difference between wait and sleep?
wait
sleep
sleep just delays the shell for the given amount of seconds.
wait makes the shell wait for the given job. e.g.:
workhard & [1] 27408 workharder & [2] 27409 wait %1 %2
delays the shell until both of the subprocesses have finished