forked from e36freak/ogrep
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
31 lines (28 loc) · 1.75 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
usage: ogrep -- [OPTIONS] PATTERN [FILE...]
ogrep -- [OPTIONS] [-e PATTERN | -f FILE] [FILE...]
The '--' is required, so AWK itself doesn't read the options
Searches the named input FILEs (or standard input if no files are named, or
if a single hyphen (-) is given as a filename) for lines matching the given
PATTERN. Prints only the matching portions of each line, with each portion on a
separate output line. PATTERNs may be any regular expression valid in AWK.
Options:
-h, --help Display this help and exit
-F, --fixed-strings Interpret PATTERN as a list of fixed strings, separated
by newlines
-e, --regex PATTERN Use PATTERN as the pattern. This can be used to specify
multiple search patterns, or to protect a pattern
beginning with a hyphen (-)
-f, --file FILE Use FILE as a list of patterns, one per line. may be
given multiple times, all files will be read
-i, --ignore-case Ignore case distinctions in both the PATTERN and the
input files.
-c, --count Suppress normal output; instead print a count of
matching strings for each input file
-W, --with-filename Print the file name for each match. this is the default
when there is more than one input file
-w, --no-filename Do not print the file name for each match. this is the
default when there is only one input file, or ogrep is
only reading stdin
-n, --line-number Prefix each line of output with the 1-based line number
within its input file.
-Z, --null Separate each output line with a NUL byte