Skip to content

Latest commit

 

History

History
35 lines (23 loc) · 594 Bytes

grep.md

File metadata and controls

35 lines (23 loc) · 594 Bytes
$ man grep

grep (search) for the word "http" in the file index.html

$ grep http index.html

grep (search) for the word "http" in the files file1.html file2.html file3.html

$ grep http file1.html file2.html file3.html

grep (search) recursively for the word "http" in all files in a directory tree

$ grep -r http 

grep (search) for the word 'inet' from the output of the "ip addr show" command

$ ip addr show | grep inet

grep (search) for the word 'Master' ignoring case

$ grep -i Master