aboutsummaryrefslogtreecommitdiff
path: root/man/man1/grep.1
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-01-03 06:40:20 +0000
committerrsc <devnull@localhost>2005-01-03 06:40:20 +0000
commit058b0118a52061ad57694c01fc8763b22b789c4d (patch)
tree6685f04dea5ed68edaa34998c976aed34c55fe94 /man/man1/grep.1
parent2600337aa704efbeba8201e88147a764b4fd2b90 (diff)
downloadplan9port-058b0118a52061ad57694c01fc8763b22b789c4d.tar.gz
plan9port-058b0118a52061ad57694c01fc8763b22b789c4d.tar.bz2
plan9port-058b0118a52061ad57694c01fc8763b22b789c4d.zip
Some man pages.
Diffstat (limited to 'man/man1/grep.1')
-rw-r--r--man/man1/grep.126
1 files changed, 23 insertions, 3 deletions
diff --git a/man/man1/grep.1 b/man/man1/grep.1
index e58d0d97..b8cb431c 100644
--- a/man/man1/grep.1
+++ b/man/man1/grep.1
@@ -1,6 +1,6 @@
.TH GREP 1
.SH NAME
-grep \- search a file for a pattern
+grep, g \- search a file for a pattern
.SH SYNOPSIS
.B grep
[
@@ -10,6 +10,14 @@ grep \- search a file for a pattern
[
.I file ...
]
+.B g
+[
+.I option ...
+]
+.I pattern
+[
+.I file ...
+]
.SH DESCRIPTION
.I Grep\^
searches the input
@@ -18,7 +26,7 @@ searches the input
for lines that match the
.IR pattern ,
a regular expression as defined in
-.IR regexp (6)
+.IR regexp (7)
with the addition of a newline character as an alternative
(substitute for
.BR | )
@@ -90,14 +98,26 @@ in single quotes
An expression starting with '*'
will treat the rest of the expression
as literal characters.
+.PP
+.I G
+invokes grep with
+.B -n
+and forces tagging of output lines by file name.
+If no files are listed, it searches all files matching
+.IP
+.EX
+*.C *.b *.c *.h *.m *.cc *.java *.py *.tex *.ms
+.EE
.SH SOURCE
.B /usr/local/plan9/src/cmd/grep
+.br
+.B /usr/local/plan9/bin/g
.SH SEE ALSO
.IR ed (1),
.IR awk (1),
.IR sed (1),
.IR sam (1),
-.IR regexp (6)
+.IR regexp (7)
.SH DIAGNOSTICS
Exit status is null if any lines are selected,
or non-null when no lines are selected or an error occurs.