Linux Foundation Certified System Administrator (LFCS) — Question 21
What is the effect of the egrep command when the -v option is used?
Answer options
- A. It enables color to highlight matching parts.
- B. It only outputs non-matching lines.
- C. It shows the command's version information.
- D. It changes the output order showing the last matching line first.
Correct answer: B
Explanation
The correct answer is B because the -v option in egrep inverts the match, meaning it will return only the lines that do not match the specified pattern. The other options describe features or behaviors that are not associated with the -v option in egrep.