LPIC-1 Exam 101 (Linux Administrator) — Question 30
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 using the -v option with egrep inverts the matching process, thus only displaying lines that do not correspond to the specified pattern. Options A, C, and D are incorrect as they describe unrelated functionalities of the egrep command.