First page Back Continue Last page Overview Graphics
Example 2-1: The grep command
To find number of Pg phases in file collect.out given in directory example1, we run command grep “Pg “ collect.out on the command line,
[aghods@ghods example1]$ grep "Pg " collect.out
PRN GZ EPg 9 D 1850 3.25 117 0.06 0 29.6 242
ALA GZ EPg C 1850 3.70 113 -0.4610 35.4 153
FIR GZ EPg D 1850 11.17 93 0.1010 81.3 172
SHM GZ EPg D 1850 12.05 93 0.2110 86.1 136
.....
The number of lines with Pg word is large so I did not show all of them here. Please notice that [aghods@ghods example1]$ is not part of the command and it is part of command line and its form depends on your setup. You should only type the command (grep “Pg “ collect.out ) in the command prompt to get above result.