Download CIS 90 - Lesson 10

Transcript
CIS 90 - Lesson 11
10
Some perfect times to use the grep command:
1) To search through the output of a command for some text
command | grep "text string"
2) To search inside one or more files for some text
grep "text string" file1 file2 … fileN
3) To search (recursively) inside all files in a branch of the UNIX
file tree for some text
grep –R "text string" directory
33