LPIC-1 101-500 Exam · Objective 103.1

Running a fallback only on failure

103.1Basic

Run grep -q '^enabled$' state.txt.

Run echo DISABLED only when there is no exact match.

Assume state.txt is a readable regular file and grep encounters no execution or input errors.

Which command list is correct?

Running a fallback only on failure · Answer choices
Question IDKP-103-021
EnvironmentBash 5.2 / GNU grep 3.x / GNU coreutils in a fresh process with errexit and pipefail off. Separate the readable single-file question from the intentional missing-file error example.
Last technical review2026-11-02
Report an error or rights issue
Progress and questions

Path & Pass is an independent learning site and is not affiliated with any certification body. Questions are original practice content based on published objectives.