----------------------------------------------------------- #!/bin/bash set -e command 1 command 2 ... exit 0 ---------------------------------------------------------- Every script you write should include set -e at the top. This tells bash that it…