Hmm... Wasn't that Unix/Linux command that write info into a text file? Isn't that what the manual is for?
grep extracts all the lines from a file that contain a given pattern. It is one leg of the UNIX information processing gang (together with sed and awk).