3 pcregrep - a grep with Perl-compatible regular expressions.
\r
5 .B pcregrep [-Vchilnsvx] pattern [file] ...
\r
9 \fBpcregrep\fR searches files for character patterns, in the same way as other
\r
10 grep commands do, but it uses the PCRE regular expression library to support
\r
11 patterns that are compatible with the regular expressions of Perl 5. See
\r
12 \fBpcre(3)\fR for a full description of syntax and semantics.
\r
14 If no files are specified, \fBpcregrep\fR reads the standard input. By default,
\r
15 each line that matches the pattern is copied to the standard output, and if
\r
16 there is more than one file, the file name is printed before each line of
\r
17 output. However, there are options that can change how \fBpcregrep\fR behaves.
\r
19 Lines are limited to BUFSIZ characters. BUFSIZ is defined in \fB<stdio.h>\fR.
\r
20 The newline character is removed from the end of each line before it is matched
\r
21 against the pattern.
\r
27 Write the version number of the PCRE library being used to the standard error
\r
31 Do not print individual lines; instead just print a count of the number of
\r
32 lines that would otherwise have been printed. If several files are given, a
\r
33 count is printed for each of them.
\r
36 Suppress printing of filenames when searching multiple files.
\r
39 Ignore upper/lower case distinctions during comparisons.
\r
42 Instead of printing lines from the files, just print the names of the files
\r
43 containing lines that would have been printed. Each file name is printed
\r
44 once, on a separate line.
\r
47 Precede each line by its line number in the file.
\r
50 Work silently, that is, display nothing except error messages.
\r
51 The exit status indicates whether any matches were found.
\r
54 Invert the sense of the match, so that lines which do \fInot\fR match the
\r
55 pattern are now the ones that are found.
\r
58 Force the pattern to be anchored (it must start matching at the beginning of
\r
59 the line) and in addition, require it to match the entire line. This is
\r
60 equivalent to having ^ and $ characters at the start and end of each
\r
61 alternative branch in the regular expression.
\r
65 \fBpcre(3)\fR, Perl 5 documentation
\r
69 Exit status is 0 if any matches were found, 1 if no matches were found, and 2
\r
70 for syntax errors or inacessible files (even if matches were found).
\r
74 Philip Hazel <ph10@cam.ac.uk>
\r
76 Copyright (c) 1997-2000 University of Cambridge.
\r