[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Changes to grep/manual/grep.html,v
From: |
Jim Meyering |
Subject: |
Changes to grep/manual/grep.html,v |
Date: |
Sun, 30 Dec 2018 01:24:23 -0500 (EST) |
CVSROOT: /webcvs/grep
Module name: grep
Changes by: Jim Meyering <meyering> 18/12/30 01:24:22
Index: grep.html
===================================================================
RCS file: /webcvs/grep/grep/manual/grep.html,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- grep.html 10 Feb 2017 04:43:36 -0000 1.28
+++ grep.html 30 Dec 2018 06:24:21 -0000 1.29
@@ -2,7 +2,7 @@
<html>
<!-- This manual is for grep, a pattern matching engine.
-Copyright (C) 1999-2002, 2005, 2008-2017 Free Software Foundation,
+Copyright (C) 1999-2002, 2005, 2008-2018 Free Software Foundation,
Inc.
Permission is granted to copy, distribute and/or modify this document
@@ -11,16 +11,16 @@
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
Texts. A copy of the license is included in the section entitled
"GNU Free Documentation License". -->
-<!-- Created by GNU Texinfo 6.3, http://www.gnu.org/software/texinfo/ -->
+<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
<head>
-<title>GNU Grep 3.0</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>GNU Grep 3.3</title>
-<meta name="description" content="GNU Grep 3.0">
-<meta name="keywords" content="GNU Grep 3.0">
+<meta name="description" content="GNU Grep 3.3">
+<meta name="keywords" content="GNU Grep 3.3">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="#Top" rel="start" title="Top">
<link href="#Index" rel="index" title="Index">
<link href="#SEC_Contents" rel="contents" title="Table of Contents">
@@ -58,7 +58,7 @@
</head>
<body lang="en">
-<h1 class="settitle" align="center">GNU Grep 3.0</h1>
+<h1 class="settitle" align="center">GNU Grep 3.3</h1>
@@ -98,13 +98,14 @@
<li><a name="toc-Basic-vs-Extended-Regular-Expressions"
href="#Basic-vs-Extended">3.6 Basic vs Extended Regular Expressions</a></li>
</ul></li>
<li><a name="toc-Usage-1" href="#Usage">4 Usage</a></li>
- <li><a name="toc-Reporting-bugs" href="#Reporting-Bugs">5 Reporting bugs</a>
+ <li><a name="toc-Performance-1" href="#Performance">5 Performance</a></li>
+ <li><a name="toc-Reporting-bugs" href="#Reporting-Bugs">6 Reporting bugs</a>
<ul class="no-bullet">
- <li><a name="toc-Known-Bugs" href="#Known-Bugs">5.1 Known Bugs</a></li>
+ <li><a name="toc-Known-Bugs" href="#Known-Bugs">6.1 Known Bugs</a></li>
</ul></li>
- <li><a name="toc-Copying-1" href="#Copying">6 Copying</a>
+ <li><a name="toc-Copying-1" href="#Copying">7 Copying</a>
<ul class="no-bullet">
- <li><a name="toc-GNU-Free-Documentation-License-1"
href="#GNU-Free-Documentation-License">6.1 GNU Free Documentation
License</a></li>
+ <li><a name="toc-GNU-Free-Documentation-License-1"
href="#GNU-Free-Documentation-License">7.1 GNU Free Documentation
License</a></li>
</ul></li>
<li><a name="toc-Index-1" href="#Index">Index</a></li>
</ul>
@@ -120,13 +121,13 @@
<a name="grep"></a>
<h1 class="top">grep</h1>
-<p><code>grep</code> prints lines that contain a match for a pattern.
+<p><code>grep</code> prints lines that contain a match for one or more
patterns.
</p>
-<p>This manual is for version 3.0 of GNU Grep.
+<p>This manual is for version 3.3 of GNU Grep.
</p>
<p>This manual is for <code>grep</code>, a pattern matching engine.
</p>
-<p>Copyright © 1999-2002, 2005, 2008-2017 Free Software Foundation,
+<p>Copyright © 1999-2002, 2005, 2008-2018 Free Software Foundation,
Inc.
</p>
<blockquote>
@@ -148,11 +149,13 @@
</td></tr>
<tr><td align="left" valign="top">• <a href="#Usage"
accesskey="4">Usage</a>:</td><td> </td><td align="left"
valign="top">Examples.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Reporting-Bugs"
accesskey="5">Reporting Bugs</a>:</td><td> </td><td align="left"
valign="top">Reporting Bugs.
+<tr><td align="left" valign="top">• <a href="#Performance"
accesskey="5">Performance</a>:</td><td> </td><td align="left"
valign="top">Performance tuning.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Copying"
accesskey="6">Copying</a>:</td><td> </td><td align="left"
valign="top">License terms for this manual.
+<tr><td align="left" valign="top">• <a href="#Reporting-Bugs"
accesskey="6">Reporting Bugs</a>:</td><td> </td><td align="left"
valign="top">Reporting Bugs.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Index"
accesskey="7">Index</a>:</td><td> </td><td align="left"
valign="top">Combined index.
+<tr><td align="left" valign="top">• <a href="#Copying"
accesskey="7">Copying</a>:</td><td> </td><td align="left"
valign="top">License terms for this manual.
+</td></tr>
+<tr><td align="left" valign="top">• <a href="#Index"
accesskey="8">Index</a>:</td><td> </td><td align="left"
valign="top">Combined index.
</td></tr>
</table>
@@ -166,10 +169,10 @@
<a name="Introduction-1"></a>
<h2 class="chapter">1 Introduction</h2>
-<a name="index-searching-for-a-pattern"></a>
+<a name="index-searching-for-patterns"></a>
-<p><code>grep</code> searches input files
-for lines containing a match to a given pattern list.
+<p>Given one or more patterns, <code>grep</code> searches input files
+for matches to the patterns.
When it finds a match in a line,
it copies the line to standard output (by default),
or produces whatever other sort of output you have requested with options.
@@ -195,16 +198,15 @@
<p>The general synopsis of the <code>grep</code> command line is
</p>
<div class="example">
-<pre class="example">grep <var>options</var> <var>pattern</var>
<var>input_file_names</var>
+<pre class="example">grep [<var>option</var>...] [<var>patterns</var>]
[<var>file</var>...]
</pre></div>
-<p>There can be zero or more <var>options</var>.
-<var>pattern</var> will only be seen as such
-(and not as an <var>input_file_name</var>)
-if it wasn’t already specified within <var>options</var>
-(by using the ‘<samp>-e <var>pattern</var></samp>’
-or ‘<samp>-f <var>file</var></samp>’ options).
-There can be zero or more <var>input_file_names</var>.
+
+<p>There can be zero or more <var>option</var> arguments, and zero or more
+<var>file</var> arguments. The <var>patterns</var> argument contains one or
+more patterns separated by newlines, and is omitted when patterns are
+given via the ‘<samp>-e <var>patterns</var></samp>’ or
‘<samp>-f <var>file</var></samp>’
+options.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">• <a href="#Command_002dline-Options"
accesskey="1">Command-line Options</a>:</td><td> </td><td
align="left" valign="top">Short and long names, grouped by category.
@@ -296,12 +298,13 @@
<h4 class="subsection">2.1.2 Matching Control</h4>
<dl compact="compact">
-<dt><samp>-e <var>pattern</var></samp></dt>
-<dt><samp>--regexp=<var>pattern</var></samp></dt>
+<dt><samp>-e <var>patterns</var></samp></dt>
+<dt><samp>--regexp=<var>patterns</var></samp></dt>
<dd><a name="index-_002de"></a>
-<a name="index-_002d_002dregexp_003dpattern"></a>
-<a name="index-pattern-list"></a>
-<p>Use <var>pattern</var> as the pattern.
+<a name="index-_002d_002dregexp_003dpatterns"></a>
+<a name="index-patterns-option"></a>
+<p>Use <var>patterns</var> as one or more patterns; newlines within
+<var>patterns</var> separate each pattern from the next.
If this option is used multiple times or is combined with the
<samp>-f</samp> (<samp>--file</samp>) option, search for all patterns given.
(<samp>-e</samp> is specified by POSIX.)
@@ -311,7 +314,7 @@
<dt><samp>--file=<var>file</var></samp></dt>
<dd><a name="index-_002df"></a>
<a name="index-_002d_002dfile"></a>
-<a name="index-pattern-from-file"></a>
+<a name="index-patterns-from-file"></a>
<p>Obtain patterns from <var>file</var>, one per line.
If this option is used multiple times or is combined with the
<samp>-e</samp> (<samp>--regexp</samp>) option, search for all patterns given.
@@ -365,9 +368,16 @@
Similarly,
it must be either at the end of the line
or followed by a non-word constituent character.
-Word-constituent characters are letters, digits, and the underscore.
+Word constituent characters are letters, digits, and the underscore.
This option has no effect if <samp>-x</samp> is also specified.
</p>
+<p>Because the <samp>-w</samp> option can match a substring that does not
+begin and end with word constituents, it differs from surrounding a
+regular expression with ‘<samp>\<</samp>’ and
‘<samp>\></samp>’. For example, although
+‘<samp>grep -w @</samp>’ matches a line containing only
‘<samp>@</samp>’, ‘<samp>grep
+'\<@\>'</samp>’ cannot match any line because
‘<samp>@</samp>’ is not a
+word constituent. See <a
href="#The-Backslash-Character-and-Special-Expressions">The Backslash Character
and Special Expressions</a>.
+</p>
</dd>
<dt><samp>-x</samp></dt>
<dt><samp>--line-regexp</samp></dt>
@@ -375,7 +385,7 @@
<a name="index-_002d_002dline_002dregexp"></a>
<a name="index-match-the-whole-line"></a>
<p>Select only those matches that exactly match the whole line.
-For a regular expression pattern, this is like parenthesizing the
+For regular expression patterns, this is like parenthesizing each
pattern and then surrounding it with ‘<samp>^</samp>’ and
‘<samp>$</samp>’.
(<samp>-x</samp> is specified by POSIX.)
</p>
@@ -452,11 +462,11 @@
<dd><a name="index-_002dm"></a>
<a name="index-_002d_002dmax_002dcount"></a>
<a name="index-max_002dcount"></a>
-<p>Stop reading a file after <var>num</var> matching lines.
+<p>Stop after the first <var>num</var> selected lines.
If the input is standard input from a regular file,
-and <var>num</var> matching lines are output,
+and <var>num</var> selected lines are output,
<code>grep</code> ensures that the standard input is positioned
-just after the last matching line before exiting,
+just after the last selected line before exiting,
regardless of the presence of trailing context lines.
This enables a calling process to resume a search.
For example, the following shell script makes use of it:
@@ -481,10 +491,8 @@
</pre></div>
<a name="index-context-lines"></a>
-<p>When <code>grep</code> stops after <var>num</var> matching lines,
+<p>When <code>grep</code> stops after <var>num</var> selected lines,
it outputs any trailing context lines.
-Since context does not include matching lines,
-<code>grep</code> will stop when it encounters another matching line.
When the <samp>-c</samp> or <samp>--count</samp> option is also used,
<code>grep</code> does not output a count greater than <var>num</var>.
When the <samp>-v</samp> or <samp>--invert-match</samp> option is also used,
@@ -561,10 +569,6 @@
before each line of output.
If <samp>-o</samp> (<samp>--only-matching</samp>) is specified,
print the offset of the matching part itself.
-When <code>grep</code> runs on MS-DOS or MS-Windows,
-the printed byte offsets depend on whether
-the <samp>-u</samp> (<samp>--unix-byte-offsets</samp>) option is used;
-see below.
</p>
</dd>
<dt><samp>-H</samp></dt>
@@ -621,22 +625,6 @@
so that lines from a single file all start at the same column.
</p>
</dd>
-<dt><samp>-u</samp></dt>
-<dt><samp>--unix-byte-offsets</samp></dt>
-<dd><a name="index-_002du"></a>
-<a name="index-_002d_002dunix_002dbyte_002doffsets"></a>
-<a name="index-MS_002dDOS_002fMS_002dWindows-byte-offsets"></a>
-<a name="index-byte-offsets_002c-on-MS_002dDOS_002fMS_002dWindows"></a>
-<p>Report Unix-style byte offsets.
-This option causes <code>grep</code> to report byte offsets
-as if the file were a Unix-style text file,
-i.e., the byte offsets ignore carriage returns that were stripped.
-This will produce results identical
-to running <code>grep</code> on a Unix machine.
-This option has no effect unless the <samp>-b</samp> option is also used;
-it has no effect on platforms other than MS-DOS and MS-Windows.
-</p>
-</dd>
<dt><samp>-Z</samp></dt>
<dt><samp>--null</samp></dt>
<dd><a name="index-_002dZ"></a>
@@ -777,7 +765,7 @@
<samp>-z</samp> (<samp>--null-data</samp>) option is not given (see <a
href="#Other-Options">Other Options</a>).
</p>
<p>By default, <var>type</var> is ‘<samp>binary</samp>’, and
<code>grep</code>
-suppresses output afer null input binary data is discovered,
+suppresses output after null input binary data is discovered,
and suppresses output lines that contain improperly encoded data.
When some output is suppressed, <code>grep</code> follows any output
with a one-line message saying that a binary file matches.
@@ -929,6 +917,15 @@
<h4 class="subsection">2.1.7 Other Options</h4>
<dl compact="compact">
+<dt><samp>--</samp></dt>
+<dd><a name="index-_002d_002d"></a>
+<a name="index-option-delimiter"></a>
+<p>Delimit the option list. Later arguments, if any, are treated as
+operands even if they begin with ‘<samp>-</samp>’. For example,
‘<samp>grep PAT --
+-file1 file2</samp>’ searches for the pattern PAT in the files named
<samp>-file1</samp>
+and <samp>file2</samp>.
+</p>
+</dd>
<dt><samp>--line-buffered</samp></dt>
<dd><a name="index-_002d_002dline_002dbuffered"></a>
<a name="index-line-buffering"></a>
@@ -940,21 +937,27 @@
<dt><samp>--binary</samp></dt>
<dd><a name="index-_002dU"></a>
<a name="index-_002d_002dbinary"></a>
-<a name="index-MS_002dDOS_002fMS_002dWindows-binary-files"></a>
-<a name="index-binary-files_002c-MS_002dDOS_002fMS_002dWindows"></a>
-<p>Treat the file(s) as binary.
-By default, under MS-DOS and MS-Windows,
-<code>grep</code> guesses whether a file is text or binary
-as described for the <samp>--binary-files</samp> option.
-If <code>grep</code> decides the file is a text file,
-it strips carriage returns from the original file contents
-(to make regular expressions with <code>^</code> and <code>$</code> work
correctly).
-Specifying <samp>-U</samp> overrules this guesswork,
-causing all files to be read and passed to the matching mechanism verbatim;
-if the file is a text file with <code>CR/LF</code> pairs at the end of each
line,
-this will cause some regular expressions to fail.
-This option has no effect
-on platforms other than MS-DOS and MS-Windows.
+<a name="index-MS_002dWindows-binary-I_002fO"></a>
+<a name="index-binary-I_002fO"></a>
+<p>On platforms that distinguish between text and binary I/O,
+use the latter when reading and writing files other
+than the user’s terminal, so that all input bytes are read and written
+as-is. This overrides the default behavior where <code>grep</code>
+follows the operating system’s advice whether to use text or binary
+I/O. On MS-Windows when <code>grep</code> uses text I/O it reads a
+carriage return–newline pair as a newline and a Control-Z as
+end-of-file, and it writes a newline as a carriage return–newline
+pair.
+</p>
+<p>When using text I/O <samp>--byte-offset</samp> (<samp>-b</samp>) counts and
+<samp>--binary-files</samp> heuristics apply to input data after text-I/O
+processing. Also, the <samp>--binary-files</samp> heuristics need not agree
+with the <samp>--binary</samp> option; that is, they may treat the data as
+text even if <samp>--binary</samp> is given, or vice versa.
+See <a href="#File-and-Directory-Selection">File and Directory Selection</a>.
+</p>
+<p>This option has no effect on GNU and other POSIX-compatible platforms,
+which do not distinguish text from binary I/O.
</p>
</dd>
<dt><samp>-z</samp></dt>
@@ -1217,6 +1220,8 @@
<dd><a name="index-LC_005fALL-environment-variable-2"></a>
<a name="index-LC_005fCTYPE-environment-variable"></a>
<a name="index-LANG-environment-variable-2"></a>
+<a name="index-encoding-error"></a>
+<a name="index-null-character"></a>
<p>These variables specify the locale for the <code>LC_CTYPE</code> category,
which determines the type of characters,
e.g., which characters are whitespace.
@@ -1224,6 +1229,17 @@
text is encoded in UTF-8, ASCII, or some other encoding. In the
‘<samp>C</samp>’ or ‘<samp>POSIX</samp>’ locale, all
characters are encoded as a
single byte and every byte is a valid character.
+In more-complex encodings such as UTF-8, a sequence of multiple bytes
+may be needed to represent a character, and some bytes may be encoding
+errors that do not contribute to the representation of any character.
+POSIX does not specify the behavior of <code>grep</code> when patterns or
+input data contain encoding errors or null characters, so portable
+scripts should avoid such usage. As an extension to POSIX, GNU
+<code>grep</code> treats null characters like any other character.
+However, unless the <samp>-a</samp> (<samp>--binary-files=text</samp>) option
+is used, the presence of null characters in input or of encoding
+errors in output causes GNU <code>grep</code> to treat the file as binary
+and suppress details about matches. See <a
href="#File-and-Directory-Selection">File and Directory Selection</a>.
</p>
</dd>
<dt><code>LANGUAGE</code></dt>
@@ -1286,6 +1302,9 @@
<p>Normally the exit status is 0 if a line is selected, 1 if no lines
were selected, and 2 if an error occurred. However, if the
+<samp>-L</samp> or <samp>--files-without-match</samp> is used, the exit status
+is 0 if a file is listed, 1 if no files were listed, and 2 if an error
+occurred. Also, if the
<samp>-q</samp> or <samp>--quiet</samp> or <samp>--silent</samp> option is used
and a line is selected, the exit status is 0 even if an error
occurred. Other <code>grep</code> implementations may exit with status
@@ -1303,7 +1322,7 @@
<a name="index-variants-of-grep"></a>
<p><code>grep</code> searches the named input files
-for lines containing a match to the given pattern.
+for lines containing a match to the given patterns.
By default, <code>grep</code> prints the matching lines.
A file named <samp>-</samp> stands for standard input.
If no input is specified, <code>grep</code> searches the working
@@ -1318,7 +1337,7 @@
<dd><a name="index-_002dG"></a>
<a name="index-_002d_002dbasic_002dregexp"></a>
<a name="index-matching-basic-regular-expressions"></a>
-<p>Interpret the pattern as a basic regular expression (BRE).
+<p>Interpret patterns as basic regular expressions (BREs).
This is the default.
</p>
</dd>
@@ -1327,7 +1346,7 @@
<dd><a name="index-_002dE"></a>
<a name="index-_002d_002dextended_002dregexp"></a>
<a name="index-matching-extended-regular-expressions"></a>
-<p>Interpret the pattern as an extended regular expression (ERE).
+<p>Interpret patterns as extended regular expressions (EREs).
(<samp>-E</samp> is specified by POSIX.)
</p>
</dd>
@@ -1336,8 +1355,7 @@
<dd><a name="index-_002dF"></a>
<a name="index-_002d_002dfixed_002dstrings"></a>
<a name="index-matching-fixed-strings"></a>
-<p>Interpret the pattern as a list of fixed strings (instead of regular
-expressions), separated by newlines, any of which is to be matched.
+<p>Interpret patterns as fixed strings, not regular expressions.
(<samp>-F</samp> is specified by POSIX.)
</p>
</dd>
@@ -1346,9 +1364,9 @@
<dd><a name="index-_002dP"></a>
<a name="index-_002d_002dperl_002dregexp"></a>
<a name="index-matching-Perl_002dcompatible-regular-expressions"></a>
-<p>Interpret the pattern as a Perl-compatible regular expression (PCRE).
-This is highly experimental, particularly when combined with
-the <samp>-z</samp> (<samp>--null-data</samp>) option, and
+<p>Interpret patterns as Perl-compatible regular expressions (PCREs).
+PCRE support is here to stay, but consider this option experimental when
+combined with the <samp>-z</samp> (<samp>--null-data</samp>) option, and note
that
‘<samp>grep -P</samp>’ may warn of unimplemented features.
See <a href="#Other-Options">Other Options</a>.
</p>
@@ -1380,7 +1398,7 @@
by using various operators to combine smaller expressions.
<code>grep</code> understands
three different versions of regular expression syntax:
-“basic” (BRE), “extended” (ERE) and “perl”
(PCRE).
+basic (BRE), extended (ERE), and Perl-compatible (PCRE).
In GNU <code>grep</code>,
there is no difference in available functionality between the basic and
extended syntaxes.
@@ -1422,17 +1440,16 @@
Any meta-character
with special meaning may be quoted by preceding it with a backslash.
</p>
-<p>A regular expression may be followed by one of several
-repetition operators:
-</p>
-<dl compact="compact">
-<dt>‘<samp>.</samp>’</dt>
-<dd><a name="index-_002e"></a>
+<a name="index-_002e"></a>
<a name="index-dot"></a>
<a name="index-period"></a>
<p>The period ‘<samp>.</samp>’ matches any single character.
+It is unspecified whether ‘<samp>.</samp>’ matches an encoding
error.
</p>
-</dd>
+<p>A regular expression may be followed by one of several
+repetition operators:
+</p>
+<dl compact="compact">
<dt>‘<samp>?</samp>’</dt>
<dd><a name="index-_003f"></a>
<a name="index-question-mark"></a>
@@ -1515,11 +1532,15 @@
<a name="index-character-class"></a>
<p>A <em>bracket expression</em> is a list of characters enclosed by
‘<samp>[</samp>’ and
‘<samp>]</samp>’.
-It matches any single character in that list;
-if the first character of the list is the caret ‘<samp>^</samp>’,
-then it matches any character <strong>not</strong> in the list.
+It matches any single character in that list.
+If the first character of the list is the caret ‘<samp>^</samp>’,
+then it matches any character <strong>not</strong> in the list,
+and it is unspecified whether it matches an encoding error.
For example, the regular expression
-‘<samp>[0123456789]</samp>’ matches any single digit.
+‘<samp>[0123456789]</samp>’ matches any single digit,
+whereas ‘<samp>[^()]</samp>’ matches any single character that is
not
+an opening or closing parenthesis, and might or might not match an
+encoding error.
</p>
<a name="index-range-expression"></a>
<p>Within a bracket expression, a <em>range expression</em> consists of two
@@ -1823,7 +1844,7 @@
<a name="Usage"></a>
<div class="header">
<p>
-Next: <a href="#Reporting-Bugs" accesskey="n" rel="next">Reporting Bugs</a>,
Previous: <a href="#Regular-Expressions" accesskey="p" rel="prev">Regular
Expressions</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a
href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a
href="#Index" title="Index" rel="index">Index</a>]</p>
+Next: <a href="#Performance" accesskey="n" rel="next">Performance</a>,
Previous: <a href="#Regular-Expressions" accesskey="p" rel="prev">Regular
Expressions</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a
href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a
href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<a name="Usage-1"></a>
<h2 class="chapter">4 Usage</h2>
@@ -2087,22 +2108,108 @@
<hr>
+<a name="Performance"></a>
+<div class="header">
+<p>
+Next: <a href="#Reporting-Bugs" accesskey="n" rel="next">Reporting Bugs</a>,
Previous: <a href="#Usage" accesskey="p" rel="prev">Usage</a>, Up: <a
href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents"
title="Table of contents" rel="contents">Contents</a>][<a href="#Index"
title="Index" rel="index">Index</a>]</p>
+</div>
+<a name="Performance-1"></a>
+<h2 class="chapter">5 Performance</h2>
+
+<a name="index-performance"></a>
+<p>Typically <code>grep</code> is an efficient way to search text. However,
+it can be quite slow in some cases, and it can search large files
+where even minor performance tweaking can help significantly.
+Although the algorithm used by <code>grep</code> is an implementation
+detail that can change from release to release, understanding its
+basic strengths and weaknesses can help you improve its performance.
+</p>
+<p>The <code>grep</code> command operates partly via a set of automata that
+are designed for efficiency, and partly via a slower matcher that
+takes over when the fast matchers run into unusual features like
+back-references. When feasible, the Boyer–Moore fast string
+searching algorithm is used to match a single fixed pattern, and the
+Aho–Corasick algorithm is used to match multiple fixed patterns.
+</p>
+<a name="index-locales"></a>
+<p>Generally speaking <code>grep</code> operates more efficiently in
+single-byte locales, since it can avoid the special processing needed
+for multi-byte characters. If your patterns will work just as well
+that way, setting <code>LC_ALL</code> to a single-byte locale can help
+performance considerably. Setting ‘<samp>LC_ALL='C'</samp>’ can be
+particularly efficient, as <code>grep</code> is tuned for that locale.
+</p>
+<a name="index-case-insensitive-search-1"></a>
+<p>Outside the ‘<samp>C</samp>’ locale, case-insensitive search,
and search for
+bracket expressions like ‘<samp>[a-z]</samp>’ and
‘<samp>[[=a=]b]</samp>’, can be
+surprisingly inefficient due to difficulties in fast portable access to
+concepts like multi-character collating elements.
+</p>
+<a name="index-back_002dreferences"></a>
+<p>A back-reference such as ‘<samp>\1</samp>’ can hurt performance
significantly
+in some cases, since back-references cannot in general be implemented
+via a finite state automaton, and instead trigger a backtracking
+algorithm that can be quite inefficient. For example, although the
+pattern ‘<samp>^(.*)\1{14}(.*)\2{13}$</samp>’ matches only lines
whose
+lengths can be written as a sum <em>15x + 14y</em> for nonnegative
+integers <em>x</em> and <em>y</em>, the pattern matcher does not perform
+linear Diophantine analysis and instead backtracks through all
+possible matching strings, using an algorithm that is exponential in
+the worst case.
+</p>
+<a name="index-holes-in-files"></a>
+<p>On some operating systems that support files with holes—large
+regions of zeros that are not physically present on secondary
+storage—<code>grep</code> can skip over the holes efficiently without
+needing to read the zeros. This optimization is not available if the
+<samp>-a</samp> (<samp>--binary-files=text</samp>) option is used (see <a
href="#File-and-Directory-Selection">File and Directory Selection</a>), unless
the <samp>-z</samp> (<samp>--null-data</samp>)
+option is also used (see <a href="#Other-Options">Other Options</a>).
+</p>
+<p>For more about the algorithms used by <code>grep</code> and about
+related string matching algorithms, see:
+</p>
+<ul>
+<li> Aho AV. Algorithms for finding patterns in strings.
+In: van Leeuwen J. <em>Handbook of Theoretical Computer Science</em>, vol. A.
+New York: Elsevier; 1990. p. 255–300.
+This surveys classic string matching algorithms, some of which are
+used by <code>grep</code>.
+
+</li><li> Aho AV, Corasick MJ. Efficient string matching: an aid to
bibliographic search.
+<em>CACM</em>. 1975;18(6):333–40.
+<a
href="https://dx.doi.org/10.1145/360825.360855">https://dx.doi.org/10.1145/360825.360855</a>.
+This introduces the Aho–Corasick algorithm.
+
+</li><li> Boyer RS, Moore JS. A fast string searching algorithm.
+<em>CACM</em>. 1977;20(10):762–72.
+<a
href="https://dx.doi.org/10.1145/359842.359859">https://dx.doi.org/10.1145/359842.359859</a>.
+This introduces the Boyer–Moore algorithm.
+
+</li><li> Faro S, Lecroq T. The exact online string matching problem: a review
+of the most recent results.
+<em>ACM Comput Surv</em>. 2013;45(2):13.
+<a
href="https://dx.doi.org/10.1145/2431211.2431212">https://dx.doi.org/10.1145/2431211.2431212</a>.
+This surveys string matching algorithms that might help improve the
+performance of <code>grep</code> in the future.
+</li></ul>
+
+<hr>
<a name="Reporting-Bugs"></a>
<div class="header">
<p>
-Next: <a href="#Copying" accesskey="n" rel="next">Copying</a>, Previous: <a
href="#Usage" accesskey="p" rel="prev">Usage</a>, Up: <a href="#Top"
accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of
contents" rel="contents">Contents</a>][<a href="#Index" title="Index"
rel="index">Index</a>]</p>
+Next: <a href="#Copying" accesskey="n" rel="next">Copying</a>, Previous: <a
href="#Performance" accesskey="p" rel="prev">Performance</a>, Up: <a
href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents"
title="Table of contents" rel="contents">Contents</a>][<a href="#Index"
title="Index" rel="index">Index</a>]</p>
</div>
<a name="Reporting-bugs"></a>
-<h2 class="chapter">5 Reporting bugs</h2>
+<h2 class="chapter">6 Reporting bugs</h2>
<a name="index-bugs_002c-reporting"></a>
<p>Bug reports can be found at the
-<a href="http://debbugs.gnu.org/cgi/pkgreport.cgi?package=grep">GNU bug report
logs for <code>grep</code></a>.
+<a href="https://debbugs.gnu.org/cgi/pkgreport.cgi?package=grep">GNU bug
report logs for <code>grep</code></a>.
If you find a bug not listed there, please email it to
<a href="mailto:address@hidden">address@hidden</a> to create a new bug report.
</p>
<a name="Known-Bugs"></a>
-<h3 class="section">5.1 Known Bugs</h3>
+<h3 class="section">6.1 Known Bugs</h3>
<a name="index-Bugs_002c-known"></a>
<p>Large repetition counts in the ‘<samp>{n,m}</samp>’ construct
may cause
@@ -2121,7 +2228,7 @@
Next: <a href="#Index" accesskey="n" rel="next">Index</a>, Previous: <a
href="#Reporting-Bugs" accesskey="p" rel="prev">Reporting Bugs</a>, Up: <a
href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents"
title="Table of contents" rel="contents">Contents</a>][<a href="#Index"
title="Index" rel="index">Index</a>]</p>
</div>
<a name="Copying-1"></a>
-<h2 class="chapter">6 Copying</h2>
+<h2 class="chapter">7 Copying</h2>
<a name="index-copying"></a>
<p>GNU <code>grep</code> is licensed under the GNU GPL, which makes it <em>free
@@ -2138,12 +2245,12 @@
<p>This general method of licensing software is sometimes called
<em>open source</em>. The GNU project prefers the term “free
software”
for reasons outlined at
-<a
href="http://www.gnu.org/philosophy/open-source-misses-the-point.html">http://www.gnu.org/philosophy/open-source-misses-the-point.html</a>.
+<a
href="https://www.gnu.org/philosophy/open-source-misses-the-point.html">https://www.gnu.org/philosophy/open-source-misses-the-point.html</a>.
</p>
<p>This manual is free documentation in the same sense. The
documentation license is included below. The license for the program
is available with the source code, or at
-<a
href="http://www.gnu.org/licenses/gpl.html">http://www.gnu.org/licenses/gpl.html</a>.
+<a
href="https://www.gnu.org/licenses/gpl.html">https://www.gnu.org/licenses/gpl.html</a>.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">• <a
href="#GNU-Free-Documentation-License" accesskey="1">GNU Free Documentation
License</a>:</td><td> </td><td align="left" valign="top">
@@ -2157,20 +2264,20 @@
Up: <a href="#Copying" accesskey="u" rel="up">Copying</a> [<a
href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a
href="#Index" title="Index" rel="index">Index</a>]</p>
</div>
<a name="GNU-Free-Documentation-License-1"></a>
-<h3 class="section">6.1 GNU Free Documentation License</h3>
+<h3 class="section">7.1 GNU Free Documentation License</h3>
<div align="center">Version 1.3, 3 November 2008
</div>
<div class="display">
<pre class="display">Copyright © 2000, 2001, 2002, 2007, 2008 Free
Software Foundation, Inc.
-<a href="http://fsf.org/">http://fsf.org/</a>
+<a href="https://fsf.org/">https://fsf.org/</a>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
</pre></div>
-<ol>
+<ol start="0">
<li> PREAMBLE
<p>The purpose of this License is to make a manual, textbook, or other
@@ -2346,7 +2453,7 @@
and modification of the Modified Version to whoever possesses a copy
of it. In addition, you must do these things in the Modified Version:
</p>
-<ol>
+<ol type="A" start="1">
<li> Use in the Title Page (and on the covers, if any) a title distinct
from that of the Document, and from those of previous versions
(which should, if there were any, be listed in the History section
@@ -2546,7 +2653,7 @@
of the GNU Free Documentation License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns. See
-<a href="http://www.gnu.org/copyleft/">http://www.gnu.org/copyleft/</a>.
+<a href="https://www.gnu.org/copyleft/">https://www.gnu.org/copyleft/</a>.
</p>
<p>Each version of the License is given a distinguishing version number.
If the Document specifies that a particular numbered version of this
@@ -2710,6 +2817,7 @@
<tr><td></td><td valign="top"><a
href="#index-_002b"><code>+</code></a>:</td><td> </td><td valign="top"><a
href="#Fundamental-Structure">Fundamental Structure</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Index_cp_symbol-3">-</a></th><td></td><td></td></tr>
+<tr><td></td><td valign="top"><a
href="#index-_002d_002d"><code>--</code></a>:</td><td> </td><td
valign="top"><a href="#Other-Options">Other Options</a></td></tr>
<tr><td></td><td valign="top"><a
href="#index-_002d_002dafter_002dcontext"><code>--after-context</code></a>:</td><td> </td><td
valign="top"><a href="#Context-Line-Control">Context Line Control</a></td></tr>
<tr><td></td><td valign="top"><a
href="#index-_002d_002dbasic_002dregexp"><code>--basic-regexp</code></a>:</td><td> </td><td
valign="top"><a href="#grep-Programs">grep Programs</a></td></tr>
<tr><td></td><td valign="top"><a
href="#index-_002d_002dbefore_002dcontext"><code>--before-context</code></a>:</td><td> </td><td
valign="top"><a href="#Context-Line-Control">Context Line Control</a></td></tr>
@@ -2751,10 +2859,9 @@
<tr><td></td><td valign="top"><a
href="#index-_002d_002dperl_002dregexp"><code>--perl-regexp</code></a>:</td><td> </td><td
valign="top"><a href="#grep-Programs">grep Programs</a></td></tr>
<tr><td></td><td valign="top"><a
href="#index-_002d_002dquiet"><code>--quiet</code></a>:</td><td> </td><td
valign="top"><a href="#General-Output-Control">General Output
Control</a></td></tr>
<tr><td></td><td valign="top"><a
href="#index-_002d_002drecursive"><code>--recursive</code></a>:</td><td> </td><td
valign="top"><a href="#File-and-Directory-Selection">File and Directory
Selection</a></td></tr>
-<tr><td></td><td valign="top"><a
href="#index-_002d_002dregexp_003dpattern"><code>--regexp=<var>pattern</var></code></a>:</td><td> </td><td
valign="top"><a href="#Matching-Control">Matching Control</a></td></tr>
+<tr><td></td><td valign="top"><a
href="#index-_002d_002dregexp_003dpatterns"><code>--regexp=<var>patterns</var></code></a>:</td><td> </td><td
valign="top"><a href="#Matching-Control">Matching Control</a></td></tr>
<tr><td></td><td valign="top"><a
href="#index-_002d_002dsilent"><code>--silent</code></a>:</td><td> </td><td
valign="top"><a href="#General-Output-Control">General Output
Control</a></td></tr>
<tr><td></td><td valign="top"><a
href="#index-_002d_002dtext"><code>--text</code></a>:</td><td> </td><td
valign="top"><a href="#File-and-Directory-Selection">File and Directory
Selection</a></td></tr>
-<tr><td></td><td valign="top"><a
href="#index-_002d_002dunix_002dbyte_002doffsets"><code>--unix-byte-offsets</code></a>:</td><td> </td><td
valign="top"><a href="#Output-Line-Prefix-Control">Output Line Prefix
Control</a></td></tr>
<tr><td></td><td valign="top"><a
href="#index-_002d_002dversion"><code>--version</code></a>:</td><td> </td><td
valign="top"><a href="#Generic-Program-Information">Generic Program
Information</a></td></tr>
<tr><td></td><td valign="top"><a
href="#index-_002d_002dwith_002dfilename"><code>--with-filename</code></a>:</td><td> </td><td
valign="top"><a href="#Output-Line-Prefix-Control">Output Line Prefix
Control</a></td></tr>
<tr><td></td><td valign="top"><a
href="#index-_002d_002dword_002dregexp"><code>--word-regexp</code></a>:</td><td> </td><td
valign="top"><a href="#Matching-Control">Matching Control</a></td></tr>
@@ -2786,7 +2893,6 @@
<tr><td></td><td valign="top"><a
href="#index-_002dR"><code>-R</code></a>:</td><td> </td><td
valign="top"><a href="#File-and-Directory-Selection">File and Directory
Selection</a></td></tr>
<tr><td></td><td valign="top"><a
href="#index-_002ds"><code>-s</code></a>:</td><td> </td><td
valign="top"><a href="#General-Output-Control">General Output
Control</a></td></tr>
<tr><td></td><td valign="top"><a
href="#index-_002dT"><code>-T</code></a>:</td><td> </td><td
valign="top"><a href="#Output-Line-Prefix-Control">Output Line Prefix
Control</a></td></tr>
-<tr><td></td><td valign="top"><a
href="#index-_002du"><code>-u</code></a>:</td><td> </td><td
valign="top"><a href="#Output-Line-Prefix-Control">Output Line Prefix
Control</a></td></tr>
<tr><td></td><td valign="top"><a
href="#index-_002dU"><code>-U</code></a>:</td><td> </td><td
valign="top"><a href="#Other-Options">Other Options</a></td></tr>
<tr><td></td><td valign="top"><a
href="#index-_002dV"><code>-V</code></a>:</td><td> </td><td
valign="top"><a href="#Generic-Program-Information">Generic Program
Information</a></td></tr>
<tr><td></td><td valign="top"><a
href="#index-_002dv"><code>-v</code></a>:</td><td> </td><td
valign="top"><a href="#Matching-Control">Matching Control</a></td></tr>
@@ -2822,12 +2928,13 @@
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Index_cp_letter-B">B</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a
href="#index-back_002dreference">back-reference</a>:</td><td> </td><td
valign="top"><a href="#Back_002dreferences-and-Subexpressions">Back-references
and Subexpressions</a></td></tr>
+<tr><td></td><td valign="top"><a
href="#index-back_002dreferences">back-references</a>:</td><td> </td><td
valign="top"><a href="#Performance">Performance</a></td></tr>
<tr><td></td><td valign="top"><a
href="#index-backslash">backslash</a>:</td><td> </td><td valign="top"><a
href="#The-Backslash-Character-and-Special-Expressions">The Backslash Character
and Special Expressions</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-basic-regular-expressions">basic
regular expressions</a>:</td><td> </td><td valign="top"><a
href="#Basic-vs-Extended">Basic vs Extended</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-before-context">before
context</a>:</td><td> </td><td valign="top"><a
href="#Context-Line-Control">Context Line Control</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-binary-files">binary
files</a>:</td><td> </td><td valign="top"><a
href="#File-and-Directory-Selection">File and Directory Selection</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-binary-files-1">binary
files</a>:</td><td> </td><td valign="top"><a
href="#File-and-Directory-Selection">File and Directory Selection</a></td></tr>
-<tr><td></td><td valign="top"><a
href="#index-binary-files_002c-MS_002dDOS_002fMS_002dWindows">binary files,
MS-DOS/MS-Windows</a>:</td><td> </td><td valign="top"><a
href="#Other-Options">Other Options</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-binary-I_002fO">binary
I/O</a>:</td><td> </td><td valign="top"><a href="#Other-Options">Other
Options</a></td></tr>
<tr><td></td><td valign="top"><a
href="#index-blank-character-class"><code>blank <span class="roman">character
class</span></code></a>:</td><td> </td><td valign="top"><a
href="#Character-Classes-and-Bracket-Expressions">Character Classes and Bracket
Expressions</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-blank-characters">blank
characters</a>:</td><td> </td><td valign="top"><a
href="#Character-Classes-and-Bracket-Expressions">Character Classes and Bracket
Expressions</a></td></tr>
<tr><td></td><td valign="top"><a
href="#index-bn-GREP_005fCOLORS-capability"><code>bn GREP_COLORS <span
class="roman">capability</span></code></a>:</td><td> </td><td
valign="top"><a href="#Environment-Variables">Environment
Variables</a></td></tr>
@@ -2839,10 +2946,10 @@
<tr><td></td><td valign="top"><a href="#index-Bugs_002c-known">Bugs,
known</a>:</td><td> </td><td valign="top"><a
href="#Reporting-Bugs">Reporting Bugs</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-bugs_002c-reporting">bugs,
reporting</a>:</td><td> </td><td valign="top"><a
href="#Reporting-Bugs">Reporting Bugs</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-byte-offset">byte
offset</a>:</td><td> </td><td valign="top"><a
href="#Output-Line-Prefix-Control">Output Line Prefix Control</a></td></tr>
-<tr><td></td><td valign="top"><a
href="#index-byte-offsets_002c-on-MS_002dDOS_002fMS_002dWindows">byte offsets,
on MS-DOS/MS-Windows</a>:</td><td> </td><td valign="top"><a
href="#Output-Line-Prefix-Control">Output Line Prefix Control</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Index_cp_letter-C">C</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-case-insensitive-search">case
insensitive search</a>:</td><td> </td><td valign="top"><a
href="#Matching-Control">Matching Control</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-case-insensitive-search-1">case
insensitive search</a>:</td><td> </td><td valign="top"><a
href="#Performance">Performance</a></td></tr>
<tr><td></td><td valign="top"><a
href="#index-changing-name-of-standard-input">changing name of standard
input</a>:</td><td> </td><td valign="top"><a
href="#Output-Line-Prefix-Control">Output Line Prefix Control</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-character-class">character
class</a>:</td><td> </td><td valign="top"><a
href="#Character-Classes-and-Bracket-Expressions">Character Classes and Bracket
Expressions</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-character-classes">character
classes</a>:</td><td> </td><td valign="top"><a
href="#Character-Classes-and-Bracket-Expressions">Character Classes and Bracket
Expressions</a></td></tr>
@@ -2868,6 +2975,7 @@
<tr><td></td><td valign="top"><a
href="#index-dot">dot</a>:</td><td> </td><td valign="top"><a
href="#Fundamental-Structure">Fundamental Structure</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Index_cp_letter-E">E</a></th><td></td><td></td></tr>
+<tr><td></td><td valign="top"><a href="#index-encoding-error">encoding
error</a>:</td><td> </td><td valign="top"><a
href="#Environment-Variables">Environment Variables</a></td></tr>
<tr><td></td><td valign="top"><a
href="#index-environment-variables">environment
variables</a>:</td><td> </td><td valign="top"><a
href="#Environment-Variables">Environment Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-exclude-directories">exclude
directories</a>:</td><td> </td><td valign="top"><a
href="#File-and-Directory-Selection">File and Directory Selection</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-exclude-files">exclude
files</a>:</td><td> </td><td valign="top"><a
href="#File-and-Directory-Selection">File and Directory Selection</a></td></tr>
@@ -2895,6 +3003,7 @@
<tr><td></td><td valign="top"><a href="#index-highlight-markers">highlight
markers</a>:</td><td> </td><td valign="top"><a
href="#Environment-Variables">Environment Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-highlight-markers-1">highlight
markers</a>:</td><td> </td><td valign="top"><a
href="#Environment-Variables">Environment Variables</a></td></tr>
<tr><td></td><td valign="top"><a
href="#index-highlight_002c-color_002c-colour">highlight, color,
colour</a>:</td><td> </td><td valign="top"><a
href="#General-Output-Control">General Output Control</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-holes-in-files">holes in
files</a>:</td><td> </td><td valign="top"><a
href="#Performance">Performance</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Index_cp_letter-I">I</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-include-files">include
files</a>:</td><td> </td><td valign="top"><a
href="#File-and-Directory-Selection">File and Directory Selection</a></td></tr>
@@ -2920,6 +3029,7 @@
<tr><td></td><td valign="top"><a href="#index-line-buffering">line
buffering</a>:</td><td> </td><td valign="top"><a
href="#Other-Options">Other Options</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-line-numbering">line
numbering</a>:</td><td> </td><td valign="top"><a
href="#Output-Line-Prefix-Control">Output Line Prefix Control</a></td></tr>
<tr><td></td><td valign="top"><a
href="#index-ln-GREP_005fCOLORS-capability"><code>ln GREP_COLORS <span
class="roman">capability</span></code></a>:</td><td> </td><td
valign="top"><a href="#Environment-Variables">Environment
Variables</a></td></tr>
+<tr><td></td><td valign="top"><a
href="#index-locales">locales</a>:</td><td> </td><td valign="top"><a
href="#Performance">Performance</a></td></tr>
<tr><td></td><td valign="top"><a
href="#index-lower-character-class"><code>lower <span class="roman">character
class</span></code></a>:</td><td> </td><td valign="top"><a
href="#Character-Classes-and-Bracket-Expressions">Character Classes and Bracket
Expressions</a></td></tr>
<tr><td></td><td valign="top"><a
href="#index-lower_002dcase-letters">lower-case
letters</a>:</td><td> </td><td valign="top"><a
href="#Character-Classes-and-Bracket-Expressions">Character Classes and Bracket
Expressions</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
@@ -2941,8 +3051,7 @@
<tr><td></td><td valign="top"><a
href="#index-mc-GREP_005fCOLORS-capability"><code>mc GREP_COLORS <span
class="roman">capability</span></code></a>:</td><td> </td><td
valign="top"><a href="#Environment-Variables">Environment
Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-message-language">message
language</a>:</td><td> </td><td valign="top"><a
href="#Environment-Variables">Environment Variables</a></td></tr>
<tr><td></td><td valign="top"><a
href="#index-ms-GREP_005fCOLORS-capability"><code>ms GREP_COLORS <span
class="roman">capability</span></code></a>:</td><td> </td><td
valign="top"><a href="#Environment-Variables">Environment
Variables</a></td></tr>
-<tr><td></td><td valign="top"><a
href="#index-MS_002dDOS_002fMS_002dWindows-binary-files">MS-DOS/MS-Windows
binary files</a>:</td><td> </td><td valign="top"><a
href="#Other-Options">Other Options</a></td></tr>
-<tr><td></td><td valign="top"><a
href="#index-MS_002dDOS_002fMS_002dWindows-byte-offsets">MS-DOS/MS-Windows byte
offsets</a>:</td><td> </td><td valign="top"><a
href="#Output-Line-Prefix-Control">Output Line Prefix Control</a></td></tr>
+<tr><td></td><td valign="top"><a
href="#index-MS_002dWindows-binary-I_002fO">MS-Windows binary
I/O</a>:</td><td> </td><td valign="top"><a href="#Other-Options">Other
Options</a></td></tr>
<tr><td></td><td valign="top"><a
href="#index-mt-GREP_005fCOLORS-capability"><code>mt GREP_COLORS <span
class="roman">capability</span></code></a>:</td><td> </td><td
valign="top"><a href="#Environment-Variables">Environment
Variables</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Index_cp_letter-N">N</a></th><td></td><td></td></tr>
@@ -2952,15 +3061,18 @@
<tr><td></td><td valign="top"><a
href="#index-ne-GREP_005fCOLORS-capability"><code>ne GREP_COLORS <span
class="roman">capability</span></code></a>:</td><td> </td><td
valign="top"><a href="#Environment-Variables">Environment
Variables</a></td></tr>
<tr><td></td><td valign="top"><a
href="#index-NLS">NLS</a>:</td><td> </td><td valign="top"><a
href="#Environment-Variables">Environment Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-no-filename-prefix">no filename
prefix</a>:</td><td> </td><td valign="top"><a
href="#Output-Line-Prefix-Control">Output Line Prefix Control</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-null-character">null
character</a>:</td><td> </td><td valign="top"><a
href="#Environment-Variables">Environment Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-numeric-characters">numeric
characters</a>:</td><td> </td><td valign="top"><a
href="#Character-Classes-and-Bracket-Expressions">Character Classes and Bracket
Expressions</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Index_cp_letter-O">O</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-only-matching">only
matching</a>:</td><td> </td><td valign="top"><a
href="#General-Output-Control">General Output Control</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-option-delimiter">option
delimiter</a>:</td><td> </td><td valign="top"><a
href="#Other-Options">Other Options</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
<tr><th><a name="Index_cp_letter-P">P</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a
href="#index-palindromes">palindromes</a>:</td><td> </td><td
valign="top"><a href="#Usage">Usage</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-pattern-from-file">pattern from
file</a>:</td><td> </td><td valign="top"><a
href="#Matching-Control">Matching Control</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-pattern-list">pattern
list</a>:</td><td> </td><td valign="top"><a
href="#Matching-Control">Matching Control</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-patterns-from-file">patterns
from file</a>:</td><td> </td><td valign="top"><a
href="#Matching-Control">Matching Control</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-patterns-option">patterns
option</a>:</td><td> </td><td valign="top"><a
href="#Matching-Control">Matching Control</a></td></tr>
+<tr><td></td><td valign="top"><a
href="#index-performance">performance</a>:</td><td> </td><td
valign="top"><a href="#Performance">Performance</a></td></tr>
<tr><td></td><td valign="top"><a
href="#index-period">period</a>:</td><td> </td><td valign="top"><a
href="#Fundamental-Structure">Fundamental Structure</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-plus-sign">plus
sign</a>:</td><td> </td><td valign="top"><a
href="#Fundamental-Structure">Fundamental Structure</a></td></tr>
<tr><td></td><td valign="top"><a
href="#index-POSIXLY_005fCORRECT-environment-variable"><code>POSIXLY_CORRECT
<span class="roman">environment
variable</span></code></a>:</td><td> </td><td valign="top"><a
href="#Environment-Variables">Environment Variables</a></td></tr>
@@ -2988,7 +3100,7 @@
<tr><td></td><td valign="top"><a
href="#index-searching-directory-trees-2">searching directory
trees</a>:</td><td> </td><td valign="top"><a
href="#File-and-Directory-Selection">File and Directory Selection</a></td></tr>
<tr><td></td><td valign="top"><a
href="#index-searching-directory-trees-3">searching directory
trees</a>:</td><td> </td><td valign="top"><a
href="#File-and-Directory-Selection">File and Directory Selection</a></td></tr>
<tr><td></td><td valign="top"><a
href="#index-searching-directory-trees-4">searching directory
trees</a>:</td><td> </td><td valign="top"><a
href="#File-and-Directory-Selection">File and Directory Selection</a></td></tr>
-<tr><td></td><td valign="top"><a
href="#index-searching-for-a-pattern">searching for a
pattern</a>:</td><td> </td><td valign="top"><a
href="#Introduction">Introduction</a></td></tr>
+<tr><td></td><td valign="top"><a
href="#index-searching-for-patterns">searching for
patterns</a>:</td><td> </td><td valign="top"><a
href="#Introduction">Introduction</a></td></tr>
<tr><td></td><td valign="top"><a
href="#index-sl-GREP_005fCOLORS-capability"><code>sl GREP_COLORS <span
class="roman">capability</span></code></a>:</td><td> </td><td
valign="top"><a href="#Environment-Variables">Environment
Variables</a></td></tr>
<tr><td></td><td valign="top"><a
href="#index-space-character-class"><code>space <span class="roman">character
class</span></code></a>:</td><td> </td><td valign="top"><a
href="#Character-Classes-and-Bracket-Expressions">Character Classes and Bracket
Expressions</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-space-characters">space
characters</a>:</td><td> </td><td valign="top"><a
href="#Character-Classes-and-Bracket-Expressions">Character Classes and Bracket
Expressions</a></td></tr>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Changes to grep/manual/grep.html,v,
Jim Meyering <=