From 058b0118a52061ad57694c01fc8763b22b789c4d Mon Sep 17 00:00:00 2001 From: rsc Date: Mon, 3 Jan 2005 06:40:20 +0000 Subject: Some man pages. --- man/man1/grep.1 | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) (limited to 'man/man1/grep.1') 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. -- cgit v1.2.3