Question 60
Original unofficial RHEL 10 RHCSA skill-check scenario: A compliance report must ignore blank lines but an unanchored expression counts whitespace-only rows as content. Which ongoing practice best prevents a recurrence?
Explanation
Correct Answer
In this RHEL 10 system administration case: A compliance report must ignore blank lines but an unanchored expression counts whitespace-only rows as content. Underlying reason: POSIX space classes include tabs and other whitespace. The most direct, approved resolution is: Apply an explicit non-whitespace pattern such as `grep -E '[^[:space:]]'` to select meaningful lines. Confirm it by checking: Blank and whitespace-only records no longer affect the count. Sustain the fix by: Include whitespace edge cases in automated report tests. This is the INTENDED response for the best ongoing operational safeguard. It is a knowledge-check explanation, not a verified hands-on Red Hat exam answer;
Incorrect Answers
Document filter expressions with sample inputs and expected outputs. That is not sufficient for the reported RHEL task, because POSIX space classes include tabs and other whitespace.
Use explicit executable-mode checks in deployment tests. That is not sufficient for the reported RHEL task, because POSIX space classes include tabs and other whitespace.
Check composed administrative commands in a nonproduction shell first. That is not sufficient for the reported RHEL task, because POSIX space classes include tabs and other whitespace.