Have you ever been editing a file while using your favorite editor, and wondered where something is at in the file? Perhaps you want to find a persons name, their street address, or whether there is a heading for Chapter 32? Imagine if your editor didn't have a search utility which makes it possible to find these objects without scanning the file line by line. You would probably be using a new editor really fast!
Searching a single file is really useful, but what if you want to know if that pattern is another file? You would just open that file and search it like you just did with the first file, right? This process is manageable for a few files, but quickly becomes very tedious. What happens if you want to know if more than 1 pattern exists in your file? You have to do a search for each pattern separately. Searching for multiple patterns in multiple files simply cannot be done with an editor.
Fortunately, the utility you are about to learn allows you to search hundreds of files for patterns without ever opening an editor. tkGrep is a Graphical User Interface to the Unix grep utility. What grep does is open a file, and scan each line in the file for the supplied pattern. If a match is found, grep prints out the entire line which contains the matching pattern. You will learn more about file searching in the sections String Searches, and Regular Expression Searches.