Display the file names that matches the pattern : We can just display the files that contains the given string/pattern. Displaying the count of number of matches : We can find the number of lines that matches the given string/patternģ. It matches the words like “UNIX”, “Unix”, “unix”.Ģ. Case insensitive search : The -i option enables to search for a string case insensitively in the given file. UNix is easy to learn.unix is a multiuser os.Learn unix. C n : Prints searched line and n lines after before the result. B n : Prints searched line and n line before the result. A n : Prints searched line and nlines after the result. With each such part on a separate output line. o : Print only the matched parts of a matching line, E : Treats pattern as an extended regular expression (ERE) f file : Takes patterns from file, one per line. e exp : Specifies expression with this option. v : This prints out all the lines that do not matches the pattern n : Display the matched lines and their line numbers. h : Display the matched lines, but do not display the filenames. Options Description -c : This prints only a count of the lines that match a pattern The pattern that is searched in the file is referred to as the regular expression (grep stands for global search for regular expression and print out). The grep filter searches a file for a particular pattern of characters, and displays all lines that contain that pattern. ISRO CS Syllabus for Scientist/Engineer Exam.ISRO CS Original Papers and Official Keys.GATE CS Original Papers and Official Keys.