grep-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Changes to grep/manual/html_node/General-Output-Control.html,v


From: Jim Meyering
Subject: Changes to grep/manual/html_node/General-Output-Control.html,v
Date: Wed, 22 Mar 2023 22:55:26 -0400 (EDT)

CVSROOT:        /webcvs/grep
Module name:    grep
Changes by:     Jim Meyering <meyering> 23/03/22 22:55:22

Index: html_node/General-Output-Control.html
===================================================================
RCS file: /webcvs/grep/grep/manual/html_node/General-Output-Control.html,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- html_node/General-Output-Control.html       3 Sep 2022 19:33:14 -0000       
1.33
+++ html_node/General-Output-Control.html       23 Mar 2023 02:55:21 -0000      
1.34
@@ -1,11 +1,11 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd";>
+<!DOCTYPE html>
 <html>
-<!-- Created by GNU Texinfo 6.8, https://www.gnu.org/software/texinfo/ -->
+<!-- Created by GNU Texinfo 7.0dev, 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-2022 Free Software Foundation,
+Copyright © 1999-2002, 2005, 2008-2023 Free Software Foundation,
 Inc.
 
 Permission is granted to copy, distribute and/or modify this document
@@ -14,10 +14,10 @@
 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". -->
-<title>General Output Control (GNU Grep 3.8)</title>
+<title>General Output Control (GNU Grep 3.10)</title>
 
-<meta name="description" content="General Output Control (GNU Grep 3.8)">
-<meta name="keywords" content="General Output Control (GNU Grep 3.8)">
+<meta name="description" content="General Output Control (GNU Grep 3.10)">
+<meta name="keywords" content="General Output Control (GNU Grep 3.10)">
 <meta name="resource-type" content="document">
 <meta name="distribution" content="global">
 <meta name="Generator" content="makeinfo">
@@ -31,21 +31,9 @@
 <link href="Matching-Control.html" rel="prev" title="Matching Control">
 <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}
-div.display {margin-left: 3.2em}
+a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
 div.example {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}
-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}
+span:hover a.copiable-link {visibility: visible}
 -->
 </style>
 <link rel="stylesheet" type="text/css" 
href="https://www.gnu.org/software/gnulib/manual.css";>
@@ -54,87 +42,92 @@
 </head>
 
 <body lang="en">
-<div class="subsection" id="General-Output-Control">
-<div class="header">
+<div class="subsection-level-extent" id="General-Output-Control">
+<div class="nav-panel">
 <p>
 Next: <a href="Output-Line-Prefix-Control.html" accesskey="n" 
rel="next">Output Line Prefix Control</a>, Previous: <a 
href="Matching-Control.html" accesskey="p" rel="prev">Matching Control</a>, Up: 
<a href="Command_002dline-Options.html" accesskey="u" rel="up">Command-line 
Options</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" 
rel="contents">Contents</a>][<a href="Index.html" title="Index" 
rel="index">Index</a>]</p>
 </div>
 <hr>
-<span id="General-Output-Control-1"></span><h4 class="subsection">2.1.3 
General Output Control</h4>
+<h4 class="subsection" id="General-Output-Control-1"><span>2.1.3 General 
Output Control<a class="copiable-link" href="#General-Output-Control-1"> 
&para;</a></span></h4>
 
-<dl compact="compact">
-<dt id='index-_002dc'><span><samp>-c</samp><a href='#index-_002dc' 
class='copiable-anchor'> &para;</a></span></dt>
-<dt><span><samp>--count</samp></span></dt>
-<dd><span id="index-_002d_002dcount"></span>
-<span id="index-counting-lines"></span>
+<dl class="table">
+<dt><samp class="option">-c</samp></dt>
+<dt><samp class="option">--count</samp></dt>
+<dd><a class="index-entry-id" id="index-_002dc"></a>
+<a class="index-entry-id" id="index-_002d_002dcount"></a>
+<a class="index-entry-id" id="index-counting-lines"></a>
 <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,
+With the <samp class="option">-v</samp> (<samp 
class="option">--invert-match</samp>) option,
 count non-matching lines.
-(<samp>-c</samp> is specified by POSIX.)
+(<samp class="option">-c</samp> is specified by POSIX.)
 </p>
 </dd>
-<dt id='index-_002d_002dcolor'><span><samp>--color[=<var>WHEN</var>]</samp><a 
href='#index-_002d_002dcolor' class='copiable-anchor'> &para;</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>
+<dt><samp class="option">--color[=<var class="var">WHEN</var>]</samp></dt>
+<dt><samp class="option">--colour[=<var class="var">WHEN</var>]</samp></dt>
+<dd><a class="index-entry-id" id="index-_002d_002dcolor"></a>
+<a class="index-entry-id" id="index-_002d_002dcolour"></a>
+<a class="index-entry-id" id="index-highlight_002c-color_002c-colour"></a>
 <p>Surround 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
 on the terminal.
