101-500 Exam QuestionsBrowse all questions from this exam

101-500 Exam - Question 93


What is the effect of the -v option for the grep command?

Show Answer
Correct Answer: C

The -v option for the grep command is used to invert the match, which means it will only output the lines that do not match the specified pattern. This is useful when you want to filter out lines that contain a certain pattern and display the rest.

Discussion

6 comments
Sign in to comment
QuangNHOption: C
Mar 16, 2021

i think C is correct

CuriousLinuxCatOption: C
Jul 24, 2021

-v reverses the matching so answer is correct.

iwkno6
Jul 28, 2021

correct!

NeoSam999Option: C
Jan 13, 2023

According to man pages, man grep: -v, --invert-match Invert the sense of matching, to select non-matching lines.

Blondilu
Nov 21, 2020

giusta

AmycertOption: C
Feb 8, 2023

C is the correct one