← 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?
- A.Prints every command before running it
- B.Stops the script as soon as a command fails
- C.Ignores all errors
- 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 →