Complete the code to make the shell script stop on any error.
set [1]The set -e option makes the shell stop running the script if any command fails.
Complete the code to print each command before executing it.
set [1]The set -x option prints each command before it runs, helping you see what the script does.
Fix the error in the script to stop on errors and print commands.
set [1] [2]
Use set -e -x to stop on errors and print commands before running them.
Fill both blanks to create a script that stops on errors and prints each command before executing it.
#!/bin/bash set [1] [2] echo "Start script" false echo "This will not run"
set -e -x stops the script on errors and prints each command with details.
Fill all three blanks to create a script that stops on errors, prints commands, and treats unset variables as errors.
#!/bin/bash set [1] [2] [3] echo "Running script" echo "$UNSET_VAR"
set -e -x -u stops on errors, prints commands, and treats unset variables as errors.