Skip to content

Instantly share code, notes, and snippets.

@aerickson
Created April 27, 2011 23:34
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 aerickson/945474 to your computer and use it in GitHub Desktop.
Save aerickson/945474 to your computer and use it in GitHub Desktop.
#!/bin/bash
FAIL=0
echo "starting"
./sleeper 2 0 &
./sleeper 2 1 &
./sleeper 3 0 &
./sleeper 2 0 &
for job in `jobs -p`
do
echo $job
wait $job || let "FAIL+=1"
done
echo $FAIL
if [ "$FAIL" == "0" ];
then
echo "YAY!"
else
echo "FAIL! ($FAIL)"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment