Print this page
3047 grep support for -r would be useful

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man1/grep.1
          +++ new/usr/src/man/man1/grep.1
↓ open down ↓ 8 lines elided ↑ open up ↑
   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   13  .TH GREP 1 "Feb 26, 2008"
  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-bhinsvw\fR] \fIlimited-regular-expression\fR
  20      -     [\fIfilename\fR]...
       19 +\fB/usr/bin/grep\fR [\fB-c\fR | \fB-l\fR |\fB-q\fR] [\fB-r\fR | \fB-R\fR] [\fB-bhinsvw\fR]
       20 +    \fIlimited-regular-expression\fR [\fIfilename\fR]...
  21   21  .fi
  22   22  
  23   23  .LP
  24   24  .nf
  25      -\fB/usr/xpg4/bin/grep\fR [\fB-E\fR | \fB-F\fR] [\fB-c\fR | \fB-l\fR | \fB-q\fR] [\fB-bhinsvwx\fR] \fB-e\fR \fIpattern_list\fR...
  26      -     [\fB-f\fR \fIpattern_file\fR]... [\fIfile\fR]...
       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]...
       27 +    [\fIfile\fR]...
  27   28  .fi
  28   29  
  29   30  .LP
  30   31  .nf
  31      -\fB/usr/xpg4/bin/grep\fR [\fB-E\fR | \fB-F\fR] [\fB-c\fR | \fB-l\fR | \fB-q\fR] [\fB-bhinsvwx\fR]
  32      -     [\fB-e\fR \fIpattern_list\fR]... \fB-f\fR \fIpattern_file\fR... [\fIfile\fR]...
       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...
       34 +    [\fIfile\fR]...
  33   35  .fi
  34   36  
  35   37  .LP
  36   38  .nf
  37      -\fB/usr/xpg4/bin/grep\fR [\fB-E\fR | \fB-F\fR] [\fB-c\fR | \fB-l\fR | \fB-q\fR] [\fB-bhinsvwx\fR] \fIpattern\fR
  38      -     [\fIfile\fR]...
       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]...
  39   41  .fi
  40   42  
  41   43  .SH DESCRIPTION
  42   44  .sp
  43   45  .LP
  44   46  The \fBgrep\fR utility searches text files for a pattern and prints all lines
  45   47  that contain that pattern.  It uses a compact non-deterministic algorithm.
  46   48  .sp
  47   49  .LP
  48   50  Be careful using the characters \fB$\fR, \fB*\fR, \fB[\fR, \fB^\fR, \fB|\fR,
↓ open down ↓ 76 lines elided ↑ open up ↑
 125  127  
 126  128  .sp
 127  129  .ne 2
 128  130  .na
 129  131  \fB\fB-n\fR\fR
 130  132  .ad
 131  133  .RS 6n
 132  134  Precedes each line by its line number in the file (first line is 1).
 133  135  .RE
 134  136  
      137 +.sp
      138 +.ne 2
      139 +.na
      140 +\fB\fB-r\fR\fR
      141 +.ad
      142 +.RS 6n
      143 +Read all files under each directory, recursively. Follow symbolic links on
      144 +the command line, but skip symlinks that are encountered recursively. If file
      145 +is a device, FIFO, or socket, skip it.
      146 +.RE
      147 +
      148 +.sp
      149 +.ne 2
      150 +.na
      151 +\fB\fB-R\fR\fR
      152 +.ad
      153 +.RS 6n
      154 +Read all files under each directory, recursively, following all symbolic links.
      155 +.RE
      156 +
 135  157  .sp
 136  158  .ne 2
 137  159  .na
 138  160  \fB\fB-q\fR\fR
 139  161  .ad
 140  162  .RS 6n
 141  163  Quiet. Does not write anything to the standard output, regardless of matching
 142  164  lines. Exits with zero status if an input line is selected.
 143  165  .RE
 144  166  
↓ open down ↓ 363 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX