Thu Feb 25 13:05:11 2010 UTC ()
New sentence, new line. (more to come).


(wiz)
diff -r1.1 -r1.2 src/external/bsd/tre/agrep/agrep.1

cvs diff -r1.1 -r1.2 src/external/bsd/tre/agrep/Attic/agrep.1 (expand / switch to unified diff)

--- src/external/bsd/tre/agrep/Attic/agrep.1 2010/02/25 08:06:43 1.1
+++ src/external/bsd/tre/agrep/Attic/agrep.1 2010/02/25 13:05:11 1.2
@@ -1,182 +1,194 @@ @@ -1,182 +1,194 @@
1.TH agrep 1 "November 21, 2004" "TRE agrep 0.8.0" 1.TH agrep 1 "November 21, 2004" "TRE agrep 0.8.0"
2.SH NAME 2.SH NAME
3agrep \- print lines approximately matching a pattern 3agrep \- print lines approximately matching a pattern
4.SH SYNOPSIS 4.SH SYNOPSIS
5.B agrep 5.B agrep
6.RI [ OPTION ]... 6.RI [ OPTION ]...
7.I PATTERN 7.I PATTERN
8.RI [ FILE ]... 8.RI [ FILE ]...
9.SH DESCRIPTION 9.SH DESCRIPTION
10Searches for approximate matches of PATTERN in each FILE or standard 10Searches for approximate matches of PATTERN in each FILE or standard
11input. Example: `agrep \-2 optimize foo.txt' outputs all lines in 11input.
12file `foo.txt' that match "optimize" within two errors. E.g. lines 12Example: `agrep \-2 optimize foo.txt' outputs all lines in
13which contain "optimise", "optmise", and "opitmize" all match. 13file `foo.txt' that match "optimize" within two errors.
 14E.g. lines which contain "optimise", "optmise", and "opitmize" all
 15match.
14.SH OPTIONS 16.SH OPTIONS
15.SS "Regexp selection and interpretation:" 17.SS "Regexp selection and interpretation:"
16.TP 18.TP
17.BI \-e " PATTERN" "\fR,\fP \-\^\-regexp=" PATTERN 19.BI \-e " PATTERN" "\fR,\fP \-\^\-regexp=" PATTERN
18Use 20Use
19.I PATTERN 21.I PATTERN
20as a regular expression; useful to protect patterns beginning with 22as a regular expression; useful to protect patterns beginning with
21.BR \- . 23.BR \- .
22.TP 24.TP
23.BR \-i ", " \-\^\-ignore\-case 25.BR \-i ", " \-\^\-ignore\-case
24Ignore case distinctions (as defined by the current locale) in 26Ignore case distinctions (as defined by the current locale) in
25.I PATTERN 27.I PATTERN
26and input files. 28and input files.
27.TP 29.TP
28.BR \-k ", " \-\^\-literal 30.BR \-k ", " \-\^\-literal
29Treat 31Treat
30.I PATTERN 32.I PATTERN
31as a literal string, that is, a fixed string with no special 33as a literal string, that is, a fixed string with no special
32characters. 34characters.
33.TP 35.TP
34.BR \-w ", " \-\^\-word\-regexp 36.BR \-w ", " \-\^\-word\-regexp
35Force 37Force
36.I PATTERN 38.I PATTERN
37to match only whole words. A "whole word" is a substring which either 39to match only whole words.
38starts at the beginning or the record or is preceded by a non-word 40A "whole word" is a substring which either starts at the beginning
39constituent character. Similarly, the substring must either end at 41or the record or is preceded by a non-word constituent character.
40the end of the record or be followed by a non-word constituent 42Similarly, the substring must either end at the end of the record
41character. Word-constituent characters are alphanumerics (as 43or be followed by a non-word constituent character.
42defined by the current locale) and the underscore character. Note 44Word-constituent characters are alphanumerics (as
43that the non-word constituent characters 45defined by the current locale) and the underscore character.
 46Note that the non-word constituent characters
44.B must 47.B must
45surround the match; they cannot be counted as errors. 48surround the match; they cannot be counted as errors.
46.SS "Approximate matching settings:" 49.SS "Approximate matching settings:"
47.TP 50.TP
48.BI \-D " NUM" "\fR,\fP \-\^\-delete\-cost=" NUM 51.BI \-D " NUM" "\fR,\fP \-\^\-delete\-cost=" NUM
49Set cost of missing characters to 52Set cost of missing characters to
50.IR NUM . 53.IR NUM .
51.TP 54.TP
52.BI \-I " NUM" "\fR,\fP \-\^\-insert\-cost=" NUM 55.BI \-I " NUM" "\fR,\fP \-\^\-insert\-cost=" NUM
53Set cost of extra characters to 56Set cost of extra characters to
54.IR NUM . 57.IR NUM .
55.TP 58.TP
56.BI \-S " NUM" "\fR,\fP \-\^\-substitute\-cost=" NUM 59.BI \-S " NUM" "\fR,\fP \-\^\-substitute\-cost=" NUM
57Set cost of incorrect characters to 60Set cost of incorrect characters to
58.IR NUM . 61.IR NUM .
59Note that a deletion (a missing character) and an insertion (an extra 62Note that a deletion (a missing character) and an insertion (an extra
60character) together constitute a substituted character, but the cost 63character) together constitute a substituted character, but the cost
61will be the that of a deletion and an insertion added together. Thus, 64will be the that of a deletion and an insertion added together.
62if the const of a substitution is set to be larger than the sum 65Thus, if the const of a substitution is set to be larger than the
63of the costs of deletion and insertion, direct substitutions will 66sum of the costs of deletion and insertion, direct substitutions
64never be done. 67will never be done.
65.TP 68.TP
66.BI \-E " NUM" "\fR,\fP \-\^\-max\-errors=" NUM 69.BI \-E " NUM" "\fR,\fP \-\^\-max\-errors=" NUM
67Select records that have at most 70Select records that have at most
68.I NUM 71.I NUM
69errors. 72errors.
70.TP 73.TP
71-\fI#\fR 74-\fI#\fR
72Select records that have at most \fI#\fR errors (\fI#\fR is a 75Select records that have at most \fI#\fR errors (\fI#\fR is a
73digit between 0 and 9). 76digit between 0 and 9).
74.SS "Miscellaneous:" 77.SS "Miscellaneous:"
75.TP 78.TP
76.BI \-d " PATTERN" "\fR,\fP \-\^\-delimiter=" PATTERN 79.BI \-d " PATTERN" "\fR,\fP \-\^\-delimiter=" PATTERN
77Set the record delimiter regular expression to 80Set the record delimiter regular expression to
78.IR PATTERN . 81.IR PATTERN .
79The text between two delimiters, before the first delimiter, and after 82The text between two delimiters, before the first delimiter, and after
80the last delimiter is considered to be a record. The default record 83the last delimiter is considered to be a record.
 84The default record
81delimiter is the regexp "\\n", so by default a record is a line. 85delimiter is the regexp "\\n", so by default a record is a line.
82.I PATTERN 86.I PATTERN
83can be any regular expression that does not match the empty string. 87can be any regular expression that does not match the empty string.
84For example, using 88For example, using
85.B \-d 89.B \-d
86"^From " 90"^From "
87defines mail messages as records in a Mailbox format file. 91defines mail messages as records in a Mailbox format file.
88.TP 92.TP
89.BR \-v ", " \-\^\-invert\-match 93.BR \-v ", " \-\^\-invert\-match
90Select non-matching records instead of matching records. 94Select non-matching records instead of matching records.
91.TP 95.TP
92.BR \-V ", " \-\^\-version 96.BR \-V ", " \-\^\-version
93Print version information and exit. 97Print version information and exit.
94.TP 98.TP
95.BR \-y ", " \-\^\-nothing 99.BR \-y ", " \-\^\-nothing
96Does nothing. This options exists only for compatibility with the 100Does nothing.
 101This options exists only for compatibility with the
97non-free agrep program. 102non-free agrep program.
98.TP 103.TP
99.BR \-\^\-help 104.BR \-\^\-help
100Display a brief help message and exit. 105Display a brief help message and exit.
101.SS "Output control:" 106.SS "Output control:"
102.TP 107.TP
103.BR \-B ", " \-\^\-best\-match 108.BR \-B ", " \-\^\-best\-match
104Only output the best matching records, that is, the records with the 109Only output the best matching records, that is, the records with the
105lowest cost. This is currently implemented by making two passes over 110lowest cost.
 111This is currently implemented by making two passes over
106the input files and cannot be used when reading from standard input. 112the input files and cannot be used when reading from standard input.
107.TP 113.TP
108.BR \-\^\-color ", " \-\^\-colour 114.BR \-\^\-color ", " \-\^\-colour
109Highlight the matching strings in the output with a color marker. The 115Highlight the matching strings in the output with a color marker.
110color string is taken from the 116The color string is taken from the
111.BI GREP_COLOR 117.BI GREP_COLOR
112environment variable. The default color is red. 118environment variable.
 119The default color is red.
113.TP 120.TP
114.BR \-c ", " \-\^\-count 121.BR \-c ", " \-\^\-count
115Only print a count of matching records per each input file, 122Only print a count of matching records per each input file,
116suppressing normal output. 123suppressing normal output.
117.TP 124.TP
118.BR \-h ", " \-\^\-no\-filename 125.BR \-h ", " \-\^\-no\-filename
119Suppress the prefixing filename on output when multiple files are 126Suppress the prefixing filename on output when multiple files are
120searched. 127searched.
121.TP 128.TP
122.BR \-H ", " \-\^\-with\-filename 129.BR \-H ", " \-\^\-with\-filename
123Prefix each output record with the name of the input file where the 130Prefix each output record with the name of the input file where the
124record was read from. 131record was read from.
125.TP 132.TP
126.BR \-l ", " \-\^\-files\-with\-matches 133.BR \-l ", " \-\^\-files\-with\-matches
127Only print the name of each input file which contains at least one 134Only print the name of each input file which contains at least one
128match, suppressing normal output. The scanning for each file will 135match, suppressing normal output.
129stop on the first match. 136The scanning for each file will stop on the first match.
130.TP 137.TP
131.BR \-n ", " \-\^\-record\-number 138.BR \-n ", " \-\^\-record\-number
132Prefix each output record with its sequence number in the input file. 139Prefix each output record with its sequence number in the input file.
133The number of the first record is 1. 140The number of the first record is 1.
134.TP 141.TP
135.BR \-q ", " \-\^\-quiet ", " \-\^\-silent 142.BR \-q ", " \-\^\-quiet ", " \-\^\-silent
136Do not write anything to standard output. Exit immediately with zero 143Do not write anything to standard output.
137exit status if a match is found. 144Exit immediately with zero exit status if a match is found.
138.TP 145.TP
139.BR \-s ", " \-\^\-show\-cost 146.BR \-s ", " \-\^\-show\-cost
140Print match cost with output. 147Print match cost with output.
141.TP 148.TP
142.BR \-\^\-show\-position 149.BR \-\^\-show\-position
143Prefix each output record with the start and end offset of the first 150Prefix each output record with the start and end offset of the first
144match within the record. The offset of the first character of the 151match within the record.
145record is 0. The end position is given as the offset of the first 152The offset of the first character of the record is 0.
 153The end position is given as the offset of the first
146character after the match. 154character after the match.
147.TP 155.TP
148.BR \-M ", " \-\^\-delimiter\-after 156.BR \-M ", " \-\^\-delimiter\-after
149By default, the record delimiter is the newline character and is 157By default, the record delimiter is the newline character and is
150output after the matching record. If 158output after the matching record.
 159If
151.B \-d 160.B \-d
152is used, the record delimiter will be output before the matching 161is used, the record delimiter will be output before the matching
153record. This option causes the delimiter to be output after the 162record.
 163This option causes the delimiter to be output after the
154matching record. 164matching record.
155.PP 165.PP
156With no 166With no
157.IR FILE , 167.IR FILE ,
158or when 168or when
159.I FILE 169.I FILE
160is -, reads standard input. If less than two 170is -, reads standard input.
 171If less than two
161.IR FILE s 172.IR FILE s
162are given 173are given
163.B \-h 174.B \-h
164is assumed, otherwise 175is assumed, otherwise
165.B \-H 176.B \-H
166is the default. 177is the default.
167.SH DIAGNOSTICS 178.SH DIAGNOSTICS
168Exit status is 0 if a match is found, 1 for no match, and 2 if there 179Exit status is 0 if a match is found, 1 for no match, and 2 if there
169were errors. If 180were errors.
 181If
170.B \-E 182.B \-E
171or -\fI#\fR is not specified, only exact matches are selected. 183or -\fI#\fR is not specified, only exact matches are selected.
172.PP 184.PP
173.I PATTERN 185.I PATTERN
174is a POSIX extended regular expression (ERE) with the TRE extensions. 186is a POSIX extended regular expression (ERE) with the TRE extensions.
175.SH "REPORTING BUGS" 187.SH "REPORTING BUGS"
176Report bugs to the TRE mailing list 188Report bugs to the TRE mailing list
177.BR "" < tre-general@lists.laurikari.net >. 189.BR "" < tre-general@lists.laurikari.net >.
178.SH COPYRIGHT 190.SH COPYRIGHT
179Copyright \(co 2002-2004 Ville Laurikari. 191Copyright \(co 2002-2004 Ville Laurikari.
180.br 192.br
181This is free software, and comes with ABSOLUTELY NO WARRANTY. 193This is free software, and comes with ABSOLUTELY NO WARRANTY.
182You are welcome to redistribute this software under certain 194You are welcome to redistribute this software under certain