First page Back Continue Last page Overview Graphics
The grep command
Find a word within a large file
In many cases, we would like to know how many times a word has been used in a given text file. For example in seismology, we need to need to know how many phases a given station has in a given catalog, or we would like to know how many Pn and Pg phases we have in a given catalog. A quick way to find such statistics is to use the grep command.