2 - This is a bugfix release. No new features.
5 - The new option --label allows to specify a different name for input
6 from stdin. See the man or info pages for details.
8 - The internal lib/getopt* files are no longer used on systems providing
9 getopt functionality in their libc (e.g. glibc 2.2.x).
10 If you need the old getopt files, use --with-included-getopt.
12 - The new option --only-matching (-o) will print only the part of matching
13 lines that matches the pattern. This is useful, for example, to extract
14 IP addresses from log files.
16 - i18n bug fixed ([A-Z0-9] wouldn't match A in locales other than C on
17 systems using recent glibc builds
19 - GNU grep can now be built with autoconf 2.52.
21 - The new option --devices controls how grep handles device files. Its usage
22 is analogous to --directories.
24 - The new option --line-buffered fflush on everyline. There is a noticeable
25 slow down when forcing line buffering.
27 - Back references are now local to the regex.
28 grep -e '\(a\)\1' -e '\(b\)\1'
29 The last backref \1 in the second expression refer to \(b\)
31 - The new option --include=PATTERN will only search matching files
32 when recursing in directories
34 - The new option --exclude=PATTERN will skip matching files when
35 recursing in directories.
37 - The new option --color will use the environment variable GREP_COLOR
38 (default is red) to highlight the matching string.
39 --color takes an optional argument specifying when to colorize a line:
40 --color=always, --color=tty, --color=never
42 - The following changes are for POSIX.2 conformance:
44 . The -q or --quiet or --silent option now causes grep to exit
45 with zero status when a input line is selected, even if an error
48 . The -s or --no-messages option no longer affects the exit status.
50 . Bracket regular expressions like [a-z] are now locale-dependent.
51 For example, many locales sort characters in dictionary order,
52 and in these locales the regular expression [a-d] is not
53 equivalent to [abcd]; it might be equivalent to [aBbCcDd], for
54 example. To obtain the traditional interpretation of bracket
55 expressions, you can use the C locale by setting the LC_ALL
56 environment variable to the value "C".
58 - The -C or --context option now requires an argument, partly for
59 consistency, and partly because POSIX.2 recommends against
62 - The new -P or --perl-regexp option tells grep to interpert the pattern as
63 a Perl regular expression.
65 - The new option --max-count=num makes grep stop reading a file after num
67 New option -m; equivalent to --max-count.
69 - Translations for bg, ca, da, nb and tr have been added.
73 - Added more check in configure to default the grep-${version}/src/regex.c
74 instead of the one in GNU Lib C.
78 - If the final byte of an input file is not a newline, grep now silently
81 - The new option --binary-files=TYPE makes grep assume that a binary input
83 --binary-files='binary' (the default) outputs a 1-line summary of matches.
84 --binary-files='without-match' assumes binary files do not match.
85 --binary-files='text' treats binary files as text
86 (equivalent to the -a or --text option).
88 - New option -I; equivalent to --binary-files='without-match'.
92 - egrep is now equivalent to `grep -E' as required by POSIX,
93 removing a longstanding source of confusion and incompatibility.
94 `grep' is now more forgiving about stray `{'s, for backward
95 compatibility with traditional egrep.
97 - The lower bound of an interval is not optional.
98 You must use an explicit zero, e.g. `x{0,10}' instead of `x{,10}'.
99 (The old documentation incorrectly claimed that it was optional.)
101 - The --revert-match option has been renamed to --invert-match.
103 - The --fixed-regexp option has been renamed to --fixed-string.
105 - New option -H or --with-filename.
107 - New option --mmap. By default, GNU grep now uses read instead of mmap.
108 This is faster on some hosts, and is safer on all.
110 - The new option -z or --null-data causes `grep' to treat a zero byte
111 (the ASCII NUL character) as a line terminator in input data, and
112 to treat newlines as ordinary data.
114 - The new option -Z or --null causes `grep' to output a zero byte
115 instead of the normal separator after a file name.
117 - These two options can be used with commands like `find -print0',
118 `perl -0', `sort -z', and `xargs -0' to process arbitrary file names,
119 even those that contain newlines.
121 - The environment variable GREP_OPTIONS specifies default options;
122 e.g. GREP_OPTIONS='--directories=skip' reestablishes grep 2.1's
123 behavior of silently skipping directories.
125 - You can specify a matcher multiple times without error, e.g.
126 `grep -E -E' or `fgrep -F'. It is still an error to specify
127 conflicting matchers.
129 - -u and -U are now allowed on non-DOS hosts, and have no effect.
131 - Modifications of the tests scripts to go around the "Broken Pipe"
132 errors from bash. See Bash FAQ.
134 - New option -r or --recursive or --directories=recurse.
135 (This option was also in grep 2.3, but wasn't announced here.)
137 - --without-included-regex disable, was causing bogus reports .i.e
138 doing more harm then good.
142 - When searching a binary file FOO, grep now just reports
143 `Binary file FOO matches' instead of outputting binary data.
144 This is typically more useful than the old behavior,
145 and it is also more consistent with other utilities like `diff'.
146 A file is considered to be binary if it contains a NUL (i.e. zero) byte.
148 The new -a or --text option causes `grep' to assume that all
149 input is text. (This option has the same meaning as with `diff'.)
150 Use it if you want binary data in your output.
152 - `grep' now searches directories just like ordinary files; it no longer
153 silently skips directories. This is the traditional behavior of
154 Unix text utilities (in particular, of traditional `grep').
155 Hence `grep PATTERN DIRECTORY' should report
156 `grep: DIRECTORY: Is a directory' on hosts where the operating system
157 does not permit programs to read directories directly, and
158 `grep: DIRECTORY: Binary file matches' (or nothing) otherwise.
160 The new -d ACTION or --directories=ACTION option affects directory handling.
161 `-d skip' causes `grep' to silently skip directories, as in grep 2.1;
162 `-d read' (the default) causes `grep' to read directories if possible,
163 as in earlier versions of grep.
165 - The MS-DOS and Microsoft Windows ports now behave identically to the
166 GNU and Unix ports with respect to binary files and directories.
172 - Status error number fix.
173 - Skipping directories removed.
175 - -f /dev/null fix(not to consider as an empty pattern).
176 - Checks for wctype/wchar.
177 - -E was using the wrong matcher fix.
178 - bug in regex char class fix
183 This is a bug fix release(see Changelog) i.e. no new features.
185 - More compliance to GNU standard.
187 - Internationalisation.
188 - Use automake/autoconf.
189 - Directory hierarchy change.
190 - Sigvec with -e on Linux corrected.
191 - Sigvec with -f on Linux corrected.
192 - Sigvec with the mmap() corrected.
193 - Bug in kwset corrected.
194 - -q, -L and -l stop on first match.
195 - New and improve regex.[ch] from Ulrich Drepper.
196 - New and improve dfa.[ch] from Arnold Robbins.
197 - Prototypes for over zealous C compiler.
198 - Not scanning a file, if it's a directory
199 (cause problems on Sun).
200 - Ported to MS-DOS/MS-Windows with DJGPP tools.
202 See Changelog for the full story and proper credits.
206 The most important user visible change is that egrep and fgrep have
207 disappeared as separate programs into the single grep program mandated
208 by POSIX 1003.2. New options -G, -E, and -F have been added,
209 selecting grep, egrep, and fgrep behavior respectively. For
210 compatibility with historical practice, hard links named egrep and
211 fgrep are also provided. See the manual page for details.
213 In addition, the regular expression facilities described in Posix
214 draft 11.2 are now supported, except for internationalization features
215 related to locale-dependent collating sequence information.
217 There is a new option, -L, which is like -l except it lists
218 files which don't contain matches. The reason this option was
219 added is because '-l -v' doesn't do what you expect.
221 Performance has been improved; the amount of improvement is platform
222 dependent, but (for example) grep 2.0 typically runs at least 30% faster
223 than grep 1.6 on a DECstation using the MIPS compiler. Where possible,
224 grep now uses mmap() for file input; on a Sun 4 running SunOS 4.1 this
225 may cut system time by as much as half, for a total reduction in running
226 time by nearly 50%. On machines that don't use mmap(), the buffering
227 code has been rewritten to choose more favorable alignments and buffer
230 Portability has been substantially cleaned up, and an automatic
231 configure script is now provided.
233 The internals have changed in ways too numerous to mention.
234 People brave enough to reuse the DFA matcher in other programs
235 will now have their bravery amply "rewarded", for the interface
236 to that file has been completely changed. Some changes were
237 necessary to track the evolution of the regex package, and since
238 I was changing it anyway I decided to do a general cleanup.