This question has appeared on a pre-interview quiz and it's making me crazy. Can anyone answer this and put me at ease? The quiz has no reference to a particular shell but the job description is for a unix sa.
again the question is simply…
What does 'set -e' do, and why might it be considered dangerous?
Best Answer
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:
From http://www.debian.org/doc/debian-policy/ch-opersys.html 9.3.2 --
This is a valid question from an interviewer standpoint because it gauges a candidates working knowledge of server-level scripting and automation