How do you use grep command to find a word in a file?

Khang Lê

New member
How do you use grep command to find a word in a file?
Answer
To use it type grep , then
the pattern we’re searching for and finally the name of the file (or files) we’re searching in
. The output is the three lines in the file that contain the letters ‘not’. By default, grep searches for a pattern in a case-sensitive way.
 

Tìm kiếm

Back
Top