🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Bash Scripting for DevOps: all 10 questions

Quiz: Bash Scripting for DevOps · Question 5 of 10

What does set -e do in a script?

What does set -e do in a script?

  1. A.Prints every command before running it
  2. B.Stops the script as soon as a command fails
  3. C.Ignores all errors
  4. D.Exports all variables
Answer & explanation

Correct answer: Stops the script as soon as a command fails

Without it, bash keeps going after failures, which is dangerous in deploy scripts.

Can you get the rest right without peeking?

Take the timed Quiz: Bash Scripting for DevOps quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →