NEWS revision 131554
11590SrgrimesVersion 2.5.1 21590Srgrimes - This is a bugfix release. No new features. 31590Srgrimes 41590SrgrimesVersion 2.5 51590Srgrimes - The new option --label allows to specify a different name for input 61590Srgrimes from stdin. See the man or info pages for details. 71590Srgrimes 81590Srgrimes - The internal lib/getopt* files are no longer used on systems providing 91590Srgrimes getopt functionality in their libc (e.g. glibc 2.2.x). 101590Srgrimes If you need the old getopt files, use --with-included-getopt. 111590Srgrimes 121590Srgrimes - The new option --only-matching (-o) will print only the part of matching 131590Srgrimes lines that matches the pattern. This is useful, for example, to extract 141590Srgrimes IP addresses from log files. 151590Srgrimes 161590Srgrimes - i18n bug fixed ([A-Z0-9] wouldn't match A in locales other than C on 171590Srgrimes systems using recent glibc builds 181590Srgrimes 191590Srgrimes - GNU grep can now be built with autoconf 2.52. 201590Srgrimes 211590Srgrimes - The new option --devices controls how grep handles device files. Its usage 221590Srgrimes is analogous to --directories. 231590Srgrimes 241590Srgrimes - The new option --line-buffered fflush on everyline. There is a noticeable 251590Srgrimes slow down when forcing line buffering. 261590Srgrimes 271590Srgrimes - Back references are now local to the regex. 281590Srgrimes grep -e '\(a\)\1' -e '\(b\)\1' 291590Srgrimes The last backref \1 in the second expression refer to \(b\) 3074769Smikeh 3174769Smikeh - The new option --include=PATTERN will only search matching files 321590Srgrimes when recursing in directories 331590Srgrimes 341590Srgrimes - The new option --exclude=PATTERN will skip matching files when 351590Srgrimes recursing in directories. 361590Srgrimes 371590Srgrimes - The new option --color will use the environment variable GREP_COLOR 381590Srgrimes (default is red) to highlight the matching string. 391590Srgrimes --color takes an optional argument specifying when to colorize a line: 401590Srgrimes --color=always, --color=tty, --color=never 411590Srgrimes 421590Srgrimes - The following changes are for POSIX.2 conformance: 431590Srgrimes 441590Srgrimes . The -q or --quiet or --silent option now causes grep to exit 451590Srgrimes with zero status when a input line is selected, even if an error 461590Srgrimes also occurs. 471590Srgrimes 481590Srgrimes . The -s or --no-messages option no longer affects the exit status. 491590Srgrimes 501590Srgrimes . Bracket regular expressions like [a-z] are now locale-dependent. 511590Srgrimes For example, many locales sort characters in dictionary order, 521590Srgrimes and in these locales the regular expression [a-d] is not 531590Srgrimes equivalent to [abcd]; it might be equivalent to [aBbCcDd], for 541590Srgrimes example. To obtain the traditional interpretation of bracket 551590Srgrimes expressions, you can use the C locale by setting the LC_ALL 561590Srgrimes environment variable to the value "C". 571590Srgrimes 581590Srgrimes - The -C or --context option now requires an argument, partly for 591590Srgrimes consistency, and partly because POSIX.2 recommends against 601590Srgrimes optional arguments. 611590Srgrimes 621590Srgrimes - The new -P or --perl-regexp option tells grep to interpert the pattern as 631590Srgrimes a Perl regular expression. 641590Srgrimes 651590Srgrimes - The new option --max-count=num makes grep stop reading a file after num 661590Srgrimes matching lines. 671590Srgrimes New option -m; equivalent to --max-count. 681590Srgrimes 691590Srgrimes - Translations for bg, ca, da, nb and tr have been added. 701590Srgrimes 711590SrgrimesVersion 2.4.2 721590Srgrimes 731590Srgrimes - Added more check in configure to default the grep-${version}/src/regex.c 741590Srgrimes instead of the one in GNU Lib C. 751590Srgrimes 761590SrgrimesVersion 2.4.1 771590Srgrimes 781590Srgrimes - If the final byte of an input file is not a newline, grep now silently 791590Srgrimes supplies one. 801590Srgrimes 811590Srgrimes - The new option --binary-files=TYPE makes grep assume that a binary input 821590Srgrimes file is of type TYPE. 831590Srgrimes --binary-files='binary' (the default) outputs a 1-line summary of matches. 841590Srgrimes --binary-files='without-match' assumes binary files do not match. 851590Srgrimes --binary-files='text' treats binary files as text 861590Srgrimes (equivalent to the -a or --text option). 871590Srgrimes 881590Srgrimes - New option -I; equivalent to --binary-files='without-match'. 891590Srgrimes 901590SrgrimesVersion 2.4: 911590Srgrimes 921590Srgrimes - egrep is now equivalent to `grep -E' as required by POSIX, 931590Srgrimes removing a longstanding source of confusion and incompatibility. 941590Srgrimes `grep' is now more forgiving about stray `{'s, for backward 951590Srgrimes compatibility with traditional egrep. 961590Srgrimes 971590Srgrimes - The lower bound of an interval is not optional. 981590Srgrimes 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.) 100 101 - The --revert-match option has been renamed to --invert-match. 102 103 - The --fixed-regexp option has been renamed to --fixed-string. 104 105 - New option -H or --with-filename. 106 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. 109 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. 113 114 - The new option -Z or --null causes `grep' to output a zero byte 115 instead of the normal separator after a file name. 116 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. 120 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. 124 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. 128 129 - -u and -U are now allowed on non-DOS hosts, and have no effect. 130 131 - Modifications of the tests scripts to go around the "Broken Pipe" 132 errors from bash. See Bash FAQ. 133 134 - New option -r or --recursive or --directories=recurse. 135 (This option was also in grep 2.3, but wasn't announced here.) 136 137 - --without-included-regex disable, was causing bogus reports .i.e 138 doing more harm then good. 139 140Version 2.3: 141 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. 147 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. 151 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. 159 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. 164 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. 167 168Version 2.2: 169 170Bug fix release. 171 172 - Status error number fix. 173 - Skipping directories removed. 174 - Many typos fix. 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 179 - Fixes for DJGPP 180 181Version 2.1: 182 183This is a bug fix release(see Changelog) i.e. no new features. 184 185 - More compliance to GNU standard. 186 - Long options. 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. 201 202See Changelog for the full story and proper credits. 203 204Version 2.0: 205 206The most important user visible change is that egrep and fgrep have 207disappeared as separate programs into the single grep program mandated 208by POSIX 1003.2. New options -G, -E, and -F have been added, 209selecting grep, egrep, and fgrep behavior respectively. For 210compatibility with historical practice, hard links named egrep and 211fgrep are also provided. See the manual page for details. 212 213In addition, the regular expression facilities described in Posix 214draft 11.2 are now supported, except for internationalization features 215related to locale-dependent collating sequence information. 216 217There is a new option, -L, which is like -l except it lists 218files which don't contain matches. The reason this option was 219added is because '-l -v' doesn't do what you expect. 220 221Performance has been improved; the amount of improvement is platform 222dependent, but (for example) grep 2.0 typically runs at least 30% faster 223than grep 1.6 on a DECstation using the MIPS compiler. Where possible, 224grep now uses mmap() for file input; on a Sun 4 running SunOS 4.1 this 225may cut system time by as much as half, for a total reduction in running 226time by nearly 50%. On machines that don't use mmap(), the buffering 227code has been rewritten to choose more favorable alignments and buffer 228sizes for read(). 229 230Portability has been substantially cleaned up, and an automatic 231configure script is now provided. 232 233The internals have changed in ways too numerous to mention. 234People brave enough to reuse the DFA matcher in other programs 235will now have their bravery amply "rewarded", for the interface 236to that file has been completely changed. Some changes were 237necessary to track the evolution of the regex package, and since 238I was changing it anyway I decided to do a general cleanup. 239