← Quiz: Bash Scripting for DevOps: all 10 questions
Quiz: Bash Scripting for DevOps · Question 6 of 10
Why is set -o pipefail useful?
Why is set -o pipefail useful?
- A.It makes pipes run in parallel
- B.It removes the need for quotes
- C.It deletes temporary files on exit
- D.A pipeline is treated as failed if any command in it fails, not only the last one
Answer & explanation
Correct answer: A pipeline is treated as failed if any command in it fails, not only the last one
Without it, failing_command | sort succeeds because sort succeeded.
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 →