166. What are the popular options of grep command in Unix?
In Unix, grep is one of the very useful commands. It provides many useful options. Some of the popular options are:
% grep –i : This option ignores case while doing search.
% grep –x : This option is used to search exact word in a file.
% grep –v: We use this option to find the lines that do not have the text we are searching.
% grep –A 10: This option displays 10 lines after the match is found.
% grep –c: We can use it to count the number of matching lines.