In this article, we are going to provide you with useful examples of the Linux grep command, including the two variant programs: egrep and fgrep. grep (global regular expression print) is used to search for text strings and regular expressions line by line which matches a specified pattern within one or more files.
Listed below are some simple and useful examples of how to use the grep command on Linux and search for a string in one/multiple files.