Skip to content

Instantly share code, notes, and snippets.

@taoky
Last active December 6, 2020 15:08
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 taoky/0f03ee9ff76ce75c0473aef4ae07862b to your computer and use it in GitHub Desktop.
Save taoky/0f03ee9ff76ce75c0473aef4ae07862b to your computer and use it in GitHub Desktop.
run multi jobs and get whether any process failed
#!/bin/bash
rm -f /tmp/failure
~/executor/executor -shell 'sleep 3 && ping' > /tmp/log || touch /tmp/failure &
~/executor/executor ls > /tmp/log2 || touch /tmp/failure &&
wait
test -f /tmp/failure && echo failed! && exit 1
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment