Skip to content

Instantly share code, notes, and snippets.

@epcim
Created February 18, 2019 13:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save epcim/d09fb73b48c7e290c3f86671484a15c3 to your computer and use it in GitHub Desktop.
Save epcim/d09fb73b48c7e290c3f86671484a15c3 to your computer and use it in GitHub Desktop.
shell jons wait
# 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