-The colors are defined by the environment variable <code>GREP_COLORS</code>
-and default to 
&lsquo;<samp>ms=01;31:mc=01;31:sl=:cx=:fn=35:ln=32:bn=32:se=36</samp>&rsquo;
+The colors are defined by the environment variable <code 
class="env">GREP_COLORS</code>
+and default to &lsquo;<samp 
class="samp">ms=01;31:mc=01;31:sl=:cx=:fn=35:ln=32:bn=32:se=36</samp>&rsquo;
 for bold red matched text, magenta file names, green line numbers,
 green byte offsets, cyan separators, and default terminal colors otherwise.
-See <a href="Environment-Variables.html">Environment Variables</a>.
+See <a class="xref" href="Environment-Variables.html">Environment 
Variables</a>.
 </p>
-<p><var>WHEN</var> is &lsquo;<samp>always</samp>&rsquo; to use colors, 
&lsquo;<samp>never</samp>&rsquo; to not use
-colors, or &lsquo;<samp>auto</samp>&rsquo; to use colors if standard output is 
associated
-with a terminal device and the <code>TERM</code> environment variable&rsquo;s 
value
+<p><var class="var">WHEN</var> is &lsquo;<samp 
class="samp">always</samp>&rsquo; to use colors, &lsquo;<samp 
class="samp">never</samp>&rsquo; to not use
+colors, or &lsquo;<samp class="samp">auto</samp>&rsquo; to use colors if 
standard output is associated
+with a terminal device and the <code class="env">TERM</code> environment 
variable&rsquo;s value
 suggests that the terminal supports colors.
-Plain <samp>--color</samp> is treated like <samp>--color=auto</samp>;
-if no <samp>--color</samp> option is given, the default is 
<samp>--color=never</samp>.
+Plain <samp class="option">--color</samp> is treated like <samp 
class="option">--color=auto</samp>;
+if no <samp class="option">--color</samp> option is given, the default is 
<samp class="option">--color=never</samp>.
 </p>
 </dd>
-<dt id='index-_002dL'><span><samp>-L</samp><a href='#index-_002dL' 
class='copiable-anchor'> &para;</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>
+<dt><samp class="option">-L</samp></dt>
+<dt><samp class="option">--files-without-match</samp></dt>
+<dd><a class="index-entry-id" id="index-_002dL"></a>
+<a class="index-entry-id" id="index-_002d_002dfiles_002dwithout_002dmatch"></a>
+<a class="index-entry-id" id="index-files-which-don_0027t-match"></a>
 <p>Suppress normal output;
 instead print the name of each input file from which
 no output would normally have been printed.
 </p>
 </dd>
-<dt id='index-_002dl'><span><samp>-l</samp><a href='#index-_002dl' 
class='copiable-anchor'> &para;</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>
+<dt><samp class="option">-l</samp></dt>
+<dt><samp class="option">--files-with-matches</samp></dt>
+<dd><a class="index-entry-id" id="index-_002dl"></a>
+<a class="index-entry-id" id="index-_002d_002dfiles_002dwith_002dmatches"></a>
+<a class="index-entry-id" id="index-names-of-matching-files"></a>
 <p>Suppress normal output;
 instead print the name of each input file from which
 output would normally have been printed.
 Scanning each input file stops upon first match.
-(<samp>-l</samp> is specified by POSIX.)
+(<samp class="option">-l</samp> is specified by POSIX.)
 </p>
 </dd>
-<dt id='index-_002dm'><span><samp>-m <var>num</var></samp><a 
href='#index-_002dm' class='copiable-anchor'> &para;</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 <var>num</var> is zero, <code>grep</code> stops right away without reading 
input.
-A <var>num</var> of -1 is treated as infinity and <code>grep</code>
+<dt><samp class="option">-m <var class="var">num</var></samp></dt>
+<dt><samp class="option">--max-count=<var class="var">num</var></samp></dt>
+<dd><a class="index-entry-id" id="index-_002dm"></a>
+<a class="index-entry-id" id="index-_002d_002dmax_002dcount"></a>
+<a class="index-entry-id" id="index-max_002dcount"></a>
+<p>Stop after the first <var class="var">num</var> selected lines.
+If <var class="var">num</var> is zero, <code class="command">grep</code> stops 
right away without reading input.
+A <var class="var">num</var> of &minus;1 is treated as infinity and <code 
class="command">grep</code>
 does not stop; this is the default.
 </p>
 <p>If the input is standard input from a regular file,
-and <var>num</var> selected lines are output,
-<code>grep</code> ensures that the standard input is positioned
+and <var class="var">num</var> selected lines are output,
+<code class="command">grep</code> ensures that the standard input is positioned
 just after the last selected line before exiting,
 regardless of the presence of trailing context lines.
 This enables a calling process to resume a search.
 For example, the following shell script makes use of it:
 </p>
 <div class="example">
