Print this page
3737 grep does not support -H option
Reviewed by: Andy Stormont <andyjstormont@gmail.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man1/grep.1
          +++ new/usr/src/man/man1/grep.1
↓ open down ↓ 2 lines elided ↑ open up ↑
   3    3  .\" Copyright 1989 AT&T
   4    4  .\" Copyright (c) 2008, Sun Microsystems, Inc.  All Rights Reserved
   5    5  .\" Portions Copyright (c) 1992, X/Open Company Limited  All Rights Reserved
   6    6  .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
   7    7  .\" http://www.opengroup.org/bookstore/.
   8    8  .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
   9    9  .\"  This notice shall appear on any product containing this material.
  10   10  .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
  11   11  .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
  12   12  .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
  13      -.TH GREP 1 "Feb 26, 2008"
       13 +.TH GREP 1 "May 3, 2013"
  14   14  .SH NAME
  15   15  grep \- search a file for a pattern
  16   16  .SH SYNOPSIS
  17   17  .LP
  18   18  .nf
  19      -\fB/usr/bin/grep\fR [\fB-c\fR | \fB-l\fR |\fB-q\fR] [\fB-r\fR | \fB-R\fR] [\fB-bhinsvw\fR]
       19 +\fB/usr/bin/grep\fR [\fB-c\fR | \fB-l\fR |\fB-q\fR] [\fB-r\fR | \fB-R\fR] [\fB-bHhinsvw\fR]
  20   20      \fIlimited-regular-expression\fR [\fIfilename\fR]...
  21   21  .fi
  22   22  
  23   23  .LP
  24   24  .nf
  25   25  \fB/usr/xpg4/bin/grep\fR [\fB-E\fR | \fB-F\fR] [\fB-c\fR | \fB-l\fR | \fB-q\fR] [\fB-r\fR | \fB-R\fR]
  26      -    [\fB-bhinsvwx\fR] \fB-e\fR \fIpattern_list\fR... [\fB-f\fR \fIpattern_file\fR]...
       26 +    [\fB-bHhinsvwx\fR] \fB-e\fR \fIpattern_list\fR... [\fB-f\fR \fIpattern_file\fR]...
  27   27      [\fIfile\fR]...
  28   28  .fi
  29   29  
  30   30  .LP
  31   31  .nf
  32   32  \fB/usr/xpg4/bin/grep\fR [\fB-E\fR | \fB-F\fR] [\fB-c\fR | \fB-l\fR | \fB-q\fR] [\fB-r\fR | \fB-R\fR]
  33      -    [\fB-bhinsvwx\fR] [\fB-e\fR \fIpattern_list\fR]... \fB-f\fR \fIpattern_file\fR...
       33 +    [\fB-bHhinsvwx\fR] [\fB-e\fR \fIpattern_list\fR]... \fB-f\fR \fIpattern_file\fR...
  34   34      [\fIfile\fR]...
  35   35  .fi
  36   36  
  37   37  .LP
  38   38  .nf
  39   39  \fB/usr/xpg4/bin/grep\fR [\fB-E\fR | \fB-F\fR] [\fB-c\fR | \fB-l\fR | \fB-q\fR] [\fB-r\fR | \fB-R\fR]
  40      -    [\fB-bhinsvwx\fR] \fIpattern\fR [\fIfile\fR]...
       40 +    [\fB-bHhinsvwx\fR] \fIpattern\fR [\fIfile\fR]...
  41   41  .fi
  42   42  
  43   43  .SH DESCRIPTION
  44   44  .sp
  45   45  .LP
  46   46  The \fBgrep\fR utility searches text files for a pattern and prints all lines
  47   47  that contain that pattern.  It uses a compact non-deterministic algorithm.
  48   48  .sp
  49   49  .LP
  50   50  Be careful using the characters \fB$\fR, \fB*\fR, \fB[\fR, \fB^\fR, \fB|\fR,
↓ open down ↓ 37 lines elided ↑ open up ↑
  88   88  
  89   89  .sp
  90   90  .ne 2
  91   91  .na
  92   92  \fB\fB-c\fR\fR
  93   93  .ad
  94   94  .RS 6n
  95   95  Prints only a count of the lines that contain the pattern.
  96   96  .RE
  97   97  
       98 +.sp
       99 +.ne 2
      100 +.na
      101 +\fB\fB-H\fR\fR
      102 +.ad
      103 +.RS 6n
      104 +Precedes each line by the name of the file containing the matching line.
      105 +.RE
      106 +
  98  107  .sp
  99  108  .ne 2
 100  109  .na
 101  110  \fB\fB-h\fR\fR
 102  111  .ad
 103  112  .RS 6n
 104  113  Prevents the name of the file containing the matching line from being prepended
 105  114  to that line.  Used when searching multiple files.
 106  115  .RE
 107  116  
↓ open down ↓ 422 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX