Question 350
On a RHEL 10 host, the administrator encounters this situation: A maintenance script expects a directory path as its first argument but silently writes to the current directory when no argument is supplied. Which evidence should be inspected before making a change?
Explanation
Correct Answer
For this specific symptom, start here: Inspect positional parameter use and validation of the argument count. The reported scenario is: A maintenance script expects a directory path as its first argument but silently writes to the current directory when no argument is supplied. A responsible next step after confirming that evidence is to check required positional parameters before modifying files and exit with usage guidance if absent. This prevents an unrelated configuration change and leaves a measurable result: running without the argument makes no changes and shows a useful error.
Incorrect Answers
Trace which argument each positional parameter references and validate sample inputs. The check concerns which argument each positional parameter references and validate sample inputs, not inspecting positional parameter use and validation of the argument count.
Inspect the loop iterable and quoting of each host value. This assesses the loop iterable and quoting of each host value; it does not determine the reported condition—a maintenance script expects a directory path as its first argument but silently writes to the current directory when no argument is supplied.
Review how positional parameters are quoted in the script and test with a spaced path. The case-specific requirement is inspecting positional parameter use and validation of the argument count, which that option does not establish.