116 lines
2.2 KiB
Text
116 lines
2.2 KiB
Text
$NetBSD: patch-ab,v 1.2 2002/11/23 16:15:21 cjep Exp $
|
|
|
|
--- grep.1.orig Fri Oct 29 17:02:36 1999
|
|
+++ grep.1
|
|
@@ -35,18 +35,18 @@
|
|
.Dt GREP 1
|
|
.Os
|
|
.Sh NAME
|
|
-.Nm grep, egrep, fgrep. zgrep
|
|
+.Nm bgrep, egrep, fgrep, zgrep
|
|
.Nd file pattern searcher
|
|
.Sh SYNOPSIS
|
|
-.Nm grep
|
|
+.Nm bgrep
|
|
.Op Fl AB Ar num
|
|
-.Op Fl CEFGHLPRSVZabchilnoqsvwx
|
|
+.Op Fl CEFGHLPRSVZabchilnoqrsvwx
|
|
.Op Fl e Ar pattern
|
|
.Op Fl f Ar file
|
|
.Op Ar
|
|
.Sh DESCRIPTION
|
|
The
|
|
-.Nm grep
|
|
+.Nm bgrep
|
|
utilities search the given input files selecting lines that match one
|
|
or more patterns.
|
|
By default, a pattern matches an input line if any regular expression
|
|
@@ -57,7 +57,7 @@
|
|
to the standard output.
|
|
.Pp
|
|
The
|
|
-.Nm grep
|
|
+.Nm bgrep
|
|
utility is used for simple patterns and
|
|
.Xr ex 1
|
|
or
|
|
@@ -74,7 +74,7 @@
|
|
the input.
|
|
The
|
|
.Nm zgrep
|
|
-utility acts like grep, but accepts input files compressed with the
|
|
+utility acts like bgrep, but accepts input files compressed with the
|
|
.Xr compress 1
|
|
or
|
|
.Xr gzip 1
|
|
@@ -99,19 +99,19 @@
|
|
.Ar 2 .
|
|
.It Fl E
|
|
Force
|
|
-.Nm grep
|
|
+.Nm bgrep
|
|
to behave as
|
|
.Nm egrep.
|
|
.It Fl F
|
|
Force
|
|
-.Nm grep
|
|
+.Nm bgrep
|
|
to behave as
|
|
.Nm fgrep.
|
|
.It Fl G
|
|
Force
|
|
-.Nm grep
|
|
+.Nm bgrep
|
|
to behave as
|
|
-.Nm grep.
|
|
+.Nm bgrep.
|
|
.It Fl H
|
|
If
|
|
.Fl R
|
|
@@ -138,7 +138,7 @@
|
|
Display version information.
|
|
.It Fl Z
|
|
Force
|
|
-.Nm grep
|
|
+.Nm bgrep
|
|
to behave as
|
|
.Nm zgrep .
|
|
.It Fl a
|
|
@@ -185,6 +185,8 @@
|
|
Always print filename headers with output lines.
|
|
.It Fl q
|
|
Suppress normal output.
|
|
+.It Fl r
|
|
+Read all files under each directory recursively.
|
|
.It Fl s
|
|
Silent mode. Nonexistent and unreadable files are ignored.
|
|
.It Fl v
|
|
@@ -204,7 +206,7 @@
|
|
If no file arguments are specified, the standard input is used.
|
|
.Pp
|
|
The
|
|
-.Nm grep
|
|
+.Nm bgrep
|
|
utility exits with one of the following values:
|
|
.Pp
|
|
.Bl -tag -width flag -compact
|
|
@@ -243,16 +245,16 @@
|
|
.Sh EXAMPLES
|
|
To find all occurrences of the word patricia in a file:
|
|
.Pp
|
|
-.Dl grep patricia myfile
|
|
+.Dl bgrep patricia myfile
|
|
.Pp
|
|
To find all occurrences of the pattern
|
|
.Ql \&.Pp
|
|
at the beginning of a line:
|
|
.Pp
|
|
-.Dl grep '^\e.Pp'
|
|
+.Dl bgrep '^\e.Pp'
|
|
.Pp
|
|
The apostrophes assure the entire expression is evaluated by
|
|
-.Nm grep
|
|
+.Nm bgrep
|
|
instead of by the
|
|
user's shell.
|
|
The caret
|