[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Changes to grep/manual/html_node/Output-Line-Prefix-Control.html,v
From: |
Jim Meyering |
Subject: |
Changes to grep/manual/html_node/Output-Line-Prefix-Control.html,v |
Date: |
Fri, 05 Feb 2016 00:45:05 +0000 |
CVSROOT: /webcvs/grep
Module name: grep
Changes by: Jim Meyering <meyering> 16/02/05 00:44:53
Index: html_node/Output-Line-Prefix-Control.html
===================================================================
RCS file: /webcvs/grep/grep/manual/html_node/Output-Line-Prefix-Control.html,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- html_node/Output-Line-Prefix-Control.html 2 Nov 2015 02:54:35 -0000
1.21
+++ html_node/Output-Line-Prefix-Control.html 5 Feb 2016 00:44:52 -0000
1.22
@@ -1,115 +1,194 @@
-<html lang="en">
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<!-- This manual is for grep, a pattern matching engine.
+
+Copyright (C) 1999-2002, 2005, 2008-2016 Free Software Foundation,
+Inc.
+
+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; with no
+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.0, http://www.gnu.org/software/texinfo/ -->
<head>
-<title>Output Line Prefix Control - GNU Grep 2.22</title>
+<title>GNU Grep 2.23: Output Line Prefix Control</title>
+
+<meta name="description" content="GNU Grep 2.23: Output Line Prefix Control">
+<meta name="keywords" content="GNU Grep 2.23: Output Line Prefix Control">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<meta name="description" content="GNU Grep 2.22">
-<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">
-<link rel="prev" href="General-Output-Control.html#General-Output-Control"
title="General Output Control">
-<link rel="next" href="Context-Line-Control.html#Context-Line-Control"
title="Context Line Control">
-<link href="http://www.gnu.org/software/texinfo/" rel="generator-home"
title="Texinfo Homepage">
+<link href="index.html#Top" rel="start" title="Top">
+<link href="Index.html#Index" 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="Context-Line-Control.html#Context-Line-Control" rel="next"
title="Context Line Control">
+<link href="General-Output-Control.html#General-Output-Control" rel="prev"
title="General Output Control">
+<style type="text/css">
<!--
-This manual is for `grep', a pattern matching engine.
+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.nocodebreak {white-space: nowrap}
+span.nolinebreak {white-space: nowrap}
+span.roman {font-family: serif; font-weight: normal}
+span.sansserif {font-family: sans-serif; font-weight: normal}
+ul.no-bullet {list-style: none}
+-->
+</style>
+<link rel="stylesheet" type="text/css" href="/software/gnulib/manual.css">
-Copyright (C) 1999-2002, 2005, 2008-2015 Free Software Foundation,
-Inc.
- 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; with no 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''.
- -->
-<meta http-equiv="Content-Style-Type" content="text/css">
-<style type="text/css"><!--
- pre.display { font-family:inherit }
- pre.format { font-family:inherit }
- pre.smalldisplay { font-family:inherit; font-size:smaller }
- pre.smallformat { font-family:inherit; font-size:smaller }
- pre.smallexample { font-size:smaller }
- pre.smalllisp { font-size:smaller }
- span.sc { font-variant:small-caps }
- span.roman { font-family:serif; font-weight:normal; }
- span.sansserif { font-family:sans-serif; font-weight:normal; }
---></style>
-<link rel="stylesheet" type="text/css" href="/software/gnulib/manual.css">
</head>
-<body>
-<div class="node">
+
+<body lang="en">
<a name="Output-Line-Prefix-Control"></a>
+<div class="header">
<p>
-Next: <a rel="next" accesskey="n"
href="Context-Line-Control.html#Context-Line-Control">Context Line Control</a>,
-Previous: <a rel="previous" accesskey="p"
href="General-Output-Control.html#General-Output-Control">General Output
Control</a>,
-Up: <a rel="up" accesskey="u"
href="Command_002dline-Options.html#Command_002dline-Options">Command-line
Options</a>
-<hr>
+Next: <a href="Context-Line-Control.html#Context-Line-Control" accesskey="n"
rel="next">Context Line Control</a>, Previous: <a
href="General-Output-Control.html#General-Output-Control" accesskey="p"
rel="prev">General Output 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>
</div>
-
+<hr>
+<a name="Output-Line-Prefix-Control-1"></a>
<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.
-
- <dl>
-<dt><samp><span class="option">-b</span></samp><dt><samp><span
class="option">--byte-offset</span></samp><dd><a
name="index-g_t_002db-52"></a><a
name="index-g_t_002d_002dbyte_002doffset-53"></a><a
name="index-byte-offset-54"></a>Print the 0-based byte offset within the input
file
+</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>
+<p>Print the 0-based byte offset within the input file
before each line of output.
-If <samp><span class="option">-o</span></samp> (<samp><span
class="option">--only-matching</span></samp>) is specified,
+If <samp>-o</samp> (<samp>--only-matching</samp>) is specified,
print the offset of the matching part itself.
-When <samp><span class="command">grep</span></samp> runs on MS-DOS or
MS-Windows,
+When <code>grep</code> runs on MS-DOS or MS-Windows,
the printed byte offsets depend on whether
-the <samp><span class="option">-u</span></samp> (<samp><span
class="option">--unix-byte-offsets</span></samp>) option is used;
+the <samp>-u</samp> (<samp>--unix-byte-offsets</samp>) option is used;
see below.
-
- <br><dt><samp><span class="option">-H</span></samp><dt><samp><span
class="option">--with-filename</span></samp><dd><a
name="index-g_t_002dH-55"></a><a
name="index-g_t_002d_002dwith_002dfilename-56"></a><a
name="index-with-filename-prefix-57"></a>Print the file name for each match.
+</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>
+<p>Print the file name for each match.
This is the default when there is more than one file to search.
-
- <br><dt><samp><span class="option">-h</span></samp><dt><samp><span
class="option">--no-filename</span></samp><dd><a
name="index-g_t_002dh-58"></a><a
name="index-g_t_002d_002dno_002dfilename-59"></a><a
name="index-no-filename-prefix-60"></a>Suppress the prefixing of file names on
output.
+</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>
+<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.
-
- <br><dt><samp><span
class="option">--label=</span><var>LABEL</var></samp><dd><a
name="index-g_t_002d_002dlabel-61"></a><a
name="index-changing-name-of-standard-input-62"></a>Display input actually
coming from standard input
+</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>
+<p>Display input actually coming from standard input
as input coming from file <var>LABEL</var>. This is
especially useful when implementing tools like
-<samp><span class="command">zgrep</span></samp>; e.g.:
-
- <pre class="example"> gzip -cd foo.gz | grep --label=foo -H
something
-</pre>
- <br><dt><samp><span class="option">-n</span></samp><dt><samp><span
class="option">--line-number</span></samp><dd><a
name="index-g_t_002dn-63"></a><a
name="index-g_t_002d_002dline_002dnumber-64"></a><a
name="index-line-numbering-65"></a>Prefix each line of output with the 1-based
line number within its input file.
-(<samp><span class="option">-n</span></samp> is specified by POSIX.)
-
- <br><dt><samp><span class="option">-T</span></samp><dt><samp><span
class="option">--initial-tab</span></samp><dd><a
name="index-g_t_002dT-66"></a><a
name="index-g_t_002d_002dinitial_002dtab-67"></a><a
name="index-tab_002daligned-content-lines-68"></a>Make sure that the first
character of actual line content lies on a tab stop,
+<code>zgrep</code>; e.g.:
+</p>
+<div class="example">
+<pre class="example">gzip -cd foo.gz | grep --label=foo -H something
+</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>
+<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>
+<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:
-<samp><span class="option">-H</span></samp>, <samp><span
class="option">-n</span></samp>, and <samp><span
class="option">-b</span></samp>.
+<samp>-H</samp>, <samp>-n</samp>, and <samp>-b</samp>.
In order to improve the probability that lines
from a single file will all start at the same column,
this also causes the line number and byte offset (if present)
to be printed in a minimum-size field width.
-
- <br><dt><samp><span class="option">-u</span></samp><dt><samp><span
class="option">--unix-byte-offsets</span></samp><dd><a
name="index-g_t_002du-69"></a><a
name="index-g_t_002d_002dunix_002dbyte_002doffsets-70"></a><a
name="index-MS_002dDOS_002fMS_002dWindows-byte-offsets-71"></a><a
name="index-byte-offsets_002c-on-MS_002dDOS_002fMS_002dWindows-72"></a>Report
Unix-style byte offsets.
-This option causes <samp><span class="command">grep</span></samp> to report
byte offsets
+</p>
+</dd>
+<dt><samp>-u</samp></dt>
+<dt><samp>--unix-byte-offsets</samp></dt>
+<dd><a name="index-_002du"></a>
+<a name="index-_002d_002dunix_002dbyte_002doffsets"></a>
+<a name="index-MS_002dDOS_002fMS_002dWindows-byte-offsets"></a>
+<a name="index-byte-offsets_002c-on-MS_002dDOS_002fMS_002dWindows"></a>
+<p>Report Unix-style byte offsets.
+This option causes <code>grep</code> to report byte offsets
as if the file were a Unix-style text file,
i.e., the byte offsets ignore carriage returns that were stripped.
This will produce results identical
-to running <samp><span class="command">grep</span></samp> on a Unix machine.
-This option has no effect unless the <samp><span
class="option">-b</span></samp> option is also used;
+to running <code>grep</code> on a Unix machine.
+This option has no effect unless the <samp>-b</samp> option is also used;
it has no effect on platforms other than MS-DOS and MS-Windows.
-
- <br><dt><samp><span class="option">-Z</span></samp><dt><samp><span
class="option">--null</span></samp><dd><a name="index-g_t_002dZ-73"></a><a
name="index-g_t_002d_002dnull-74"></a><a
name="index-zero_002dterminated-file-names-75"></a>Output a zero byte (the
ASCII NUL character)
+</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>
+<p>Output a zero byte (the ASCII NUL character)
instead of the character that normally follows a file name.
For example,
-‘<samp><span class="samp">grep -lZ</span></samp>’ outputs a zero
byte after each file name
+‘<samp>grep -lZ</samp>’ outputs a zero byte after each file name
instead of the usual newline.
This option makes the output unambiguous,
even in the presence of file names containing unusual characters like
newlines.
This option can be used with commands like
-‘<samp><span class="samp">find -print0</span></samp>’,
‘<samp><span class="samp">perl -0</span></samp>’,
‘<samp><span class="samp">sort -z</span></samp>’, and
‘<samp><span class="samp">xargs -0</span></samp>’
+‘<samp>find -print0</samp>’, ‘<samp>perl -0</samp>’,
‘<samp>sort -z</samp>’, and ‘<samp>xargs -0</samp>’
to process arbitrary file names,
even those that contain newline characters.
+</p>
+</dd>
+</dl>
+
+<hr>
+<div class="header">
+<p>
+Next: <a href="Context-Line-Control.html#Context-Line-Control" accesskey="n"
rel="next">Context Line Control</a>, Previous: <a
href="General-Output-Control.html#General-Output-Control" accesskey="p"
rel="prev">General Output 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>
+</div>
- </dl>
- </body></html>
+</body>
+</html>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Changes to grep/manual/html_node/Output-Line-Prefix-Control.html,v,
Jim Meyering <=