Grep

From wiki
Revision as of 12:26, 1 November 2018 by Hdridder (talk | contribs) (Created page with "Find pattern in data stream (files, standard input) ;grep <pattern> <files> :Find pattern in any of the files. :When multiple files are scanned the filename is reported too...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Find pattern in data stream (files, standard input)

grep <pattern> <files>
Find pattern in any of the files.
When multiple files are scanned the filename is reported too (see -h below)
Useful options
-i
Ignore case
-n
Only report filname of files with matches
-h
Suppress reporting of filenames when multiple files are scanned.
-l
Report linenumber of matches too