[Top][All Lists]
[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: |
Tue, 23 Mar 2010 12:04:25 +0000 |
CVSROOT: /webcvs/grep
Module name: grep
Changes by: Jim Meyering <meyering> 10/03/23 12:04:22
Index: grep.txt
===================================================================
RCS file: /webcvs/grep/grep/manual/grep.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- grep.txt 24 May 2009 18:42:56 -0000 1.1
+++ grep.txt 23 Mar 2010 12:04:16 -0000 1.2
@@ -35,12 +35,12 @@
`grep' prints lines that match a pattern.
- This manual is for version 2.5.4 of GNU Grep.
+ This manual is for version 2.6 of GNU Grep.
This manual is for `grep', a pattern matching engine.
- Copyright (C) 1999, 2000, 2001, 2002, 2005, 2008, 2009 Free Software
-Foundation, Inc.
+ Copyright (C) 1999-2002, 2005, 2008-2010 Free Software Foundation,
+Inc.
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License,
@@ -267,10 +267,10 @@
`--label=LABEL'
Display input actually coming from standard input as input coming
- from file LABEL. This is especially useful for tools like `zgrep';
- e.g.:
+ from file LABEL. This is especially useful when implementing
+ tools like `zgrep'; e.g.:
- gzip -cd foo.gz | grep --label=foo something
+ gzip -cd foo.gz | grep --label=foo -H something
`-n'
`--line-number'
@@ -330,14 +330,24 @@
`--context=NUM'
Print NUM lines of leading and trailing output context.
+`--group-separator=STRING'
+ When `-A', `-B' or `-C' are in use, print STRING instead of `--'
+ around disjoint groups of lines.
+
+`--no-group-separator'
+ When `-A', `-B' or `-C' are in use, print disjoint groups of lines
+ adjacent to each other.
+
Matching lines normally use `:' as a separator between prefix fields
and actual line content. Context (i.e., non-matching) lines use `-'
instead. When no context is specified, matching lines are simply
output one right after another. When nonzero context is specified,
lines that are adjacent in the input form a group and are output one
-right after another, but disjoint groups of lines are separated by a
-`--' without any prefix and on a line of its own. Each group may
+right after another, while a separator appears by default between
+disjoint groups on a line of its own and without any prefix. The
+default separator is `--', however whether to include it and its
+appearance can be changed with the options above. Each group may
contain several matching lines when they are close enough to each other
that two otherwise adjacent but divided groups connect and can just
merge into a single contiguous one.
@@ -418,11 +428,10 @@
penalty.
`--mmap'
- If possible, use the `mmap' system call to read input, instead of
- the default `read' system call. In some situations, `--mmap'
- yields better performance. However, `--mmap' can cause undefined
- behavior (including core dumps) if an input file shrinks while
- `grep' is operating, or if an I/O error occurs.
+ This option is ignored for backwards compatibility. It used to
+ read input with the `mmap' system call, instead of the default
+ `read' system call. On modern systems, `--mmap' rarely if ever
+ yields better performance.
`-U'
`--binary'
@@ -684,12 +693,15 @@
A "regular expression" is a pattern that describes a set of strings.
Regular expressions are constructed analogously to arithmetic
expressions, by using various operators to combine smaller expressions.
-`grep' understands two different versions of regular expression syntax:
-"basic"(BRE) and "extended"(ERE). In GNU `grep', there is no
-difference in available functionality using either syntax. In other
-implementations, basic regular expressions are less powerful. The
-following description applies to extended regular expressions;
-differences for basic regular expressions are summarized afterwards.
+`grep' understands three different versions of regular expression
+syntax: "basic," (BRE) "extended" (ERE) and "perl". In GNU `grep',
+there is no difference in available functionality between basic and
+extended syntaxes. In other implementations, basic regular expressions
+are less powerful. The following description applies to extended
+regular expressions; differences for basic regular expressions are
+summarized afterwards. Perl regular expressions give additional
+functionality, and are documented in pcresyntax(3) and pcrepattern(3),
+but may not be available on every system.
3.1 Fundamental Structure
=========================
@@ -1128,7 +1140,8 @@
Version 1.3, 3 November 2008
- Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2000-2002, 2007-2008, 2010 Free Software Foundation,
+ Inc.
`http://fsf.org/'
Everyone is permitted to copy and distribute verbatim copies
@@ -1609,67 +1622,68 @@
Index
*****
-*: See 3.1. (line 712)
-+: See 3.1. (line 715)
+*: See 3.1. (line 724)
++: See 3.1. (line 727)
--after-context: See 2.1.5. (line 322)
---basic-regexp: See 2.4. (line 654)
+--basic-regexp: See 2.4. (line 663)
--before-context: See 2.1.5. (line 326)
---binary: See 2.1.7. (line 429)
---binary-files: See 2.1.6. (line 354)
+--binary: See 2.1.7. (line 438)
+--binary-files: See 2.1.6. (line 364)
--byte-offset: See 2.1.4. (line 251)
--color: See 2.1.3. (line 158)
--colour: See 2.1.3. (line 158)
--context: See 2.1.5. (line 331)
--count: See 2.1.3. (line 152)
---devices: See 2.1.6. (line 368)
---directories: See 2.1.6. (line 375)
---exclude: See 2.1.6. (line 385)
---exclude-dir: See 2.1.6. (line 394)
---exclude-from: See 2.1.6. (line 390)
---extended-regexp: See 2.4. (line 659)
+--devices: See 2.1.6. (line 378)
+--directories: See 2.1.6. (line 385)
+--exclude: See 2.1.6. (line 395)
+--exclude-dir: See 2.1.6. (line 404)
+--exclude-from: See 2.1.6. (line 400)
+--extended-regexp: See 2.4. (line 668)
--file: See 2.1.2. (line 116)
--files-with-matches: See 2.1.3. (line 179)
--files-without-match: See 2.1.3. (line 173)
---fixed-strings: See 2.4. (line 664)
+--fixed-strings: See 2.4. (line 673)
+--group-separator: See 2.1.5. (line 334)
--help: See 2.1.1. (line 96)
--ignore-case: See 2.1.2. (line 123)
---include: See 2.1.6. (line 402)
+--include: See 2.1.6. (line 412)
--initial-tab: See 2.1.4. (line 282)
--invert-match: See 2.1.2. (line 129)
--label: See 2.1.4. (line 269)
---line-buffered: See 2.1.7. (line 417)
+--line-buffered: See 2.1.7. (line 427)
--line-number: See 2.1.4. (line 277)
--line-regexp: See 2.1.2. (line 143)
--max-count: See 2.1.3. (line 186)
---mmap: See 2.1.7. (line 421)
+--mmap: See 2.1.7. (line 431)
--no-filename: See 2.1.4. (line 264)
--no-messages: See 2.1.3. (line 232)
--null: See 2.1.4. (line 302)
---null-data: See 2.1.7. (line 443)
+--null-data: See 2.1.7. (line 452)
--only-matching: See 2.1.3. (line 219)
---perl-regexp: See 2.4. (line 670)
+--perl-regexp: See 2.4. (line 679)
--quiet: See 2.1.3. (line 225)
---recursive: See 2.1.6. (line 408)
+--recursive: See 2.1.6. (line 418)
--regexp=PATTERN: See 2.1.2. (line 110)
--silent: See 2.1.3. (line 225)
---text: See 2.1.6. (line 350)
+--text: See 2.1.6. (line 360)
--unix-byte-offsets: See 2.1.4. (line 292)
--version: See 2.1.1. (line 101)
--with-filename: See 2.1.4. (line 259)
--word-regexp: See 2.1.2. (line 134)
--a: See 2.1.6. (line 350)
+-a: See 2.1.6. (line 360)
-A: See 2.1.5. (line 322)
-B: See 2.1.5. (line 326)
-b: See 2.1.4. (line 251)
-C: See 2.1.5. (line 331)
-c: See 2.1.3. (line 152)
--d: See 2.1.6. (line 375)
--D: See 2.1.6. (line 368)
--E: See 2.4. (line 659)
+-d: See 2.1.6. (line 385)
+-D: See 2.1.6. (line 378)
+-E: See 2.4. (line 668)
-e: See 2.1.2. (line 110)
--F: See 2.4. (line 664)
+-F: See 2.4. (line 673)
-f: See 2.1.2. (line 116)
--G: See 2.4. (line 654)
+-G: See 2.4. (line 663)
-h: See 2.1.4. (line 264)
-H: See 2.1.4. (line 259)
-i: See 2.1.2. (line 123)
@@ -1679,168 +1693,169 @@
-n: See 2.1.4. (line 277)
-NUM: See 2.1.5. (line 331)
-o: See 2.1.3. (line 219)
--P: See 2.4. (line 670)
+-P: See 2.4. (line 679)
-q: See 2.1.3. (line 225)
--r: See 2.1.6. (line 408)
+-r: See 2.1.6. (line 418)
-s: See 2.1.3. (line 232)
-T: See 2.1.4. (line 282)
--U: See 2.1.7. (line 429)
+-U: See 2.1.7. (line 438)
-u: See 2.1.4. (line 292)
-v: See 2.1.2. (line 129)
-V: See 2.1.1. (line 101)
-w: See 2.1.2. (line 134)
-x: See 2.1.2. (line 143)
-y: See 2.1.2. (line 123)
--z: See 2.1.7. (line 443)
+-z: See 2.1.7. (line 452)
-Z: See 2.1.4. (line 302)
-.: See 3.1. (line 706)
-?: See 3.1. (line 709)
-_N_GNU_nonoption_argv_flags_ environment variable:See 2.2. (line 621)
+.: See 3.1. (line 718)
+?: See 3.1. (line 721)
+_N_GNU_nonoption_argv_flags_ environment variable:See 2.2. (line 630)
after context: See 2.1.5. (line 322)
-alnum character class: See 3.2. (line 769)
-alpha character class: See 3.2. (line 772)
-alphabetic characters: See 3.2. (line 772)
-alphanumeric characters: See 3.2. (line 769)
-anchoring: See 3.4. (line 884)
-asterisk: See 3.1. (line 712)
-back-reference: See 3.5. (line 890)
-backslash: See 3.3. (line 856)
-basic regular expressions: See 3.6. (line 902)
+alnum character class: See 3.2. (line 781)
+alpha character class: See 3.2. (line 784)
+alphabetic characters: See 3.2. (line 784)
+alphanumeric characters: See 3.2. (line 781)
+anchoring: See 3.4. (line 896)
+asterisk: See 3.1. (line 724)
+back-reference: See 3.5. (line 902)
+backslash: See 3.3. (line 868)
+basic regular expressions: See 3.6. (line 914)
before context: See 2.1.5. (line 326)
-binary files: See 2.1.6. (line 350)
-binary files, MS-DOS/MS-Windows: See 2.1.7. (line 429)
-blank character class: See 3.2. (line 775)
-blank characters: See 3.2. (line 775)
-bn GREP_COLORS capability: See 2.2. (line 549)
-braces, first argument omitted: See 3.1. (line 724)
-braces, one argument: See 3.1. (line 718)
-braces, second argument omitted: See 3.1. (line 721)
-braces, two arguments: See 3.1. (line 727)
-bracket expression: See 3.2. (line 746)
-Bugs, known: See 5.1. (line 1097)
-bugs, reporting: See 5. (line 1089)
+binary files: See 2.1.6. (line 360)
+binary files, MS-DOS/MS-Windows: See 2.1.7. (line 438)
+blank character class: See 3.2. (line 787)
+blank characters: See 3.2. (line 787)
+bn GREP_COLORS capability: See 2.2. (line 558)
+braces, first argument omitted: See 3.1. (line 736)
+braces, one argument: See 3.1. (line 730)
+braces, second argument omitted: See 3.1. (line 733)
+braces, two arguments: See 3.1. (line 739)
+bracket expression: See 3.2. (line 758)
+Bugs, known: See 5.1. (line 1109)
+bugs, reporting: See 5. (line 1101)
byte offset: See 2.1.4. (line 251)
byte offsets, on MS-DOS/MS-Windows: See 2.1.4. (line 292)
case insensitive search: See 2.1.2. (line 123)
changing name of standard input: See 2.1.4. (line 269)
-character class: See 3.2. (line 746)
-character classes: See 3.2. (line 768)
-character type: See 2.2. (line 591)
-classes of characters: See 3.2. (line 768)
-cntrl character class: See 3.2. (line 778)
+character class: See 3.2. (line 758)
+character classes: See 3.2. (line 780)
+character type: See 2.2. (line 600)
+classes of characters: See 3.2. (line 780)
+cntrl character class: See 3.2. (line 790)
context: See 2.1.5. (line 331)
context lines, after match: See 2.1.5. (line 322)
context lines, before match: See 2.1.5. (line 326)
-control characters: See 3.2. (line 778)
-copying: See 6. (line 1107)
+control characters: See 3.2. (line 790)
+copying: See 6. (line 1119)
counting lines: See 2.1.3. (line 152)
-cx GREP_COLORS capability: See 2.2. (line 502)
-default options environment variable: See 2.2. (line 465)
-device search: See 2.1.6. (line 368)
-digit character class: See 3.2. (line 783)
-digit characters: See 3.2. (line 783)
-directory search: See 2.1.6. (line 375)
-dot: See 3.1. (line 706)
-environment variables: See 2.2. (line 464)
-exclude directories: See 2.1.6. (line 394)
-exclude files: See 2.1.6. (line 385)
-exit status: See 2.3. (line 634)
-FAQ about grep usage: See 4. (line 932)
+cx GREP_COLORS capability: See 2.2. (line 511)
+default options environment variable: See 2.2. (line 474)
+device search: See 2.1.6. (line 378)
+digit character class: See 3.2. (line 795)
+digit characters: See 3.2. (line 795)
+directory search: See 2.1.6. (line 385)
+dot: See 3.1. (line 718)
+environment variables: See 2.2. (line 473)
+exclude directories: See 2.1.6. (line 404)
+exclude files: See 2.1.6. (line 395)
+exit status: See 2.3. (line 643)
+FAQ about grep usage: See 4. (line 944)
files which don't match: See 2.1.3. (line 173)
-fn GREP_COLORS capability: See 2.2. (line 539)
-graph character class: See 3.2. (line 786)
-graphic characters: See 3.2. (line 786)
-grep programs: See 2.4. (line 646)
-GREP_COLOR environment variable: See 2.2. (line 475)
-GREP_COLORS environment variable: See 2.2. (line 486)
-GREP_OPTIONS environment variable: See 2.2. (line 465)
-hexadecimal digits: See 3.2. (line 808)
-highlight markers: See 2.2. (line 475)
+fn GREP_COLORS capability: See 2.2. (line 548)
+graph character class: See 3.2. (line 798)
+graphic characters: See 3.2. (line 798)
+grep programs: See 2.4. (line 655)
+GREP_COLOR environment variable: See 2.2. (line 484)
+GREP_COLORS environment variable: See 2.2. (line 495)
+GREP_OPTIONS environment variable: See 2.2. (line 474)
+group separator: See 2.1.5. (line 334)
+hexadecimal digits: See 3.2. (line 820)
+highlight markers: See 2.2. (line 484)
highlight, color, colour: See 2.1.3. (line 158)
-include files: See 2.1.6. (line 402)
-interval specifications: See 3.6. (line 906)
+include files: See 2.1.6. (line 412)
+interval specifications: See 3.6. (line 918)
invert matching: See 2.1.2. (line 129)
-LANG environment variable: See 2.2. (line 591)
-language of messages: See 2.2. (line 605)
-LC_ALL environment variable: See 2.2. (line 591)
-LC_COLLATE environment variable: See 2.2. (line 591)
-LC_CTYPE environment variable: See 2.2. (line 598)
-LC_MESSAGES environment variable: See 2.2. (line 605)
-line buffering: See 2.1.7. (line 417)
+LANG environment variable: See 2.2. (line 600)
+language of messages: See 2.2. (line 614)
+LC_ALL environment variable: See 2.2. (line 600)
+LC_COLLATE environment variable: See 2.2. (line 600)
+LC_CTYPE environment variable: See 2.2. (line 607)
+LC_MESSAGES environment variable: See 2.2. (line 614)
+line buffering: See 2.1.7. (line 427)
line numbering: See 2.1.4. (line 277)
-ln GREP_COLORS capability: See 2.2. (line 544)
-lower character class: See 3.2. (line 789)
-lower-case letters: See 3.2. (line 789)
-match expression at most M times: See 3.1. (line 724)
-match expression at most once: See 3.1. (line 709)
-match expression from N to M times: See 3.1. (line 727)
-match expression N or more times: See 3.1. (line 721)
-match expression N times: See 3.1. (line 718)
-match expression one or more times: See 3.1. (line 715)
-match expression zero or more times: See 3.1. (line 712)
+ln GREP_COLORS capability: See 2.2. (line 553)
+lower character class: See 3.2. (line 801)
+lower-case letters: See 3.2. (line 801)
+match expression at most M times: See 3.1. (line 736)
+match expression at most once: See 3.1. (line 721)
+match expression from N to M times: See 3.1. (line 739)
+match expression N or more times: See 3.1. (line 733)
+match expression N times: See 3.1. (line 730)
+match expression one or more times: See 3.1. (line 727)
+match expression zero or more times: See 3.1. (line 724)
match the whole line: See 2.1.2. (line 143)
-matching basic regular expressions: See 2.4. (line 654)
-matching extended regular expressions: See 2.4. (line 659)
-matching fixed strings: See 2.4. (line 664)
-matching Perl regular expressions: See 2.4. (line 670)
+matching basic regular expressions: See 2.4. (line 663)
+matching extended regular expressions: See 2.4. (line 668)
+matching fixed strings: See 2.4. (line 673)
+matching Perl regular expressions: See 2.4. (line 679)
matching whole words: See 2.1.2. (line 134)
max-count: See 2.1.3. (line 186)
-mc GREP_COLORS capability: See 2.2. (line 532)
-memory mapped input: See 2.1.7. (line 421)
-message language: See 2.2. (line 605)
-ms GREP_COLORS capability: See 2.2. (line 525)
-MS-DOS/MS-Windows binary files: See 2.1.7. (line 429)
+mc GREP_COLORS capability: See 2.2. (line 541)
+memory mapped input: See 2.1.7. (line 431)
+message language: See 2.2. (line 614)
+ms GREP_COLORS capability: See 2.2. (line 534)
+MS-DOS/MS-Windows binary files: See 2.1.7. (line 438)
MS-DOS/MS-Windows byte offsets: See 2.1.4. (line 292)
-mt GREP_COLORS capability: See 2.2. (line 517)
+mt GREP_COLORS capability: See 2.2. (line 526)
names of matching files: See 2.1.3. (line 179)
-national language support: See 2.2. (line 591)
-ne GREP_COLORS capability: See 2.2. (line 561)
-NLS: See 2.2. (line 591)
+national language support: See 2.2. (line 600)
+ne GREP_COLORS capability: See 2.2. (line 570)
+NLS: See 2.2. (line 600)
no filename prefix: See 2.1.4. (line 264)
-numeric characters: See 3.2. (line 783)
+numeric characters: See 3.2. (line 795)
only matching: See 2.1.3. (line 219)
-palindromes: See 4. (line 1044)
+palindromes: See 4. (line 1056)
pattern from file: See 2.1.2. (line 116)
pattern list: See 2.1.2. (line 110)
-period: See 3.1. (line 706)
-plus sign: See 3.1. (line 715)
-POSIXLY_CORRECT environment variable: See 2.2. (line 610)
-print character class: See 3.2. (line 793)
+period: See 3.1. (line 718)
+plus sign: See 3.1. (line 727)
+POSIXLY_CORRECT environment variable: See 2.2. (line 619)
+print character class: See 3.2. (line 805)
print non-matching lines: See 2.1.2. (line 129)
-printable characters: See 3.2. (line 793)
-punct character class: See 3.2. (line 796)
-punctuation characters: See 3.2. (line 796)
-question mark: See 3.1. (line 709)
+printable characters: See 3.2. (line 805)
+punct character class: See 3.2. (line 808)
+punctuation characters: See 3.2. (line 808)
+question mark: See 3.1. (line 721)
quiet, silent: See 2.1.3. (line 225)
-range expression: See 3.2. (line 752)
-recursive search: See 2.1.6. (line 408)
-regular expressions: See 3. (line 684)
-return status: See 2.3. (line 634)
-rv GREP_COLORS capability: See 2.2. (line 511)
-searching directory trees: See 2.1.6. (line 385)
+range expression: See 3.2. (line 764)
+recursive search: See 2.1.6. (line 418)
+regular expressions: See 3. (line 693)
+return status: See 2.3. (line 643)
+rv GREP_COLORS capability: See 2.2. (line 520)
+searching directory trees: See 2.1.6. (line 395)
searching for a pattern: See 1. (line 55)
-sl GREP_COLORS capability: See 2.2. (line 494)
-space character class: See 3.2. (line 800)
-space characters: See 3.2. (line 800)
-subexpression: See 3.5. (line 890)
-suppress binary data: See 2.1.6. (line 350)
+sl GREP_COLORS capability: See 2.2. (line 503)
+space character class: See 3.2. (line 812)
+space characters: See 3.2. (line 812)
+subexpression: See 3.5. (line 902)
+suppress binary data: See 2.1.6. (line 360)
suppress error messages: See 2.1.3. (line 232)
tab-aligned content lines: See 2.1.4. (line 282)
-translation of message language: See 2.2. (line 605)
-upper character class: See 3.2. (line 804)
-upper-case letters: See 3.2. (line 804)
+translation of message language: See 2.2. (line 614)
+upper character class: See 3.2. (line 816)
+upper-case letters: See 3.2. (line 816)
usage summary, printing: See 2.1.1. (line 96)
-usage, examples: See 4. (line 921)
-using grep, Q&A: See 4. (line 932)
-variants of gerp: See 2.4. (line 646)
+usage, examples: See 4. (line 933)
+using grep, Q&A: See 4. (line 944)
+variants of gerp: See 2.4. (line 655)
version, printing: See 2.1.1. (line 101)
-whitespace characters: See 3.2. (line 800)
+whitespace characters: See 3.2. (line 812)
with filename prefix: See 2.1.4. (line 259)
-xdigit character class: See 3.2. (line 808)
-xdigit class: See 3.2. (line 808)
+xdigit character class: See 3.2. (line 820)
+xdigit class: See 3.2. (line 820)
zero-terminated file names: See 2.1.4. (line 302)
-zero-terminated lines: See 2.1.7. (line 443)
-{,M}: See 3.1. (line 724)
-{N,M}: See 3.1. (line 727)
-{N,}: See 3.1. (line 721)
-{N}: See 3.1. (line 718)
+zero-terminated lines: See 2.1.7. (line 452)
+{,M}: See 3.1. (line 736)
+{N,M}: See 3.1. (line 739)
+{N,}: See 3.1. (line 733)
+{N}: See 3.1. (line 730)
- Changes to grep/manual/grep.txt,v,
Jim Meyering <=