[Top][All Lists]

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

Changes to grep/manual/grep.html,v

From: Jim Meyering
Subject: Changes to grep/manual/grep.html,v
Date: Mon, 02 Nov 2015 02:54:39 +0000

CVSROOT:        /webcvs/grep
Module name:    grep
Changes by:     Jim Meyering <meyering> 15/11/02 02:54:37

Index: grep.html
RCS file: /webcvs/grep/grep/manual/grep.html,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- grep.html   23 Nov 2014 22:23:28 -0000      1.20
+++ grep.html   2 Nov 2015 02:54:28 -0000       1.21
@@ -1,15 +1,15 @@
 <html lang="en">
-<title>GNU Grep 2.21</title>
+<title>GNU Grep 2.22</title>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<meta name="description" content="GNU Grep 2.21">
+<meta name="description" content="GNU Grep 2.22">
 <meta name="generator" content="makeinfo 4.13">
 <link title="Top" rel="top" href="#Top">
 <link href=""; rel="generator-home" 
title="Texinfo Homepage">
 This manual is for `grep', a pattern matching engine.
-Copyright (C) 1999-2002, 2005, 2008-2014 Free Software Foundation,
+Copyright (C) 1999-2002, 2005, 2008-2015 Free Software Foundation,
      Permission is granted to copy, distribute and/or modify this
@@ -31,9 +31,10 @@
   span.roman { font-family:serif; font-weight:normal; } 
   span.sansserif { font-family:sans-serif; font-weight:normal; } 
+<link rel="stylesheet" type="text/css" href="/software/gnulib/manual.css">
-<h1 class="settitle">GNU Grep 2.21</h1>
+<h1 class="settitle">GNU Grep 2.22</h1>
    <div class="contents">
 <h2>Table of Contents</h2>
@@ -91,11 +92,11 @@
 <p><samp><span class="command">grep</span></samp> prints lines that contain a 
match for a pattern.
-   <p>This manual is for version 2.21 of GNU Grep.
+   <p>This manual is for version 2.22 of GNU Grep.
    <p>This manual is for <samp><span class="command">grep</span></samp>, a 
pattern matching engine.
-   <p>Copyright &copy; 1999&ndash;2002, 2005, 2008&ndash;2014 Free Software 
+   <p>Copyright &copy; 1999-2002, 2005, 2008-2015 Free Software Foundation,
@@ -534,12 +535,18 @@
 or if its data read before a line is selected for output,
 indicate that the file contains binary data,
 assume that the file is of type <var>type</var>. 
-By default, <var>type</var> is &lsquo;<samp><span 
+Non-text bytes indicate binary data; these are either data bytes
+improperly encoded for the current locale, or null bytes when the
+<samp><span class="option">-z</span></samp> (<samp><span 
class="option">--null-data</span></samp>) option is not given (see <a 
href="#Other-Options">Other Options</a>).
+     <p>By default, <var>type</var> is &lsquo;<samp><span 
 and <samp><span class="command">grep</span></samp> normally outputs either
 a one-line message saying that a binary file matches,
 or no message if there is no match. 
-When matching binary data, <samp><span class="command">grep</span></samp> may 
treat non-text
-bytes as line terminators.
+When processing binary data, <samp><span class="command">grep</span></samp> 
may treat non-text bytes
+as line terminators; for example, the pattern &lsquo;<samp><span 
class="samp">.</span></samp>&rsquo; (period) might
+not match a null byte, as the null byte might be treated as a line
+terminator even without the <samp><span class="option">-z</span></samp> 
(<samp><span class="option">--null-data</span></samp>) option.
      <p>If <var>type</var> is &lsquo;<samp><span 
 <samp><span class="command">grep</span></samp> assumes that a binary file does 
not match;
@@ -602,6 +609,7 @@
 read and process all files in that directory, recursively. 
 Follow symbolic links on the command line, but skip symlinks
 that are encountered recursively. 
+Note that if no file operand is given, grep searches the working directory. 
 This is the same as the &lsquo;<samp><span 
class="samp">--directories=recurse</span></samp>&rsquo; option.
      <br><dt><samp><span class="option">-R</span></samp><dt><samp><span 
name="index-symbolic-links-125"></a>For each directory operand, read and 
process all files in that
@@ -718,7 +726,14 @@
 As this causes problems when writing portable scripts, this feature
 will be removed in a future release of <samp><span 
class="command">grep</span></samp>, and <samp><span 
 warns if it is used.  Please use an alias or script instead.
+For example, if <samp><span class="command">grep</span></samp> is in the 
directory &lsquo;<samp><span class="samp">/usr/bin</span></samp>&rsquo; you
+can prepend <samp><span class="file">$HOME/bin</span></samp> to your 
<samp><span class="env">PATH</span></samp> and create an
+executable script <samp><span class="file">$HOME/bin/grep</span></samp> 
containing the following:
+     <pre class="example">          #! /bin/sh
+          export PATH=/usr/bin
+          exec grep --color=auto --devices=skip "$@"
      <br><dt><samp><span class="env">GREP_COLOR</span></samp><dd><a 
name="index-highlight-markers-143"></a>This variable specifies the color used 
to highlight matched (non-empty) text. 
 It is deprecated in favor of <samp><span 
class="env">GREP_COLORS</span></samp>, but still supported. 
 The &lsquo;<samp><span class="samp">mt</span></samp>&rsquo;, 
&lsquo;<samp><span class="samp">ms</span></samp>&rsquo;, and &lsquo;<samp><span 
class="samp">mc</span></samp>&rsquo; capabilities of <samp><span 
@@ -1437,7 +1452,8 @@
 Therefore, merely using the <code>[:space:]</code> character class does not
 match newlines in the way you might expect.
-     <p>With the GNU <samp><span class="command">grep</span></samp> option 
<code>-z</code> (see <a href="#File-and-Directory-Selection">File and Directory 
Selection</a>), the input is terminated by null bytes.  Thus,
+     <p>With the GNU <samp><span class="command">grep</span></samp> option 
<samp><span class="option">-z</span></samp> (<samp><span 
class="option">--null-data</span></samp>), each
+input &ldquo;line&rdquo; is terminated by a null byte; see <a 
href="#Other-Options">Other Options</a>.  Thus,
 you can match newlines in the input, but typically if there is a match
 the entire input is output, so this usage is often combined with
 output-suppressing options like <samp><span class="option">-q</span></samp>, 

reply via email to

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