Question 550
A quick workaround is proposed for this Linux problem: A report requires counting matching text lines without retaining the entire intermediate output. Which assumption creates the most relevant technical risk?
Explanation
Correct Answer
A pipeline passes stdout onward; errors on stderr are not automatically counted as matching text. This is the scenario's misleading assumption. An engineer should investigate: Check the grep match criteria and whether the next command accepts standard input. Appropriate evidence afterward is: The final count equals the number of selected matching lines.
Incorrect Answers
A plain > file redirect removes the command output from the terminal rather than duplicating it. That would matter when an operator needs to view command output on screen and retain the same stream in a file. The relevant distinction in this case is: A pipeline passes stdout onward; errors on stderr are not automatically counted as matching text.
tee cannot capture upstream stderr through a plain pipe unless that descriptor is redirected. That would matter when a script uses a pipeline into tee but needs the file to collect both output and diagnostics. It does not address this case's requirement: A report requires counting matching text lines without retaining the entire intermediate output.
The > redirection truncates a file rather than appending when used without the append operator. That would matter when a noisy command must append diagnostic errors to an existing audit file without replacing its contents. That separate mechanism does not verify the needed Linux administration outcome in this case.