I have simple bash script that starts lots of processes. If one fails I want to stop everything. There maybe a better way to do this but I came up with this.
First create two scripts to test our main script. good_sleep that sleeps for 10 seconds and exits with no error.
#!/bin/bash
echo " good sleeping"
sleep 10
echo "done"