From 78e51a8c6678b6e3dff3d619aa786669f531f4bc Mon Sep 17 00:00:00 2001 From: rsc Date: Fri, 14 Jan 2005 03:45:44 +0000 Subject: checkpoint --- man/man1/grep.html | 117 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 man/man1/grep.html (limited to 'man/man1/grep.html') diff --git a/man/man1/grep.html b/man/man1/grep.html new file mode 100644 index 00000000..e9682561 --- /dev/null +++ b/man/man1/grep.html @@ -0,0 +1,117 @@ + +grep(1) - Plan 9 from User Space + + + + +
+
+
GREP(1)GREP(1) +
+
+

NAME
+ +
+ + grep, g – search a file for a pattern
+ +
+

SYNOPSIS
+ +
+ + grep [ option ... ] pattern [ file ... ] +
+ + g [ option ... ] pattern [ file ... ]
+ +
+

DESCRIPTION
+ +
+ + Grep searches the input files (standard input default) for lines + that match the pattern, a regular expression as defined in regexp(7) + with the addition of a newline character as an alternative (substitute + for |) with lowest precedence. Normally, each line matching the + pattern is ‘selected’, and each selected line is copied to + the standard output. The options are
+ −c    Print only a count of matching lines.
+ −h    Do not print file name tags (headers) with output lines.
+ −e    The following argument is taken as a pattern. This option makes + it easy to specify patterns that might confuse argument parsing, + such as −n.
+ −i    Ignore alphabetic case distinctions. The implementation folds + into lower case all letters in the pattern and input before interpretation. + Matched lines are printed in their original form.
+ −l    (ell) Print the names of files with selected lines; don’t print + the lines.
+ −L    Print the names of files with no selected lines; the converse + of −l.
+ −n    Mark each printed line with its line number counted in its file.
+ −s    Produce no output, but return status.
+ −v    Reverse: print lines that do not match the pattern.
+ −f    The pattern argument is the name of a file containing regular + expressions one per line.
+ −b    Don’t buffer the output: write each output line as soon as it + is discovered. +
+ + Output lines are tagged by file name when there is more than one + input file. (To force this tagging, include /dev/null as a file + name argument.) +
+ + Care should be taken when using the shell metacharacters $*[^|()=\ + and newline in pattern; it is safest to enclose the entire expression + in single quotes '...'. An expression starting with ’*’ will treat + the rest of the expression as literal characters. +
+ + G invokes grep with −n and forces tagging of output lines by file + name. If no files are listed, it searches all files matching
+ +
+ + *.C *.b *.c *.h *.m *.cc *.java *.py *.tex *.ms
+
+
+ +
+

SOURCE
+ +
+ + /usr/local/plan9/src/cmd/grep
+ /usr/local/plan9/bin/g
+
+
+

SEE ALSO
+ +
+ + ed(1), awk(1), sed(1), sam(1), regexp(7)
+ +
+

DIAGNOSTICS
+ +
+ + Exit status is null if any lines are selected, or non-null when + no lines are selected or an error occurs.
+ +
+ +

+
+
+ + +
+
+
+Space Glenda +
+
+ + -- cgit v1.2.3