In our first article on the grep command, we covered quite a few features the tool offers, including how you can use it to search only for words, search for two words, count lines containing matched word, and more. Aside from these, the tool provides some more easy-to-understand and useful features.
This article focuses on some advanced features of the grep command like case insensitive search, displaying certain non-matched lines with line containing matched string, print matched strings in grep, and to display the position of a match in grep.
Read more at HowToForge