[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: |
Sat, 14 Aug 2021 16:46:41 -0400 (EDT) |
CVSROOT: /webcvs/grep
Module name: grep
Changes by: Jim Meyering <meyering> 21/08/14 16:46:41
Index: grep.html
===================================================================
RCS file: /webcvs/grep/grep/manual/grep.html,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- grep.html 28 Sep 2020 03:36:48 -0000 1.31
+++ grep.html 14 Aug 2021 20:46:39 -0000 1.32
@@ -1,8 +1,11 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
+<!-- Created by GNU Texinfo 6.8, https://www.gnu.org/software/texinfo/ -->
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- This manual is for grep, a pattern matching engine.
-Copyright (C) 1999-2002, 2005, 2008-2020 Free Software Foundation,
+Copyright (C) 1999-2002, 2005, 2008-2021 Free Software Foundation,
Inc.
Permission is granted to copy, distribute and/or modify this document
@@ -11,125 +14,68 @@
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.5, http://www.gnu.org/software/texinfo/ -->
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>GNU Grep 3.5</title>
+<title>GNU Grep 3.7</title>
-<meta name="description" content="GNU Grep 3.5">
-<meta name="keywords" content="GNU Grep 3.5">
+<meta name="description" content="GNU Grep 3.7">
+<meta name="keywords" content="GNU Grep 3.7">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+
<link href="#Top" rel="start" title="Top">
<link href="#Index" rel="index" title="Index">
<link href="#SEC_Contents" rel="contents" title="Table of Contents">
<link href="/manual" rel="up" title="(dir)">
+<link href="#Introduction" rel="next" title="Introduction">
<style type="text/css">
<!--
+a.copiable-anchor {visibility: hidden; text-decoration: none; line-height: 0em}
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
-blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
-blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
-div.lisp {margin-left: 3.2em}
-div.smalldisplay {margin-left: 3.2em}
-div.smallexample {margin-left: 3.2em}
-div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
-pre.smalldisplay {font-family: inherit; font-size: smaller}
-pre.smallexample {font-size: smaller}
-pre.smallformat {font-family: inherit; font-size: smaller}
-pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
+span:hover a.copiable-anchor {visibility: visible}
ul.no-bullet {list-style: none}
-->
</style>
-<link rel="stylesheet" type="text/css" href="/software/gnulib/manual.css">
+<link rel="stylesheet" type="text/css"
href="https://www.gnu.org/software/gnulib/manual.css">
</head>
<body lang="en">
-<h1 class="settitle" align="center">GNU Grep 3.5</h1>
-
-
+<h1 class="settitle" align="center">GNU Grep 3.7</h1>
-<a name="SEC_Contents"></a>
-<h2 class="contents-heading">Table of Contents</h2>
-
-<div class="contents">
-<ul class="no-bullet">
- <li><a name="toc-Introduction-1" href="#Introduction">1 Introduction</a></li>
- <li><a name="toc-Invoking-grep" href="#Invoking">2 Invoking
<code>grep</code></a>
- <ul class="no-bullet">
- <li><a name="toc-Command_002dline-Options-1"
href="#Command_002dline-Options">2.1 Command-line Options</a>
- <ul class="no-bullet">
- <li><a name="toc-Generic-Program-Information-1"
href="#Generic-Program-Information">2.1.1 Generic Program Information</a></li>
- <li><a name="toc-Matching-Control-1" href="#Matching-Control">2.1.2
Matching Control</a></li>
- <li><a name="toc-General-Output-Control-1"
href="#General-Output-Control">2.1.3 General Output Control</a></li>
- <li><a name="toc-Output-Line-Prefix-Control-1"
href="#Output-Line-Prefix-Control">2.1.4 Output Line Prefix Control</a></li>
- <li><a name="toc-Context-Line-Control-1"
href="#Context-Line-Control">2.1.5 Context Line Control</a></li>
- <li><a name="toc-File-and-Directory-Selection-1"
href="#File-and-Directory-Selection">2.1.6 File and Directory Selection</a></li>
- <li><a name="toc-Other-Options-1" href="#Other-Options">2.1.7 Other
Options</a></li>
- </ul></li>
- <li><a name="toc-Environment-Variables-1"
href="#Environment-Variables">2.2 Environment Variables</a></li>
- <li><a name="toc-Exit-Status-1" href="#Exit-Status">2.3 Exit
Status</a></li>
- <li><a name="toc-grep-Programs-1" href="#grep-Programs">2.4
<code>grep</code> Programs</a></li>
- </ul></li>
- <li><a name="toc-Regular-Expressions-1" href="#Regular-Expressions">3
Regular Expressions</a>
- <ul class="no-bullet">
- <li><a name="toc-Fundamental-Structure-1"
href="#Fundamental-Structure">3.1 Fundamental Structure</a></li>
- <li><a name="toc-Character-Classes-and-Bracket-Expressions-1"
href="#Character-Classes-and-Bracket-Expressions">3.2 Character Classes and
Bracket Expressions</a></li>
- <li><a name="toc-The-Backslash-Character-and-Special-Expressions-1"
href="#The-Backslash-Character-and-Special-Expressions">3.3 The Backslash
Character and Special Expressions</a></li>
- <li><a name="toc-Anchoring-1" href="#Anchoring">3.4 Anchoring</a></li>
- <li><a name="toc-Back_002dreferences-and-Subexpressions-1"
href="#Back_002dreferences-and-Subexpressions">3.5 Back-references and
Subexpressions</a></li>
- <li><a name="toc-Basic-vs-Extended-Regular-Expressions"
href="#Basic-vs-Extended">3.6 Basic vs Extended Regular Expressions</a></li>
- <li><a name="toc-Character-Encoding-1" href="#Character-Encoding">3.7
Character Encoding</a></li>
- <li><a name="toc-Matching-Non_002dASCII-and-Non_002dprintable-Characters"
href="#Matching-Non_002dASCII">3.8 Matching Non-ASCII and Non-printable
Characters</a></li>
- </ul></li>
- <li><a name="toc-Usage-1" href="#Usage">4 Usage</a></li>
- <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-1" href="#Known-Bugs">6.1 Known Bugs</a></li>
- </ul></li>
- <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">7.1 GNU Free Documentation
License</a></li>
- </ul></li>
- <li><a name="toc-Index-1" href="#Index">Index</a></li>
-</ul>
-</div>
-<a name="Top"></a>
+<div class="top" id="Top">
<div class="header">
<p>
Next: <a href="#Introduction" accesskey="n" rel="next">Introduction</a>, Up:
<a href="/manual" accesskey="u" rel="up">(dir)</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="grep"></a>
-<h1 class="top">grep</h1>
+<span id="grep"></span><h1 class="top">grep</h1>
<p><code>grep</code> prints lines that contain a match for one or more
patterns.
</p>
-<p>This manual is for version 3.5 of GNU Grep.
+<p>This manual is for version 3.7 of GNU Grep.
</p>
<p>This manual is for <code>grep</code>, a pattern matching engine.
</p>
-<p>Copyright © 1999–2002, 2005, 2008–2020 Free Software
Foundation,
+<p>Copyright © 1999–2002, 2005, 2008–2021 Free Software
Foundation,
Inc.
</p>
<blockquote>
@@ -142,36 +88,64 @@
</p></blockquote>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Introduction"
accesskey="1">Introduction</a>:</td><td> </td><td align="left"
valign="top">Introduction.
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Invoking"
accesskey="2">Invoking</a>:</td><td> </td><td align="left"
valign="top">Command-line options, environment, exit status.
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Regular-Expressions"
accesskey="3">Regular Expressions</a>:</td><td> </td><td
align="left" valign="top">Regular Expressions.
-</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="#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="#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="#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>
+<div class="Contents_element" id="SEC_Contents">
+<h2 class="contents-heading">Table of Contents</h2>
+<div class="contents">
+
+<ul class="no-bullet">
+ <li><a id="toc-Introduction-1" href="#Introduction">1 Introduction</a></li>
+ <li><a id="toc-Invoking-grep" href="#Invoking">2 Invoking
<code>grep</code></a>
+ <ul class="no-bullet">
+ <li><a id="toc-Command_002dline-Options-1"
href="#Command_002dline-Options">2.1 Command-line Options</a>
+ <ul class="no-bullet">
+ <li><a id="toc-Generic-Program-Information-1"
href="#Generic-Program-Information">2.1.1 Generic Program Information</a></li>
+ <li><a id="toc-Matching-Control-1" href="#Matching-Control">2.1.2
Matching Control</a></li>
+ <li><a id="toc-General-Output-Control-1"
href="#General-Output-Control">2.1.3 General Output Control</a></li>
+ <li><a id="toc-Output-Line-Prefix-Control-1"
href="#Output-Line-Prefix-Control">2.1.4 Output Line Prefix Control</a></li>
+ <li><a id="toc-Context-Line-Control-1"
href="#Context-Line-Control">2.1.5 Context Line Control</a></li>
+ <li><a id="toc-File-and-Directory-Selection-1"
href="#File-and-Directory-Selection">2.1.6 File and Directory Selection</a></li>
+ <li><a id="toc-Other-Options-1" href="#Other-Options">2.1.7 Other
Options</a></li>
+ </ul></li>
+ <li><a id="toc-Environment-Variables-1" href="#Environment-Variables">2.2
Environment Variables</a></li>
+ <li><a id="toc-Exit-Status-1" href="#Exit-Status">2.3 Exit Status</a></li>
+ <li><a id="toc-grep-Programs-1" href="#grep-Programs">2.4
<code>grep</code> Programs</a></li>
+ </ul></li>
+ <li><a id="toc-Regular-Expressions-1" href="#Regular-Expressions">3 Regular
Expressions</a>
+ <ul class="no-bullet">
+ <li><a id="toc-Fundamental-Structure-1" href="#Fundamental-Structure">3.1
Fundamental Structure</a></li>
+ <li><a id="toc-Character-Classes-and-Bracket-Expressions-1"
href="#Character-Classes-and-Bracket-Expressions">3.2 Character Classes and
Bracket Expressions</a></li>
+ <li><a id="toc-The-Backslash-Character-and-Special-Expressions-1"
href="#The-Backslash-Character-and-Special-Expressions">3.3 The Backslash
Character and Special Expressions</a></li>
+ <li><a id="toc-Anchoring-1" href="#Anchoring">3.4 Anchoring</a></li>
+ <li><a id="toc-Back_002dreferences-and-Subexpressions-1"
href="#Back_002dreferences-and-Subexpressions">3.5 Back-references and
Subexpressions</a></li>
+ <li><a id="toc-Basic-vs-Extended-Regular-Expressions"
href="#Basic-vs-Extended">3.6 Basic vs Extended Regular Expressions</a></li>
+ <li><a id="toc-Character-Encoding-1" href="#Character-Encoding">3.7
Character Encoding</a></li>
+ <li><a id="toc-Matching-Non_002dASCII-and-Non_002dprintable-Characters"
href="#Matching-Non_002dASCII">3.8 Matching Non-ASCII and Non-printable
Characters</a></li>
+ </ul></li>
+ <li><a id="toc-Usage-1" href="#Usage">4 Usage</a></li>
+ <li><a id="toc-Performance-1" href="#Performance">5 Performance</a></li>
+ <li><a id="toc-Reporting-bugs" href="#Reporting-Bugs">6 Reporting bugs</a>
+ <ul class="no-bullet">
+ <li><a id="toc-Known-Bugs-1" href="#Known-Bugs">6.1 Known Bugs</a></li>
+ </ul></li>
+ <li><a id="toc-Copying-1" href="#Copying">7 Copying</a>
+ <ul class="no-bullet">
+ <li><a id="toc-GNU-Free-Documentation-License-1"
href="#GNU-Free-Documentation-License">7.1 GNU Free Documentation
License</a></li>
+ </ul></li>
+ <li><a id="toc-Index-1" href="#Index" rel="index">Index</a></li>
+</ul>
+</div>
+</div>
<hr>
-<a name="Introduction"></a>
+<div class="chapter" id="Introduction">
<div class="header">
<p>
-Next: <a href="#Invoking" accesskey="n" rel="next">Invoking</a>, Previous: <a
href="#Top" accesskey="p" rel="prev">Top</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="#Invoking" accesskey="n" rel="next">Invoking
<code>grep</code></a>, Previous: <a href="#Top" accesskey="p"
rel="prev">grep</a>, Up: <a href="#Top" accesskey="u" rel="up">grep</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="Introduction-1"></a>
-<h2 class="chapter">1 Introduction</h2>
+<span id="Introduction-1"></span><h2 class="chapter">1 Introduction</h2>
-<a name="index-searching-for-patterns"></a>
+<span id="index-searching-for-patterns"></span>
<p>Given one or more patterns, <code>grep</code> searches input files
for matches to the patterns.
@@ -189,13 +163,13 @@
</p>
<hr>
-<a name="Invoking"></a>
+</div>
+<div class="chapter" id="Invoking">
<div class="header">
<p>
-Next: <a href="#Regular-Expressions" accesskey="n" rel="next">Regular
Expressions</a>, Previous: <a href="#Introduction" accesskey="p"
rel="prev">Introduction</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="#Regular-Expressions" accesskey="n" rel="next">Regular
Expressions</a>, Previous: <a href="#Introduction" accesskey="p"
rel="prev">Introduction</a>, Up: <a href="#Top" accesskey="u" rel="up">grep</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="Invoking-grep"></a>
-<h2 class="chapter">2 Invoking <code>grep</code></h2>
+<span id="Invoking-grep"></span><h2 class="chapter">2 Invoking
<code>grep</code></h2>
<p>The general synopsis of the <code>grep</code> command line is
</p>
@@ -210,25 +184,20 @@
options. Typically <var>patterns</var> should be quoted when
<code>grep</code> is used in a shell command.
</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.
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Environment-Variables"
accesskey="2">Environment Variables</a>:</td><td> </td><td
align="left" valign="top">POSIX, GNU generic, and GNU grep specific.
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Exit-Status"
accesskey="3">Exit Status</a>:</td><td> </td><td align="left"
valign="top">Exit status returned by <code>grep</code>.
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#grep-Programs"
accesskey="4">grep Programs</a>:</td><td> </td><td align="left"
valign="top"><code>grep</code> programs.
-</td></tr>
-</table>
+<ul class="section-toc">
+<li><a href="#Command_002dline-Options" accesskey="1">Command-line
Options</a></li>
+<li><a href="#Environment-Variables" accesskey="2">Environment
Variables</a></li>
+<li><a href="#Exit-Status" accesskey="3">Exit Status</a></li>
+<li><a href="#grep-Programs" accesskey="4"><code>grep</code> Programs</a></li>
+</ul>
<hr>
-<a name="Command_002dline-Options"></a>
+<div class="section" id="Command_002dline-Options">
<div class="header">
<p>
-Next: <a href="#Environment-Variables" accesskey="n" rel="next">Environment
Variables</a>, Up: <a href="#Invoking" accesskey="u" rel="up">Invoking</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="#Environment-Variables" accesskey="n" rel="next">Environment
Variables</a>, Up: <a href="#Invoking" accesskey="u" rel="up">Invoking
<code>grep</code></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="Command_002dline-Options-1"></a>
-<h3 class="section">2.1 Command-line Options</h3>
+<span id="Command_002dline-Options-1"></span><h3 class="section">2.1
Command-line Options</h3>
<p><code>grep</code> comes with a rich set of options:
some from POSIX and some being GNU extensions.
@@ -241,49 +210,39 @@
A few option names are provided
for compatibility with older or more exotic implementations.
</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a
href="#Generic-Program-Information" accesskey="1">Generic Program
Information</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Matching-Control"
accesskey="2">Matching Control</a>:</td><td> </td><td align="left"
valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#General-Output-Control"
accesskey="3">General Output Control</a>:</td><td> </td><td
align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Output-Line-Prefix-Control"
accesskey="4">Output Line Prefix Control</a>:</td><td> </td><td
align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Context-Line-Control"
accesskey="5">Context Line Control</a>:</td><td> </td><td
align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a
href="#File-and-Directory-Selection" accesskey="6">File and Directory
Selection</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Other-Options"
accesskey="7">Other Options</a>:</td><td> </td><td align="left"
valign="top">
-</td></tr>
-</table>
<p>Several additional options control
which variant of the <code>grep</code> matching engine is used.
-See <a href="#grep-Programs">grep Programs</a>.
+See <a href="#grep-Programs"><code>grep</code> Programs</a>.
</p>
+<ul class="section-toc">
+<li><a href="#Generic-Program-Information" accesskey="1">Generic Program
Information</a></li>
+<li><a href="#Matching-Control" accesskey="2">Matching Control</a></li>
+<li><a href="#General-Output-Control" accesskey="3">General Output
Control</a></li>
+<li><a href="#Output-Line-Prefix-Control" accesskey="4">Output Line Prefix
Control</a></li>
+<li><a href="#Context-Line-Control" accesskey="5">Context Line Control</a></li>
+<li><a href="#File-and-Directory-Selection" accesskey="6">File and Directory
Selection</a></li>
+<li><a href="#Other-Options" accesskey="7">Other Options</a></li>
+</ul>
<hr>
-<a name="Generic-Program-Information"></a>
+<div class="subsection" id="Generic-Program-Information">
<div class="header">
<p>
Next: <a href="#Matching-Control" accesskey="n" rel="next">Matching
Control</a>, Up: <a href="#Command_002dline-Options" accesskey="u"
rel="up">Command-line Options</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="Generic-Program-Information-1"></a>
-<h4 class="subsection">2.1.1 Generic Program Information</h4>
+<span id="Generic-Program-Information-1"></span><h4 class="subsection">2.1.1
Generic Program Information</h4>
<dl compact="compact">
-<dt><samp>--help</samp></dt>
-<dd><a name="index-_002d_002dhelp"></a>
-<a name="index-usage-summary_002c-printing"></a>
+<dt id='index-_002d_002dhelp'><span><samp>--help</samp><a
href='#index-_002d_002dhelp' class='copiable-anchor'> ¶</a></span></dt>
+<dd><span id="index-usage-summary_002c-printing"></span>
<p>Print a usage message briefly summarizing the command-line options
and the bug-reporting address, then exit.
</p>
</dd>
-<dt><samp>-V</samp></dt>
-<dt><samp>--version</samp></dt>
-<dd><a name="index-_002dV"></a>
-<a name="index-_002d_002dversion"></a>
-<a name="index-version_002c-printing"></a>
+<dt id='index-_002dV'><span><samp>-V</samp><a href='#index-_002dV'
class='copiable-anchor'> ¶</a></span></dt>
+<dt><span><samp>--version</samp></span></dt>
+<dd><span id="index-_002d_002dversion"></span>
+<span id="index-version_002c-printing"></span>
<p>Print the version number of <code>grep</code> to the standard output stream.
This version number should be included in all bug reports.
</p>
@@ -291,20 +250,19 @@
</dl>
<hr>
-<a name="Matching-Control"></a>
+</div>
+<div class="subsection" id="Matching-Control">
<div class="header">
<p>
Next: <a href="#General-Output-Control" accesskey="n" rel="next">General
Output Control</a>, Previous: <a href="#Generic-Program-Information"
accesskey="p" rel="prev">Generic Program Information</a>, Up: <a
href="#Command_002dline-Options" accesskey="u" rel="up">Command-line
Options</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="Matching-Control-1"></a>
-<h4 class="subsection">2.1.2 Matching Control</h4>
+<span id="Matching-Control-1"></span><h4 class="subsection">2.1.2 Matching
Control</h4>
<dl compact="compact">
-<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_003dpatterns"></a>
-<a name="index-patterns-option"></a>
+<dt id='index-_002de'><span><samp>-e <var>patterns</var></samp><a
href='#index-_002de' class='copiable-anchor'> ¶</a></span></dt>
+<dt><span><samp>--regexp=<var>patterns</var></samp></span></dt>
+<dd><span id="index-_002d_002dregexp_003dpatterns"></span>
+<span id="index-patterns-option"></span>
<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
@@ -314,11 +272,10 @@
(<samp>-e</samp> is specified by POSIX.)
</p>
</dd>
-<dt><samp>-f <var>file</var></samp></dt>
-<dt><samp>--file=<var>file</var></samp></dt>
-<dd><a name="index-_002df"></a>
-<a name="index-_002d_002dfile"></a>
-<a name="index-patterns-from-file"></a>
+<dt id='index-_002df'><span><samp>-f <var>file</var></samp><a
href='#index-_002df' class='copiable-anchor'> ¶</a></span></dt>
+<dt><span><samp>--file=<var>file</var></samp></span></dt>
+<dd><span id="index-_002d_002dfile"></span>
+<span id="index-patterns-from-file"></span>
<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.
@@ -326,13 +283,12 @@
(<samp>-f</samp> is specified by POSIX.)
</p>
</dd>
-<dt><samp>-i</samp></dt>
-<dt><samp>-y</samp></dt>
-<dt><samp>--ignore-case</samp></dt>
-<dd><a name="index-_002di"></a>
-<a name="index-_002dy"></a>
-<a name="index-_002d_002dignore_002dcase"></a>
-<a name="index-case-insensitive-search"></a>
+<dt id='index-_002di'><span><samp>-i</samp><a href='#index-_002di'
class='copiable-anchor'> ¶</a></span></dt>
+<dt><span><samp>-y</samp></span></dt>
+<dt><span><samp>--ignore-case</samp></span></dt>
+<dd><span id="index-_002dy"></span>
+<span id="index-_002d_002dignore_002dcase"></span>
+<span id="index-case-insensitive-search"></span>
<p>Ignore case distinctions in patterns and input data,
so that characters that differ only in case
match each other. Although this is straightforward when letters
@@ -351,29 +307,26 @@
(<samp>-i</samp> is specified by POSIX.)
</p>
</dd>
-<dt><samp>--no-ignore-case</samp></dt>
-<dd><a name="index-_002d_002dno_002dignore_002dcase"></a>
-<p>Do not ignore case distinctions in patterns and input data. This is
+<dt
id='index-_002d_002dno_002dignore_002dcase'><span><samp>--no-ignore-case</samp><a
href='#index-_002d_002dno_002dignore_002dcase' class='copiable-anchor'>
¶</a></span></dt>
+<dd><p>Do not ignore case distinctions in patterns and input data. This is
the default. This option is useful for passing to shell scripts that
already use <samp>-i</samp>, in order to cancel its effects because the
two options override each other.
</p>
</dd>
-<dt><samp>-v</samp></dt>
-<dt><samp>--invert-match</samp></dt>
-<dd><a name="index-_002dv"></a>
-<a name="index-_002d_002dinvert_002dmatch"></a>
-<a name="index-invert-matching"></a>
-<a name="index-print-non_002dmatching-lines"></a>
+<dt id='index-_002dv'><span><samp>-v</samp><a href='#index-_002dv'
class='copiable-anchor'> ¶</a></span></dt>
+<dt><span><samp>--invert-match</samp></span></dt>
+<dd><span id="index-_002d_002dinvert_002dmatch"></span>
+<span id="index-invert-matching"></span>
+<span id="index-print-non_002dmatching-lines"></span>
<p>Invert the sense of matching, to select non-matching lines.
(<samp>-v</samp> is specified by POSIX.)
</p>
</dd>
-<dt><samp>-w</samp></dt>
-<dt><samp>--word-regexp</samp></dt>
-<dd><a name="index-_002dw"></a>
-<a name="index-_002d_002dword_002dregexp"></a>
-<a name="index-matching-whole-words"></a>
+<dt id='index-_002dw'><span><samp>-w</samp><a href='#index-_002dw'
class='copiable-anchor'> ¶</a></span></dt>
+<dt><span><samp>--word-regexp</samp></span></dt>
+<dd><span id="index-_002d_002dword_002dregexp"></span>
+<span id="index-matching-whole-words"></span>
<p>Select only those lines containing matches that form whole words.
The test is that the matching substring must either
be at the beginning of the line,
@@ -392,11 +345,10 @@
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>
-<dd><a name="index-_002dx"></a>
-<a name="index-_002d_002dline_002dregexp"></a>
-<a name="index-match-the-whole-line"></a>
+<dt id='index-_002dx'><span><samp>-x</samp><a href='#index-_002dx'
class='copiable-anchor'> ¶</a></span></dt>
+<dt><span><samp>--line-regexp</samp></span></dt>
+<dd><span id="index-_002d_002dline_002dregexp"></span>
+<span id="index-match-the-whole-line"></span>
<p>Select only those matches that exactly match the whole line.
For regular expression patterns, this is like parenthesizing each
pattern and then surrounding it with ‘<samp>^</samp>’ and
‘<samp>$</samp>’.
@@ -406,20 +358,19 @@
</dl>
<hr>
-<a name="General-Output-Control"></a>
+</div>
+<div class="subsection" id="General-Output-Control">
<div class="header">
<p>
Next: <a href="#Output-Line-Prefix-Control" accesskey="n" rel="next">Output
Line Prefix Control</a>, Previous: <a href="#Matching-Control" accesskey="p"
rel="prev">Matching Control</a>, Up: <a href="#Command_002dline-Options"
accesskey="u" rel="up">Command-line Options</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="General-Output-Control-1"></a>
-<h4 class="subsection">2.1.3 General Output Control</h4>
+<span id="General-Output-Control-1"></span><h4 class="subsection">2.1.3
General Output Control</h4>
<dl compact="compact">
-<dt><samp>-c</samp></dt>
-<dt><samp>--count</samp></dt>
-<dd><a name="index-_002dc"></a>
-<a name="index-_002d_002dcount"></a>
-<a name="index-counting-lines"></a>
+<dt id='index-_002dc'><span><samp>-c</samp><a href='#index-_002dc'
class='copiable-anchor'> ¶</a></span></dt>
+<dt><span><samp>--count</samp></span></dt>
+<dd><span id="index-_002d_002dcount"></span>
+<span id="index-counting-lines"></span>
<p>Suppress normal output;
instead print a count of matching lines for each input file.
With the <samp>-v</samp> (<samp>--invert-match</samp>) option,
@@ -427,11 +378,10 @@
(<samp>-c</samp> is specified by POSIX.)
</p>
</dd>
-<dt><samp>--color[=<var>WHEN</var>]</samp></dt>
-<dt><samp>--colour[=<var>WHEN</var>]</samp></dt>
-<dd><a name="index-_002d_002dcolor"></a>
-<a name="index-_002d_002dcolour"></a>
-<a name="index-highlight_002c-color_002c-colour"></a>
+<dt id='index-_002d_002dcolor'><span><samp>--color[=<var>WHEN</var>]</samp><a
href='#index-_002d_002dcolor' class='copiable-anchor'> ¶</a></span></dt>
+<dt><span><samp>--colour[=<var>WHEN</var>]</samp></span></dt>
+<dd><span id="index-_002d_002dcolour"></span>
+<span id="index-highlight_002c-color_002c-colour"></span>
<p>Surround the matched (non-empty) strings, matching lines, context lines,
file names, line numbers, byte offsets, and separators (for fields and
groups of context lines) with escape sequences to display them in color
@@ -447,34 +397,30 @@
<var>WHEN</var> is ‘<samp>never</samp>’,
‘<samp>always</samp>’, or ‘<samp>auto</samp>’.
</p>
</dd>
-<dt><samp>-L</samp></dt>
-<dt><samp>--files-without-match</samp></dt>
-<dd><a name="index-_002dL"></a>
-<a name="index-_002d_002dfiles_002dwithout_002dmatch"></a>
-<a name="index-files-which-don_0027t-match"></a>
+<dt id='index-_002dL'><span><samp>-L</samp><a href='#index-_002dL'
class='copiable-anchor'> ¶</a></span></dt>
+<dt><span><samp>--files-without-match</samp></span></dt>
+<dd><span id="index-_002d_002dfiles_002dwithout_002dmatch"></span>
+<span id="index-files-which-don_0027t-match"></span>
<p>Suppress normal output;
instead print the name of each input file from which
no output would normally have been printed.
-The scanning of each file stops on the first match.
</p>
</dd>
-<dt><samp>-l</samp></dt>
-<dt><samp>--files-with-matches</samp></dt>
-<dd><a name="index-_002dl"></a>
-<a name="index-_002d_002dfiles_002dwith_002dmatches"></a>
-<a name="index-names-of-matching-files"></a>
+<dt id='index-_002dl'><span><samp>-l</samp><a href='#index-_002dl'
class='copiable-anchor'> ¶</a></span></dt>
+<dt><span><samp>--files-with-matches</samp></span></dt>
+<dd><span id="index-_002d_002dfiles_002dwith_002dmatches"></span>
+<span id="index-names-of-matching-files"></span>
<p>Suppress normal output;
instead print the name of each input file from which
output would normally have been printed.
-The scanning of each file stops on the first match.
+Scanning each input file stops upon first match.
(<samp>-l</samp> is specified by POSIX.)
</p>
</dd>
-<dt><samp>-m <var>num</var></samp></dt>
-<dt><samp>--max-count=<var>num</var></samp></dt>
-<dd><a name="index-_002dm"></a>
-<a name="index-_002d_002dmax_002dcount"></a>
-<a name="index-max_002dcount"></a>
+<dt id='index-_002dm'><span><samp>-m <var>num</var></samp><a
href='#index-_002dm' class='copiable-anchor'> ¶</a></span></dt>
+<dt><span><samp>--max-count=<var>num</var></samp></span></dt>
+<dd><span id="index-_002d_002dmax_002dcount"></span>
+<span id="index-max_002dcount"></span>
<p>Stop after the first <var>num</var> selected lines.
If the input is standard input from a regular file,
and <var>num</var> selected lines are output,
@@ -503,7 +449,7 @@
done
</pre></div>
-<a name="index-context-lines"></a>
+<span id="index-context-lines"></span>
<p>When <code>grep</code> stops after <var>num</var> selected lines,
it outputs any trailing context lines.
When the <samp>-c</samp> or <samp>--count</samp> option is also used,
@@ -512,24 +458,22 @@
<code>grep</code> stops after outputting <var>num</var> non-matching lines.
</p>
</dd>
-<dt><samp>-o</samp></dt>
-<dt><samp>--only-matching</samp></dt>
-<dd><a name="index-_002do"></a>
-<a name="index-_002d_002donly_002dmatching"></a>
-<a name="index-only-matching"></a>
+<dt id='index-_002do'><span><samp>-o</samp><a href='#index-_002do'
class='copiable-anchor'> ¶</a></span></dt>
+<dt><span><samp>--only-matching</samp></span></dt>
+<dd><span id="index-_002d_002donly_002dmatching"></span>
+<span id="index-only-matching"></span>
<p>Print only the matched (non-empty) parts of matching lines,
with each such part on a separate output line.
Output lines use the same delimiters as input, and delimiters are null
bytes if <samp>-z</samp> (<samp>--null-data</samp>) is also used (see <a
href="#Other-Options">Other Options</a>).
</p>
</dd>
-<dt><samp>-q</samp></dt>
-<dt><samp>--quiet</samp></dt>
-<dt><samp>--silent</samp></dt>
-<dd><a name="index-_002dq"></a>
-<a name="index-_002d_002dquiet"></a>
-<a name="index-_002d_002dsilent"></a>
-<a name="index-quiet_002c-silent"></a>
+<dt id='index-_002dq'><span><samp>-q</samp><a href='#index-_002dq'
class='copiable-anchor'> ¶</a></span></dt>
+<dt><span><samp>--quiet</samp></span></dt>
+<dt><span><samp>--silent</samp></span></dt>
+<dd><span id="index-_002d_002dquiet"></span>
+<span id="index-_002d_002dsilent"></span>
+<span id="index-quiet_002c-silent"></span>
<p>Quiet; do not write anything to standard output.
Exit immediately with zero status if any match is found,
even if an error was detected.
@@ -537,18 +481,17 @@
(<samp>-q</samp> is specified by POSIX.)
</p>
</dd>
-<dt><samp>-s</samp></dt>
-<dt><samp>--no-messages</samp></dt>
-<dd><a name="index-_002ds"></a>
-<a name="index-_002d_002dno_002dmessages"></a>
-<a name="index-suppress-error-messages"></a>
+<dt id='index-_002ds'><span><samp>-s</samp><a href='#index-_002ds'
class='copiable-anchor'> ¶</a></span></dt>
+<dt><span><samp>--no-messages</samp></span></dt>
+<dd><span id="index-_002d_002dno_002dmessages"></span>
+<span id="index-suppress-error-messages"></span>
<p>Suppress error messages about nonexistent or unreadable files.
Portability note:
unlike GNU <code>grep</code>,
7th Edition Unix <code>grep</code> did not conform to POSIX,
because it lacked <samp>-q</samp>
and its <samp>-s</samp> option behaved like
-GNU <code>grep</code>’s <samp>-q</samp> option.<a name="DOCF1"
href="#FOOT1"><sup>1</sup></a>
+GNU <code>grep</code>’s <samp>-q</samp> option.<a id="DOCF1"
href="#FOOT1"><sup>1</sup></a>
USG-style <code>grep</code> also lacked <samp>-q</samp>
but its <samp>-s</samp> option behaved like GNU <code>grep</code>’s.
Portable shell scripts should avoid both
@@ -560,52 +503,48 @@
</dl>
<hr>
-<a name="Output-Line-Prefix-Control"></a>
+</div>
+<div class="subsection" id="Output-Line-Prefix-Control">
<div class="header">
<p>
Next: <a href="#Context-Line-Control" accesskey="n" rel="next">Context Line
Control</a>, Previous: <a href="#General-Output-Control" accesskey="p"
rel="prev">General Output Control</a>, Up: <a href="#Command_002dline-Options"
accesskey="u" rel="up">Command-line Options</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="Output-Line-Prefix-Control-1"></a>
-<h4 class="subsection">2.1.4 Output Line Prefix Control</h4>
+<span id="Output-Line-Prefix-Control-1"></span><h4 class="subsection">2.1.4
Output Line Prefix Control</h4>
<p>When several prefix fields are to be output,
the order is always file name, line number, and byte offset,
regardless of the order in which these options were specified.
</p>
<dl compact="compact">
-<dt><samp>-b</samp></dt>
-<dt><samp>--byte-offset</samp></dt>
-<dd><a name="index-_002db"></a>
-<a name="index-_002d_002dbyte_002doffset"></a>
-<a name="index-byte-offset"></a>
+<dt id='index-_002db'><span><samp>-b</samp><a href='#index-_002db'
class='copiable-anchor'> ¶</a></span></dt>
+<dt><span><samp>--byte-offset</samp></span></dt>
+<dd><span id="index-_002d_002dbyte_002doffset"></span>
+<span id="index-byte-offset"></span>
<p>Print the 0-based byte offset within the input file
before each line of output.
If <samp>-o</samp> (<samp>--only-matching</samp>) is specified,
print the offset of the matching part itself.
</p>
</dd>
-<dt><samp>-H</samp></dt>
-<dt><samp>--with-filename</samp></dt>
-<dd><a name="index-_002dH"></a>
-<a name="index-_002d_002dwith_002dfilename"></a>
-<a name="index-with-filename-prefix"></a>
+<dt id='index-_002dH'><span><samp>-H</samp><a href='#index-_002dH'
class='copiable-anchor'> ¶</a></span></dt>
+<dt><span><samp>--with-filename</samp></span></dt>
+<dd><span id="index-_002d_002dwith_002dfilename"></span>
+<span id="index-with-filename-prefix"></span>
<p>Print the file name for each match.
This is the default when there is more than one file to search.
</p>
</dd>
-<dt><samp>-h</samp></dt>
-<dt><samp>--no-filename</samp></dt>
-<dd><a name="index-_002dh"></a>
-<a name="index-_002d_002dno_002dfilename"></a>
-<a name="index-no-filename-prefix"></a>
+<dt id='index-_002dh'><span><samp>-h</samp><a href='#index-_002dh'
class='copiable-anchor'> ¶</a></span></dt>
+<dt><span><samp>--no-filename</samp></span></dt>
+<dd><span id="index-_002d_002dno_002dfilename"></span>
+<span id="index-no-filename-prefix"></span>
<p>Suppress the prefixing of file names on output.
This is the default when there is only one file
(or only standard input) to search.
</p>
</dd>
-<dt><samp>--label=<var>LABEL</var></samp></dt>
-<dd><a name="index-_002d_002dlabel"></a>
-<a name="index-changing-name-of-standard-input"></a>
+<dt id='index-_002d_002dlabel'><span><samp>--label=<var>LABEL</var></samp><a
href='#index-_002d_002dlabel' class='copiable-anchor'> ¶</a></span></dt>
+<dd><span id="index-changing-name-of-standard-input"></span>
<p>Display input actually coming from standard input
as input coming from file <var>LABEL</var>.
This can be useful for commands that transform a file’s contents
@@ -616,20 +555,18 @@
</pre></div>
</dd>
-<dt><samp>-n</samp></dt>
-<dt><samp>--line-number</samp></dt>
-<dd><a name="index-_002dn"></a>
-<a name="index-_002d_002dline_002dnumber"></a>
-<a name="index-line-numbering"></a>
+<dt id='index-_002dn'><span><samp>-n</samp><a href='#index-_002dn'
class='copiable-anchor'> ¶</a></span></dt>
+<dt><span><samp>--line-number</samp></span></dt>
+<dd><span id="index-_002d_002dline_002dnumber"></span>
+<span id="index-line-numbering"></span>
<p>Prefix each line of output with the 1-based line number within its input
file.
(<samp>-n</samp> is specified by POSIX.)
</p>
</dd>
-<dt><samp>-T</samp></dt>
-<dt><samp>--initial-tab</samp></dt>
-<dd><a name="index-_002dT"></a>
-<a name="index-_002d_002dinitial_002dtab"></a>
-<a name="index-tab_002daligned-content-lines"></a>
+<dt id='index-_002dT'><span><samp>-T</samp><a href='#index-_002dT'
class='copiable-anchor'> ¶</a></span></dt>
+<dt><span><samp>--initial-tab</samp></span></dt>
+<dd><span id="index-_002d_002dinitial_002dtab"></span>
+<span id="index-tab_002daligned-content-lines"></span>
<p>Make sure that the first character of actual line content lies on a tab
stop,
so that the alignment of tabs looks normal.
This is useful with options that prefix their output to the actual content:
@@ -638,11 +575,10 @@
so that lines from a single file all start at the same column.
</p>
</dd>
-<dt><samp>-Z</samp></dt>
-<dt><samp>--null</samp></dt>
-<dd><a name="index-_002dZ"></a>
-<a name="index-_002d_002dnull"></a>
-<a name="index-zero_002dterminated-file-names"></a>
+<dt id='index-_002dZ'><span><samp>-Z</samp><a href='#index-_002dZ'
class='copiable-anchor'> ¶</a></span></dt>
+<dt><span><samp>--null</samp></span></dt>
+<dd><span id="index-_002d_002dnull"></span>
+<span id="index-zero_002dterminated-file-names"></span>
<p>Output a zero byte (the ASCII NUL character)
instead of the character that normally follows a file name.
For example,
@@ -659,15 +595,15 @@
</dl>
<hr>
-<a name="Context-Line-Control"></a>
+</div>
+<div class="subsection" id="Context-Line-Control">
<div class="header">
<p>
Next: <a href="#File-and-Directory-Selection" accesskey="n" rel="next">File
and Directory Selection</a>, Previous: <a href="#Output-Line-Prefix-Control"
accesskey="p" rel="prev">Output Line Prefix Control</a>, Up: <a
href="#Command_002dline-Options" accesskey="u" rel="up">Command-line
Options</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="Context-Line-Control-1"></a>
-<h4 class="subsection">2.1.5 Context Line Control</h4>
+<span id="Context-Line-Control-1"></span><h4 class="subsection">2.1.5 Context
Line Control</h4>
-<a name="index-context-lines-1"></a>
+<span id="index-context-lines-1"></span>
<p><em>Context lines</em> are non-matching lines that are near a matching line.
They are output only if one of the following options are used.
Regardless of how these options are set,
@@ -676,44 +612,39 @@
these options have no effect and a warning is given upon their use.
</p>
<dl compact="compact">
-<dt><samp>-A <var>num</var></samp></dt>
-<dt><samp>--after-context=<var>num</var></samp></dt>
-<dd><a name="index-_002dA"></a>
-<a name="index-_002d_002dafter_002dcontext"></a>
-<a name="index-after-context"></a>
-<a name="index-context-lines_002c-after-match"></a>
+<dt id='index-_002dA'><span><samp>-A <var>num</var></samp><a
href='#index-_002dA' class='copiable-anchor'> ¶</a></span></dt>
+<dt><span><samp>--after-context=<var>num</var></samp></span></dt>
+<dd><span id="index-_002d_002dafter_002dcontext"></span>
+<span id="index-after-context"></span>
+<span id="index-context-lines_002c-after-match"></span>
<p>Print <var>num</var> lines of trailing context after matching lines.
</p>
</dd>
-<dt><samp>-B <var>num</var></samp></dt>
-<dt><samp>--before-context=<var>num</var></samp></dt>
-<dd><a name="index-_002dB"></a>
-<a name="index-_002d_002dbefore_002dcontext"></a>
-<a name="index-before-context"></a>
-<a name="index-context-lines_002c-before-match"></a>
+<dt id='index-_002dB'><span><samp>-B <var>num</var></samp><a
href='#index-_002dB' class='copiable-anchor'> ¶</a></span></dt>
+<dt><span><samp>--before-context=<var>num</var></samp></span></dt>
+<dd><span id="index-_002d_002dbefore_002dcontext"></span>
+<span id="index-before-context"></span>
+<span id="index-context-lines_002c-before-match"></span>
<p>Print <var>num</var> lines of leading context before matching lines.
</p>
</dd>
-<dt><samp>-C <var>num</var></samp></dt>
-<dt><samp>-<var>num</var></samp></dt>
-<dt><samp>--context=<var>num</var></samp></dt>
-<dd><a name="index-_002dC"></a>
-<a name="index-_002d_002dcontext"></a>
-<a name="index-_002dnum"></a>
-<a name="index-context-lines-2"></a>
+<dt id='index-_002dC'><span><samp>-C <var>num</var></samp><a
href='#index-_002dC' class='copiable-anchor'> ¶</a></span></dt>
+<dt><span><samp>-<var>num</var></samp></span></dt>
+<dt><span><samp>--context=<var>num</var></samp></span></dt>
+<dd><span id="index-_002d_002dcontext"></span>
+<span id="index-_002dnum"></span>
+<span id="index-context-lines-2"></span>
<p>Print <var>num</var> lines of leading and trailing output context.
</p>
</dd>
-<dt><samp>--group-separator=<var>string</var></samp></dt>
-<dd><a name="index-_002d_002dgroup_002dseparator"></a>
-<a name="index-group-separator"></a>
+<dt
id='index-_002d_002dgroup_002dseparator'><span><samp>--group-separator=<var>string</var></samp><a
href='#index-_002d_002dgroup_002dseparator' class='copiable-anchor'>
¶</a></span></dt>
+<dd><span id="index-group-separator"></span>
<p>When <samp>-A</samp>, <samp>-B</samp> or <samp>-C</samp> are in use,
print <var>string</var> instead of <samp>--</samp> between groups of lines.
</p>
</dd>
-<dt><samp>--no-group-separator</samp></dt>
-<dd><a name="index-_002d_002dgroup_002dseparator-1"></a>
-<a name="index-group-separator-1"></a>
+<dt
id='index-_002d_002dgroup_002dseparator-1'><span><samp>--no-group-separator</samp><a
href='#index-_002d_002dgroup_002dseparator-1' class='copiable-anchor'>
¶</a></span></dt>
+<dd><span id="index-group-separator-1"></span>
<p>When <samp>-A</samp>, <samp>-B</samp> or <samp>-C</samp> are in use,
do not print a separator between groups of lines.
</p>
@@ -748,28 +679,26 @@
</li></ul>
<hr>
-<a name="File-and-Directory-Selection"></a>
+</div>
+<div class="subsection" id="File-and-Directory-Selection">
<div class="header">
<p>
Next: <a href="#Other-Options" accesskey="n" rel="next">Other Options</a>,
Previous: <a href="#Context-Line-Control" accesskey="p" rel="prev">Context Line
Control</a>, Up: <a href="#Command_002dline-Options" accesskey="u"
rel="up">Command-line Options</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="File-and-Directory-Selection-1"></a>
-<h4 class="subsection">2.1.6 File and Directory Selection</h4>
+<span id="File-and-Directory-Selection-1"></span><h4 class="subsection">2.1.6
File and Directory Selection</h4>
<dl compact="compact">
-<dt><samp>-a</samp></dt>
-<dt><samp>--text</samp></dt>
-<dd><a name="index-_002da"></a>
-<a name="index-_002d_002dtext"></a>
-<a name="index-suppress-binary-data"></a>
-<a name="index-binary-files"></a>
+<dt id='index-_002da'><span><samp>-a</samp><a href='#index-_002da'
class='copiable-anchor'> ¶</a></span></dt>
+<dt><span><samp>--text</samp></span></dt>
+<dd><span id="index-_002d_002dtext"></span>
+<span id="index-suppress-binary-data"></span>
+<span id="index-binary-files"></span>
<p>Process a binary file as if it were text;
this is equivalent to the ‘<samp>--binary-files=text</samp>’
option.
</p>
</dd>
-<dt><samp>--binary-files=<var>type</var></samp></dt>
-<dd><a name="index-_002d_002dbinary_002dfiles"></a>
-<a name="index-binary-files-1"></a>
+<dt
id='index-_002d_002dbinary_002dfiles'><span><samp>--binary-files=<var>type</var></samp><a
href='#index-_002d_002dbinary_002dfiles' class='copiable-anchor'>
¶</a></span></dt>
+<dd><span id="index-binary-files-1"></span>
<p>If a file’s data or metadata
indicate that the file contains binary data,
assume that the file is of type <var>type</var>.
@@ -811,11 +740,10 @@
even if the matches are unsafe for direct display.
</p>
</dd>
-<dt><samp>-D <var>action</var></samp></dt>
-<dt><samp>--devices=<var>action</var></samp></dt>
-<dd><a name="index-_002dD"></a>
-<a name="index-_002d_002ddevices"></a>
-<a name="index-device-search"></a>
+<dt id='index-_002dD'><span><samp>-D <var>action</var></samp><a
href='#index-_002dD' class='copiable-anchor'> ¶</a></span></dt>
+<dt><span><samp>--devices=<var>action</var></samp></span></dt>
+<dd><span id="index-_002d_002ddevices"></span>
+<span id="index-device-search"></span>
<p>If an input file is a device, FIFO, or socket, use <var>action</var> to
process it.
If <var>action</var> is ‘<samp>read</samp>’,
all devices are read just as if they were ordinary files.
@@ -828,12 +756,11 @@
This option has no effect on a file that is read via standard input.
</p>
</dd>
-<dt><samp>-d <var>action</var></samp></dt>
-<dt><samp>--directories=<var>action</var></samp></dt>
-<dd><a name="index-_002dd"></a>
-<a name="index-_002d_002ddirectories"></a>
-<a name="index-directory-search"></a>
-<a name="index-symbolic-links"></a>
+<dt id='index-_002dd'><span><samp>-d <var>action</var></samp><a
href='#index-_002dd' class='copiable-anchor'> ¶</a></span></dt>
+<dt><span><samp>--directories=<var>action</var></samp></span></dt>
+<dd><span id="index-_002d_002ddirectories"></span>
+<span id="index-directory-search"></span>
+<span id="index-symbolic-links"></span>
<p>If an input file is a directory, use <var>action</var> to process it.
By default, <var>action</var> is ‘<samp>read</samp>’,
which means that directories are read just as if they were ordinary files
@@ -847,10 +774,9 @@
this is equivalent to the <samp>-r</samp> option.
</p>
</dd>
-<dt><samp>--exclude=<var>glob</var></samp></dt>
-<dd><a name="index-_002d_002dexclude"></a>
-<a name="index-exclude-files"></a>
-<a name="index-searching-directory-trees"></a>
+<dt
id='index-_002d_002dexclude'><span><samp>--exclude=<var>glob</var></samp><a
href='#index-_002d_002dexclude' class='copiable-anchor'> ¶</a></span></dt>
+<dd><span id="index-exclude-files"></span>
+<span id="index-searching-directory-trees"></span>
<p>Skip any command-line file with a name suffix that matches the pattern
<var>glob</var>, using wildcard matching; a name suffix is either the whole
name, or a trailing part that starts with a non-slash character
@@ -862,44 +788,44 @@
and <code>\</code> to quote a wildcard or backslash character literally.
</p>
</dd>
-<dt><samp>--exclude-from=<var>file</var></samp></dt>
-<dd><a name="index-_002d_002dexclude_002dfrom"></a>
-<a name="index-exclude-files-1"></a>
-<a name="index-searching-directory-trees-1"></a>
+<dt
id='index-_002d_002dexclude_002dfrom'><span><samp>--exclude-from=<var>file</var></samp><a
href='#index-_002d_002dexclude_002dfrom' class='copiable-anchor'>
¶</a></span></dt>
+<dd><span id="index-exclude-files-1"></span>
+<span id="index-searching-directory-trees-1"></span>
<p>Skip files whose name matches any of the patterns
read from <var>file</var> (using wildcard matching as described
under <samp>--exclude</samp>).
</p>
</dd>
-<dt><samp>--exclude-dir=<var>glob</var></samp></dt>
-<dd><a name="index-_002d_002dexclude_002ddir"></a>
-<a name="index-exclude-directories"></a>
+<dt
id='index-_002d_002dexclude_002ddir'><span><samp>--exclude-dir=<var>glob</var></samp><a
href='#index-_002d_002dexclude_002ddir' class='copiable-anchor'>
¶</a></span></dt>
+<dd><span id="index-exclude-directories"></span>
<p>Skip any command-line directory with a name suffix that matches the
pattern <var>glob</var>. When searching recursively, skip any subdirectory
whose base name matches <var>glob</var>. Ignore any redundant trailing
slashes in <var>glob</var>.
</p>
</dd>
-<dt><samp>-I</samp></dt>
+<dt><span><samp>-I</samp></span></dt>
<dd><p>Process a binary file as if it did not contain matching data;
this is equivalent to the
‘<samp>--binary-files=without-match</samp>’ option.
</p>
</dd>
-<dt><samp>--include=<var>glob</var></samp></dt>
-<dd><a name="index-_002d_002dinclude"></a>
-<a name="index-include-files"></a>
-<a name="index-searching-directory-trees-2"></a>
+<dt
id='index-_002d_002dinclude'><span><samp>--include=<var>glob</var></samp><a
href='#index-_002d_002dinclude' class='copiable-anchor'> ¶</a></span></dt>
+<dd><span id="index-include-files"></span>
+<span id="index-searching-directory-trees-2"></span>
<p>Search only files whose name matches <var>glob</var>,
using wildcard matching as described under <samp>--exclude</samp>.
+If contradictory <samp>--include</samp> and <samp>--exclude</samp> options are
+given, the last matching one wins. If no <samp>--include</samp> or
+<samp>--exclude</samp> options match, a file is included unless the first
+such option is <samp>--include</samp>.
</p>
</dd>
-<dt><samp>-r</samp></dt>
-<dt><samp>--recursive</samp></dt>
-<dd><a name="index-_002dr"></a>
-<a name="index-_002d_002drecursive"></a>
-<a name="index-recursive-search"></a>
-<a name="index-searching-directory-trees-3"></a>
-<a name="index-symbolic-links-1"></a>
+<dt id='index-_002dr'><span><samp>-r</samp><a href='#index-_002dr'
class='copiable-anchor'> ¶</a></span></dt>
+<dt><span><samp>--recursive</samp></span></dt>
+<dd><span id="index-_002d_002drecursive"></span>
+<span id="index-recursive-search"></span>
+<span id="index-searching-directory-trees-3"></span>
+<span id="index-symbolic-links-1"></span>
<p>For each directory operand,
read and process all files in that directory, recursively.
Follow symbolic links on the command line, but skip symlinks
@@ -908,13 +834,12 @@
This is the same as the ‘<samp>--directories=recurse</samp>’
option.
</p>
</dd>
-<dt><samp>-R</samp></dt>
-<dt><samp>--dereference-recursive</samp></dt>
-<dd><a name="index-_002dR"></a>
-<a name="index-_002d_002ddereference_002drecursive"></a>
-<a name="index-recursive-search-1"></a>
-<a name="index-searching-directory-trees-4"></a>
-<a name="index-symbolic-links-2"></a>
+<dt id='index-_002dR'><span><samp>-R</samp><a href='#index-_002dR'
class='copiable-anchor'> ¶</a></span></dt>
+<dt><span><samp>--dereference-recursive</samp></span></dt>
+<dd><span id="index-_002d_002ddereference_002drecursive"></span>
+<span id="index-recursive-search-1"></span>
+<span id="index-searching-directory-trees-4"></span>
+<span id="index-symbolic-links-2"></span>
<p>For each directory operand, read and process all files in that
directory, recursively, following all symbolic links.
</p>
@@ -922,27 +847,25 @@
</dl>
<hr>
-<a name="Other-Options"></a>
+</div>
+<div class="subsection" id="Other-Options">
<div class="header">
<p>
Previous: <a href="#File-and-Directory-Selection" accesskey="p"
rel="prev">File and Directory Selection</a>, Up: <a
href="#Command_002dline-Options" accesskey="u" rel="up">Command-line
Options</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="Other-Options-1"></a>
-<h4 class="subsection">2.1.7 Other Options</h4>
+<span id="Other-Options-1"></span><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>
+<dt id='index-_002d_002d'><span><samp>--</samp><a href='#index-_002d_002d'
class='copiable-anchor'> ¶</a></span></dt>
+<dd><span id="index-option-delimiter"></span>
<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>
+<dt
id='index-_002d_002dline_002dbuffered'><span><samp>--line-buffered</samp><a
href='#index-_002d_002dline_002dbuffered' class='copiable-anchor'>
¶</a></span></dt>
+<dd><span id="index-line-buffering"></span>
<p>Use line buffering for standard output, regardless of output device.
By default, standard output is line buffered for interactive devices,
and is fully buffered otherwise. With full buffering, the output
@@ -950,12 +873,11 @@
flushed after every output line. The buffer size is system dependent.
</p>
</dd>
-<dt><samp>-U</samp></dt>
-<dt><samp>--binary</samp></dt>
-<dd><a name="index-_002dU"></a>
-<a name="index-_002d_002dbinary"></a>
-<a name="index-MS_002dWindows-binary-I_002fO"></a>
-<a name="index-binary-I_002fO"></a>
+<dt id='index-_002dU'><span><samp>-U</samp><a href='#index-_002dU'
class='copiable-anchor'> ¶</a></span></dt>
+<dt><span><samp>--binary</samp></span></dt>
+<dd><span id="index-_002d_002dbinary"></span>
+<span id="index-MS_002dWindows-binary-I_002fO"></span>
+<span id="index-binary-I_002fO"></span>
<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
@@ -977,11 +899,10 @@
which do not distinguish text from binary I/O.
</p>
</dd>
-<dt><samp>-z</samp></dt>
-<dt><samp>--null-data</samp></dt>
-<dd><a name="index-_002dz"></a>
-<a name="index-_002d_002dnull_002ddata"></a>
-<a name="index-zero_002dterminated-lines"></a>
+<dt id='index-_002dz'><span><samp>-z</samp><a href='#index-_002dz'
class='copiable-anchor'> ¶</a></span></dt>
+<dt><span><samp>--null-data</samp></span></dt>
+<dd><span id="index-_002d_002dnull_002ddata"></span>
+<span id="index-zero_002dterminated-lines"></span>
<p>Treat input and output data as sequences of lines, each terminated by
a zero byte (the ASCII NUL character) instead of a newline.
Like the <samp>-Z</samp> or <samp>--null</samp> option,
@@ -992,21 +913,22 @@
</dl>
<hr>
-<a name="Environment-Variables"></a>
+</div>
+</div>
+<div class="section" id="Environment-Variables">
<div class="header">
<p>
-Next: <a href="#Exit-Status" accesskey="n" rel="next">Exit Status</a>,
Previous: <a href="#Command_002dline-Options" accesskey="p"
rel="prev">Command-line Options</a>, Up: <a href="#Invoking" accesskey="u"
rel="up">Invoking</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="#Exit-Status" accesskey="n" rel="next">Exit Status</a>,
Previous: <a href="#Command_002dline-Options" accesskey="p"
rel="prev">Command-line Options</a>, Up: <a href="#Invoking" accesskey="u"
rel="up">Invoking <code>grep</code></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="Environment-Variables-1"></a>
-<h3 class="section">2.2 Environment Variables</h3>
+<span id="Environment-Variables-1"></span><h3 class="section">2.2 Environment
Variables</h3>
<p>The behavior of <code>grep</code> is affected
by the following environment variables.
</p>
-<a name="index-LANGUAGE-environment-variable"></a>
-<a name="index-LC_005fALL-environment-variable"></a>
-<a name="index-LC_005fMESSAGES-environment-variable"></a>
-<a name="index-LANG-environment-variable"></a>
+<span id="index-LANGUAGE-environment-variable"></span>
+<span id="index-LC_005fALL-environment-variable"></span>
+<span id="index-LC_005fMESSAGES-environment-variable"></span>
+<span id="index-LANG-environment-variable"></span>
<p>The locale for category <code><span
class="nolinebreak">LC_</span><var>foo</var></code><!-- /@w -->
is specified by examining the three environment variables
<code>LC_ALL</code>, <code><span
class="nolinebreak">LC_</span><var>foo</var></code><!-- /@w -->, and
<code>LANG</code>,
@@ -1060,31 +982,11 @@
These capabilities are stored in an online database and accessed by
the <code>terminfo</code> library.
</p>
-<a name="index-environment-variables"></a>
+<span id="index-environment-variables"></span>
<dl compact="compact">
-<dt><code>GREP_OPTIONS</code></dt>
-<dd><a name="index-GREP_005fOPTIONS-environment-variable"></a>
-<a name="index-default-options-environment-variable"></a>
-<p>This variable specifies default options to be placed in front of any
-explicit options.
-As this causes problems when writing portable scripts, this feature
-will be removed in a future release of <code>grep</code>, and <code>grep</code>
-warns if it is used. Please use an alias or script instead.
-For example, if <code>grep</code> is in the directory
‘<samp>/usr/bin</samp>’ you
-can prepend <samp>$HOME/bin</samp> to your <code>PATH</code> and create an
-executable script <samp>$HOME/bin/grep</samp> containing the following:
-</p>
-<div class="example">
-<pre class="example">#! /bin/sh
-export PATH=/usr/bin
-exec grep --color=auto --devices=skip "$@"
-</pre></div>
-
-</dd>
-<dt><code>GREP_COLOR</code></dt>
-<dd><a name="index-GREP_005fCOLOR-environment-variable"></a>
-<a name="index-highlight-markers"></a>
+<dt
id='index-GREP_005fCOLOR-environment-variable'><span><code>GREP_COLOR</code><a
href='#index-GREP_005fCOLOR-environment-variable' class='copiable-anchor'>
¶</a></span></dt>
+<dd><span id="index-highlight-markers"></span>
<p>This variable specifies the color used to highlight matched (non-empty)
text.
It is deprecated in favor of <code>GREP_COLORS</code>, but still supported.
The ‘<samp>mt</samp>’, ‘<samp>ms</samp>’, and
‘<samp>mc</samp>’ capabilities of <code>GREP_COLORS</code>
@@ -1097,9 +999,8 @@
which means a bold red foreground text on the terminal’s default
background.
</p>
</dd>
-<dt><code>GREP_COLORS</code></dt>
-<dd><a name="index-GREP_005fCOLORS-environment-variable"></a>
-<a name="index-highlight-markers-1"></a>
+<dt
id='index-GREP_005fCOLORS-environment-variable'><span><code>GREP_COLORS</code><a
href='#index-GREP_005fCOLORS-environment-variable' class='copiable-anchor'>
¶</a></span></dt>
+<dd><span id="index-highlight-markers-1"></span>
<p>This variable specifies the colors and other attributes
used to highlight various parts of the output.
Its value is a colon-separated list of <code>terminfo</code> capabilities
@@ -1108,9 +1009,8 @@
Supported capabilities are as follows.
</p>
<dl compact="compact">
-<dt><code>sl=</code></dt>
-<dd><a name="index-sl-GREP_005fCOLORS-capability"></a>
-<p>SGR substring for whole selected lines
+<dt id='index-sl-GREP_005fCOLORS-capability'><span><code>sl=</code><a
href='#index-sl-GREP_005fCOLORS-capability' class='copiable-anchor'>
¶</a></span></dt>
+<dd><p>SGR substring for whole selected lines
(i.e.,
matching lines when the <samp>-v</samp> command-line option is omitted,
or non-matching lines when <samp>-v</samp> is specified).
@@ -1120,9 +1020,8 @@
The default is empty (i.e., the terminal’s default color pair).
</p>
</dd>
-<dt><code>cx=</code></dt>
-<dd><a name="index-cx-GREP_005fCOLORS-capability"></a>
-<p>SGR substring for whole context lines
+<dt id='index-cx-GREP_005fCOLORS-capability'><span><code>cx=</code><a
href='#index-cx-GREP_005fCOLORS-capability' class='copiable-anchor'>
¶</a></span></dt>
+<dd><p>SGR substring for whole context lines
(i.e.,
non-matching lines when the <samp>-v</samp> command-line option is omitted,
or matching lines when <samp>-v</samp> is specified).
@@ -1132,17 +1031,15 @@
The default is empty (i.e., the terminal’s default color pair).
</p>
</dd>
-<dt><code>rv</code></dt>
-<dd><a name="index-rv-GREP_005fCOLORS-capability"></a>
-<p>Boolean value that reverses (swaps) the meanings of
+<dt id='index-rv-GREP_005fCOLORS-capability'><span><code>rv</code><a
href='#index-rv-GREP_005fCOLORS-capability' class='copiable-anchor'>
¶</a></span></dt>
+<dd><p>Boolean value that reverses (swaps) the meanings of
the ‘<samp>sl=</samp>’ and ‘<samp>cx=</samp>’
capabilities
when the <samp>-v</samp> command-line option is specified.
The default is false (i.e., the capability is omitted).
</p>
</dd>
-<dt><code>mt=01;31</code></dt>
-<dd><a name="index-mt-GREP_005fCOLORS-capability"></a>
-<p>SGR substring for matching non-empty text in any matching line
+<dt id='index-mt-GREP_005fCOLORS-capability'><span><code>mt=01;31</code><a
href='#index-mt-GREP_005fCOLORS-capability' class='copiable-anchor'>
¶</a></span></dt>
+<dd><p>SGR substring for matching non-empty text in any matching line
(i.e.,
a selected line when the <samp>-v</samp> command-line option is omitted,
or a context line when <samp>-v</samp> is specified).
@@ -1151,45 +1048,39 @@
The default is a bold red text foreground over the current line background.
</p>
</dd>
-<dt><code>ms=01;31</code></dt>
-<dd><a name="index-ms-GREP_005fCOLORS-capability"></a>
-<p>SGR substring for matching non-empty text in a selected line.
+<dt id='index-ms-GREP_005fCOLORS-capability'><span><code>ms=01;31</code><a
href='#index-ms-GREP_005fCOLORS-capability' class='copiable-anchor'>
¶</a></span></dt>
+<dd><p>SGR substring for matching non-empty text in a selected line.
(This is used only when the <samp>-v</samp> command-line option is omitted.)
The effect of the ‘<samp>sl=</samp>’ (or
‘<samp>cx=</samp>’ if ‘<samp>rv</samp>’) capability
remains active when this takes effect.
The default is a bold red text foreground over the current line background.
</p>
</dd>
-<dt><code>mc=01;31</code></dt>
-<dd><a name="index-mc-GREP_005fCOLORS-capability"></a>
-<p>SGR substring for matching non-empty text in a context line.
+<dt id='index-mc-GREP_005fCOLORS-capability'><span><code>mc=01;31</code><a
href='#index-mc-GREP_005fCOLORS-capability' class='copiable-anchor'>
¶</a></span></dt>
+<dd><p>SGR substring for matching non-empty text in a context line.
(This is used only when the <samp>-v</samp> command-line option is specified.)
The effect of the ‘<samp>cx=</samp>’ (or
‘<samp>sl=</samp>’ if ‘<samp>rv</samp>’) capability
remains active when this takes effect.
The default is a bold red text foreground over the current line background.
</p>
</dd>
-<dt><code>fn=35</code></dt>
-<dd><a name="index-fn-GREP_005fCOLORS-capability"></a>
-<p>SGR substring for file names prefixing any content line.
+<dt id='index-fn-GREP_005fCOLORS-capability'><span><code>fn=35</code><a
href='#index-fn-GREP_005fCOLORS-capability' class='copiable-anchor'>
¶</a></span></dt>
+<dd><p>SGR substring for file names prefixing any content line.
The default is a magenta text foreground over the terminal’s default
background.
</p>
</dd>
-<dt><code>ln=32</code></dt>
-<dd><a name="index-ln-GREP_005fCOLORS-capability"></a>
-<p>SGR substring for line numbers prefixing any content line.
+<dt id='index-ln-GREP_005fCOLORS-capability'><span><code>ln=32</code><a
href='#index-ln-GREP_005fCOLORS-capability' class='copiable-anchor'>
¶</a></span></dt>
+<dd><p>SGR substring for line numbers prefixing any content line.
The default is a green text foreground over the terminal’s default
background.
</p>
</dd>
-<dt><code>bn=32</code></dt>
-<dd><a name="index-bn-GREP_005fCOLORS-capability"></a>
-<p>SGR substring for byte offsets prefixing any content line.
+<dt id='index-bn-GREP_005fCOLORS-capability'><span><code>bn=32</code><a
href='#index-bn-GREP_005fCOLORS-capability' class='copiable-anchor'>
¶</a></span></dt>
+<dd><p>SGR substring for byte offsets prefixing any content line.
The default is a green text foreground over the terminal’s default
background.
</p>
</dd>
-<dt><code>se=36</code></dt>
-<dd><a name="index-fn-GREP_005fCOLORS-capability-1"></a>
-<p>SGR substring for separators that are inserted
+<dt id='index-fn-GREP_005fCOLORS-capability-1'><span><code>se=36</code><a
href='#index-fn-GREP_005fCOLORS-capability-1' class='copiable-anchor'>
¶</a></span></dt>
+<dd><p>SGR substring for separators that are inserted
between selected line fields (‘<samp>:</samp>’),
between context line fields (‘<samp>-</samp>’),
and between groups of adjacent lines
@@ -1197,9 +1088,8 @@
The default is a cyan text foreground over the terminal’s default
background.
</p>
</dd>
-<dt><code>ne</code></dt>
-<dd><a name="index-ne-GREP_005fCOLORS-capability"></a>
-<p>Boolean value that prevents clearing to the end of line
+<dt id='index-ne-GREP_005fCOLORS-capability'><span><code>ne</code><a
href='#index-ne-GREP_005fCOLORS-capability' class='copiable-anchor'>
¶</a></span></dt>
+<dd><p>Boolean value that prevents clearing to the end of line
using Erase in Line (EL) to Right (‘<samp>\33[K</samp>’)
each time a colorized item ends.
This is needed on terminals on which EL is not supported.
@@ -1217,28 +1107,26 @@
</p>
</dd>
-<dt><code>LC_ALL</code></dt>
-<dt><code>LC_COLLATE</code></dt>
-<dt><code>LANG</code></dt>
-<dd><a name="index-LC_005fALL-environment-variable-1"></a>
-<a name="index-LC_005fCOLLATE-environment-variable"></a>
-<a name="index-LANG-environment-variable-1"></a>
-<a name="index-character-type"></a>
-<a name="index-national-language-support"></a>
-<a name="index-NLS"></a>
+<dt id='index-LC_005fALL-environment-variable-1'><span><code>LC_ALL</code><a
href='#index-LC_005fALL-environment-variable-1' class='copiable-anchor'>
¶</a></span></dt>
+<dt><span><code>LC_COLLATE</code></span></dt>
+<dt><span><code>LANG</code></span></dt>
+<dd><span id="index-LC_005fCOLLATE-environment-variable"></span>
+<span id="index-LANG-environment-variable-1"></span>
+<span id="index-character-type"></span>
+<span id="index-national-language-support"></span>
+<span id="index-NLS"></span>
<p>These variables specify the locale for the <code>LC_COLLATE</code> category,
which might affect how range expressions like ‘<samp>[a-z]</samp>’
are
interpreted.
</p>
</dd>
-<dt><code>LC_ALL</code></dt>
-<dt><code>LC_CTYPE</code></dt>
-<dt><code>LANG</code></dt>
-<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>
+<dt id='index-LC_005fALL-environment-variable-2'><span><code>LC_ALL</code><a
href='#index-LC_005fALL-environment-variable-2' class='copiable-anchor'>
¶</a></span></dt>
+<dt><span><code>LC_CTYPE</code></span></dt>
+<dt><span><code>LANG</code></span></dt>
+<dd><span id="index-LC_005fCTYPE-environment-variable"></span>
+<span id="index-LANG-environment-variable-2"></span>
+<span id="index-encoding-error"></span>
+<span id="index-null-character"></span>
<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.
@@ -1246,26 +1134,24 @@
See <a href="#Character-Encoding">Character Encoding</a>.
</p>
</dd>
-<dt><code>LANGUAGE</code></dt>
-<dt><code>LC_ALL</code></dt>
-<dt><code>LC_MESSAGES</code></dt>
-<dt><code>LANG</code></dt>
-<dd><a name="index-LANGUAGE-environment-variable-1"></a>
-<a name="index-LC_005fALL-environment-variable-3"></a>
-<a name="index-LC_005fMESSAGES-environment-variable-1"></a>
-<a name="index-LANG-environment-variable-3"></a>
-<a name="index-language-of-messages"></a>
-<a name="index-message-language"></a>
-<a name="index-national-language-support-1"></a>
-<a name="index-translation-of-message-language"></a>
+<dt id='index-LANGUAGE-environment-variable-1'><span><code>LANGUAGE</code><a
href='#index-LANGUAGE-environment-variable-1' class='copiable-anchor'>
¶</a></span></dt>
+<dt><span><code>LC_ALL</code></span></dt>
+<dt><span><code>LC_MESSAGES</code></span></dt>
+<dt><span><code>LANG</code></span></dt>
+<dd><span id="index-LC_005fALL-environment-variable-3"></span>
+<span id="index-LC_005fMESSAGES-environment-variable-1"></span>
+<span id="index-LANG-environment-variable-3"></span>
+<span id="index-language-of-messages"></span>
+<span id="index-message-language"></span>
+<span id="index-national-language-support-1"></span>
+<span id="index-translation-of-message-language"></span>
<p>These variables specify the locale for the <code>LC_MESSAGES</code>
category,
which determines the language that <code>grep</code> uses for messages.
The default ‘<samp>C</samp>’ locale uses American English messages.
</p>
</dd>
-<dt><code>POSIXLY_CORRECT</code></dt>
-<dd><a name="index-POSIXLY_005fCORRECT-environment-variable"></a>
-<p>If set, <code>grep</code> behaves as POSIX requires; otherwise,
+<dt
id='index-POSIXLY_005fCORRECT-environment-variable'><span><code>POSIXLY_CORRECT</code><a
href='#index-POSIXLY_005fCORRECT-environment-variable'
class='copiable-anchor'> ¶</a></span></dt>
+<dd><p>If set, <code>grep</code> behaves as POSIX requires; otherwise,
<code>grep</code> behaves more like other GNU programs.
POSIX
requires that options that
@@ -1277,9 +1163,8 @@
invalid bracket expression. See <a
href="#invalid_002dbracket_002dexpr">invalid-bracket-expr</a>.
</p>
</dd>
-<dt><code>_<var>N</var>_GNU_nonoption_argv_flags_</code></dt>
-<dd><a
name="index-_005fN_005fGNU_005fnonoption_005fargv_005fflags_005f-environment-variable"></a>
-<p>(Here <code><var>N</var></code> is <code>grep</code>’s numeric
process ID.)
+<dt
id='index-_005fN_005fGNU_005fnonoption_005fargv_005fflags_005f-environment-variable'><span><code>_<var>N</var>_GNU_nonoption_argv_flags_</code><a
href='#index-_005fN_005fGNU_005fnonoption_005fargv_005fflags_005f-environment-variable'
class='copiable-anchor'> ¶</a></span></dt>
+<dd><p>(Here <code><var>N</var></code> is <code>grep</code>’s numeric
process ID.)
If the <var>i</var>th character of this environment variable’s value is
‘<samp>1</samp>’,
do not consider the <var>i</var>th operand of <code>grep</code> to be an
option,
even if it appears to be one.
@@ -1292,17 +1177,31 @@
</dd>
</dl>
+<p>The <code>GREP_OPTIONS</code> environment variable of <code>grep</code>
2.20 and
+earlier is no longer supported, as it caused problems when writing
+portable scripts. To make arbitrary changes to how <code>grep</code>
+works, you can use an alias or script instead. For example, if
+<code>grep</code> is in the directory ‘<samp>/usr/bin</samp>’ you
can prepend
+<samp>$HOME/bin</samp> to your <code>PATH</code> and create an executable
script
+<samp>$HOME/bin/grep</samp> containing the following:
+</p>
+<div class="example">
+<pre class="example">#! /bin/sh
+export PATH=/usr/bin
+exec grep --color=auto --devices=skip "$@"
+</pre></div>
+
<hr>
-<a name="Exit-Status"></a>
+</div>
+<div class="section" id="Exit-Status">
<div class="header">
<p>
-Next: <a href="#grep-Programs" accesskey="n" rel="next">grep Programs</a>,
Previous: <a href="#Environment-Variables" accesskey="p" rel="prev">Environment
Variables</a>, Up: <a href="#Invoking" accesskey="u" rel="up">Invoking</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="#grep-Programs" accesskey="n" rel="next"><code>grep</code>
Programs</a>, Previous: <a href="#Environment-Variables" accesskey="p"
rel="prev">Environment Variables</a>, Up: <a href="#Invoking" accesskey="u"
rel="up">Invoking <code>grep</code></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="Exit-Status-1"></a>
-<h3 class="section">2.3 Exit Status</h3>
-<a name="index-exit-status"></a>
-<a name="index-return-status"></a>
+<span id="Exit-Status-1"></span><h3 class="section">2.3 Exit Status</h3>
+<span id="index-exit-status"></span>
+<span id="index-return-status"></span>
<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
@@ -1312,15 +1211,15 @@
greater than 2 on error.
</p>
<hr>
-<a name="grep-Programs"></a>
+</div>
+<div class="section" id="grep-Programs">
<div class="header">
<p>
-Previous: <a href="#Exit-Status" accesskey="p" rel="prev">Exit Status</a>, Up:
<a href="#Invoking" accesskey="u" rel="up">Invoking</a> [<a
href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a
href="#Index" title="Index" rel="index">Index</a>]</p>
+Previous: <a href="#Exit-Status" accesskey="p" rel="prev">Exit Status</a>, Up:
<a href="#Invoking" accesskey="u" rel="up">Invoking <code>grep</code></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="grep-Programs-1"></a>
-<h3 class="section">2.4 <code>grep</code> Programs</h3>
-<a name="index-grep-programs"></a>
-<a name="index-variants-of-grep"></a>
+<span id="grep-Programs-1"></span><h3 class="section">2.4 <code>grep</code>
Programs</h3>
+<span id="index-grep-programs"></span>
+<span id="index-variants-of-grep"></span>
<p><code>grep</code> searches the named input files
for lines containing a match to the given patterns.
@@ -1333,38 +1232,34 @@
controlled by the following options.
</p>
<dl compact="compact">
-<dt><samp>-G</samp></dt>
-<dt><samp>--basic-regexp</samp></dt>
-<dd><a name="index-_002dG"></a>
-<a name="index-_002d_002dbasic_002dregexp"></a>
-<a name="index-matching-basic-regular-expressions"></a>
+<dt id='index-_002dG'><span><samp>-G</samp><a href='#index-_002dG'
class='copiable-anchor'> ¶</a></span></dt>
+<dt><span><samp>--basic-regexp</samp></span></dt>
+<dd><span id="index-_002d_002dbasic_002dregexp"></span>
+<span id="index-matching-basic-regular-expressions"></span>
<p>Interpret patterns as basic regular expressions (BREs).
This is the default.
</p>
</dd>
-<dt><samp>-E</samp></dt>
-<dt><samp>--extended-regexp</samp></dt>
-<dd><a name="index-_002dE"></a>
-<a name="index-_002d_002dextended_002dregexp"></a>
-<a name="index-matching-extended-regular-expressions"></a>
+<dt id='index-_002dE'><span><samp>-E</samp><a href='#index-_002dE'
class='copiable-anchor'> ¶</a></span></dt>
+<dt><span><samp>--extended-regexp</samp></span></dt>
+<dd><span id="index-_002d_002dextended_002dregexp"></span>
+<span id="index-matching-extended-regular-expressions"></span>
<p>Interpret patterns as extended regular expressions (EREs).
(<samp>-E</samp> is specified by POSIX.)
</p>
</dd>
-<dt><samp>-F</samp></dt>
-<dt><samp>--fixed-strings</samp></dt>
-<dd><a name="index-_002dF"></a>
-<a name="index-_002d_002dfixed_002dstrings"></a>
-<a name="index-matching-fixed-strings"></a>
+<dt id='index-_002dF'><span><samp>-F</samp><a href='#index-_002dF'
class='copiable-anchor'> ¶</a></span></dt>
+<dt><span><samp>--fixed-strings</samp></span></dt>
+<dd><span id="index-_002d_002dfixed_002dstrings"></span>
+<span id="index-matching-fixed-strings"></span>
<p>Interpret patterns as fixed strings, not regular expressions.
(<samp>-F</samp> is specified by POSIX.)
</p>
</dd>
-<dt><samp>-P</samp></dt>
-<dt><samp>--perl-regexp</samp></dt>
-<dd><a name="index-_002dP"></a>
-<a name="index-_002d_002dperl_002dregexp"></a>
-<a name="index-matching-Perl_002dcompatible-regular-expressions"></a>
+<dt id='index-_002dP'><span><samp>-P</samp><a href='#index-_002dP'
class='copiable-anchor'> ¶</a></span></dt>
+<dt><span><samp>--perl-regexp</samp></span></dt>
+<dd><span id="index-_002d_002dperl_002dregexp"></span>
+<span id="index-matching-Perl_002dcompatible-regular-expressions"></span>
<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
@@ -1385,14 +1280,15 @@
</p>
<hr>
-<a name="Regular-Expressions"></a>
+</div>
+</div>
+<div class="chapter" id="Regular-Expressions">
<div class="header">
<p>
-Next: <a href="#Usage" accesskey="n" rel="next">Usage</a>, Previous: <a
href="#Invoking" accesskey="p" rel="prev">Invoking</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="#Usage" accesskey="n" rel="next">Usage</a>, Previous: <a
href="#Invoking" accesskey="p" rel="prev">Invoking <code>grep</code></a>, Up:
<a href="#Top" accesskey="u" rel="up">grep</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="Regular-Expressions-1"></a>
-<h2 class="chapter">3 Regular Expressions</h2>
-<a name="index-regular-expressions"></a>
+<span id="Regular-Expressions-1"></span><h2 class="chapter">3 Regular
Expressions</h2>
+<span id="index-regular-expressions"></span>
<p>A <em>regular expression</em> is a pattern that describes a set of strings.
Regular expressions are constructed analogously to arithmetic expressions,
@@ -1410,98 +1306,84 @@
are documented in the <i>pcresyntax</i>(3) and <i>pcrepattern</i>(3) manual
pages, but work only if PCRE is available in the system.
</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Fundamental-Structure"
accesskey="1">Fundamental Structure</a>:</td><td> </td><td
align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a
href="#Character-Classes-and-Bracket-Expressions" accesskey="2">Character
Classes and Bracket Expressions</a>:</td><td> </td><td align="left"
valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a
href="#The-Backslash-Character-and-Special-Expressions" accesskey="3">The
Backslash Character and Special Expressions</a>:</td><td> </td><td
align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Anchoring"
accesskey="4">Anchoring</a>:</td><td> </td><td align="left"
valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a
href="#Back_002dreferences-and-Subexpressions" accesskey="5">Back-references
and Subexpressions</a>:</td><td> </td><td align="left" valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Basic-vs-Extended"
accesskey="6">Basic vs Extended</a>:</td><td> </td><td align="left"
valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Character-Encoding"
accesskey="7">Character Encoding</a>:</td><td> </td><td align="left"
valign="top">
-</td></tr>
-<tr><td align="left" valign="top">• <a href="#Matching-Non_002dASCII"
accesskey="8">Matching Non-ASCII</a>:</td><td> </td><td align="left"
valign="top">
-</td></tr>
-</table>
+<ul class="section-toc">
+<li><a href="#Fundamental-Structure" accesskey="1">Fundamental
Structure</a></li>
+<li><a href="#Character-Classes-and-Bracket-Expressions"
accesskey="2">Character Classes and Bracket Expressions</a></li>
+<li><a href="#The-Backslash-Character-and-Special-Expressions"
accesskey="3">The Backslash Character and Special Expressions</a></li>
+<li><a href="#Anchoring" accesskey="4">Anchoring</a></li>
+<li><a href="#Back_002dreferences-and-Subexpressions"
accesskey="5">Back-references and Subexpressions</a></li>
+<li><a href="#Basic-vs-Extended" accesskey="6">Basic vs Extended Regular
Expressions</a></li>
+<li><a href="#Character-Encoding" accesskey="7">Character Encoding</a></li>
+<li><a href="#Matching-Non_002dASCII" accesskey="8">Matching Non-ASCII and
Non-printable Characters</a></li>
+</ul>
<hr>
-<a name="Fundamental-Structure"></a>
+<div class="section" id="Fundamental-Structure">
<div class="header">
<p>
Next: <a href="#Character-Classes-and-Bracket-Expressions" accesskey="n"
rel="next">Character Classes and Bracket Expressions</a>, Up: <a
href="#Regular-Expressions" accesskey="u" rel="up">Regular Expressions</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="Fundamental-Structure-1"></a>
-<h3 class="section">3.1 Fundamental Structure</h3>
+<span id="Fundamental-Structure-1"></span><h3 class="section">3.1 Fundamental
Structure</h3>
-<p>The fundamental building blocks are the regular expressions that match
-a single character.
-Most characters, including all letters and digits,
-are regular expressions that match themselves.
-Any meta-character
-with special meaning may be quoted by preceding it with a backslash.
-</p>
-<a name="index-_002e"></a>
-<a name="index-dot"></a>
-<a name="index-period"></a>
+<span id="index-ordinary-characters"></span>
+<span id="index-special-characters"></span>
+<p>In regular expressions, the characters
‘<samp>.?*+{|()[\^$</samp>’ are
+<em>special characters</em> and have uses described below. All other
+characters are <em>ordinary characters</em>, and each ordinary character
+is a regular expression that matches itself.
+</p>
+<span id="index-_002e"></span>
+<span id="index-dot"></span>
+<span id="index-period"></span>
<p>The period ‘<samp>.</samp>’ matches any single character.
It is unspecified whether ‘<samp>.</samp>’ matches an encoding
error.
</p>
+<span id="index-interval-expressions"></span>
<p>A regular expression may be followed by one of several
-repetition operators:
+repetition operators; the operators beginning with ‘<samp>{</samp>’
+are called <em>interval expressions</em>.
</p>
<dl compact="compact">
-<dt>‘<samp>?</samp>’</dt>
-<dd><a name="index-_003f"></a>
-<a name="index-question-mark"></a>
-<a name="index-match-expression-at-most-once"></a>
-<p>The preceding item is optional and will be matched at most once.
-</p>
-</dd>
-<dt>‘<samp>*</samp>’</dt>
-<dd><a name="index-_002a"></a>
-<a name="index-asterisk"></a>
-<a name="index-match-expression-zero-or-more-times"></a>
-<p>The preceding item will be matched zero or more times.
-</p>
-</dd>
-<dt>‘<samp>+</samp>’</dt>
-<dd><a name="index-_002b"></a>
-<a name="index-plus-sign"></a>
-<a name="index-match-expression-one-or-more-times"></a>
-<p>The preceding item will be matched one or more times.
-</p>
-</dd>
-<dt>‘<samp>{<var>n</var>}</samp>’</dt>
-<dd><a name="index-_007bn_007d"></a>
-<a name="index-braces_002c-one-argument"></a>
-<a name="index-match-expression-n-times"></a>
+<dt id='index-_003f'><span>‘<samp>?</samp>’<a href='#index-_003f'
class='copiable-anchor'> ¶</a></span></dt>
+<dd><span id="index-question-mark"></span>
+<span id="index-match-expression-at-most-once"></span>
+<p>The preceding item is optional and is matched at most once.
+</p>
+</dd>
+<dt id='index-_002a'><span>‘<samp>*</samp>’<a href='#index-_002a'
class='copiable-anchor'> ¶</a></span></dt>
+<dd><span id="index-asterisk"></span>
+<span id="index-match-expression-zero-or-more-times"></span>
+<p>The preceding item is matched zero or more times.
+</p>
+</dd>
+<dt id='index-_002b'><span>‘<samp>+</samp>’<a href='#index-_002b'
class='copiable-anchor'> ¶</a></span></dt>
+<dd><span id="index-plus-sign"></span>
+<span id="index-match-expression-one-or-more-times"></span>
+<p>The preceding item is matched one or more times.
+</p>
+</dd>
+<dt id='index-_007bn_007d'><span>‘<samp>{<var>n</var>}</samp>’<a
href='#index-_007bn_007d' class='copiable-anchor'> ¶</a></span></dt>
+<dd><span id="index-braces_002c-one-argument"></span>
+<span id="index-match-expression-n-times"></span>
<p>The preceding item is matched exactly <var>n</var> times.
</p>
</dd>
-<dt>‘<samp>{<var>n</var>,}</samp>’</dt>
-<dd><a name="index-_007bn_002c_007d"></a>
-<a name="index-braces_002c-second-argument-omitted"></a>
-<a name="index-match-expression-n-or-more-times"></a>
+<dt
id='index-_007bn_002c_007d'><span>‘<samp>{<var>n</var>,}</samp>’<a
href='#index-_007bn_002c_007d' class='copiable-anchor'> ¶</a></span></dt>
+<dd><span id="index-braces_002c-second-argument-omitted"></span>
+<span id="index-match-expression-n-or-more-times"></span>
<p>The preceding item is matched <var>n</var> or more times.
</p>
</dd>
-<dt>‘<samp>{,<var>m</var>}</samp>’</dt>
-<dd><a name="index-_007b_002cm_007d"></a>
-<a name="index-braces_002c-first-argument-omitted"></a>
-<a name="index-match-expression-at-most-m-times"></a>
+<dt
id='index-_007b_002cm_007d'><span>‘<samp>{,<var>m</var>}</samp>’<a
href='#index-_007b_002cm_007d' class='copiable-anchor'> ¶</a></span></dt>
+<dd><span id="index-braces_002c-first-argument-omitted"></span>
+<span id="index-match-expression-at-most-m-times"></span>
<p>The preceding item is matched at most <var>m</var> times.
This is a GNU extension.
</p>
</dd>
-<dt>‘<samp>{<var>n</var>,<var>m</var>}</samp>’</dt>
-<dd><a name="index-_007bn_002cm_007d"></a>
-<a name="index-braces_002c-two-arguments"></a>
-<a name="index-match-expression-from-n-to-m-times"></a>
+<dt
id='index-_007bn_002cm_007d'><span>‘<samp>{<var>n</var>,<var>m</var>}</samp>’<a
href='#index-_007bn_002cm_007d' class='copiable-anchor'> ¶</a></span></dt>
+<dd><span id="index-braces_002c-two-arguments"></span>
+<span id="index-match-expression-from-n-to-m-times"></span>
<p>The preceding item is matched at least <var>n</var> times, but not more than
<var>m</var> times.
</p>
@@ -1525,16 +1407,16 @@
An unmatched ‘<samp>)</samp>’ matches just itself.
</p>
<hr>
-<a name="Character-Classes-and-Bracket-Expressions"></a>
+</div>
+<div class="section" id="Character-Classes-and-Bracket-Expressions">
<div class="header">
<p>
Next: <a href="#The-Backslash-Character-and-Special-Expressions" accesskey="n"
rel="next">The Backslash Character and Special Expressions</a>, Previous: <a
href="#Fundamental-Structure" accesskey="p" rel="prev">Fundamental
Structure</a>, Up: <a href="#Regular-Expressions" accesskey="u"
rel="up">Regular Expressions</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="Character-Classes-and-Bracket-Expressions-1"></a>
-<h3 class="section">3.2 Character Classes and Bracket Expressions</h3>
+<span id="Character-Classes-and-Bracket-Expressions-1"></span><h3
class="section">3.2 Character Classes and Bracket Expressions</h3>
-<a name="index-bracket-expression"></a>
-<a name="index-character-class"></a>
+<span id="index-bracket-expression"></span>
+<span id="index-character-class"></span>
<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.
@@ -1547,7 +1429,7 @@
an opening or closing parenthesis, and might or might not match an
encoding error.
</p>
-<a name="index-range-expression"></a>
+<span id="index-range-expression"></span>
<p>Within a bracket expression, a <em>range expression</em> consists of two
characters separated by a hyphen.
It matches any single character that
@@ -1568,35 +1450,31 @@
for example, ‘<samp>[[:alnum:]]</samp>’ means the character class
of numbers and letters
in the current locale.
</p>
-<a name="index-classes-of-characters"></a>
-<a name="index-character-classes"></a>
+<span id="index-classes-of-characters"></span>
+<span id="index-character-classes"></span>
<dl compact="compact">
-<dt>‘<samp>[:alnum:]</samp>’</dt>
-<dd><a name="index-alnum-character-class"></a>
-<a name="index-alphanumeric-characters"></a>
+<dt
id='index-alnum-character-class'><span>‘<samp>[:alnum:]</samp>’<a
href='#index-alnum-character-class' class='copiable-anchor'>
¶</a></span></dt>
+<dd><span id="index-alphanumeric-characters"></span>
<p>Alphanumeric characters:
‘<samp>[:alpha:]</samp>’ and ‘<samp>[:digit:]</samp>’;
in the ‘<samp>C</samp>’ locale and ASCII
character encoding, this is the same as ‘<samp>[0-9A-Za-z]</samp>’.
</p>
</dd>
-<dt>‘<samp>[:alpha:]</samp>’</dt>
-<dd><a name="index-alpha-character-class"></a>
-<a name="index-alphabetic-characters"></a>
+<dt
id='index-alpha-character-class'><span>‘<samp>[:alpha:]</samp>’<a
href='#index-alpha-character-class' class='copiable-anchor'>
¶</a></span></dt>
+<dd><span id="index-alphabetic-characters"></span>
<p>Alphabetic characters:
‘<samp>[:lower:]</samp>’ and ‘<samp>[:upper:]</samp>’;
in the ‘<samp>C</samp>’ locale and ASCII
character encoding, this is the same as ‘<samp>[A-Za-z]</samp>’.
</p>
</dd>
-<dt>‘<samp>[:blank:]</samp>’</dt>
-<dd><a name="index-blank-character-class"></a>
-<a name="index-blank-characters"></a>
+<dt
id='index-blank-character-class'><span>‘<samp>[:blank:]</samp>’<a
href='#index-blank-character-class' class='copiable-anchor'>
¶</a></span></dt>
+<dd><span id="index-blank-characters"></span>
<p>Blank characters:
space and tab.
</p>
</dd>
-<dt>‘<samp>[:cntrl:]</samp>’</dt>
-<dd><a name="index-cntrl-character-class"></a>
-<a name="index-control-characters"></a>
+<dt
id='index-cntrl-character-class'><span>‘<samp>[:cntrl:]</samp>’<a
href='#index-cntrl-character-class' class='copiable-anchor'>
¶</a></span></dt>
+<dd><span id="index-control-characters"></span>
<p>Control characters.
In ASCII, these characters have octal codes 000
through 037, and 177 (DEL).
@@ -1604,64 +1482,56 @@
the equivalent characters, if any.
</p>
</dd>
-<dt>‘<samp>[:digit:]</samp>’</dt>
-<dd><a name="index-digit-character-class"></a>
-<a name="index-digit-characters"></a>
-<a name="index-numeric-characters"></a>
+<dt
id='index-digit-character-class'><span>‘<samp>[:digit:]</samp>’<a
href='#index-digit-character-class' class='copiable-anchor'>
¶</a></span></dt>
+<dd><span id="index-digit-characters"></span>
+<span id="index-numeric-characters"></span>
<p>Digits: <code>0 1 2 3 4 5 6 7 8 9</code>.
</p>
</dd>
-<dt>‘<samp>[:graph:]</samp>’</dt>
-<dd><a name="index-graph-character-class"></a>
-<a name="index-graphic-characters"></a>
+<dt
id='index-graph-character-class'><span>‘<samp>[:graph:]</samp>’<a
href='#index-graph-character-class' class='copiable-anchor'>
¶</a></span></dt>
+<dd><span id="index-graphic-characters"></span>
<p>Graphical characters:
‘<samp>[:alnum:]</samp>’ and ‘<samp>[:punct:]</samp>’.
</p>
</dd>
-<dt>‘<samp>[:lower:]</samp>’</dt>
-<dd><a name="index-lower-character-class"></a>
-<a name="index-lower_002dcase-letters"></a>
+<dt
id='index-lower-character-class'><span>‘<samp>[:lower:]</samp>’<a
href='#index-lower-character-class' class='copiable-anchor'>
¶</a></span></dt>
+<dd><span id="index-lower_002dcase-letters"></span>
<p>Lower-case letters; in the ‘<samp>C</samp>’ locale and ASCII
character
encoding, this is
<code>a b c d e f g h i j k l m n o p q r s t u v w x y z</code>.
</p>
</dd>
-<dt>‘<samp>[:print:]</samp>’</dt>
-<dd><a name="index-print-character-class"></a>
-<a name="index-printable-characters"></a>
+<dt
id='index-print-character-class'><span>‘<samp>[:print:]</samp>’<a
href='#index-print-character-class' class='copiable-anchor'>
¶</a></span></dt>
+<dd><span id="index-printable-characters"></span>
<p>Printable characters:
‘<samp>[:alnum:]</samp>’, ‘<samp>[:punct:]</samp>’,
and space.
</p>
</dd>
-<dt>‘<samp>[:punct:]</samp>’</dt>
-<dd><a name="index-punct-character-class"></a>
-<a name="index-punctuation-characters"></a>
+<dt
id='index-punct-character-class'><span>‘<samp>[:punct:]</samp>’<a
href='#index-punct-character-class' class='copiable-anchor'>
¶</a></span></dt>
+<dd><span id="index-punctuation-characters"></span>
<p>Punctuation characters; in the ‘<samp>C</samp>’ locale and
ASCII character
encoding, this is
<code>! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` {
| } ~</code>.
</p>
</dd>
-<dt>‘<samp>[:space:]</samp>’</dt>
-<dd><a name="index-space-character-class"></a>
-<a name="index-space-characters"></a>
-<a name="index-whitespace-characters"></a>
+<dt
id='index-space-character-class'><span>‘<samp>[:space:]</samp>’<a
href='#index-space-character-class' class='copiable-anchor'>
¶</a></span></dt>
+<dd><span id="index-space-characters"></span>
+<span id="index-whitespace-characters"></span>
<p>Space characters: in the ‘<samp>C</samp>’ locale, this is
tab, newline, vertical tab, form feed, carriage return, and space.
See <a href="#Usage">Usage</a>, for more discussion of matching newlines.
</p>
</dd>
-<dt>‘<samp>[:upper:]</samp>’</dt>
-<dd><a name="index-upper-character-class"></a>
-<a name="index-upper_002dcase-letters"></a>
+<dt
id='index-upper-character-class'><span>‘<samp>[:upper:]</samp>’<a
href='#index-upper-character-class' class='copiable-anchor'>
¶</a></span></dt>
+<dd><span id="index-upper_002dcase-letters"></span>
<p>Upper-case letters: in the ‘<samp>C</samp>’ locale and ASCII
character
encoding, this is
<code>A B C D E F G H I J K L M N O P Q R S T U V W X Y Z</code>.
</p>
</dd>
-<dt>‘<samp>[:xdigit:]</samp>’</dt>
-<dd><a name="index-xdigit-character-class"></a>
-<a name="index-xdigit-class"></a>
-<a name="index-hexadecimal-digits"></a>
+<dt
id='index-xdigit-character-class'><span>‘<samp>[:xdigit:]</samp>’<a
href='#index-xdigit-character-class' class='copiable-anchor'>
¶</a></span></dt>
+<dd><span id="index-xdigit-class"></span>
+<span id="index-hexadecimal-digits"></span>
<p>Hexadecimal digits:
<code>0 1 2 3 4 5 6 7 8 9 A B C D E F a b c d e f</code>.
</p>
@@ -1671,52 +1541,52 @@
part of the symbolic names, and must be included in addition to
the brackets delimiting the bracket expression.
</p>
-<a name="invalid_002dbracket_002dexpr"></a><p>If you mistakenly omit the outer
brackets, and search for say, ‘<samp>[:upper:]</samp>’,
+<span id="invalid_002dbracket_002dexpr"></span><p>If you mistakenly omit the
outer brackets, and search for say, ‘<samp>[:upper:]</samp>’,
GNU <code>grep</code> prints a diagnostic and exits with status 2, on
the assumption that you did not intend to search for the nominally
equivalent regular expression: ‘<samp>[:epru]</samp>’.
Set the <code>POSIXLY_CORRECT</code> environment variable to disable this
feature.
</p>
-<p>Most meta-characters lose their special meaning inside bracket expressions.
+<p>Special characters lose their special meaning inside bracket expressions.
</p>
<dl compact="compact">
-<dt>‘<samp>]</samp>’</dt>
+<dt><span>‘<samp>]</samp>’</span></dt>
<dd><p>ends the bracket expression if it’s not the first list item.
So, if you want to make the ‘<samp>]</samp>’ character a list item,
you must put it first.
</p>
</dd>
-<dt>‘<samp>[.</samp>’</dt>
+<dt><span>‘<samp>[.</samp>’</span></dt>
<dd><p>represents the open collating symbol.
</p>
</dd>
-<dt>‘<samp>.]</samp>’</dt>
+<dt><span>‘<samp>.]</samp>’</span></dt>
<dd><p>represents the close collating symbol.
</p>
</dd>
-<dt>‘<samp>[=</samp>’</dt>
+<dt><span>‘<samp>[=</samp>’</span></dt>
<dd><p>represents the open equivalence class.
</p>
</dd>
-<dt>‘<samp>=]</samp>’</dt>
+<dt><span>‘<samp>=]</samp>’</span></dt>
<dd><p>represents the close equivalence class.
</p>
</dd>
-<dt>‘<samp>[:</samp>’</dt>
+<dt><span>‘<samp>[:</samp>’</span></dt>
<dd><p>represents the open character class symbol, and should be followed by a
valid character class name.
</p>
</dd>
-<dt>‘<samp>:]</samp>’</dt>
+<dt><span>‘<samp>:]</samp>’</span></dt>
<dd><p>represents the close character class symbol.
</p>
</dd>
-<dt>‘<samp>-</samp>’</dt>
+<dt><span>‘<samp>-</samp>’</span></dt>
<dd><p>represents the range if it’s not first or last in a list or the
ending point
of a range.
</p>
</dd>
-<dt>‘<samp>^</samp>’</dt>
+<dt><span>‘<samp>^</samp>’</span></dt>
<dd><p>represents the characters not in the list.
If you want to make the ‘<samp>^</samp>’
character a list item, place it anywhere but first.
@@ -1725,49 +1595,51 @@
</dl>
<hr>
-<a name="The-Backslash-Character-and-Special-Expressions"></a>
+</div>
+<div class="section" id="The-Backslash-Character-and-Special-Expressions">
<div class="header">
<p>
Next: <a href="#Anchoring" accesskey="n" rel="next">Anchoring</a>, Previous:
<a href="#Character-Classes-and-Bracket-Expressions" accesskey="p"
rel="prev">Character Classes and Bracket Expressions</a>, Up: <a
href="#Regular-Expressions" accesskey="u" rel="up">Regular Expressions</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="The-Backslash-Character-and-Special-Expressions-1"></a>
-<h3 class="section">3.3 The Backslash Character and Special Expressions</h3>
-<a name="index-backslash"></a>
+<span id="The-Backslash-Character-and-Special-Expressions-1"></span><h3
class="section">3.3 The Backslash Character and Special Expressions</h3>
+<span id="index-backslash"></span>
-<p>The ‘<samp>\</samp>’ character,
+<p>The ‘<samp>\</samp>’ character followed by a special character
is a regular
+expression that matches the special character.
+The ‘<samp>\</samp>’ character,
when followed by certain ordinary characters,
takes a special meaning:
</p>
<dl compact="compact">
-<dt>‘<samp>\b</samp>’</dt>
+<dt><span>‘<samp>\b</samp>’</span></dt>
<dd><p>Match the empty string at the edge of a word.
</p>
</dd>
-<dt>‘<samp>\B</samp>’</dt>
+<dt><span>‘<samp>\B</samp>’</span></dt>
<dd><p>Match the empty string provided it’s not at the edge of a word.
</p>
</dd>
-<dt>‘<samp>\<</samp>’</dt>
-<dd><p>Match the empty string at the beginning of word.
+<dt><span>‘<samp>\<</samp>’</span></dt>
+<dd><p>Match the empty string at the beginning of a word.
</p>
</dd>
-<dt>‘<samp>\></samp>’</dt>
-<dd><p>Match the empty string at the end of word.
+<dt><span>‘<samp>\></samp>’</span></dt>
+<dd><p>Match the empty string at the end of a word.
</p>
</dd>
-<dt>‘<samp>\w</samp>’</dt>
+<dt><span>‘<samp>\w</samp>’</span></dt>
<dd><p>Match word constituent, it is a synonym for
‘<samp>[_[:alnum:]]</samp>’.
</p>
</dd>
-<dt>‘<samp>\W</samp>’</dt>
+<dt><span>‘<samp>\W</samp>’</span></dt>
<dd><p>Match non-word constituent, it is a synonym for
‘<samp>[^_[:alnum:]]</samp>’.
</p>
</dd>
-<dt>‘<samp>\s</samp>’</dt>
+<dt><span>‘<samp>\s</samp>’</span></dt>
<dd><p>Match whitespace, it is a synonym for
‘<samp>[[:space:]]</samp>’.
</p>
</dd>
-<dt>‘<samp>\S</samp>’</dt>
+<dt><span>‘<samp>\S</samp>’</span></dt>
<dd><p>Match non-whitespace, it is a synonym for
‘<samp>[^[:space:]]</samp>’.
</p>
</dd>
@@ -1777,39 +1649,42 @@
‘<samp>\Brat\B</samp>’ matches ‘<samp>crate</samp>’
but not ‘<samp>furry rat</samp>’.
</p>
<hr>
-<a name="Anchoring"></a>
+</div>
+<div class="section" id="Anchoring">
<div class="header">
<p>
Next: <a href="#Back_002dreferences-and-Subexpressions" accesskey="n"
rel="next">Back-references and Subexpressions</a>, Previous: <a
href="#The-Backslash-Character-and-Special-Expressions" accesskey="p"
rel="prev">The Backslash Character and Special Expressions</a>, Up: <a
href="#Regular-Expressions" accesskey="u" rel="up">Regular Expressions</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="Anchoring-1"></a>
-<h3 class="section">3.4 Anchoring</h3>
-<a name="index-anchoring"></a>
+<span id="Anchoring-1"></span><h3 class="section">3.4 Anchoring</h3>
+<span id="index-anchoring"></span>
-<p>The caret ‘<samp>^</samp>’ and the dollar sign
‘<samp>$</samp>’ are meta-characters that
+<p>The caret ‘<samp>^</samp>’ and the dollar sign
‘<samp>$</samp>’ are special characters that
respectively match the empty string at the beginning and end of a line.
They are termed <em>anchors</em>, since they force the match to be
“anchored”
to beginning or end of a line, respectively.
</p>
<hr>
-<a name="Back_002dreferences-and-Subexpressions"></a>
+</div>
+<div class="section" id="Back_002dreferences-and-Subexpressions">
<div class="header">
<p>
-Next: <a href="#Basic-vs-Extended" accesskey="n" rel="next">Basic vs
Extended</a>, Previous: <a href="#Anchoring" accesskey="p"
rel="prev">Anchoring</a>, Up: <a href="#Regular-Expressions" accesskey="u"
rel="up">Regular Expressions</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="#Basic-vs-Extended" accesskey="n" rel="next">Basic vs Extended
Regular Expressions</a>, Previous: <a href="#Anchoring" accesskey="p"
rel="prev">Anchoring</a>, Up: <a href="#Regular-Expressions" accesskey="u"
rel="up">Regular Expressions</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="Back_002dreferences-and-Subexpressions-1"></a>
-<h3 class="section">3.5 Back-references and Subexpressions</h3>
-<a name="index-subexpression"></a>
-<a name="index-back_002dreference"></a>
+<span id="Back_002dreferences-and-Subexpressions-1"></span><h3
class="section">3.5 Back-references and Subexpressions</h3>
+<span id="index-subexpression"></span>
+<span id="index-back_002dreference"></span>
-<p>The back-reference ‘<samp>\<var>n</var></samp>’, where
<var>n</var> is a single digit, matches
+<p>The back-reference ‘<samp>\<var>n</var></samp>’,
+where <var>n</var> is a single nonzero digit, matches
the substring previously matched by the <var>n</var>th parenthesized
subexpression
of the regular expression.
For example, ‘<samp>(a)\1</samp>’ matches
‘<samp>aa</samp>’.
-When used with alternation, if the group does not participate in the match then
-the back-reference makes the whole match fail.
-For example, ‘<samp>a(.)|b\1</samp>’
-will not match ‘<samp>ba</samp>’.
+If the parenthesized subexpression does not participate in the match,
+the back-reference makes the whole match fail;
+for example, ‘<samp>(a)*\1</samp>’ fails to match
‘<samp>a</samp>’.
+If the parenthesized subexpression matches more than one substring,
+the back-reference refers to the last matched substring;
+for example, ‘<samp>^(ab*)*\1$</samp>’ matches
‘<samp>ababbabb</samp>’ but not ‘<samp>ababbab</samp>’.
When multiple regular expressions are given with
<samp>-e</samp> or from a file (‘<samp>-f <var>file</var></samp>’),
back-references are local to each expression.
@@ -1817,29 +1692,48 @@
<p>See <a href="#Known-Bugs">Known Bugs</a>, for some known problems with
back-references.
</p>
<hr>
-<a name="Basic-vs-Extended"></a>
+</div>
+<div class="section" id="Basic-vs-Extended">
<div class="header">
<p>
Next: <a href="#Character-Encoding" accesskey="n" rel="next">Character
Encoding</a>, Previous: <a href="#Back_002dreferences-and-Subexpressions"
accesskey="p" rel="prev">Back-references and Subexpressions</a>, Up: <a
href="#Regular-Expressions" accesskey="u" rel="up">Regular Expressions</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="Basic-vs-Extended-Regular-Expressions"></a>
-<h3 class="section">3.6 Basic vs Extended Regular Expressions</h3>
-<a name="index-basic-regular-expressions"></a>
+<span id="Basic-vs-Extended-Regular-Expressions"></span><h3
class="section">3.6 Basic vs Extended Regular Expressions</h3>
+<span id="index-basic-regular-expressions"></span>
-<p>In basic regular expressions the meta-characters
‘<samp>?</samp>’, ‘<samp>+</samp>’,
+<p>In basic regular expressions the characters ‘<samp>?</samp>’,
‘<samp>+</samp>’,
‘<samp>{</samp>’, ‘<samp>|</samp>’,
‘<samp>(</samp>’, and ‘<samp>)</samp>’ lose their
special meaning;
instead use the backslashed versions ‘<samp>\?</samp>’,
‘<samp>\+</samp>’, ‘<samp>\{</samp>’,
-‘<samp>\|</samp>’, ‘<samp>\(</samp>’, and
‘<samp>\)</samp>’.
+‘<samp>\|</samp>’, ‘<samp>\(</samp>’, and
‘<samp>\)</samp>’. Also, a backslash is needed
+before an interval expression’s closing ‘<samp>}</samp>’,
and an unmatched
+<code>\)</code> is invalid.
</p>
-<a name="index-interval-specifications"></a>
-<p>Traditional <code>egrep</code> did not support the
‘<samp>{</samp>’ meta-character,
-and some <code>egrep</code> implementations support
‘<samp>\{</samp>’ instead, so
-portable scripts should avoid ‘<samp>{</samp>’ in
‘<samp>grep -E</samp>’ patterns and
-should use ‘<samp>[{]</samp>’ to match a literal
‘<samp>{</samp>’.
+<p>Portable scripts should avoid the following constructs, as
+POSIX says they produce undefined results:
+</p>
+<ul>
+<li> Extended regular expressions that use back-references.
+</li><li> Basic regular expressions that use ‘<samp>\?</samp>’,
‘<samp>\+</samp>’, or ‘<samp>\|</samp>’.
+</li><li> Empty parenthesized regular expressions like
‘<samp>()</samp>’.
+</li><li> Empty alternatives (as in, e.g, ‘<samp>a|</samp>’).
+</li><li> Repetition operators that immediately follow empty expressions,
+unescaped ‘<samp>$</samp>’, or other repetition operators.
+</li><li> A backslash escaping an ordinary character (e.g.,
‘<samp>\S</samp>’),
+unless it is a back-reference.
+</li><li> An unescaped ‘<samp>[</samp>’ that is not part of a
bracket expression.
+</li><li> In extended regular expressions, an unescaped
‘<samp>{</samp>’ that is not
+part of an interval expression.
+</li></ul>
+
+<span id="index-interval-expressions-1"></span>
+<p>Traditional <code>egrep</code> did not support interval expressions and
+some <code>egrep</code> implementations use ‘<samp>\{</samp>’ and
‘<samp>\}</samp>’ instead, so
+portable scripts should avoid interval expressions in
‘<samp>grep -E</samp>’ patterns
+and should use ‘<samp>[{]</samp>’ to match a literal
‘<samp>{</samp>’.
</p>
<p>GNU <code>grep -E</code> attempts to support traditional usage by
assuming that ‘<samp>{</samp>’ is not special if it would be the
start of an
-invalid interval specification.
+invalid interval expression.
For example, the command
‘<samp>grep -E '{1'</samp>’ searches for the
two-character string ‘<samp>{1</samp>’
instead of reporting a syntax error in the regular expression.
@@ -1847,14 +1741,14 @@
should avoid it.
</p>
<hr>
-<a name="Character-Encoding"></a>
+</div>
+<div class="section" id="Character-Encoding">
<div class="header">
<p>
-Next: <a href="#Matching-Non_002dASCII" accesskey="n" rel="next">Matching
Non-ASCII</a>, Previous: <a href="#Basic-vs-Extended" accesskey="p"
rel="prev">Basic vs Extended</a>, Up: <a href="#Regular-Expressions"
accesskey="u" rel="up">Regular Expressions</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="#Matching-Non_002dASCII" accesskey="n" rel="next">Matching
Non-ASCII and Non-printable Characters</a>, Previous: <a
href="#Basic-vs-Extended" accesskey="p" rel="prev">Basic vs Extended Regular
Expressions</a>, Up: <a href="#Regular-Expressions" accesskey="u"
rel="up">Regular Expressions</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="Character-Encoding-1"></a>
-<h3 class="section">3.7 Character Encoding</h3>
-<a name="index-character-encoding"></a>
+<span id="Character-Encoding-1"></span><h3 class="section">3.7 Character
Encoding</h3>
+<span id="index-character-encoding"></span>
<p>The <code>LC_CTYPE</code> locale specifies the encoding of characters in
patterns and data, that is, whether text is encoded in UTF-8, ASCII,
@@ -1880,15 +1774,15 @@
all but oddball platforms.
</p>
<hr>
-<a name="Matching-Non_002dASCII"></a>
+</div>
+<div class="section" id="Matching-Non_002dASCII">
<div class="header">
<p>
Previous: <a href="#Character-Encoding" accesskey="p" rel="prev">Character
Encoding</a>, Up: <a href="#Regular-Expressions" accesskey="u" rel="up">Regular
Expressions</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="Matching-Non_002dASCII-and-Non_002dprintable-Characters"></a>
-<h3 class="section">3.8 Matching Non-ASCII and Non-printable Characters</h3>
-<a name="index-non_002dASCII-matching"></a>
-<a name="index-non_002dprintable-matching"></a>
+<span id="Matching-Non_002dASCII-and-Non_002dprintable-Characters"></span><h3
class="section">3.8 Matching Non-ASCII and Non-printable Characters</h3>
+<span id="index-non_002dASCII-matching"></span>
+<span id="index-non_002dprintable-matching"></span>
<p>In a regular expression, non-ASCII and non-printable characters other
than newline are not special, and represent themselves. For example,
@@ -1924,15 +1818,16 @@
in a pattern specified via the <samp>-f</samp> (<samp>--file</samp>) option.
</p>
<hr>
-<a name="Usage"></a>
+</div>
+</div>
+<div class="chapter" id="Usage">
<div class="header">
<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>
+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">grep</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>
+<span id="Usage-1"></span><h2 class="chapter">4 Usage</h2>
-<a name="index-usage_002c-examples"></a>
+<span id="index-usage_002c-examples"></span>
<p>Here is an example command that invokes GNU <code>grep</code>:
</p>
<div class="example">
@@ -1947,30 +1842,29 @@
to ignore case, causing it to match the line ‘<samp>Hello,
world!</samp>’, which
it would not otherwise match.
</p>
-<p>Here is a more complex example session,
+<p>Here is a more complex example,
showing the location and contents of any line
containing ‘<samp>f</samp>’ and ending in
‘<samp>.c</samp>’,
within all files in the current directory whose names
-contain ‘<samp>g</samp>’ and end in ‘<samp>.h</samp>’.
+start with non-‘<samp>.</samp>’, contain
‘<samp>g</samp>’, and end in ‘<samp>.h</samp>’.
The <samp>-n</samp> option outputs line numbers, the <samp>--</samp> argument
-treats any later arguments starting with ‘<samp>-</samp>’ as file
names not
-options, and the empty file <samp>/dev/null</samp> causes file names to be
output
+treats any later arguments as file names not options even if
+<code>*g*.h</code> expands to a file name that starts with
‘<samp>-</samp>’,
+and the empty file <samp>/dev/null</samp> causes file names to be output
even if only one file name happens to be of the form
‘<samp>*g*.h</samp>’.
</p>
<div class="example">
-<pre class="example">$ <kbd>grep -n -- 'f.*\.c$' *g*.h /dev/null</kbd>
-argmatch.h:1:/* definitions and prototypes for argmatch.c
+<pre class="example">grep -n -- 'f.*\.c$' *g*.h /dev/null
</pre></div>
-<p>The only line that contains a match is line 1 of <samp>argmatch.h</samp>.
-Note that the regular expression syntax used in the pattern differs
+<p>Note that the regular expression syntax used in the pattern differs
from the globbing syntax that the shell uses to match file names.
</p>
-<p>See <a href="#Invoking">Invoking</a>, for more details about
+<p>See <a href="#Invoking">Invoking <code>grep</code></a>, for more details
about
how to invoke <code>grep</code>.
</p>
-<a name="index-using-grep_002c-Q_0026A"></a>
-<a name="index-FAQ-about-grep-usage"></a>
+<span id="index-using-grep_002c-Q_0026A"></span>
+<span id="index-FAQ-about-grep-usage"></span>
<p>Here are some common questions and answers about <code>grep</code> usage.
</p>
<ol>
@@ -2151,11 +2045,8 @@
<pre class="example">echo 'ba' | grep -E '(a)\1|b\1'
</pre></div>
-<p>This gives no output, because the first alternate
‘<samp>(a)\1</samp>’ does not match,
-as there is no ‘<samp>aa</samp>’ in the input, so the
‘<samp>\1</samp>’ in the second alternate
+<p>This outputs an error message, because the second
‘<samp>\1</samp>’
has nothing to refer back to, meaning it will never match anything.
-(The second alternate in this example can only match
-if the first alternate has matched—making the second one superfluous.)
</p>
</li><li> How can I match across lines?
@@ -2197,15 +2088,15 @@
<hr>
-<a name="Performance"></a>
+</div>
+<div class="chapter" id="Performance">
<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>
+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">grep</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>
+<span id="Performance-1"></span><h2 class="chapter">5 Performance</h2>
-<a name="index-performance"></a>
+<span id="index-performance"></span>
<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.
@@ -2220,7 +2111,7 @@
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>
+<span id="index-locales"></span>
<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
@@ -2228,25 +2119,25 @@
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>
+<span id="index-case-insensitive-search-1"></span>
<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>
+<span id="index-back_002dreferences"></span>
<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
+lengths can be written as a sum <em class='math'>15x + 14y</em> for nonnegative
+integers <em class='math'>x</em> and <em class='math'>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>
+<span id="index-holes-in-files"></span>
<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
@@ -2283,34 +2174,32 @@
</li></ul>
<hr>
-<a name="Reporting-Bugs"></a>
+</div>
+<div class="chapter" id="Reporting-Bugs">
<div class="header">
<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>
+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">grep</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">6 Reporting bugs</h2>
+<span id="Reporting-bugs"></span><h2 class="chapter">6 Reporting bugs</h2>
-<a name="index-bugs_002c-reporting"></a>
+<span id="index-bugs_002c-reporting"></span>
<p>Bug reports can be found at the
<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:bug-grep@gnu.org">bug-grep@gnu.org</a> to create a new bug
report.
</p>
-<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Known-Bugs"
accesskey="1">Known Bugs</a>:</td><td> </td><td align="left"
valign="top">
-</td></tr>
-</table>
+<ul class="section-toc">
+<li><a href="#Known-Bugs" accesskey="1">Known Bugs</a></li>
+</ul>
<hr>
-<a name="Known-Bugs"></a>
+<div class="section" id="Known-Bugs">
<div class="header">
<p>
-Up: <a href="#Reporting-Bugs" accesskey="u" rel="up">Reporting Bugs</a>
[<a href="#SEC_Contents" title="Table of contents"
rel="contents">Contents</a>][<a href="#Index" title="Index"
rel="index">Index</a>]</p>
+Up: <a href="#Reporting-Bugs" accesskey="u" rel="up">Reporting bugs</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="Known-Bugs-1"></a>
-<h3 class="section">6.1 Known Bugs</h3>
-<a name="index-Bugs_002c-known"></a>
+<span id="Known-Bugs-1"></span><h3 class="section">6.1 Known Bugs</h3>
+<span id="index-Bugs_002c-known"></span>
<p>Large repetition counts in the ‘<samp>{n,m}</samp>’ construct
may cause
<code>grep</code> to use lots of memory.
@@ -2324,7 +2213,7 @@
back-references is at times unclear. Furthermore, many regular
expression implementations have back-reference bugs that can cause
programs to return incorrect answers or even crash, and fixing these
-bugs has often been low-priority: for example, as of 2020 the
+bugs has often been low-priority: for example, as of 2021 the
<a href="https://sourceware.org/bugzilla/">GNU C library bug database</a>
contained back-reference bugs
<a href="https://sourceware.org/bugzilla/show_bug.cgi?id=52">52</a>,
@@ -2338,14 +2227,15 @@
</p>
<hr>
-<a name="Copying"></a>
+</div>
+</div>
+<div class="chapter" id="Copying">
<div class="header">
<p>
-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>
+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">grep</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">7 Copying</h2>
-<a name="index-copying"></a>
+<span id="Copying-1"></span><h2 class="chapter">7 Copying</h2>
+<span id="index-copying"></span>
<p>GNU <code>grep</code> is licensed under the GNU GPL, which makes it <em>free
software</em>.
@@ -2368,19 +2258,17 @@
is available with the source code, or at
<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">
-</td></tr>
-</table>
+<ul class="section-toc">
+<li><a href="#GNU-Free-Documentation-License" accesskey="1">GNU Free
Documentation License</a></li>
+</ul>
<hr>
-<a name="GNU-Free-Documentation-License"></a>
+<div class="section" id="GNU-Free-Documentation-License">
<div class="header">
<p>
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">7.1 GNU Free Documentation License</h3>
+<span id="GNU-Free-Documentation-License-1"></span><h3 class="section">7.1 GNU
Free Documentation License</h3>
<div align="center">Version 1.3, 3 November 2008
</div>
@@ -2815,15 +2703,14 @@
</p>
</li></ol>
-<a name="ADDENDUM_003a-How-to-use-this-License-for-your-documents"></a>
-<h3 class="heading">ADDENDUM: How to use this License for your documents</h3>
+<span id="ADDENDUM_003a-How-to-use-this-License-for-your-documents"></span><h3
class="heading">ADDENDUM: How to use this License for your documents</h3>
<p>To use this License in a document you have written, include a copy of
the License in the document and put the following copyright and
license notices just after the title page:
</p>
-<div class="smallexample">
-<pre class="smallexample"> Copyright (C) <var>year</var> <var>your
name</var>.
+<div class="example">
+<pre class="example"> Copyright (C) <var>year</var> <var>your name</var>.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
or any later version published by the Free Software Foundation;
@@ -2835,8 +2722,8 @@
<p>If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
replace the “with…Texts.” line with this:
</p>
-<div class="smallexample">
-<pre class="smallexample"> with the Invariant Sections being <var>list
their titles</var>, with
+<div class="example">
+<pre class="example"> with the Invariant Sections being <var>list their
titles</var>, with
the Front-Cover Texts being <var>list</var>, and with the Back-Cover Texts
being <var>list</var>.
</pre></div>
@@ -2853,13 +2740,14 @@
<hr>
-<a name="Index"></a>
+</div>
+</div>
+<div class="unnumbered" id="Index">
<div class="header">
<p>
-Previous: <a href="#Copying" accesskey="p" rel="prev">Copying</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>
+Previous: <a href="#Copying" accesskey="p" rel="prev">Copying</a>, Up: <a
href="#Top" accesskey="u" rel="up">grep</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="Index-1"></a>
-<h2 class="unnumbered">Index</h2>
+<span id="Index-1"></span><h2 class="unnumbered">Index</h2>
<table><tr><th valign="top">Jump to: </th><td><a class="summary-letter"
href="#Index_cp_symbol-1"><b>*</b></a>
@@ -2926,13 +2814,13 @@
<table class="index-cp" border="0">
<tr><td></td><th align="left">Index Entry</th><td> </td><th align="left">
Section</th></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_symbol-1">*</a></th><td></td><td></td></tr>
+<tr><th id="Index_cp_symbol-1">*</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a
href="#index-_002a"><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-2">+</a></th><td></td><td></td></tr>
+<tr><th id="Index_cp_symbol-2">+</th><td></td><td></td></tr>
<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><th id="Index_cp_symbol-3">-</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>
@@ -3019,22 +2907,22 @@
<tr><td></td><td valign="top"><a
href="#index-_002dZ"><code>-Z</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-_002dz"><code>-z</code></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_symbol-4">.</a></th><td></td><td></td></tr>
+<tr><th id="Index_cp_symbol-4">.</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a
href="#index-_002e"><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-5">?</a></th><td></td><td></td></tr>
+<tr><th id="Index_cp_symbol-5">?</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a
href="#index-_003f"><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-6">_</a></th><td></td><td></td></tr>
+<tr><th id="Index_cp_symbol-6">_</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a
href="#index-_005fN_005fGNU_005fnonoption_005fargv_005fflags_005f-environment-variable"><code>_<var>N</var>_GNU_nonoption_argv_flags_
<span class="roman">environment
variable</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_symbol-7">{</a></th><td></td><td></td></tr>
+<tr><th id="Index_cp_symbol-7">{</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a
href="#index-_007b_002cm_007d"><code>{,<var>m</var>}</code></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-_007bn_002cm_007d"><code>{<var>n</var>,<var>m</var>}</code></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-_007bn_002c_007d"><code>{<var>n</var>,}</code></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-_007bn_007d"><code>{<var>n</var>}</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_letter-A">A</a></th><td></td><td></td></tr>
+<tr><th id="Index_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-after-context">after
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-alnum-character-class"><code>alnum <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-alpha-character-class"><code>alpha <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>
@@ -3043,7 +2931,7 @@
<tr><td></td><td valign="top"><a
href="#index-anchoring">anchoring</a>:</td><td> </td><td valign="top"><a
href="#Anchoring">Anchoring</a></td></tr>
<tr><td></td><td valign="top"><a
href="#index-asterisk">asterisk</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-B">B</a></th><td></td><td></td></tr>
+<tr><th id="Index_cp_letter-B">B</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>
@@ -3064,7 +2952,7 @@
<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 colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-C">C</a></th><td></td><td></td></tr>
+<tr><th id="Index_cp_letter-C">C</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>
@@ -3084,15 +2972,14 @@
<tr><td></td><td valign="top"><a href="#index-counting-lines">counting
lines</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-cx-GREP_005fCOLORS-capability"><code>cx 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-D">D</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a
href="#index-default-options-environment-variable">default options environment
variable</a>:</td><td> </td><td valign="top"><a
href="#Environment-Variables">Environment Variables</a></td></tr>
+<tr><th id="Index_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-device-search">device
search</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-digit-character-class"><code>digit <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-digit-characters">digit
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-directory-search">directory
search</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-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><th id="Index_cp_letter-E">E</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>
@@ -3100,35 +2987,35 @@
<tr><td></td><td valign="top"><a href="#index-exclude-files-1">exclude
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-exit-status">exit
status</a>:</td><td> </td><td valign="top"><a href="#Exit-Status">Exit
Status</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-F">F</a></th><td></td><td></td></tr>
+<tr><th id="Index_cp_letter-F">F</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-FAQ-about-grep-usage">FAQ about
<code>grep</code> usage</a>:</td><td> </td><td valign="top"><a
href="#Usage">Usage</a></td></tr>
<tr><td></td><td valign="top"><a
href="#index-files-which-don_0027t-match">files which don’t
match</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-fn-GREP_005fCOLORS-capability"><code>fn 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-fn-GREP_005fCOLORS-capability-1"><code>fn 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-G">G</a></th><td></td><td></td></tr>
+<tr><th id="Index_cp_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a
href="#index-graph-character-class"><code>graph <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-graphic-characters">graphic
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-grep-programs"><code>grep</code>
programs</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-GREP_005fCOLOR-environment-variable"><code>GREP_COLOR <span
class="roman">environment variable</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-GREP_005fCOLORS-environment-variable"><code>GREP_COLORS <span
class="roman">environment variable</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-GREP_005fOPTIONS-environment-variable"><code>GREP_OPTIONS <span
class="roman">environment variable</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-group-separator">group
separator</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-group-separator-1">group
separator</a>:</td><td> </td><td valign="top"><a
href="#Context-Line-Control">Context Line Control</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-H">H</a></th><td></td><td></td></tr>
+<tr><th id="Index_cp_letter-H">H</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-hexadecimal-digits">hexadecimal
digits</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-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><th id="Index_cp_letter-I">I</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>
-<tr><td></td><td valign="top"><a
href="#index-interval-specifications">interval
specifications</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-interval-expressions">interval
expressions</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-interval-expressions-1">interval
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-invert-matching">invert
matching</a>:</td><td> </td><td valign="top"><a
href="#Matching-Control">Matching Control</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-L">L</a></th><td></td><td></td></tr>
+<tr><th id="Index_cp_letter-L">L</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a
href="#index-LANG-environment-variable"><code>LANG <span
class="roman">environment variable</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-LANG-environment-variable-1"><code>LANG <span
class="roman">environment variable</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-LANG-environment-variable-2"><code>LANG <span
class="roman">environment variable</span></code></a>:</td><td> </td><td
valign="top"><a href="#Environment-Variables">Environment
Variables</a></td></tr>
@@ -3151,7 +3038,7 @@
<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>
-<tr><th><a name="Index_cp_letter-M">M</a></th><td></td><td></td></tr>
+<tr><th id="Index_cp_letter-M">M</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a
href="#index-match-expression-at-most-m-times">match expression at most
<var>m</var> times</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-match-expression-at-most-once">match expression at most
once</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-match-expression-from-n-to-m-times">match expression from
<var>n</var> to <var>m</var> times</a>:</td><td> </td><td valign="top"><a
href="#Fundamental-Structure">Fundamental Structure</a></td></tr>
@@ -3172,7 +3059,7 @@
<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>
+<tr><th id="Index_cp_letter-N">N</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-names-of-matching-files">names
of matching files</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-national-language-support">national language
support</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-national-language-support-1">national language
support</a>:</td><td> </td><td valign="top"><a
href="#Environment-Variables">Environment Variables</a></td></tr>
@@ -3184,11 +3071,12 @@
<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><th id="Index_cp_letter-O">O</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></td><td valign="top"><a href="#index-ordinary-characters">ordinary
characters</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-P">P</a></th><td></td><td></td></tr>
+<tr><th id="Index_cp_letter-P">P</th><td></td><td></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>
@@ -3201,11 +3089,11 @@
<tr><td></td><td valign="top"><a
href="#index-punct-character-class"><code>punct <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-punctuation-characters">punctuation
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-Q">Q</a></th><td></td><td></td></tr>
+<tr><th id="Index_cp_letter-Q">Q</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-question-mark">question
mark</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-quiet_002c-silent">quiet,
silent</a>:</td><td> </td><td valign="top"><a
href="#General-Output-Control">General Output Control</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-R">R</a></th><td></td><td></td></tr>
+<tr><th id="Index_cp_letter-R">R</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-range-expression">range
expression</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-recursive-search">recursive
search</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-recursive-search-1">recursive
search</a>:</td><td> </td><td valign="top"><a
href="#File-and-Directory-Selection">File and Directory Selection</a></td></tr>
@@ -3213,7 +3101,7 @@
<tr><td></td><td valign="top"><a href="#index-return-status">return
status</a>:</td><td> </td><td valign="top"><a href="#Exit-Status">Exit
Status</a></td></tr>
<tr><td></td><td valign="top"><a
href="#index-rv-GREP_005fCOLORS-capability"><code>rv 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-S">S</a></th><td></td><td></td></tr>
+<tr><th id="Index_cp_letter-S">S</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a
href="#index-searching-directory-trees">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-1">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-2">searching directory
trees</a>:</td><td> </td><td valign="top"><a
href="#File-and-Directory-Selection">File and Directory Selection</a></td></tr>
@@ -3223,6 +3111,7 @@
<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>
+<tr><td></td><td valign="top"><a href="#index-special-characters">special
characters</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-subexpression">subexpression</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-suppress-binary-data">suppress
binary data</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-suppress-error-messages">suppress error
messages</a>:</td><td> </td><td valign="top"><a
href="#General-Output-Control">General Output Control</a></td></tr>
@@ -3230,30 +3119,30 @@
<tr><td></td><td valign="top"><a href="#index-symbolic-links-1">symbolic
links</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-symbolic-links-2">symbolic
links</a>:</td><td> </td><td valign="top"><a
href="#File-and-Directory-Selection">File and Directory Selection</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-T">T</a></th><td></td><td></td></tr>
+<tr><th id="Index_cp_letter-T">T</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a
href="#index-tab_002daligned-content-lines">tab-aligned content
lines</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-translation-of-message-language">translation of message
language</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-U">U</a></th><td></td><td></td></tr>
+<tr><th id="Index_cp_letter-U">U</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a
href="#index-upper-character-class"><code>upper <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-upper_002dcase-letters">upper-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></td><td valign="top"><a
href="#index-usage-summary_002c-printing">usage summary,
printing</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-usage_002c-examples">usage,
examples</a>:</td><td> </td><td valign="top"><a
href="#Usage">Usage</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-using-grep_002c-Q_0026A">using
<code>grep</code>, Q&A</a>:</td><td> </td><td valign="top"><a
href="#Usage">Usage</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-V">V</a></th><td></td><td></td></tr>
+<tr><th id="Index_cp_letter-V">V</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-variants-of-grep">variants of
<code>grep</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-version_002c-printing">version,
printing</a>:</td><td> </td><td valign="top"><a
href="#Generic-Program-Information">Generic Program Information</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-W">W</a></th><td></td><td></td></tr>
+<tr><th id="Index_cp_letter-W">W</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a
href="#index-whitespace-characters">whitespace
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-with-filename-prefix">with
filename prefix</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-X">X</a></th><td></td><td></td></tr>
+<tr><th id="Index_cp_letter-X">X</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a
href="#index-xdigit-character-class"><code>xdigit <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-xdigit-class">xdigit
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 colspan="4"> <hr></td></tr>
-<tr><th><a name="Index_cp_letter-Z">Z</a></th><td></td><td></td></tr>
+<tr><th id="Index_cp_letter-Z">Z</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a
href="#index-zero_002dterminated-file-names">zero-terminated file
names</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-zero_002dterminated-lines">zero-terminated
lines</a>:</td><td> </td><td valign="top"><a href="#Other-Options">Other
Options</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
@@ -3321,15 +3210,16 @@
</td></tr></table>
+</div>
+</div>
<div class="footnote">
<hr>
<h4 class="footnotes-heading">Footnotes</h4>
-<h3><a name="FOOT1" href="#DOCF1">(1)</a></h3>
+<h5><a id="FOOT1" href="#DOCF1">(1)</a></h5>
<p>Of course, 7th Edition
Unix predated POSIX by several years!</p>
</div>
-<hr>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Changes to grep/manual/grep.html,v,
Jim Meyering <=