-<pre class="example">while grep -m 1 'PATTERN'
+<pre class="example-preformatted">while grep -m 1 'PATTERN'
 do
   echo xxxx
 done &lt; FILE
@@ -144,7 +137,7 @@
 file:
 </p>
 <div class="example">
-<pre class="example"># This probably will not work.
+<pre class="example-preformatted"># This probably will not work.
 cat FILE |
 while grep -m 1 'PATTERN'
 do
@@ -152,54 +145,57 @@
 done
 </pre></div>
 
-<span id="index-context-lines"></span>
-<p>When <code>grep</code> stops after <var>num</var> selected lines,
+<a class="index-entry-id" id="index-context-lines"></a>
+<p>When <code class="command">grep</code> stops after <var 
class="var">num</var> selected lines,
 it outputs any trailing context lines.
-When the <samp>-c</samp> or <samp>--count</samp> option is also used,
-<code>grep</code> does not output a count greater than <var>num</var>.
-When the <samp>-v</samp> or <samp>--invert-match</samp> option is also used,
-<code>grep</code> stops after outputting <var>num</var> non-matching lines.
+When the <samp class="option">-c</samp> or <samp class="option">--count</samp> 
option is also used,
+<code class="command">grep</code> does not output a count greater than <var 
class="var">num</var>.
+When the <samp class="option">-v</samp> or <samp 
class="option">--invert-match</samp> option is also used,
+<code class="command">grep</code> stops after outputting <var 
class="var">num</var> non-matching lines.
 </p>
 </dd>
-<dt id='index-_002do'><span><samp>-o</samp><a href='#index-_002do' 
class='copiable-anchor'> &para;</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>
+<dt><samp class="option">-o</samp></dt>
+<dt><samp class="option">--only-matching</samp></dt>
+<dd><a class="index-entry-id" id="index-_002do"></a>
+<a class="index-entry-id" id="index-_002d_002donly_002dmatching"></a>
+<a class="index-entry-id" id="index-only-matching"></a>
 <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.html">Other Options</a>).
+bytes if <samp class="option">-z</samp> (<samp 
class="option">--null-data</samp>) is also used (see <a class="pxref" 
href="Other-Options.html">Other Options</a>).
 </p>
 </dd>
-<dt id='index-_002dq'><span><samp>-q</samp><a href='#index-_002dq' 
class='copiable-anchor'> &para;</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>
+<dt><samp class="option">-q</samp></dt>
+<dt><samp class="option">--quiet</samp></dt>
+<dt><samp class="option">--silent</samp></dt>
+<dd><a class="index-entry-id" id="index-_002dq"></a>
+<a class="index-entry-id" id="index-_002d_002dquiet"></a>
+<a class="index-entry-id" id="index-_002d_002dsilent"></a>
+<a class="index-entry-id" id="index-quiet_002c-silent"></a>
 <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.
-Also see the <samp>-s</samp> or <samp>--no-messages</samp> option.
-Portability note: Solaris 10 <code>grep</code> lacks <samp>-q</samp>;
+Also see the <samp class="option">-s</samp> or <samp 
class="option">--no-messages</samp> option.
+Portability note: Solaris 10 <code class="command">grep</code> lacks <samp 
class="option">-q</samp>;
 portable shell scripts typically can redirect standard output to
-<samp>/dev/null</samp> instead of using <samp>-q</samp>.
-(<samp>-q</samp> is specified by POSIX.)
+<samp class="file">/dev/null</samp> instead of using <samp 
class="option">-q</samp>.
+(<samp class="option">-q</samp> is specified by POSIX.)
 </p>
 </dd>
-<dt id='index-_002ds'><span><samp>-s</samp><a href='#index-_002ds' 
class='copiable-anchor'> &para;</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>
+<dt><samp class="option">-s</samp></dt>
+<dt><samp class="option">--no-messages</samp></dt>
+<dd><a class="index-entry-id" id="index-_002ds"></a>
+<a class="index-entry-id" id="index-_002d_002dno_002dmessages"></a>
+<a class="index-entry-id" id="index-suppress-error-messages"></a>
 <p>Suppress error messages about nonexistent or unreadable files.
-(<samp>-s</samp> is specified by POSIX.)
+(<samp class="option">-s</samp> is specified by POSIX.)
 </p>
 </dd>
 </dl>
 
 </div>
 <hr>
-<div class="header">
+<div class="nav-panel">
 <p>
 Next: <a href="Output-Line-Prefix-Control.html">Output Line Prefix 
Control</a>, Previous: <a href="Matching-Control.html">Matching Control</a>, 
Up: <a href="Command_002dline-Options.html">Command-line Options</a> &nbsp; [<a 
href="index.html#SEC_Contents" title="Table of contents" 
rel="contents">Contents</a>][<a href="Index.html" title="Index" 
rel="index">Index</a>]</p>
 </div>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]