Wait for jobs in the background and measure time taken

SECONDS=0;sleep 5 & sleep 6 & sleep 3 & sleep 7 & wait ; elapsedseconds=$SECONDS ; echo $elapsedseconds

 

nJoy 😉

 

Leave a Reply

Your email address will not be published. Required fields are marked *