[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Changes to grep/manual/html_node/Context-Line-Control.html,v
From: |
Jim Meyering |
Subject: |
Changes to grep/manual/html_node/Context-Line-Control.html,v |
Date: |
Fri, 02 Mar 2012 09:28:38 +0000 |
CVSROOT: /webcvs/grep
Module name: grep
Changes by: Jim Meyering <meyering> 12/03/02 09:28:32
Index: html_node/Context-Line-Control.html
===================================================================
RCS file: /webcvs/grep/grep/manual/html_node/Context-Line-Control.html,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- html_node/Context-Line-Control.html 25 Jun 2011 09:28:45 -0000 1.9
+++ html_node/Context-Line-Control.html 2 Mar 2012 09:28:26 -0000 1.10
@@ -1,8 +1,8 @@
<html lang="en">
<head>
-<title>Context Line Control - GNU Grep 2.9</title>
+<title>Context Line 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,
@@ -48,40 +49,52 @@
<p>Regardless of how these options are set,
<samp><span class="command">grep</span></samp> will never print any given line
more than once.
-If the ‘<samp><span class="samp">-o</span></samp>’ or
‘<samp><span class="samp">--only-matching</span></samp>’ option is
specified,
+If the <samp><span class="option">-o</span></samp> (<samp><span
class="option">--only-matching</span></samp>) option is specified,
these options have no effect and a warning is given upon their use.
<dl>
-<dt>‘<samp><span class="samp">-A
</span><var>num</var></samp>’<dt>‘<samp><span
class="samp">--after-context=</span><var>num</var></samp>’<dd><a
name="index-g_t_002dA-76"></a><a
name="index-g_t_002d_002dafter_002dcontext-77"></a><a
name="index-after-context-78"></a><a
name="index-context-lines_002c-after-match-79"></a>Print <var>num</var> lines
of trailing context after matching lines.
+<dt><samp><span class="option">-A </span><var>num</var></samp><dt><samp><span
class="option">--after-context=</span><var>num</var></samp><dd><a
name="index-g_t_002dA-76"></a><a
name="index-g_t_002d_002dafter_002dcontext-77"></a><a
name="index-after-context-78"></a><a
name="index-context-lines_002c-after-match-79"></a>Print <var>num</var> lines
of trailing context after matching lines.
- <br><dt>‘<samp><span class="samp">-B
</span><var>num</var></samp>’<dt>‘<samp><span
class="samp">--before-context=</span><var>num</var></samp>’<dd><a
name="index-g_t_002dB-80"></a><a
name="index-g_t_002d_002dbefore_002dcontext-81"></a><a
name="index-before-context-82"></a><a
name="index-context-lines_002c-before-match-83"></a>Print <var>num</var> lines
of leading context before matching lines.
+ <br><dt><samp><span class="option">-B
</span><var>num</var></samp><dt><samp><span
class="option">--before-context=</span><var>num</var></samp><dd><a
name="index-g_t_002dB-80"></a><a
name="index-g_t_002d_002dbefore_002dcontext-81"></a><a
name="index-before-context-82"></a><a
name="index-context-lines_002c-before-match-83"></a>Print <var>num</var> lines
of leading context before matching lines.
- <br><dt>‘<samp><span class="samp">-C
</span><var>num</var></samp>’<dt>‘<samp><span
class="samp">-</span><var>num</var></samp>’<dt>‘<samp><span
class="samp">--context=</span><var>num</var></samp>’<dd><a
name="index-g_t_002dC-84"></a><a name="index-g_t_002d_002dcontext-85"></a><a
name="index-g_t_002d_0040var_007bnum_007d-86"></a><a
name="index-context-87"></a>Print <var>num</var> lines of leading and trailing
output context.
+ <br><dt><samp><span class="option">-C
</span><var>num</var></samp><dt><samp><span
class="option">-</span><var>num</var></samp><dt><samp><span
class="option">--context=</span><var>num</var></samp><dd><a
name="index-g_t_002dC-84"></a><a name="index-g_t_002d_002dcontext-85"></a><a
name="index-g_t_002d_0040var_007bnum_007d-86"></a><a
name="index-context-87"></a>Print <var>num</var> lines of leading and trailing
output context.
- <br><dt>‘<samp><span
class="samp">--group-separator=</span><var>string</var></samp>’<dd><a
name="index-g_t_002d_002dgroup_002dseparator-88"></a><a
name="index-group-separator-89"></a>When <samp><span
class="option">-A</span></samp>, <samp><span class="option">-B</span></samp> or
<samp><span class="option">-C</span></samp> are in use,
-print <var>string</var> instead of ‘<samp><span
class="samp">--</span></samp>’ around disjoint groups
+ <br><dt><samp><span
class="option">--group-separator=</span><var>string</var></samp><dd><a
name="index-g_t_002d_002dgroup_002dseparator-88"></a><a
name="index-group-separator-89"></a>When <samp><span
class="option">-A</span></samp>, <samp><span class="option">-B</span></samp> or
<samp><span class="option">-C</span></samp> are in use,
+print <var>string</var> instead of <samp><span class="option">--</span></samp>
around disjoint groups
of lines.
- <br><dt>‘<samp><span
class="samp">--no-group-separator</span></samp>’<dd><a
name="index-g_t_002d_002dgroup_002dseparator-90"></a><a
name="index-group-separator-91"></a>When <samp><span
class="option">-A</span></samp>, <samp><span class="option">-B</span></samp> or
<samp><span class="option">-C</span></samp> are in use,
+ <br><dt><samp><span
class="option">--no-group-separator</span></samp><dd><a
name="index-g_t_002d_002dgroup_002dseparator-90"></a><a
name="index-group-separator-91"></a>When <samp><span
class="option">-A</span></samp>, <samp><span class="option">-B</span></samp> or
<samp><span class="option">-C</span></samp> are in use,
print disjoint groups of lines adjacent to each other.
</dl>
- <p>Matching lines normally use ‘<samp><span
class="samp">:</span></samp>’ as a separator
+ <p>Here are some points about how <samp><span
class="command">grep</span></samp> chooses
+the separator to print between prefix fields and line content:
+
+ <ul>
+<li>Matching lines normally use ‘<samp><span
class="samp">:</span></samp>’ as a separator
between prefix fields and actual line content.
-Context (i.e., non-matching) lines use ‘<samp><span
class="samp">-</span></samp>’ instead.
-When no context is specified,
+
+ <li>Context (i.e., non-matching) lines use ‘<samp><span
class="samp">-</span></samp>’ instead.
+
+ <li>When no context is specified,
matching lines are simply output one right after another.
-When nonzero context is specified,
+
+ <li>When nonzero context is specified,
lines that are adjacent in the input form a group
and are output one right after another, while
a separator appears by default between disjoint groups on a line
-of its own and without any prefix. The default separator
+of its own and without any prefix.
+
+ <li>The default separator
is ‘<samp><span class="samp">--</span></samp>’, however whether to
include it and its appearance
-can be changed with the options above. Each group may contain
+can be changed with the options above.
+
+ <li>Each group may contain
several matching lines when they are close enough to each other
that two otherwise adjacent but divided groups connect
and can just merge into a single contiguous one.
+</ul>
</body></html>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Changes to grep/manual/html_node/Context-Line-Control.html,v,
Jim Meyering <=