diff options
author | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2007-12-17 14:46:11 +0000 |
---|---|---|
committer | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2007-12-17 14:46:11 +0000 |
commit | f34b50f089383917ab527f3ab5f9c0a8144bbf0d (patch) | |
tree | 4d41d677b615b7a567ecb0d65a407790ce35ca93 /doc/pcregrep.1 | |
parent | bcaa82a45b01cc5cf8689180e20514e5e14bb36f (diff) | |
download | pcre-f34b50f089383917ab527f3ab5f9c0a8144bbf0d.tar.gz |
Add .gz and .bz2 optional support to pcregrep.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@286 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'doc/pcregrep.1')
-rw-r--r-- | doc/pcregrep.1 | 47 |
1 files changed, 29 insertions, 18 deletions
diff --git a/doc/pcregrep.1 b/doc/pcregrep.1 index cb64aff..32bbaaf 100644 --- a/doc/pcregrep.1 +++ b/doc/pcregrep.1 @@ -47,24 +47,34 @@ possible to search for patterns that span line boundaries. What defines a line boundary is controlled by the \fB-N\fP (\fB--newline\fP) option. .P Patterns are limited to 8K or BUFSIZ characters, whichever is the greater. -BUFSIZ is defined in \fB<stdio.h>\fP. When there is more than one pattern -(specified by the use of \fB-e\fP and/or \fB-f\fP), each pattern is applied to -each line in the order in which they are defined, except that all the \fB-e\fP -patterns are tried before the \fB-f\fP patterns. As soon as one pattern matches +BUFSIZ is defined in \fB<stdio.h>\fP. When there is more than one pattern +(specified by the use of \fB-e\fP and/or \fB-f\fP), each pattern is applied to +each line in the order in which they are defined, except that all the \fB-e\fP +patterns are tried before the \fB-f\fP patterns. As soon as one pattern matches (or fails to match when \fB-v\fP is used), no further patterns are considered. .P When \fB--only-matching\fP, \fB--file-offsets\fP, or \fB--line-offsets\fP is used, the output is the part of the line that matched (either shown literally, or as an offset). In this case, scanning resumes immediately following the match, so that further matches on the same line can be found. -If there are multiple patterns, they are all tried on the remainder of the -line. However, patterns that follow the one that matched are not tried on the +If there are multiple patterns, they are all tried on the remainder of the +line. However, patterns that follow the one that matched are not tried on the earlier part of the line. .P If the \fBLC_ALL\fP or \fBLC_CTYPE\fP environment variable is set, \fBpcregrep\fP uses the value to set a locale when calling the PCRE library. The \fB--locale\fP option can be used to override this. . +.SH "SUPPORT FOR COMPRESSED FILES" +.rs +.sp +It is possible to compile \fBpcregrep\fP so that it uses \fBlibz\fP or +\fBlibbz2\fP to read files whose names end in \fB.gz\fP or \fB.bz2\fP, +respectively. You can find out whether your binary has support for one or both +of these file types by running it with the \fB--help\fP option. If the +appropriate support is not present, files are treated as plain text. The +standard input is always so treated. +. .SH OPTIONS .rs .TP 10 @@ -128,7 +138,7 @@ option), or "skip" (silently skip the path). In the default case, directories are read as if they were ordinary files. In some operating systems the effect of reading a directory like this is an immediate end-of-file. .TP -\fB-e\fP \fIpattern\fP, \fB--regex=\fP\fIpattern\fP, \fB--regexp=\fP\fIpattern\fP +\fB-e\fP \fIpattern\fP, \fB--regex=\fP\fIpattern\fP, \fB--regexp=\fP\fIpattern\fP Specify a pattern to be matched. This option can be used multiple times in order to specify several patterns. It can also be used as a way of specifying a single pattern that starts with a hyphen. When \fB-e\fP is used, no argument @@ -168,7 +178,7 @@ present; they are tested before the file's patterns. However, no other pattern is taken from the command line; all arguments are treated as file names. There is an overall maximum of 100 patterns. Trailing white space is removed from each line, and blank lines are ignored. An empty file contains no patterns and -therefore matches nothing. See also the comments about multiple patterns versus +therefore matches nothing. See also the comments about multiple patterns versus a single pattern with alternatives in the description of \fB-e\fP above. .TP \fB--file-offsets\fP @@ -194,7 +204,8 @@ separator is used. If a line number is also being output, it follows the file name without a space. .TP \fB--help\fP -Output a brief help message and exit. +Output a help message, giving brief details of the command options and file +type support, and then exit. .TP \fB-i\fP, \fB--ignore-case\fP Ignore upper/lower case distinctions during comparisons. @@ -223,9 +234,9 @@ are being output. If not supplied, "(standard input)" is used. There is no short form for this option. .TP \fB--line-offsets\fP -Instead of showing lines or parts of lines that match, show each match as a -line number, the offset from the start of the line, and a length. The line -number is terminated by a colon (as usual; see the \fB-n\fP option), and the +Instead of showing lines or parts of lines that match, show each match as a +line number, the offset from the start of the line, and a length. The line +number is terminated by a colon (as usual; see the \fB-n\fP option), and the offset and length are separated by a comma. In this mode, no context is shown. That is, the \fB-A\fP, \fB-B\fP, and \fB-C\fP options are ignored. If there is more than one match in a line, each of them is shown separately. This option is @@ -271,16 +282,16 @@ being scanned does not agree with the convention set by this option, \fB-n\fP, \fB--line-number\fP Precede each output line by its line number in the file, followed by a colon and a space for matching lines or a hyphen and a space for context lines. If -the filename is also being output, it precedes the line number. This option is +the filename is also being output, it precedes the line number. This option is forced if \fB--line-offsets\fP is used. .TP \fB-o\fP, \fB--only-matching\fP Show only the part of the line that matched a pattern. In this mode, no context is shown. That is, the \fB-A\fP, \fB-B\fP, and \fB-C\fP options are -ignored. If there is more than one match in a line, each of them is shown -separately. If \fB-o\fP is combined with \fB-v\fP (invert the sense of the -match to find non-matching lines), no output is generated, but the return code -is set appropriately. This option is mutually exclusive with +ignored. If there is more than one match in a line, each of them is shown +separately. If \fB-o\fP is combined with \fB-v\fP (invert the sense of the +match to find non-matching lines), no output is generated, but the return code +is set appropriately. This option is mutually exclusive with \fB--file-offsets\fP and \fB--line-offsets\fP. .TP \fB-q\fP, \fB--quiet\fP @@ -423,6 +434,6 @@ Cambridge CB2 3QH, England. .rs .sp .nf -Last updated: 07 December 2007 +Last updated: 17 December 2007 Copyright (c) 1997-2007 University of Cambridge. .fi |