What does ‘set -e’ do, and why might it be considered dangerous?
set -e causes the shell to exit if any subcommand or pipeline returns a non-zero status. The answer the interviewer was probably looking for is: It would be dangerous to use “set -e” when creating init.d scripts: From http://www.debian.org/doc/debian-policy/ch-opersys.html 9.3.2 — Be careful of using set -e in init.d scripts. Writing correct init.d scripts requires … Read more