projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
.Xr botch fix
[unix-history]
/
usr
/
src
/
usr.bin
/
grep
/
egrep
/
grep.1
diff --git
a/usr/src/usr.bin/grep/egrep/grep.1
b/usr/src/usr.bin/grep/egrep/grep.1
index
e3d8077
..
244d0c6
100644
(file)
--- a/
usr/src/usr.bin/grep/egrep/grep.1
+++ b/
usr/src/usr.bin/grep/egrep/grep.1
@@
-3,7
+3,7
@@
.\"
.\" %sccs.include.redist.man%
.\"
.\"
.\" %sccs.include.redist.man%
.\"
-.\" @(#)grep.1 6.
4
(Berkeley) %G%
+.\" @(#)grep.1 6.
5
(Berkeley) %G%
.\"
.Dd
.Dt GREP 1
.\"
.Dd
.Dt GREP 1
@@
-108,7
+108,7
@@
Pathnames are
listed once per file searched.
If the standard
input is searched, the pathname
listed once per file searched.
If the standard
input is searched, the pathname
-.Fl
+.
Sq
Fl
is written.
.Tp Fl n
Each output line is preceded by its relative line
is written.
.Tp Fl n
Each output line is preceded by its relative line
@@
-151,14
+151,14
@@
standard input is used.
The
.Nm grep
utility exits with one of the following values:
The
.Nm grep
utility exits with one of the following values:
-.
T
w Ds
-.
T
p Li \&0
+.
D
w Ds
+.
D
p Li \&0
One or more lines were selected.
One or more lines were selected.
-.
T
p Li \&1
+.
D
p Li \&1
No lines were selected.
No lines were selected.
-.
T
p Li \&>1
+.
D
p Li \&>1
An error occurred.
An error occurred.
-.
T
p
+.
D
p
.Sh EXTENDED REGULAR EXPRESSIONS
The following characters are interpreted by
.Nm egrep :
.Sh EXTENDED REGULAR EXPRESSIONS
The following characters are interpreted by
.Nm egrep :
@@
-185,11
+185,13
@@
the set of {$,.,^,[,],|,?,+,*,(,)}.
.Tp
.Sh EXAMPLES
To find all occurances of the word patricia in a file:
.Tp
.Sh EXAMPLES
To find all occurances of the word patricia in a file:
+.Pp
.Dl grep patricia myfile
.Pp
To find all occurences to the pattern
.Sq Li \&.Pp
at the beginning of a line:
.Dl grep patricia myfile
.Pp
To find all occurences to the pattern
.Sq Li \&.Pp
at the beginning of a line:
+.Pp
.Dl grep '^\e.Pp'
.Pp
The apostrophys assure the entire expression is evaluated by
.Dl grep '^\e.Pp'
.Pp
The apostrophys assure the entire expression is evaluated by
@@
-207,6
+209,7
@@
escapes the
which would otherwise match any character.
.Pp
A simple example of an extended regular expression:
which would otherwise match any character.
.Pp
A simple example of an extended regular expression:
+.Pp
.Dl egrep '19|20|25' calendar
.Pp
Peruses the file calendar looking for either 19, 20
.Dl egrep '19|20|25' calendar
.Pp
Peruses the file calendar looking for either 19, 20