Created
February 18, 2019 13:22
-
-
Save epcim/d09fb73b48c7e290c3f86671484a15c3 to your computer and use it in GitHub Desktop.
shell jons wait
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
# wait for background jobs | |
while true; do | |
wait -n || { | |
code="$?" | |
([[ $code = "127" ]] && exit 0 || exit "$code") | |
break | |
} | |
done; | |
# or just | |
wait |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment