Question 70
An entry-level Linux support technician investigates: A learner reads a regular expression ab* and assumes it means any characters after ab, then receives unexpected matches such as a and abbb. Which observed outcome confirms that the Linux operation works as intended?
Explanation
Correct Answer
This specifically verifies grep regular expression star repeats preceding token: A controlled test illustrates that ab* can match a plus zero or more b characters, while a separate pattern captures the intended full word. The related engineering correction is: Construct a pattern using the correct anchors and tokens for the desired match, and distinguish it from shell filename globbing. Evidence from another workflow would not establish the stated outcome.
Incorrect Answers
The worksheet files and nested directory are recovered and can be opened separately after extraction. “Use a suitable unzip utility to list and extract the intended archive entries into a chosen directory” would remedy that alternative situation, but it would not correct the present issue: a controlled test illustrates that ab* can match a plus zero or more b characters, while a separate pattern captures the intended full word.
“Use an appropriate regular expression in grep and quote the pattern so the shell does not transform it first” is the supported response when both expected three-character test words match while an unrelated four-character word does not satisfy the intended expression. Here the decisive response is “Construct a pattern using the correct anchors and tokens for the desired match, and distinguish it from shell filename globbing”, so that different intervention does not meet the stated requirement.
The output contains only the test log lines that match the expected marker, including their original text. “Run grep with the intended literal pattern and appropriate input file, then inspect the matching lines in context” applies to that other condition. The reported evidence is a learner reads a regular expression ab* and assumes it means any characters after ab, then receives unexpected matches such as a and abbb; this alternative would address the wrong dependency.