/[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 453 by ph10, Fri Sep 18 19:12:35 2009 UTC revision 535 by ph10, Thu Jun 3 19:18:24 2010 UTC
# Line 119  standard input is always so treated. Line 119  standard input is always so treated.
119  </P>  </P>
120  <br><a name="SEC4" href="#TOC1">OPTIONS</a><br>  <br><a name="SEC4" href="#TOC1">OPTIONS</a><br>
121  <P>  <P>
122  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
123  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
124  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
125  effect.  effect.
126  </P>  </P>
127  <P>  <P>
# Line 178  coloured. The value (which is optional, Line 178  coloured. The value (which is optional,
178  connected to a terminal. More resources are used when colouring is enabled,  connected to a terminal. More resources are used when colouring is enabled,
179  because <b>pcregrep</b> has to search for all possible matches in a line, not  because <b>pcregrep</b> has to search for all possible matches in a line, not
180  just one, in order to colour them all.  just one, in order to colour them all.
181  </P>  <br>
182  <P>  <br>
183  The colour that is used can be specified by setting the environment variable  The colour that is used can be specified by setting the environment variable
184  PCREGREP_COLOUR or PCREGREP_COLOR. The value of this variable should be a  PCREGREP_COLOUR or PCREGREP_COLOR. The value of this variable should be a
185  string of two numbers, separated by a semicolon. They are copied directly into  string of two numbers, separated by a semicolon. They are copied directly into
# Line 326  output once, on a separate line. Line 326  output once, on a separate line.
326  Instead of outputting lines from the files, just output the names of the files  Instead of outputting lines from the files, just output the names of the files
327  containing lines that would have been output. Each file name is output  containing lines that would have been output. Each file name is output
328  once, on a separate line. Searching normally stops as soon as a matching line  once, on a separate line. Searching normally stops as soon as a matching line
329  is found in a file. However, if the <b>-c</b> (count) option is also used,  is found in a file. However, if the <b>-c</b> (count) option is also used,
330  matching continues in order to obtain the correct count, and those files that  matching continues in order to obtain the correct count, and those files that
331  have at least one match are listed along with their counts. Using this option  have at least one match are listed along with their counts. Using this option
332  with <b>-c</b> is a way of suppressing the listing of files with no matches.  with <b>-c</b> is a way of suppressing the listing of files with no matches.
333  </P>  </P>
334  <P>  <P>
# Line 338  are being output. If not supplied, "(sta Line 338  are being output. If not supplied, "(sta
338  short form for this option.  short form for this option.
339  </P>  </P>
340  <P>  <P>
341    <b>--line-buffered</b>
342    When this option is given, input is read and processed line by line, and the
343    output is flushed after each write. By default, input is read in large chunks,
344    unless <b>pcregrep</b> can determine that it is reading from a terminal (which
345    is currently possible only in Unix environments). Output to terminal is
346    normally automatically flushed by the operating system. This option can be
347    useful when the input or output is attached to a pipe and you do not want
348    <b>pcregrep</b> to buffer up large amounts of data. However, its use will affect
349    performance, and the <b>-M</b> (multiline) option ceases to work.
350    </P>
351    <P>
352  <b>--line-offsets</b>  <b>--line-offsets</b>
353  Instead of showing lines or parts of lines that match, show each match as a  Instead of showing lines or parts of lines that match, show each match as a
354  line number, the offset from the start of the line, and a length. The line  line number, the offset from the start of the line, and a length. The line
# Line 365  that <b>pcregrep</b> buffers the input f Line 376  that <b>pcregrep</b> buffers the input f
376  <b>pcregrep</b> ensures that at least 8K characters or the rest of the document  <b>pcregrep</b> ensures that at least 8K characters or the rest of the document
377  (whichever is the shorter) are available for forward matching, and similarly  (whichever is the shorter) are available for forward matching, and similarly
378  the previous 8K characters (or all the previous characters, if fewer than 8K)  the previous 8K characters (or all the previous characters, if fewer than 8K)
379  are guaranteed to be available for lookbehind assertions.  are guaranteed to be available for lookbehind assertions. This option does not
380    work when input is read line by line (see \fP--line-buffered\fP.)
381  </P>  </P>
382  <P>  <P>
383  <b>-N</b> <i>newline-type</i>, <b>--newline=</b><i>newline-type</i>  <b>-N</b> <i>newline-type</i>, <b>--newline=</b><i>newline-type</i>
# Line 474  The majority of short and long forms of Line 486  The majority of short and long forms of
486  as in the GNU <b>grep</b> program. Any long option of the form  as in the GNU <b>grep</b> program. Any long option of the form
487  <b>--xxx-regexp</b> (GNU terminology) is also available as <b>--xxx-regex</b>  <b>--xxx-regexp</b> (GNU terminology) is also available as <b>--xxx-regex</b>
488  (PCRE terminology). However, the <b>--locale</b>, <b>-M</b>, <b>--multiline</b>,  (PCRE terminology). However, the <b>--locale</b>, <b>-M</b>, <b>--multiline</b>,
489  <b>-u</b>, and <b>--utf-8</b> options are specific to <b>pcregrep</b>. If both the  <b>-u</b>, and <b>--utf-8</b> options are specific to <b>pcregrep</b>. If both the
490  <b>-c</b> and <b>-l</b> options are given, GNU grep lists only file names,  <b>-c</b> and <b>-l</b> options are given, GNU grep lists only file names,
491  without counts, but <b>pcregrep</b> gives the counts.  without counts, but <b>pcregrep</b> gives the counts.
492  </P>  </P>
493  <br><a name="SEC8" href="#TOC1">OPTIONS WITH DATA</a><br>  <br><a name="SEC8" href="#TOC1">OPTIONS WITH DATA</a><br>
# Line 538  Cambridge CB2 3QH, England. Line 550  Cambridge CB2 3QH, England.
550  </P>  </P>
551  <br><a name="SEC13" href="#TOC1">REVISION</a><br>  <br><a name="SEC13" href="#TOC1">REVISION</a><br>
552  <P>  <P>
553  Last updated: 13 September 2009  Last updated: 21 May 2010
554  <br>  <br>
555  Copyright &copy; 1997-2009 University of Cambridge.  Copyright &copy; 1997-2010 University of Cambridge.
556  <br>  <br>
557  <p>  <p>
558  Return to the <a href="index.html">PCRE index page</a>.  Return to the <a href="index.html">PCRE index page</a>.

Legend:
Removed from v.453  
changed lines
  Added in v.535

  ViewVC Help
Powered by ViewVC 1.1.5