This lesson shows how the bash shell handles the exit status of pipelines differently when set -o pipefail is enabled. Normally, the shell returns the exit status of the last command in a pipeline. But with pipefail on, it returns the exit status of the rightmost command that fails. The example runs a pipeline where the first command fails and the others succeed. With pipefail on, the pipeline exit status is the failure code from the first command. Without pipefail, it is the success code from the last command. This helps scripts detect errors early in pipelines. The execution table traces each command's exit status and the resulting pipeline status. The variable tracker shows how the PIPEFAIL option and pipeline exit status change step by step. Key moments clarify common confusions about how pipefail affects exit status but not command execution. The quiz tests understanding of pipeline exit status behavior with pipefail on and off. The snapshot summarizes the key points for quick reference.