/[pcre]/code/trunk/doc/html/pcregrep.html
ViewVC logotype

Diff of /code/trunk/doc/html/pcregrep.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 653 by ph10, Sat Jan 15 11:31:39 2011 UTC revision 654 by ph10, Tue Aug 2 11:00:40 2011 UTC
# Line 74  possible to search for patterns that spa Line 74  possible to search for patterns that spa
74  boundary is controlled by the <b>-N</b> (<b>--newline</b>) option.  boundary is controlled by the <b>-N</b> (<b>--newline</b>) option.
75  </P>  </P>
76  <P>  <P>
77  Patterns are limited to 8K or BUFSIZ characters, whichever is the greater.  The amount of memory used for buffering files that are being scanned is
78  BUFSIZ is defined in <b>&#60;stdio.h&#62;</b>. When there is more than one pattern  controlled by a parameter that can be set by the <b>--buffer-size</b> option.
79  (specified by the use of <b>-e</b> and/or <b>-f</b>), each pattern is applied to  The default value for this parameter is specified when <b>pcregrep</b> is built,
80  each line in the order in which they are defined, except that all the <b>-e</b>  with the default default being 20K. A block of memory three times this size is
81  patterns are tried before the <b>-f</b> patterns.  used (to allow for buffering "before" and "after" lines). An error occurs if a
82    line overflows the buffer.
83    </P>
84    <P>
85    Patterns are limited to 8K or BUFSIZ bytes, whichever is the greater. BUFSIZ is
86    defined in <b>&#60;stdio.h&#62;</b>. When there is more than one pattern (specified by
87    the use of <b>-e</b> and/or <b>-f</b>), each pattern is applied to each line in
88    the order in which they are defined, except that all the <b>-e</b> patterns are
89    tried before the <b>-f</b> patterns.
90  </P>  </P>
91  <P>  <P>
92  By default, as soon as one pattern matches (or fails to match when <b>-v</b> is  By default, as soon as one pattern matches (or fails to match when <b>-v</b> is
# Line 122  standard input is always so treated. Line 130  standard input is always so treated.
130  The order in which some of the options appear can affect the output. For  The order in which some of the options appear can affect the output. For
131  example, both the <b>-h</b> and <b>-l</b> options affect the printing of file  example, both the <b>-h</b> and <b>-l</b> options affect the printing of file
132  names. Whichever comes later in the command line will be the one that takes  names. Whichever comes later in the command line will be the one that takes
133  effect.  effect. Numerical values for options may be followed by K or M, to signify
134    multiplication by 1024 or 1024*1024 respectively.
135  </P>  </P>
136  <P>  <P>
137  <b>--</b>  <b>--</b>
138  This terminate the list of options. It is useful if the next item on the  This terminates the list of options. It is useful if the next item on the
139  command line starts with a hyphen but is not an option. This allows for the  command line starts with a hyphen but is not an option. This allows for the
140  processing of patterns and filenames that start with hyphens.  processing of patterns and filenames that start with hyphens.
141  </P>  </P>
# Line 149  of <i>number</i> is expected to be relat Line 158  of <i>number</i> is expected to be relat
158  guarantees to have up to 8K of preceding text available for context output.  guarantees to have up to 8K of preceding text available for context output.
159  </P>  </P>
160  <P>  <P>
161    <b>--buffer-size=</b><i>number</i>
162    Set the parameter that controls how much memory is used for buffering files
163    that are being scanned.
164    </P>
165    <P>
166  <b>-C</b> <i>number</i>, <b>--context=</b><i>number</i>  <b>-C</b> <i>number</i>, <b>--context=</b><i>number</i>
167  Output <i>number</i> lines of context both before and after each matching line.  Output <i>number</i> lines of context both before and after each matching line.
168  This is equivalent to setting both <b>-A</b> and <b>-B</b> to the same value.  This is equivalent to setting both <b>-A</b> and <b>-B</b> to the same value.
# Line 421  and LF (linefeed), the two-character seq Line 435  and LF (linefeed), the two-character seq
435  which recognizes any of the preceding three types, and an "any" convention, in  which recognizes any of the preceding three types, and an "any" convention, in
436  which any Unicode line ending sequence is assumed to end a line. The Unicode  which any Unicode line ending sequence is assumed to end a line. The Unicode
437  sequences are the three just mentioned, plus VT (vertical tab, U+000B), FF  sequences are the three just mentioned, plus VT (vertical tab, U+000B), FF
438  (formfeed, U+000C), NEL (next line, U+0085), LS (line separator, U+2028), and  (form feed, U+000C), NEL (next line, U+0085), LS (line separator, U+2028), and
439  PS (paragraph separator, U+2029).  PS (paragraph separator, U+2029).
440  <br>  <br>
441  <br>  <br>
# Line 600  discussion of these options above). Line 614  discussion of these options above).
614  <br><a name="SEC10" href="#TOC1">DIAGNOSTICS</a><br>  <br><a name="SEC10" href="#TOC1">DIAGNOSTICS</a><br>
615  <P>  <P>
616  Exit status is 0 if any matches were found, 1 if no matches were found, and 2  Exit status is 0 if any matches were found, 1 if no matches were found, and 2
617  for syntax errors and non-existent or inacessible files (even if matches were  for syntax errors, overlong lines, non-existent or inaccessible files (even if
618  found in other files) or too many matching errors. Using the <b>-s</b> option to  matches were found in other files) or too many matching errors. Using the
619  suppress error messages about inaccessble files does not affect the return  <b>-s</b> option to suppress error messages about inaccessible files does not
620  code.  affect the return code.
621  </P>  </P>
622  <br><a name="SEC11" href="#TOC1">SEE ALSO</a><br>  <br><a name="SEC11" href="#TOC1">SEE ALSO</a><br>
623  <P>  <P>
# Line 620  Cambridge CB2 3QH, England. Line 634  Cambridge CB2 3QH, England.
634  </P>  </P>
635  <br><a name="SEC13" href="#TOC1">REVISION</a><br>  <br><a name="SEC13" href="#TOC1">REVISION</a><br>
636  <P>  <P>
637  Last updated: 14 January 2011  Last updated: 30 July 2011
638  <br>  <br>
639  Copyright &copy; 1997-2011 University of Cambridge.  Copyright &copy; 1997-2011 University of Cambridge.
640  <br>  <br>

Legend:
Removed from v.653  
changed lines
  Added in v.654

  ViewVC Help
Powered by ViewVC 1.1.5