[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: |
Sat, 14 Aug 2021 16:46:43 -0400 (EDT) |
CVSROOT: /webcvs/grep
Module name: grep
Changes by: Jim Meyering <meyering> 21/08/14 16:46:41
Index: html_node/General-Output-Control.html
===================================================================
RCS file: /webcvs/grep/grep/manual/html_node/General-Output-Control.html,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- html_node/General-Output-Control.html 28 Sep 2020 03:36:49 -0000
1.31
+++ html_node/General-Output-Control.html 14 Aug 2021 20:46:40 -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,70 +14,59 @@
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>General Output Control (GNU Grep 3.5)</title>
+<title>General Output Control (GNU Grep 3.7)</title>
-<meta name="description" content="General Output Control (GNU Grep 3.5)">
-<meta name="keywords" content="General Output Control (GNU Grep 3.5)">
+<meta name="description" content="General Output Control (GNU Grep 3.7)">
+<meta name="keywords" content="General Output Control (GNU Grep 3.7)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
-<link href="index.html#Top" rel="start" title="Top">
-<link href="Index.html#Index" rel="index" title="Index">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+
+<link href="index.html" rel="start" title="Top">
+<link href="Index.html" rel="index" title="Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
-<link href="Command_002dline-Options.html#Command_002dline-Options" rel="up"
title="Command-line Options">
-<link href="Output-Line-Prefix-Control.html#Output-Line-Prefix-Control"
rel="next" title="Output Line Prefix Control">
-<link href="Matching-Control.html#Matching-Control" rel="prev" title="Matching
Control">
+<link href="Command_002dline-Options.html" rel="up" title="Command-line
Options">
+<link href="Output-Line-Prefix-Control.html" rel="next" title="Output Line
Prefix Control">
+<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}
-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">
-<a name="General-Output-Control"></a>
+<div class="subsection" id="General-Output-Control">
<div class="header">
<p>
-Next: <a href="Output-Line-Prefix-Control.html#Output-Line-Prefix-Control"
accesskey="n" rel="next">Output Line Prefix Control</a>, Previous: <a
href="Matching-Control.html#Matching-Control" accesskey="p" rel="prev">Matching
Control</a>, Up: <a
href="Command_002dline-Options.html#Command_002dline-Options" accesskey="u"
rel="up">Command-line Options</a> [<a href="index.html#SEC_Contents"
title="Table of contents" rel="contents">Contents</a>][<a
href="Index.html#Index" title="Index" rel="index">Index</a>]</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> [<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>
-<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,
@@ -82,11 +74,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
@@ -102,34 +93,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,
@@ -158,7 +145,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,
@@ -167,24 +154,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.html#Other-Options">Other Options</a>).
+bytes if <samp>-z</samp> (<samp>--null-data</samp>) is also used (see <a
href="Other-Options.html">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.
@@ -192,18 +177,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
@@ -214,18 +198,19 @@
</dd>
</dl>
+</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>
<div class="header">
<p>
-Next: <a href="Output-Line-Prefix-Control.html#Output-Line-Prefix-Control"
accesskey="n" rel="next">Output Line Prefix Control</a>, Previous: <a
href="Matching-Control.html#Matching-Control" accesskey="p" rel="prev">Matching
Control</a>, Up: <a
href="Command_002dline-Options.html#Command_002dline-Options" accesskey="u"
rel="up">Command-line Options</a> [<a href="index.html#SEC_Contents"
title="Table of contents" rel="contents">Contents</a>][<a
href="Index.html#Index" title="Index" rel="index">Index</a>]</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> [<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>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Changes to grep/manual/html_node/General-Output-Control.html,v,
Jim Meyering <=