Script 1: without setting -e
#!/bin/bashdecho "hi"echo "hello"
This will throw an error in the line with decho
and the program continues to the next line.
Script 2: With setting -e
#!/bin/bashset -edecho "hi"echo "hello"
Up to decho "hi"
, the shell will process and the program exit. It will not proceed further.