[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Changes to grep/manual/grep.txt,v
From: |
Jim Meyering |
Subject: |
Changes to grep/manual/grep.txt,v |
Date: |
Sun, 30 Dec 2018 01:24:23 -0500 (EST) |
CVSROOT: /webcvs/grep
Module name: grep
Changes by: Jim Meyering <meyering> 18/12/30 01:24:22
Index: grep.txt
===================================================================
RCS file: /webcvs/grep/grep/manual/grep.txt,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- grep.txt 10 Feb 2017 04:43:36 -0000 1.28
+++ grep.txt 30 Dec 2018 06:24:21 -0000 1.29
@@ -20,21 +20,22 @@
3.5 Back-references and Subexpressions
3.6 Basic vs Extended Regular Expressions
4 Usage
-5 Reporting bugs
- 5.1 Known Bugs
-6 Copying
- 6.1 GNU Free Documentation License
+5 Performance
+6 Reporting bugs
+ 6.1 Known Bugs
+7 Copying
+ 7.1 GNU Free Documentation License
Index
grep
****
-âgrepâ prints lines that contain a match for a pattern.
+âgrepâ prints lines that contain a match for one or more patterns.
- This manual is for version 3.0 of GNU Grep.
+ This manual is for version 3.3 of GNU Grep.
This manual is for âgrepâ, a pattern matching engine.
- Copyright © 1999-2002, 2005, 2008-2017 Free Software Foundation, Inc.
+ Copyright © 1999-2002, 2005, 2008-2018 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License,
@@ -46,8 +47,8 @@
1 Introduction
**************
-âgrepâ searches input files for lines containing a match to a given
-pattern list. When it finds a match in a line, it copies the line to
+Given one or more patterns, âgrepâ searches input files for matches to
+the patterns. When it finds a match in a line, it copies the line to
standard output (by default), or produces whatever other sort of output
you have requested with options.
@@ -63,12 +64,13 @@
The general synopsis of the âgrepâ command line is
- grep OPTIONS PATTERN INPUT_FILE_NAMES
+ grep [OPTION...] [PATTERNS] [FILE...]
-There can be zero or more OPTIONS. PATTERN will only be seen as such
-(and not as an INPUT_FILE_NAME) if it wasnât already specified within
-OPTIONS (by using the â-e PATTERNâ or â-f FILEâ options). There can be
-zero or more INPUT_FILE_NAMES.
+
+ There can be zero or more OPTION arguments, and zero or more FILE
+arguments. The PATTERNS argument contains one or more patterns
+separated by newlines, and is omitted when patterns are given via the
+â-e PATTERNSâ or â-f FILEâ options.
2.1 Command-line Options
========================
@@ -98,11 +100,12 @@
2.1.2 Matching Control
----------------------
-â-e PATTERNâ
-â--regexp=PATTERNâ
- Use PATTERN as the pattern. If this option is used multiple times
- or is combined with the â-fâ (â--fileâ) option, search for all
- patterns given. (â-eâ is specified by POSIX.)
+â-e PATTERNSâ
+â--regexp=PATTERNSâ
+ Use PATTERNS as one or more patterns; newlines within PATTERNS
+ separate each pattern from the next. If this option is used
+ multiple times or is combined with the â-fâ (â--fileâ) option,
+ search for all patterns given. (â-eâ is specified by POSIX.)
â-f FILEâ
â--file=FILEâ
@@ -143,16 +146,23 @@
The test is that the matching substring must either be at the
beginning of the line, or preceded by a non-word constituent
character. Similarly, it must be either at the end of the line or
- followed by a non-word constituent character. Word-constituent
+ followed by a non-word constituent character. Word constituent
characters are letters, digits, and the underscore. This option
has no effect if â-xâ is also specified.
+ Because the â-wâ option can match a substring that does not begin
+ and end with word constituents, it differs from surrounding a
+ regular expression with â\<â and â\>â. For example, although
âgrep
+ -w @â matches a line containing only address@hidden, âgrep '\<@\>'â
cannot
+ match any line because address@hidden is not a word constituent. *Note
The
+ Backslash Character and Special Expressions::.
+
â-xâ
â--line-regexpâ
- Select only those matches that exactly match the whole line. For a
- regular expression pattern, this is like parenthesizing the pattern
- and then surrounding it with â^â and â$â. (â-xâ is specified
by
- POSIX.)
+ Select only those matches that exactly match the whole line. For
+ regular expression patterns, this is like parenthesizing each
+ pattern and then surrounding it with â^â and â$â. (â-xâ is
+ specified by POSIX.)
2.1.3 General Output Control
----------------------------
@@ -193,13 +203,12 @@
â-m NUMâ
â--max-count=NUMâ
- Stop reading a file after NUM matching lines. If the input is
- standard input from a regular file, and NUM matching lines are
- output, âgrepâ ensures that the standard input is positioned just
- after the last matching line before exiting, regardless of the
- presence of trailing context lines. This enables a calling process
- to resume a search. For example, the following shell script makes
- use of it:
+ Stop after the first NUM selected lines. If the input is standard
+ input from a regular file, and NUM selected lines are output,
+ âgrepâ ensures that the standard input is positioned just after the
+ last selected line before exiting, regardless of the presence of
+ trailing context lines. This enables a calling process to resume a
+ search. For example, the following shell script makes use of it:
while grep -m 1 PATTERN
do
@@ -216,12 +225,11 @@
echo xxxx
done
- When âgrepâ stops after NUM matching lines, it outputs any trailing
- context lines. Since context does not include matching lines,
- âgrepâ will stop when it encounters another matching line. When
- the â-câ or â--countâ option is also used, âgrepâ does not
output a
- count greater than NUM. When the â-vâ or â--invert-matchâ option
- is also used, âgrepâ stops after outputting NUM non-matching lines.
+ When âgrepâ stops after NUM selected lines, it outputs any trailing
+ context lines. When the â-câ or â--countâ option is also used,
+ âgrepâ does not output a count greater than NUM. When the â-vâ or
+ â--invert-matchâ option is also used, âgrepâ stops after
outputting
+ NUM non-matching lines.
â-oâ
â--only-matchingâ
@@ -264,9 +272,7 @@
â--byte-offsetâ
Print the 0-based byte offset within the input file before each
line of output. If â-oâ (â--only-matchingâ) is specified, print
- the offset of the matching part itself. When âgrepâ runs on MS-DOS
- or MS-Windows, the printed byte offsets depend on whether the â-uâ
- (â--unix-byte-offsetsâ) option is used; see below.
+ the offset of the matching part itself.
â-Hâ
â--with-filenameâ
@@ -300,16 +306,6 @@
numbers and byte offsets so that lines from a single file all start
at the same column.
-â-uâ
-â--unix-byte-offsetsâ
- Report Unix-style byte offsets. This option causes âgrepâ to
- report byte offsets as if the file were a Unix-style text file,
- i.e., the byte offsets ignore carriage returns that were stripped.
- This will produce results identical to running âgrepâ on a Unix
- machine. This option has no effect unless the â-bâ option is also
- used; it has no effect on platforms other than MS-DOS and
- MS-Windows.
-
â-Zâ
â--nullâ
Output a zero byte (the ASCII NUL character) instead of the
@@ -390,7 +386,7 @@
Variables::), or null input bytes when the â-zâ (â--null-dataâ)
option is not given (*note Other Options::).
- By default, TYPE is âbinaryâ, and âgrepâ suppresses output afer
+ By default, TYPE is âbinaryâ, and âgrepâ suppresses output after
null input binary data is discovered, and suppresses output lines
that contain improperly encoded data. When some output is
suppressed, âgrepâ follows any output with a one-line message
@@ -486,22 +482,36 @@
2.1.7 Other Options
-------------------
+â--â
+ Delimit the option list. Later arguments, if any, are treated as
+ operands even if they begin with â-â. For example, âgrep PAT --
+ -file1 file2â searches for the pattern PAT in the files named
+ â-file1â and âfile2â.
+
â--line-bufferedâ
Use line buffering on output. This can cause a performance
penalty.
â-Uâ
â--binaryâ
- Treat the file(s) as binary. By default, under MS-DOS and
- MS-Windows, âgrepâ guesses whether a file is text or binary as
- described for the â--binary-filesâ option. If âgrepâ decides the
- file is a text file, it strips carriage returns from the original
- file contents (to make regular expressions with â^â and â$â work
- correctly). Specifying â-Uâ overrules this guesswork, causing all
- files to be read and passed to the matching mechanism verbatim; if
- the file is a text file with âCR/LFâ pairs at the end of each line,
- this will cause some regular expressions to fail. This option has
- no effect on platforms other than MS-DOS and MS-Windows.
+ On platforms that distinguish between text and binary I/O, use the
+ latter when reading and writing files other than the userâs
+ terminal, so that all input bytes are read and written as-is. This
+ overrides the default behavior where âgrepâ follows the operating
+ systemâs advice whether to use text or binary I/O. On MS-Windows
+ when âgrepâ uses text I/O it reads a carriage returnânewline pair
+ as a newline and a Control-Z as end-of-file, and it writes a
+ newline as a carriage returnânewline pair.
+
+ When using text I/O â--byte-offsetâ (â-bâ) counts and
+ â--binary-filesâ heuristics apply to input data after text-I/O
+ processing. Also, the â--binary-filesâ heuristics need not agree
+ with the â--binaryâ option; that is, they may treat the data as
+ text even if â--binaryâ is given, or vice versa. *Note File and
+ Directory Selection::.
+
+ This option has no effect on GNU and other POSIX-compatible
+ platforms, which do not distinguish text from binary I/O.
â-zâ
â--null-dataâ
@@ -680,7 +690,18 @@
whitespace. This category also determines the character encoding,
that is, whether text is encoded in UTF-8, ASCII, or some other
encoding. In the âCâ or âPOSIXâ locale, all characters are
encoded
- as a single byte and every byte is a valid character.
+ as a single byte and every byte is a valid character. In
+ more-complex encodings such as UTF-8, a sequence of multiple bytes
+ may be needed to represent a character, and some bytes may be
+ encoding errors that do not contribute to the representation of any
+ character. POSIX does not specify the behavior of âgrepâ when
+ patterns or input data contain encoding errors or null characters,
+ so portable scripts should avoid such usage. As an extension to
+ POSIX, GNU âgrepâ treats null characters like any other character.
+ However, unless the â-aâ (â--binary-files=textâ) option is used,
+ the presence of null characters in input or of encoding errors in
+ output causes GNU âgrepâ to treat the file as binary and suppress
+ details about matches. *Note File and Directory Selection::.
âLANGUAGEâ
âLC_ALLâ
@@ -713,16 +734,18 @@
===============
Normally the exit status is 0 if a line is selected, 1 if no lines were
-selected, and 2 if an error occurred. However, if the â-qâ or
â--quietâ
-or â--silentâ option is used and a line is selected, the exit status is
-0 even if an error occurred. Other âgrepâ implementations may exit with
-status greater than 2 on error.
+selected, and 2 if an error occurred. However, if the â-Lâ or
+â--files-without-matchâ is used, the exit status is 0 if a file is
+listed, 1 if no files were listed, and 2 if an error occurred. Also, if
+the â-qâ or â--quietâ or â--silentâ option is used and a line is
+selected, the exit status is 0 even if an error occurred. Other âgrepâ
+implementations may exit with status greater than 2 on error.
2.4 âgrepâ Programs
===================
âgrepâ searches the named input files for lines containing a match to
-the given pattern. By default, âgrepâ prints the matching lines. A
+the given patterns. By default, âgrepâ prints the matching lines. A
file named â-â stands for standard input. If no input is specified,
âgrepâ searches the working directory â.â if given a command-line
option
specifying recursion; otherwise, âgrepâ searches standard input. There
@@ -730,26 +753,26 @@
â-Gâ
â--basic-regexpâ
- Interpret the pattern as a basic regular expression (BRE). This is
+ Interpret patterns as basic regular expressions (BREs). This is
the default.
â-Eâ
â--extended-regexpâ
- Interpret the pattern as an extended regular expression (ERE).
- (â-Eâ is specified by POSIX.)
+ Interpret patterns as extended regular expressions (EREs). (â-Eâ
+ is specified by POSIX.)
â-Fâ
â--fixed-stringsâ
- Interpret the pattern as a list of fixed strings (instead of
- regular expressions), separated by newlines, any of which is to be
- matched. (â-Fâ is specified by POSIX.)
+ Interpret patterns as fixed strings, not regular expressions.
+ (â-Fâ is specified by POSIX.)
â-Pâ
â--perl-regexpâ
- Interpret the pattern as a Perl-compatible regular expression
- (PCRE). This is highly experimental, particularly when combined
- with the â-zâ (â--null-dataâ) option, and âgrep -Pâ may warn
of
- unimplemented features. *Note Other Options::.
+ Interpret patterns as Perl-compatible regular expressions (PCREs).
+ PCRE support is here to stay, but consider this option experimental
+ when combined with the â-zâ (â--null-dataâ) option, and note that
+ âgrep -Pâ may warn of unimplemented features. *Note Other
+ Options::.
In addition, two variant programs âegrepâ and âfgrepâ are available.
âegrepâ is the same as âgrep -Eâ. âfgrepâ is the same as âgrep
-Fâ.
@@ -764,7 +787,7 @@
Regular expressions are constructed analogously to arithmetic
expressions, by using various operators to combine smaller expressions.
âgrepâ understands three different versions of regular expression
-syntax: âbasicâ (BRE), âextendedâ (ERE) and âperlâ (PCRE). In GNU
+syntax: basic (BRE), extended (ERE), and Perl-compatible (PCRE). In GNU
âgrepâ, there is no difference in available functionality between the
basic and extended syntaxes. In other implementations, basic regular
expressions are less powerful. The following description applies to
@@ -782,12 +805,12 @@
are regular expressions that match themselves. Any meta-character with
special meaning may be quoted by preceding it with a backslash.
+ The period â.â matches any single character. It is unspecified
+whether â.â matches an encoding error.
+
A regular expression may be followed by one of several repetition
operators:
-â.â
- The period â.â matches any single character.
-
â?â
The preceding item is optional and will be matched at most once.
@@ -829,10 +852,12 @@
=============================================
A âbracket expressionâ is a list of characters enclosed by â[â and
â]â.
-It matches any single character in that list; if the first character of
+It matches any single character in that list. If the first character of
the list is the caret â^â, then it matches any character *not* in the
-list. For example, the regular expression â[0123456789]â matches any
-single digit.
+list, and it is unspecified whether it matches an encoding error. For
+example, the regular expression â[0123456789]â matches any single digit,
+whereas â[^()]â matches any single character that is not an opening or
+closing parenthesis, and might or might not match an encoding error.
Within a bracket expression, a ârange expressionâ consists of two
characters separated by a hyphen. It matches any single character that
@@ -1209,15 +1234,84 @@
âfgrepâ stands for Fixed âgrepâ; âegrepâ stands for Extended
âgrepâ.
-5 Reporting bugs
+5 Performance
+*************
+
+Typically âgrepâ is an efficient way to search text. However, it can be
+quite slow in some cases, and it can search large files where even minor
+performance tweaking can help significantly. Although the algorithm
+used by âgrepâ is an implementation detail that can change from release
+to release, understanding its basic strengths and weaknesses can help
+you improve its performance.
+
+ The âgrepâ command operates partly via a set of automata that are
+designed for efficiency, and partly via a slower matcher that takes over
+when the fast matchers run into unusual features like back-references.
+When feasible, the BoyerâMoore fast string searching algorithm is used
+to match a single fixed pattern, and the AhoâCorasick algorithm is used
+to match multiple fixed patterns.
+
+ Generally speaking âgrepâ operates more efficiently in single-byte
+locales, since it can avoid the special processing needed for multi-byte
+characters. If your patterns will work just as well that way, setting
+âLC_ALLâ to a single-byte locale can help performance considerably.
+Setting âLC_ALL='C'â can be particularly efficient, as âgrepâ is tuned
+for that locale.
+
+ Outside the âCâ locale, case-insensitive search, and search for
+bracket expressions like â[a-z]â and â[[=a=]b]â, can be surprisingly
+inefficient due to difficulties in fast portable access to concepts like
+multi-character collating elements.
+
+ A back-reference such as â\1â can hurt performance significantly in
+some cases, since back-references cannot in general be implemented via a
+finite state automaton, and instead trigger a backtracking algorithm
+that can be quite inefficient. For example, although the pattern
+â^(.*)\1{14}(.*)\2{13}$â matches only lines whose lengths can be written
+as a sum 15x + 14y for nonnegative integers x and y, the pattern matcher
+does not perform linear Diophantine analysis and instead backtracks
+through all possible matching strings, using an algorithm that is
+exponential in the worst case.
+
+ On some operating systems that support files with holesâlarge regions
+of zeros that are not physically present on secondary storageââgrepâ can
+skip over the holes efficiently without needing to read the zeros. This
+optimization is not available if the â-aâ (â--binary-files=textâ)
option
+is used (*note File and Directory Selection::), unless the â-zâ
+(â--null-dataâ) option is also used (*note Other Options::).
+
+ For more about the algorithms used by âgrepâ and about related string
+matching algorithms, see:
+
+ ⢠Aho AV. Algorithms for finding patterns in strings. In: van Leeuwen
+ J. _Handbook of Theoretical Computer Science_, vol. A. New York:
+ Elsevier; 1990. p. 255â300. This surveys classic string matching
+ algorithms, some of which are used by âgrepâ.
+
+ ⢠Aho AV, Corasick MJ. Efficient string matching: an aid to
+ bibliographic search. _CACM_. 1975;18(6):333â40.
+ <https://dx.doi.org/10.1145/360825.360855>. This introduces the
+ AhoâCorasick algorithm.
+
+ ⢠Boyer RS, Moore JS. A fast string searching algorithm. _CACM_.
+ 1977;20(10):762â72. <https://dx.doi.org/10.1145/359842.359859>.
+ This introduces the BoyerâMoore algorithm.
+
+ ⢠Faro S, Lecroq T. The exact online string matching problem: a
+ review of the most recent results. _ACM Comput Surv_.
+ 2013;45(2):13. <https://dx.doi.org/10.1145/2431211.2431212>. This
+ surveys string matching algorithms that might help improve the
+ performance of âgrepâ in the future.
+
+6 Reporting bugs
****************
Bug reports can be found at the GNU bug report logs for âgrepâ
-(http://debbugs.gnu.org/cgi/pkgreport.cgi?package=grep). If you find a
+(https://debbugs.gnu.org/cgi/pkgreport.cgi?package=grep). If you find a
bug not listed there, please email it to <address@hidden> to create a
new bug report.
-5.1 Known Bugs
+6.1 Known Bugs
==============
Large repetition counts in the â{n,m}â construct may cause âgrepâ to
use
@@ -1227,7 +1321,7 @@
Back-references are very slow, and may require exponential time.
-6 Copying
+7 Copying
*********
GNU âgrepâ is licensed under the GNU GPL, which makes it âfree
@@ -1243,20 +1337,20 @@
This general method of licensing software is sometimes called âopen
sourceâ. The GNU project prefers the term âfree softwareâ for reasons
outlined at
-<http://www.gnu.org/philosophy/open-source-misses-the-point.html>.
+<https://www.gnu.org/philosophy/open-source-misses-the-point.html>.
This manual is free documentation in the same sense. The
documentation license is included below. The license for the program is
available with the source code, or at
-<http://www.gnu.org/licenses/gpl.html>.
+<https://www.gnu.org/licenses/gpl.html>.
-6.1 GNU Free Documentation License
+7.1 GNU Free Documentation License
==================================
Version 1.3, 3 November 2008
Copyright © 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
- <http://fsf.org/>
+ <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -1653,7 +1747,7 @@
the GNU Free Documentation License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns. See
- <http://www.gnu.org/copyleft/>.
+ <https://www.gnu.org/copyleft/>.
Each version of the License is given a distinguishing version
number. If the Document specifies that a particular numbered
@@ -1735,474 +1829,477 @@
* Menu:
* *: Fundamental Structure.
- (line 794)
+ (line 817)
* +: Fundamental Structure.
- (line 797)
+ (line 820)
+* --: Other Options. (line 485)
* --after-context: Context Line Control.
- (line 335)
-* --basic-regexp: grep Programs. (line 732)
+ (line 331)
+* --basic-regexp: grep Programs. (line 755)
* --before-context: Context Line Control.
- (line 339)
-* --binary: Other Options. (line 494)
+ (line 335)
+* --binary: Other Options. (line 496)
* --binary-files: File and Directory Selection.
- (line 385)
+ (line 381)
* --byte-offset: Output Line Prefix Control.
- (line 264)
+ (line 272)
* --color: General Output Control.
- (line 167)
+ (line 177)
* --colour: General Output Control.
- (line 167)
+ (line 177)
* --context: Context Line Control.
- (line 344)
+ (line 340)
* --count: General Output Control.
- (line 161)
+ (line 171)
* --dereference-recursive: File and Directory Selection.
- (line 482)
+ (line 478)
* --devices: File and Directory Selection.
- (line 424)
+ (line 420)
* --directories: File and Directory Selection.
- (line 435)
+ (line 431)
* --exclude: File and Directory Selection.
- (line 446)
+ (line 442)
* --exclude-dir: File and Directory Selection.
- (line 459)
-* --exclude-from: File and Directory Selection.
(line 455)
-* --extended-regexp: grep Programs. (line 737)
-* --file: Matching Control. (line 108)
+* --exclude-from: File and Directory Selection.
+ (line 451)
+* --extended-regexp: grep Programs. (line 760)
+* --file: Matching Control. (line 111)
* --files-with-matches: General Output Control.
- (line 188)
+ (line 198)
* --files-without-match: General Output Control.
- (line 182)
-* --fixed-strings: grep Programs. (line 742)
+ (line 192)
+* --fixed-strings: grep Programs. (line 765)
* --group-separator: Context Line Control.
- (line 347)
+ (line 343)
* --group-separator <1>: Context Line Control.
- (line 351)
+ (line 347)
* --help: Generic Program Information.
- (line 89)
-* --ignore-case: Matching Control. (line 117)
+ (line 91)
+* --ignore-case: Matching Control. (line 120)
* --include: File and Directory Selection.
- (line 469)
+ (line 465)
* --initial-tab: Output Line Prefix Control.
- (line 295)
-* --invert-match: Matching Control. (line 136)
+ (line 301)
+* --invert-match: Matching Control. (line 139)
* --label: Output Line Prefix Control.
- (line 282)
-* --line-buffered: Other Options. (line 489)
+ (line 288)
+* --line-buffered: Other Options. (line 491)
* --line-number: Output Line Prefix Control.
- (line 290)
-* --line-regexp: Matching Control. (line 151)
+ (line 296)
+* --line-regexp: Matching Control. (line 161)
* --max-count: General Output Control.
- (line 195)
+ (line 205)
* --no-filename: Output Line Prefix Control.
- (line 277)
+ (line 283)
* --no-messages: General Output Control.
- (line 242)
+ (line 250)
* --null: Output Line Prefix Control.
- (line 314)
-* --null-data: Other Options. (line 507)
+ (line 310)
+* --null-data: Other Options. (line 517)
* --only-matching: General Output Control.
- (line 227)
-* --perl-regexp: grep Programs. (line 748)
-* --quiet: General Output Control.
(line 235)
+* --perl-regexp: grep Programs. (line 770)
+* --quiet: General Output Control.
+ (line 243)
* --recursive: File and Directory Selection.
- (line 474)
-* --regexp=PATTERN: Matching Control. (line 102)
+ (line 470)
+* --regexp=PATTERNS: Matching Control. (line 104)
* --silent: General Output Control.
- (line 235)
+ (line 243)
* --text: File and Directory Selection.
- (line 381)
-* --unix-byte-offsets: Output Line Prefix Control.
- (line 304)
+ (line 377)
* --version: Generic Program Information.
- (line 94)
+ (line 96)
* --with-filename: Output Line Prefix Control.
- (line 272)
-* --word-regexp: Matching Control. (line 141)
+ (line 278)
+* --word-regexp: Matching Control. (line 144)
* -A: Context Line Control.
- (line 335)
+ (line 331)
* -a: File and Directory Selection.
- (line 381)
+ (line 377)
* -b: Output Line Prefix Control.
- (line 264)
+ (line 272)
* -B: Context Line Control.
- (line 339)
+ (line 335)
* -c: General Output Control.
- (line 161)
+ (line 171)
* -C: Context Line Control.
- (line 344)
+ (line 340)
* -D: File and Directory Selection.
- (line 424)
+ (line 420)
* -d: File and Directory Selection.
- (line 435)
-* -e: Matching Control. (line 102)
-* -E: grep Programs. (line 737)
-* -f: Matching Control. (line 108)
-* -F: grep Programs. (line 742)
-* -G: grep Programs. (line 732)
+ (line 431)
+* -e: Matching Control. (line 104)
+* -E: grep Programs. (line 760)
+* -f: Matching Control. (line 111)
+* -F: grep Programs. (line 765)
+* -G: grep Programs. (line 755)
* -H: Output Line Prefix Control.
- (line 272)
+ (line 278)
* -h: Output Line Prefix Control.
- (line 277)
-* -i: Matching Control. (line 117)
+ (line 283)
+* -i: Matching Control. (line 120)
* -L: General Output Control.
- (line 182)
+ (line 192)
* -l: General Output Control.
- (line 188)
+ (line 198)
* -m: General Output Control.
- (line 195)
+ (line 205)
* -n: Output Line Prefix Control.
- (line 290)
+ (line 296)
* -NUM: Context Line Control.
- (line 344)
+ (line 340)
* -o: General Output Control.
- (line 227)
-* -P: grep Programs. (line 748)
-* -q: General Output Control.
(line 235)
+* -P: grep Programs. (line 770)
+* -q: General Output Control.
+ (line 243)
* -r: File and Directory Selection.
- (line 474)
+ (line 470)
* -R: File and Directory Selection.
- (line 482)
+ (line 478)
* -s: General Output Control.
- (line 242)
+ (line 250)
* -T: Output Line Prefix Control.
- (line 295)
-* -u: Output Line Prefix Control.
- (line 304)
-* -U: Other Options. (line 494)
+ (line 301)
+* -U: Other Options. (line 496)
* -V: Generic Program Information.
- (line 94)
-* -v: Matching Control. (line 136)
-* -w: Matching Control. (line 141)
-* -x: Matching Control. (line 151)
-* -y: Matching Control. (line 117)
+ (line 96)
+* -v: Matching Control. (line 139)
+* -w: Matching Control. (line 144)
+* -x: Matching Control. (line 161)
+* -y: Matching Control. (line 120)
* -Z: Output Line Prefix Control.
- (line 314)
-* -z: Other Options. (line 507)
+ (line 310)
+* -z: Other Options. (line 517)
* .: Fundamental Structure.
- (line 788)
+ (line 807)
* ?: Fundamental Structure.
- (line 791)
+ (line 814)
* _N_GNU_nonoption_argv_flags_ environment variable: Environment Variables.
- (line 702)
+ (line 723)
* {,M}: Fundamental Structure.
- (line 806)
+ (line 829)
* {N,M}: Fundamental Structure.
- (line 810)
+ (line 833)
* {N,}: Fundamental Structure.
- (line 803)
+ (line 826)
* {N}: Fundamental Structure.
- (line 800)
+ (line 823)
* after context: Context Line Control.
- (line 335)
+ (line 331)
* alnum character class: Character Classes and Bracket
Expressions.
- (line 853)
+ (line 878)
* alpha character class: Character Classes and Bracket
Expressions.
- (line 858)
+ (line 883)
* alphabetic characters: Character Classes and Bracket
Expressions.
- (line 858)
+ (line 883)
* alphanumeric characters: Character Classes and Bracket
Expressions.
- (line 853)
-* anchoring: Anchoring. (line 981)
+ (line 878)
+* anchoring: Anchoring. (line 1006)
* asterisk: Fundamental Structure.
- (line 794)
+ (line 817)
* back-reference: Back-references and Subexpressions.
- (line 989)
+ (line 1014)
+* back-references: Performance. (line 1266)
* backslash: The Backslash Character and Special
Expressions.
- (line 948)
-* basic regular expressions: Basic vs Extended. (line 1001)
+ (line 973)
+* basic regular expressions: Basic vs Extended. (line 1026)
* before context: Context Line Control.
- (line 339)
+ (line 335)
* binary files: File and Directory Selection.
- (line 381)
+ (line 377)
* binary files <1>: File and Directory Selection.
- (line 385)
-* binary files, MS-DOS/MS-Windows: Other Options. (line 494)
+ (line 381)
+* binary I/O: Other Options. (line 496)
* blank character class: Character Classes and Bracket
Expressions.
- (line 863)
+ (line 888)
* blank characters: Character Classes and Bracket
Expressions.
- (line 863)
+ (line 888)
* bn GREP_COLORS capability: Environment Variables.
- (line 643)
+ (line 653)
* braces, first argument omitted: Fundamental Structure.
- (line 806)
+ (line 829)
* braces, one argument: Fundamental Structure.
- (line 800)
+ (line 823)
* braces, second argument omitted: Fundamental Structure.
- (line 803)
+ (line 826)
* braces, two arguments: Fundamental Structure.
- (line 810)
+ (line 833)
* bracket expression: Character Classes and Bracket
Expressions.
- (line 830)
-* Bugs, known: Reporting Bugs. (line 1223)
-* bugs, reporting: Reporting Bugs. (line 1215)
+ (line 853)
+* Bugs, known: Reporting Bugs. (line 1317)
+* bugs, reporting: Reporting Bugs. (line 1309)
* byte offset: Output Line Prefix Control.
- (line 264)
-* byte offsets, on MS-DOS/MS-Windows: Output Line Prefix Control.
- (line 304)
-* case insensitive search: Matching Control. (line 117)
+ (line 272)
+* case insensitive search: Matching Control. (line 120)
+* case insensitive search <1>: Performance. (line 1261)
* changing name of standard input: Output Line Prefix Control.
- (line 282)
+ (line 288)
* character class: Character Classes and Bracket
Expressions.
- (line 830)
+ (line 853)
* character classes: Character Classes and Bracket
Expressions.
- (line 852)
+ (line 877)
* character type: Environment Variables.
- (line 670)
+ (line 680)
* classes of characters: Character Classes and Bracket
Expressions.
- (line 852)
+ (line 877)
* cntrl character class: Character Classes and Bracket
Expressions.
- (line 866)
+ (line 891)
* context lines: General Output Control.
- (line 218)
+ (line 227)
* context lines <1>: Context Line Control.
- (line 326)
+ (line 322)
* context lines <2>: Context Line Control.
- (line 344)
+ (line 340)
* context lines, after match: Context Line Control.
- (line 335)
+ (line 331)
* context lines, before match: Context Line Control.
- (line 339)
+ (line 335)
* control characters: Character Classes and Bracket
Expressions.
- (line 866)
-* copying: Copying. (line 1233)
+ (line 891)
+* copying: Copying. (line 1327)
* counting lines: General Output Control.
- (line 161)
+ (line 171)
* cx GREP_COLORS capability: Environment Variables.
- (line 594)
+ (line 604)
* default options environment variable: Environment Variables.
- (line 554)
+ (line 564)
* device search: File and Directory Selection.
- (line 424)
+ (line 420)
* digit character class: Character Classes and Bracket
Expressions.
- (line 871)
+ (line 896)
* digit characters: Character Classes and Bracket
Expressions.
- (line 871)
+ (line 896)
* directory search: File and Directory Selection.
- (line 435)
+ (line 431)
* dot: Fundamental Structure.
- (line 788)
+ (line 807)
+* encoding error: Environment Variables.
+ (line 687)
* environment variables: Environment Variables.
- (line 553)
+ (line 563)
* exclude directories: File and Directory Selection.
- (line 459)
+ (line 455)
* exclude files: File and Directory Selection.
- (line 446)
+ (line 442)
* exclude files <1>: File and Directory Selection.
- (line 455)
-* exit status: Exit Status. (line 714)
-* FAQ about grep usage: Usage. (line 1031)
+ (line 451)
+* exit status: Exit Status. (line 735)
+* FAQ about grep usage: Usage. (line 1056)
* files which donât match: General Output Control.
- (line 182)
+ (line 192)
* fn GREP_COLORS capability: Environment Variables.
- (line 633)
+ (line 643)
* fn GREP_COLORS capability <1>: Environment Variables.
- (line 648)
+ (line 658)
* graph character class: Character Classes and Bracket
Expressions.
- (line 874)
+ (line 899)
* graphic characters: Character Classes and Bracket
Expressions.
- (line 874)
-* grep programs: grep Programs. (line 723)
+ (line 899)
+* grep programs: grep Programs. (line 746)
* GREP_COLOR environment variable: Environment Variables.
- (line 567)
+ (line 577)
* GREP_COLORS environment variable: Environment Variables.
- (line 578)
+ (line 588)
* GREP_OPTIONS environment variable: Environment Variables.
- (line 554)
+ (line 564)
* group separator: Context Line Control.
- (line 347)
+ (line 343)
* group separator <1>: Context Line Control.
- (line 351)
+ (line 347)
* hexadecimal digits: Character Classes and Bracket
Expressions.
- (line 898)
+ (line 923)
* highlight markers: Environment Variables.
- (line 567)
+ (line 577)
* highlight markers <1>: Environment Variables.
- (line 578)
+ (line 588)
* highlight, color, colour: General Output Control.
- (line 167)
+ (line 177)
+* holes in files: Performance. (line 1276)
* include files: File and Directory Selection.
- (line 469)
-* interval specifications: Basic vs Extended. (line 1005)
-* invert matching: Matching Control. (line 136)
+ (line 465)
+* interval specifications: Basic vs Extended. (line 1030)
+* invert matching: Matching Control. (line 139)
* LANG environment variable: Environment Variables.
- (line 518)
+ (line 528)
* LANG environment variable <1>: Environment Variables.
- (line 670)
+ (line 680)
* LANG environment variable <2>: Environment Variables.
- (line 677)
+ (line 687)
* LANG environment variable <3>: Environment Variables.
- (line 688)
+ (line 709)
* LANGUAGE environment variable: Environment Variables.
- (line 518)
+ (line 528)
* LANGUAGE environment variable <1>: Environment Variables.
- (line 688)
+ (line 709)
* language of messages: Environment Variables.
- (line 688)
+ (line 709)
* LC_ALL environment variable: Environment Variables.
- (line 518)
+ (line 528)
* LC_ALL environment variable <1>: Environment Variables.
- (line 670)
+ (line 680)
* LC_ALL environment variable <2>: Environment Variables.
- (line 677)
+ (line 687)
* LC_ALL environment variable <3>: Environment Variables.
- (line 688)
+ (line 709)
* LC_COLLATE environment variable: Environment Variables.
- (line 670)
+ (line 680)
* LC_CTYPE environment variable: Environment Variables.
- (line 677)
+ (line 687)
* LC_MESSAGES environment variable: Environment Variables.
- (line 518)
+ (line 528)
* LC_MESSAGES environment variable <1>: Environment Variables.
- (line 688)
-* line buffering: Other Options. (line 489)
+ (line 709)
+* line buffering: Other Options. (line 491)
* line numbering: Output Line Prefix Control.
- (line 290)
+ (line 296)
* ln GREP_COLORS capability: Environment Variables.
- (line 638)
+ (line 648)
+* locales: Performance. (line 1254)
* lower character class: Character Classes and Bracket
Expressions.
- (line 877)
+ (line 902)
* lower-case letters: Character Classes and Bracket
Expressions.
- (line 877)
+ (line 902)
* match expression at most M times: Fundamental Structure.
- (line 806)
+ (line 829)
* match expression at most once: Fundamental Structure.
- (line 791)
+ (line 814)
* match expression from N to M times: Fundamental Structure.
- (line 810)
+ (line 833)
* match expression N or more times: Fundamental Structure.
- (line 803)
+ (line 826)
* match expression N times: Fundamental Structure.
- (line 800)
+ (line 823)
* match expression one or more times: Fundamental Structure.
- (line 797)
+ (line 820)
* match expression zero or more times: Fundamental Structure.
- (line 794)
-* match the whole line: Matching Control. (line 151)
-* matching basic regular expressions: grep Programs. (line 732)
-* matching extended regular expressions: grep Programs. (line 737)
-* matching fixed strings: grep Programs. (line 742)
+ (line 817)
+* match the whole line: Matching Control. (line 161)
+* matching basic regular expressions: grep Programs. (line 755)
+* matching extended regular expressions: grep Programs. (line 760)
+* matching fixed strings: grep Programs. (line 765)
* matching Perl-compatible regular expressions: grep Programs.
- (line 748)
-* matching whole words: Matching Control. (line 141)
+ (line 770)
+* matching whole words: Matching Control. (line 144)
* max-count: General Output Control.
- (line 195)
+ (line 205)
* mc GREP_COLORS capability: Environment Variables.
- (line 625)
+ (line 635)
* message language: Environment Variables.
- (line 688)
+ (line 709)
* ms GREP_COLORS capability: Environment Variables.
- (line 617)
-* MS-DOS/MS-Windows binary files: Other Options. (line 494)
-* MS-DOS/MS-Windows byte offsets: Output Line Prefix Control.
- (line 304)
+ (line 627)
+* MS-Windows binary I/O: Other Options. (line 496)
* mt GREP_COLORS capability: Environment Variables.
- (line 609)
+ (line 619)
* names of matching files: General Output Control.
- (line 188)
+ (line 198)
* national language support: Environment Variables.
- (line 670)
+ (line 680)
* national language support <1>: Environment Variables.
- (line 688)
+ (line 709)
* ne GREP_COLORS capability: Environment Variables.
- (line 655)
+ (line 665)
* NLS: Environment Variables.
- (line 670)
+ (line 680)
* no filename prefix: Output Line Prefix Control.
- (line 277)
+ (line 283)
+* null character: Environment Variables.
+ (line 687)
* numeric characters: Character Classes and Bracket
Expressions.
- (line 871)
+ (line 896)
* only matching: General Output Control.
- (line 227)
-* palindromes: Usage. (line 1153)
-* pattern from file: Matching Control. (line 108)
-* pattern list: Matching Control. (line 102)
+ (line 235)
+* option delimiter: Other Options. (line 485)
+* palindromes: Usage. (line 1178)
+* patterns from file: Matching Control. (line 111)
+* patterns option: Matching Control. (line 104)
+* performance: Performance. (line 1240)
* period: Fundamental Structure.
- (line 788)
+ (line 807)
* plus sign: Fundamental Structure.
- (line 797)
+ (line 820)
* POSIXLY_CORRECT environment variable: Environment Variables.
- (line 693)
+ (line 714)
* print character class: Character Classes and Bracket
Expressions.
- (line 881)
-* print non-matching lines: Matching Control. (line 136)
+ (line 906)
+* print non-matching lines: Matching Control. (line 139)
* printable characters: Character Classes and Bracket
Expressions.
- (line 881)
+ (line 906)
* punct character class: Character Classes and Bracket
Expressions.
- (line 884)
+ (line 909)
* punctuation characters: Character Classes and Bracket
Expressions.
- (line 884)
+ (line 909)
* question mark: Fundamental Structure.
- (line 791)
+ (line 814)
* quiet, silent: General Output Control.
- (line 235)
+ (line 243)
* range expression: Character Classes and Bracket
Expressions.
- (line 836)
+ (line 861)
* recursive search: File and Directory Selection.
- (line 474)
+ (line 470)
* recursive search <1>: File and Directory Selection.
- (line 482)
+ (line 478)
* regular expressions: Regular Expressions.
- (line 762)
-* return status: Exit Status. (line 714)
+ (line 785)
+* return status: Exit Status. (line 735)
* rv GREP_COLORS capability: Environment Variables.
- (line 603)
+ (line 613)
* searching directory trees: File and Directory Selection.
- (line 446)
+ (line 442)
* searching directory trees <1>: File and Directory Selection.
- (line 455)
+ (line 451)
* searching directory trees <2>: File and Directory Selection.
- (line 469)
+ (line 465)
* searching directory trees <3>: File and Directory Selection.
- (line 474)
+ (line 470)
* searching directory trees <4>: File and Directory Selection.
- (line 482)
-* searching for a pattern: Introduction. (line 48)
+ (line 478)
+* searching for patterns: Introduction. (line 49)
* sl GREP_COLORS capability: Environment Variables.
- (line 586)
+ (line 596)
* space character class: Character Classes and Bracket
Expressions.
- (line 889)
+ (line 914)
* space characters: Character Classes and Bracket
Expressions.
- (line 889)
+ (line 914)
* subexpression: Back-references and Subexpressions.
- (line 989)
+ (line 1014)
* suppress binary data: File and Directory Selection.
- (line 381)
+ (line 377)
* suppress error messages: General Output Control.
- (line 242)
+ (line 250)
* symbolic links: File and Directory Selection.
- (line 435)
+ (line 431)
* symbolic links <1>: File and Directory Selection.
- (line 474)
+ (line 470)
* symbolic links <2>: File and Directory Selection.
- (line 482)
+ (line 478)
* tab-aligned content lines: Output Line Prefix Control.
- (line 295)
+ (line 301)
* translation of message language: Environment Variables.
- (line 688)
+ (line 709)
* upper character class: Character Classes and Bracket
Expressions.
- (line 894)
+ (line 919)
* upper-case letters: Character Classes and Bracket
Expressions.
- (line 894)
+ (line 919)
* usage summary, printing: Generic Program Information.
- (line 89)
-* usage, examples: Usage. (line 1020)
-* using grep, Q&A: Usage. (line 1031)
-* variants of grep: grep Programs. (line 723)
+ (line 91)
+* usage, examples: Usage. (line 1045)
+* using grep, Q&A: Usage. (line 1056)
+* variants of grep: grep Programs. (line 746)
* version, printing: Generic Program Information.
- (line 94)
+ (line 96)
* whitespace characters: Character Classes and Bracket
Expressions.
- (line 889)
+ (line 914)
* with filename prefix: Output Line Prefix Control.
- (line 272)
+ (line 278)
* xdigit character class: Character Classes and Bracket
Expressions.
- (line 898)
+ (line 923)
* xdigit class: Character Classes and Bracket
Expressions.
- (line 898)
+ (line 923)
* zero-terminated file names: Output Line Prefix Control.
- (line 314)
-* zero-terminated lines: Other Options. (line 507)
+ (line 310)
+* zero-terminated lines: Other Options. (line 517)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Changes to grep/manual/grep.txt,v,
Jim Meyering <=