set -x
Print shell command before execute it. This feature help programmers to track their shell script.
set -e
If the return code of one command is not 0 and the caller does not check it, the shell script will exit. This feature make shell script robust.
set -e and set -x often appear at the head of shell script:
set -x
set -e
echo "I am a shell script."
Or use as shell command:
sh -xe shell_script.sh
Reference: http://julio.meroh.net/2010/01/set-e-and-set-x.html