Question 130
Original unofficial RHEL 10 RHCSA skill-check scenario: A team uses `sed -i` against an unfamiliar file and replaces far more occurrences than intended. Which observation best confirms the intended outcome?
Explanation
Correct Answer
In this RHEL 10 system administration case: A team uses `sed -i` against an unfamiliar file and replaces far more occurrences than intended. Underlying reason: Broad text substitutions operate on every matching occurrence. The most direct, approved resolution is: Preview the substitution without in-place modification, narrow the match, then apply to a preserved copy. Confirm it by checking: Only the intended configuration keys change in a before-and-after diff. Sustain the fix by: Review diffs and expression scope before committing scripted edits. This is the INTENDED response for the strongest objective verification result. It is a knowledge-check explanation, not a verified hands-on Red Hat exam answer;
Incorrect Answers
The service's configuration test passes and logs show a clean reload. That is not sufficient for the reported RHEL task, because broad text substitutions operate on every matching occurrence.
No signed reports appear in the deletion preview or actual removal set. That is not sufficient for the reported RHEL task, because broad text substitutions operate on every matching occurrence.
The file uses supported directives and validation succeeds. That is not sufficient for the reported RHEL task, because broad text substitutions operate on every matching occurrence.