Use “-A n” to find and print the matches along with “n” lines after the match. Use “-w” to find and print whole word matches. Use a combination of “-v” and “-i” to refine the search. Use “-v” to find and print all inverse (non-matching) lines.
Use a combination of “-c” and “-i” to refine the search. Use “-c” to find and print the number of line matches. Use “-n” to find and print matches and include line numbers. Use “-i” to ignore case ~]# grep -i world example.txt
This article explains how to start using the grep command in Linux®.