[Top][All Lists]
[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: |
Fri, 02 Mar 2012 09:28:41 +0000 |
CVSROOT: /webcvs/grep
Module name: grep
Changes by: Jim Meyering <meyering> 12/03/02 09:28:32
Index: html_node/General-Output-Control.html
===================================================================
RCS file: /webcvs/grep/grep/manual/html_node/General-Output-Control.html,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- html_node/General-Output-Control.html 25 Jun 2011 09:28:45 -0000
1.9
+++ html_node/General-Output-Control.html 2 Mar 2012 09:28:29 -0000
1.10
@@ -1,8 +1,8 @@
<html lang="en">
<head>
-<title>General Output Control - GNU Grep 2.9</title>
+<title>General Output Control - GNU Grep 2.11</title>
<meta http-equiv="Content-Type" content="text/html">
-<meta name="description" content="GNU Grep 2.9">
+<meta name="description" content="GNU Grep 2.11">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Command_002dline-Options.html#Command_002dline-Options"
title="Command-line Options">
@@ -12,7 +12,8 @@
<!--
This manual is for `grep', a pattern matching engine.
-Copyright (C) 1999-2002, 2005, 2008-2011 Free Software Foundation, Inc.
+Copyright (C) 1999-2002, 2005, 2008-2012 Free Software Foundation,
+Inc.
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License,
@@ -47,38 +48,38 @@
<h4 class="subsection">2.1.3 General Output Control</h4>
<dl>
-<dt>‘<samp><span
class="samp">-c</span></samp>’<dt>‘<samp><span
class="samp">--count</span></samp>’<dd><a
name="index-g_t_002dc-27"></a><a name="index-g_t_002d_002dcount-28"></a><a
name="index-counting-lines-29"></a>Suppress normal output;
+<dt><samp><span class="option">-c</span></samp><dt><samp><span
class="option">--count</span></samp><dd><a name="index-g_t_002dc-27"></a><a
name="index-g_t_002d_002dcount-28"></a><a
name="index-counting-lines-29"></a>Suppress normal output;
instead print a count of matching lines for each input file.
-With the ‘<samp><span class="samp">-v</span></samp>’,
‘<samp><span class="samp">--invert-match</span></samp>’ option,
+With the <samp><span class="option">-v</span></samp> (<samp><span
class="option">--invert-match</span></samp>) option,
count non-matching lines.
-(‘<samp><span class="samp">-c</span></samp>’ is specified by <span
class="sc">posix</span>.)
+(<samp><span class="option">-c</span></samp> is specified by POSIX.)
- <br><dt>‘<samp><span
class="samp">--color[=</span><var>WHEN</var><span
class="samp">]</span></samp>’<dt>‘<samp><span
class="samp">--colour[=</span><var>WHEN</var><span
class="samp">]</span></samp>’<dd><a
name="index-g_t_002d_002dcolor-30"></a><a
name="index-g_t_002d_002dcolour-31"></a><a
name="index-highlight_002c-color_002c-colour-32"></a>Surround the matched
(non-empty) strings, matching lines, context lines,
+ <br><dt><samp><span class="option">--color[=</span><var>WHEN</var><span
class="option">]</span></samp><dt><samp><span
class="option">--colour[=</span><var>WHEN</var><span
class="option">]</span></samp><dd><a name="index-g_t_002d_002dcolor-30"></a><a
name="index-g_t_002d_002dcolour-31"></a><a
name="index-highlight_002c-color_002c-colour-32"></a>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
on the terminal.
-The colors are defined by the environment variable <var>GREP_COLORS</var>
+The colors are defined by the environment variable <samp><span
class="env">GREP_COLORS</span></samp>
and default to ‘<samp><span
class="samp">ms=01;31:mc=01;31:sl=:cx=:fn=35:ln=32:bn=32:se=36</span></samp>’
for bold red matched text, magenta file names, green line numbers,
green byte offsets, cyan separators, and default terminal colors otherwise.
-The deprecated environment variable <var>GREP_COLOR</var> is still supported,
+The deprecated environment variable <samp><span
class="env">GREP_COLOR</span></samp> is still supported,
but its setting does not have priority;
it defaults to `01;31' (bold red)
which only covers the color for matched text.
<var>WHEN</var> is ‘<samp><span class="samp">never</span></samp>’,
‘<samp><span class="samp">always</span></samp>’, or
‘<samp><span class="samp">auto</span></samp>’.
- <br><dt>‘<samp><span
class="samp">-L</span></samp>’<dt>‘<samp><span
class="samp">--files-without-match</span></samp>’<dd><a
name="index-g_t_002dL-33"></a><a
name="index-g_t_002d_002dfiles_002dwithout_002dmatch-34"></a><a
name="index-files-which-don_0027t-match-35"></a>Suppress normal output;
+ <br><dt><samp><span class="option">-L</span></samp><dt><samp><span
class="option">--files-without-match</span></samp><dd><a
name="index-g_t_002dL-33"></a><a
name="index-g_t_002d_002dfiles_002dwithout_002dmatch-34"></a><a
name="index-files-which-don_0027t-match-35"></a>Suppress normal output;
instead print the name of each input file from which
no output would normally have been printed.
-The scanning of every file will stop on the first match.
+The scanning of each file stops on the first match.
- <br><dt>‘<samp><span
class="samp">-l</span></samp>’<dt>‘<samp><span
class="samp">--files-with-matches</span></samp>’<dd><a
name="index-g_t_002dl-36"></a><a
name="index-g_t_002d_002dfiles_002dwith_002dmatches-37"></a><a
name="index-names-of-matching-files-38"></a>Suppress normal output;
+ <br><dt><samp><span class="option">-l</span></samp><dt><samp><span
class="option">--files-with-matches</span></samp><dd><a
name="index-g_t_002dl-36"></a><a
name="index-g_t_002d_002dfiles_002dwith_002dmatches-37"></a><a
name="index-names-of-matching-files-38"></a>Suppress normal output;
instead print the name of each input file from which
output would normally have been printed.
-The scanning of every file will stop on the first match.
-(‘<samp><span class="samp">-l</span></samp>’ is specified by <span
class="sc">posix</span>.)
+The scanning of each file stops on the first match.
+(<samp><span class="option">-l</span></samp> is specified by POSIX.)
- <br><dt>‘<samp><span class="samp">-m
</span><var>num</var></samp>’<dt>‘<samp><span
class="samp">--max-count=</span><var>num</var></samp>’<dd><a
name="index-g_t_002dm-39"></a><a
name="index-g_t_002d_002dmax_002dcount-40"></a><a
name="index-max_002dcount-41"></a>Stop reading a file after <var>num</var>
matching lines.
+ <br><dt><samp><span class="option">-m
</span><var>num</var></samp><dt><samp><span
class="option">--max-count=</span><var>num</var></samp><dd><a
name="index-g_t_002dm-39"></a><a
name="index-g_t_002d_002dmax_002dcount-40"></a><a
name="index-max_002dcount-41"></a>Stop reading a file after <var>num</var>
matching lines.
If the input is standard input from a regular file,
and <var>num</var> matching lines are output,
<samp><span class="command">grep</span></samp> ensures that the standard input
is positioned
@@ -106,35 +107,42 @@
it outputs any trailing context lines.
Since context does not include matching lines,
<samp><span class="command">grep</span></samp> will stop when it encounters
another matching line.
-When the ‘<samp><span class="samp">-c</span></samp>’ or
‘<samp><span class="samp">--count</span></samp>’ option is also
used,
+When the <samp><span class="option">-c</span></samp> or <samp><span
class="option">--count</span></samp> option is also used,
<samp><span class="command">grep</span></samp> does not output a count greater
than <var>num</var>.
-When the ‘<samp><span class="samp">-v</span></samp>’ or
‘<samp><span class="samp">--invert-match</span></samp>’ option is
also used,
+When the <samp><span class="option">-v</span></samp> or <samp><span
class="option">--invert-match</span></samp> option is also used,
<samp><span class="command">grep</span></samp> stops after outputting
<var>num</var> non-matching lines.
- <br><dt>‘<samp><span
class="samp">-o</span></samp>’<dt>‘<samp><span
class="samp">--only-matching</span></samp>’<dd><a
name="index-g_t_002do-42"></a><a
name="index-g_t_002d_002donly_002dmatching-43"></a><a
name="index-only-matching-44"></a>Print only the matched (non-empty) parts of
matching lines,
+ <br><dt><samp><span class="option">-o</span></samp><dt><samp><span
class="option">--only-matching</span></samp><dd><a
name="index-g_t_002do-42"></a><a
name="index-g_t_002d_002donly_002dmatching-43"></a><a
name="index-only-matching-44"></a>Print only the matched (non-empty) parts of
matching lines,
with each such part on a separate output line.
- <br><dt>‘<samp><span
class="samp">-q</span></samp>’<dt>‘<samp><span
class="samp">--quiet</span></samp>’<dt>‘<samp><span
class="samp">--silent</span></samp>’<dd><a
name="index-g_t_002dq-45"></a><a name="index-g_t_002d_002dquiet-46"></a><a
name="index-g_t_002d_002dsilent-47"></a><a
name="index-quiet_002c-silent-48"></a>Quiet; do not write anything to standard
output.
+ <br><dt><samp><span class="option">-q</span></samp><dt><samp><span
class="option">--quiet</span></samp><dt><samp><span
class="option">--silent</span></samp><dd><a name="index-g_t_002dq-45"></a><a
name="index-g_t_002d_002dquiet-46"></a><a
name="index-g_t_002d_002dsilent-47"></a><a
name="index-quiet_002c-silent-48"></a>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><span class="samp">-s</span></samp>’ or
‘<samp><span class="samp">--no-messages</span></samp>’ option.
-(‘<samp><span class="samp">-q</span></samp>’ is specified by <span
class="sc">posix</span>.)
+Also see the <samp><span class="option">-s</span></samp> or <samp><span
class="option">--no-messages</span></samp> option.
+(<samp><span class="option">-q</span></samp> is specified by POSIX.)
- <br><dt>‘<samp><span
class="samp">-s</span></samp>’<dt>‘<samp><span
class="samp">--no-messages</span></samp>’<dd><a
name="index-g_t_002ds-49"></a><a
name="index-g_t_002d_002dno_002dmessages-50"></a><a
name="index-suppress-error-messages-51"></a>Suppress error messages about
nonexistent or unreadable files.
+ <br><dt><samp><span class="option">-s</span></samp><dt><samp><span
class="option">--no-messages</span></samp><dd><a
name="index-g_t_002ds-49"></a><a
name="index-g_t_002d_002dno_002dmessages-50"></a><a
name="index-suppress-error-messages-51"></a>Suppress error messages about
nonexistent or unreadable files.
Portability note:
-unlike <span class="sc">gnu</span> <samp><span
class="command">grep</span></samp>,
-7th Edition Unix <samp><span class="command">grep</span></samp> did not
conform to <span class="sc">posix</span>,
-because it lacked ‘<samp><span class="samp">-q</span></samp>’
-and its ‘<samp><span class="samp">-s</span></samp>’ option behaved
like
-<span class="sc">gnu</span> <samp><span class="command">grep</span></samp>'s
‘<samp><span class="samp">-q</span></samp>’ option.
-<span class="sc">usg</span>-style <samp><span
class="command">grep</span></samp> also lacked ‘<samp><span
class="samp">-q</span></samp>’
-but its ‘<samp><span class="samp">-s</span></samp>’ option behaved
like <span class="sc">gnu</span> <samp><span
class="command">grep</span></samp>'s.
+unlike GNU <samp><span class="command">grep</span></samp>,
+7th Edition Unix <samp><span class="command">grep</span></samp> did not
conform to POSIX,
+because it lacked <samp><span class="option">-q</span></samp>
+and its <samp><span class="option">-s</span></samp> option behaved like
+GNU <samp><span class="command">grep</span></samp>'s <samp><span
class="option">-q</span></samp> option.<a rel="footnote" href="#fn-1"
name="fnd-1"><sup>1</sup></a>
+USG-style <samp><span class="command">grep</span></samp> also lacked
<samp><span class="option">-q</span></samp>
+but its <samp><span class="option">-s</span></samp> option behaved like GNU
<samp><span class="command">grep</span></samp>'s.
Portable shell scripts should avoid both
-‘<samp><span class="samp">-q</span></samp>’ and ‘<samp><span
class="samp">-s</span></samp>’ and should redirect
+<samp><span class="option">-q</span></samp> and <samp><span
class="option">-s</span></samp> and should redirect
standard and error output to <samp><span class="file">/dev/null</span></samp>
instead.
-(‘<samp><span class="samp">-s</span></samp>’ is specified by <span
class="sc">posix</span>.)
+(<samp><span class="option">-s</span></samp> is specified by POSIX.)
</dl>
+ <div class="footnote">
+<hr>
+<h4>Footnotes</h4><p class="footnote"><small>[<a name="fn-1"
href="#fnd-1">1</a>]</small> Of course, 7th Edition
+Unix predated POSIX by several years!</p>
+
+ <hr></div>
+
</body></html>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Changes to grep/manual/html_node/General-Output-Control.html,v,
Jim Meyering <=