🎙 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 6 of 10

Why is set -o pipefail useful?

Why is set -o pipefail useful?

  1. A.It makes pipes run in parallel
  2. B.It removes the need for quotes
  3. C.It deletes temporary files on exit
  4. 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 →