What is the effect of the egrep command when the -v option is used?
What is the effect of the egrep command when the -v option is used?
The -v option in the egrep command inverts the matching criteria, causing it to output only the lines that do not match the specified pattern.
Correct. To invert the Grep output , use the -v flag. The -v option instructs grep to print all lines that do not contain or match the expression. The –v option tells grep to invert its output, meaning that instead of printing matching lines, do the opposite and print all of the lines that don't match the expression.
Correct. -v or --invert-match is for selecting non-matching lines.