Created
November 27, 2017 11:20
-
-
Save gasp/7939938b478172c7ad86754e55642512 to your computer and use it in GitHub Desktop.
multiple bash processes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
sleep_date() { | |
echo "starting $1 at $(date)"; | |
sleep $1; | |
echo "ending $1 at $(date)"; | |
} | |
echo "starting all $(date)"; | |
sleep_date 10 & | |
sleep_date 20 & | |
sleep_date 15 & | |
wait; | |
echo 'ended'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment