Print this page
3737 grep does not support -H option
3759 egrep(1) and fgrep(1) -s flag does not hide -c output
Reviewed by: Albert Lee <trisk@nexenta.com>
Reviewed by: Andy Stormont <andyjstormont@gmail.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man1/egrep.1
          +++ new/usr/src/man/man1/egrep.1
↓ open down ↓ 1 lines elided ↑ open up ↑
   2    2  .\" Copyright 1989 AT&T
   3    3  .\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved
   4    4  .\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
   5    5  .\" 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
   6    6  .\" http://www.opengroup.org/bookstore/.
   7    7  .\" 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.
   8    8  .\"  This notice shall appear on any product containing this material.
   9    9  .\" 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.
  10   10  .\" 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.
  11   11  .\" 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]
  12      -.TH EGREP 1 "Mar 24, 2006"
       12 +.TH EGREP 1 "May 3, 2013"
  13   13  .SH NAME
  14   14  egrep \- search a file for a pattern using full regular expressions
  15   15  .SH SYNOPSIS
  16   16  .LP
  17   17  .nf
  18      -\fB/usr/bin/egrep\fR [\fB-bchilnsv\fR] \fB-e\fR \fIpattern_list\fR [\fIfile...\fR]
       18 +\fB/usr/bin/egrep\fR [\fB-bcHhilnqsv\fR] \fB-e\fR \fIpattern_list\fR [\fIfile...\fR]
  19   19  .fi
  20   20  
  21   21  .LP
  22   22  .nf
  23      -\fB/usr/bin/egrep\fR [\fB-bchilnsv\fR] \fB-f\fR \fIfile\fR [\fIfile...\fR]
       23 +\fB/usr/bin/egrep\fR [\fB-bcHhilnqsv\fR] \fB-f\fR \fIfile\fR [\fIfile...\fR]
  24   24  .fi
  25   25  
  26   26  .LP
  27   27  .nf
  28      -\fB/usr/bin/egrep\fR [\fB-bchilnsv\fR] \fIpattern\fR [\fIfile...\fR]
       28 +\fB/usr/bin/egrep\fR [\fB-bcHhilnqsv\fR] \fIpattern\fR [\fIfile...\fR]
  29   29  .fi
  30   30  
  31   31  .LP
  32   32  .nf
  33      -\fB/usr/xpg4/bin/egrep\fR [\fB-bchilnqsvx\fR] \fB-e\fR \fIpattern_list\fR [\fB-f\fR \fIfile\fR]
       33 +\fB/usr/xpg4/bin/egrep\fR [\fB-bcHhilnqsvx\fR] \fB-e\fR \fIpattern_list\fR [\fB-f\fR \fIfile\fR]
  34   34       [\fIfile...\fR]
  35   35  .fi
  36   36  
  37   37  .LP
  38   38  .nf
  39      -\fB/usr/xpg4/bin/egrep\fR [\fB-bchilnqsvx\fR] [\fB-e\fR \fIpattern_list\fR] \fB-f\fR \fIfile\fR
       39 +\fB/usr/xpg4/bin/egrep\fR [\fB-bcHhilnqsvx\fR] [\fB-e\fR \fIpattern_list\fR] \fB-f\fR \fIfile\fR
  40   40       [\fIfile...\fR]
  41   41  .fi
  42   42  
  43   43  .LP
  44   44  .nf
  45      -\fB/usr/xpg4/bin/egrep\fR [\fB-bchilnqsvx\fR] \fIpattern\fR [\fIfile...\fR]
       45 +\fB/usr/xpg4/bin/egrep\fR [\fB-bcHhilnqsvx\fR] \fIpattern\fR [\fIfile...\fR]
  46   46  .fi
  47   47  
  48   48  .SH DESCRIPTION
  49   49  .sp
  50   50  .LP
  51   51  The \fBegrep\fR (\fIexpression grep\fR) utility searches files for a pattern of
  52   52  characters and prints all lines that contain that pattern. \fBegrep\fR uses
  53   53  full regular expressions (expressions that have string values that use the full
  54   54  set of alphanumeric and special characters) to match the patterns. It uses a
  55   55  fast deterministic algorithm that sometimes needs exponential space.
↓ open down ↓ 88 lines elided ↑ open up ↑
 144  144  .na
 145  145  \fB\fB-f\fR \fIfile\fR\fR
 146  146  .ad
 147  147  .RS 19n
 148  148  Take the list of \fIfull\fR \fIregular\fR \fIexpressions\fR from \fIfile\fR.
 149  149  .RE
 150  150  
 151  151  .sp
 152  152  .ne 2
 153  153  .na
      154 +\fB\fB-H\fR\fR
      155 +.ad
      156 +.RS 19n
      157 +Precedes each line by the name of the file containing the matching line.
      158 +.RE
      159 +
      160 +.sp
      161 +.ne 2
      162 +.na
 154  163  \fB\fB-h\fR\fR
 155  164  .ad
 156  165  .RS 19n
 157  166  Suppress printing of filenames when searching multiple files.
 158  167  .RE
 159  168  
 160  169  .sp
 161  170  .ne 2
 162  171  .na
 163  172  \fB\fB-i\fR\fR
↓ open down ↓ 17 lines elided ↑ open up ↑
 181  190  .na
 182  191  \fB\fB-n\fR\fR
 183  192  .ad
 184  193  .RS 19n
 185  194  Precede each line by its line number in the file (first line is 1).
 186  195  .RE
 187  196  
 188  197  .sp
 189  198  .ne 2
 190  199  .na
      200 +\fB\fB-q\fR\fR
      201 +.ad
      202 +.RS 19n
      203 +Quiet. Does not write anything to the standard output, regardless of matching
      204 +lines. Exits with zero status if an input line is selected.
      205 +.RE
      206 +
      207 +.sp
      208 +.ne 2
      209 +.na
 191  210  \fB\fB-s\fR\fR
 192  211  .ad
 193  212  .RS 19n
 194      -Work silently, that is, display nothing except error messages. This is useful
 195      -for checking the error status.
      213 +Legacy equivalent of \fB-q\fR.
 196  214  .RE
 197  215  
 198  216  .sp
 199  217  .ne 2
 200  218  .na
 201  219  \fB\fB-v\fR\fR
 202  220  .ad
 203  221  .RS 19n
 204  222  Print all lines except those that contain the pattern.
 205  223  .RE
 206  224  
 207  225  .SS "/usr/xpg4/bin/egrep"
 208  226  .sp
 209  227  .LP
 210  228  The following options are supported for \fB/usr/xpg4/bin/egrep\fR only:
 211  229  .sp
 212  230  .ne 2
 213      -.na
 214      -\fB\fB-q\fR\fR
 215      -.ad
 216      -.RS 6n
 217      -Quiet. Does not write anything to the standard output, regardless of matching
 218      -lines. Exits with zero status if an input line is selected.
 219      -.RE
 220      -
 221      -.sp
 222      -.ne 2
 223  231  .na
 224  232  \fB\fB-x\fR\fR
 225  233  .ad
 226  234  .RS 6n
 227  235  Consider only input lines that use all characters in the line to match an
 228  236  entire fixed string or regular expression to be matching lines.
 229  237  .RE
 230  238  
 231  239  .SH OPERANDS
 232  240  .sp
↓ open down ↓ 125 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX