NEWS revision 56230
1221337Sdim - The new option --binary-files=TYPE makes grep assume that a binary input 2221337Sdim file is of type TYPE. 3221337Sdim --binary-files='binary' (the default) outputs a 1-line summary of matches. 4221337Sdim --binary-files='without-match' assumes binary files do not match. 5221337Sdim --binary-files='text' treats binary files as text 6221337Sdim (equivalent to -a or --text). 7221337Sdim 8221337SdimVersion 2.4: 9221337Sdim 10221337Sdim - egrep is now equivalent to `grep -E' as required by POSIX, 11221337Sdim removing a longstanding source of confusion and incompatibility. 12221337Sdim `grep' is now more forgiving about stray `{'s, for backward 13221337Sdim compatibility with traditional egrep. 14221337Sdim 15221337Sdim - The lower bound of an interval is not optional. 16221337Sdim You must use an explicit zero, e.g. `x{0,10}' instead of `x{,10}'. 17221337Sdim (The old documentation incorrectly claimed that it was optional.) 18221337Sdim 19221337Sdim - The --revert-match option has been renamed to --invert-match. 20221337Sdim 21221337Sdim - The --fixed-regexp option has been renamed to --fixed-string. 22221337Sdim 23226633Sdim - New option -H or --with-filename. 24226633Sdim 25221337Sdim - New option --mmap. By default, GNU grep now uses read instead of mmap. 26221337Sdim This is faster on some hosts, and is safer on all. 27221337Sdim 28221337Sdim - The new option -z or --null-data causes `grep' to treat a zero byte 29221337Sdim (the ASCII NUL character) as a line terminator in input data, and 30221337Sdim to treat newlines as ordinary data. 31234353Sdim 32226633Sdim - The new option -Z or --null causes `grep' to output a zero byte 33234353Sdim instead of the normal separator after a file name. 34221337Sdim 35221337Sdim - These two options can be used with commands like `find -print0', 36221337Sdim `perl -0', `sort -z', and `xargs -0' to process arbitrary file names, 37221337Sdim even those that contain newlines. 38221337Sdim 39221337Sdim - The environment variable GREP_OPTIONS specifies default options; 40221337Sdim e.g. GREP_OPTIONS='--directories=skip' reestablishes grep 2.1's 41221337Sdim behavior of silently skipping directories. 42221337Sdim 43221337Sdim - You can specify a matcher multiple times without error, e.g. 44221337Sdim `grep -E -E' or `fgrep -F'. It is still an error to specify 45221337Sdim conflicting matchers. 46221337Sdim 47221337Sdim - -u and -U are now allowed on non-DOS hosts, and have no effect. 48221337Sdim 49221337Sdim - Modifications of the tests scripts to go around the "Broken Pipe" 50221337Sdim errors from bash. See Bash FAQ. 51221337Sdim 52221337Sdim - New option -r or --recursive or --directories=recurse. 53221337Sdim (This option was also in grep 2.3, but wasn't announced here.) 54221337Sdim 55221337Sdim - --without-included-regex disable, was causing bogus reports .i.e 56221337Sdim doing more harm then good. 57221337Sdim 58221337SdimVersion 2.3: 59221337Sdim 60221337Sdim - When searching a binary file FOO, grep now just reports 61221337Sdim `Binary file FOO matches' instead of outputting binary data. 62221337Sdim This is typically more useful than the old behavior, 63221337Sdim and it is also more consistent with other utilities like `diff'. 64226633Sdim A file is considered to be binary if it contains a NUL (i.e. zero) byte. 65226633Sdim 66234353Sdim The new -a or --text option causes `grep' to assume that all 67234353Sdim input is text. (This option has the same meaning as with `diff'.) 68234353Sdim Use it if you want binary data in your output. 69234353Sdim 70221337Sdim - `grep' now searches directories just like ordinary files; it no longer 71221337Sdim silently skips directories. This is the traditional behavior of 72221337Sdim Unix text utilities (in particular, of traditional `grep'). 73221337Sdim Hence `grep PATTERN DIRECTORY' should report 74221337Sdim `grep: DIRECTORY: Is a directory' on hosts where the operating system 75221337Sdim does not permit programs to read directories directly, and 76221337Sdim `grep: DIRECTORY: Binary file matches' (or nothing) otherwise. 77221337Sdim 78226633Sdim The new -d ACTION or --directories=ACTION option affects directory handling. 79226633Sdim `-d skip' causes `grep' to silently skip directories, as in grep 2.1; 80226633Sdim `-d read' (the default) causes `grep' to read directories if possible, 81226633Sdim as in earlier versions of grep. 82221337Sdim 83221337Sdim - The MS-DOS and Microsoft Windows ports now behave identically to the 84221337Sdim GNU and Unix ports with respect to binary files and directories. 85221337Sdim 86226633SdimVersion 2.2: 87234353Sdim 88234353SdimBug fix release. 89221337Sdim 90221337Sdim - Status error number fix. 91221337Sdim - Skipping directories removed. 92226633Sdim - Many typos fix. 93226633Sdim - -f /dev/null fix(not to consider as an empty pattern). 94221337Sdim - Checks for wctype/wchar. 95226633Sdim - -E was using the wrong matcher fix. 96234353Sdim - bug in regex char class fix 97234353Sdim - Fixes for DJGPP 98221337Sdim 99221337SdimVersion 2.1: 100221337Sdim 101221337SdimThis is a bug fix release(see Changelog) i.e. no new features. 102239462Sdim 103239462Sdim - More compliance to GNU standard. 104239462Sdim - Long options. 105239462Sdim - Internationalisation. 106239462Sdim - Use automake/autoconf. 107239462Sdim - Directory hierarchy change. 108239462Sdim - Sigvec with -e on Linux corrected. 109239462Sdim - Sigvec with -f on Linux corrected. 110221337Sdim - Sigvec with the mmap() corrected. 111226633Sdim - Bug in kwset corrected. 112221337Sdim - -q, -L and -l stop on first match. 113221337Sdim - New and improve regex.[ch] from Ulrich Drepper. 114221337Sdim - New and improve dfa.[ch] from Arnold Robbins. 115221337Sdim - Prototypes for over zealous C compiler. 116221337Sdim - Not scanning a file, if it's a directory 117221337Sdim (cause problems on Sun). 118 - Ported to MS-DOS/MS-Windows with DJGPP tools. 119 120See Changelog for the full story and proper credits. 121 122Version 2.0: 123 124The most important user visible change is that egrep and fgrep have 125disappeared as separate programs into the single grep program mandated 126by POSIX 1003.2. New options -G, -E, and -F have been added, 127selecting grep, egrep, and fgrep behavior respectively. For 128compatibility with historical practice, hard links named egrep and 129fgrep are also provided. See the manual page for details. 130 131In addition, the regular expression facilities described in Posix 132draft 11.2 are now supported, except for internationalization features 133related to locale-dependent collating sequence information. 134 135There is a new option, -L, which is like -l except it lists 136files which don't contain matches. The reason this option was 137added is because '-l -v' doesn't do what you expect. 138 139Performance has been improved; the amount of improvement is platform 140dependent, but (for example) grep 2.0 typically runs at least 30% faster 141than grep 1.6 on a DECstation using the MIPS compiler. Where possible, 142grep now uses mmap() for file input; on a Sun 4 running SunOS 4.1 this 143may cut system time by as much as half, for a total reduction in running 144time by nearly 50%. On machines that don't use mmap(), the buffering 145code has been rewritten to choose more favorable alignments and buffer 146sizes for read(). 147 148Portability has been substantially cleaned up, and an automatic 149configure script is now provided. 150 151The internals have changed in ways too numerous to mention. 152People brave enough to reuse the DFA matcher in other programs 153will now have their bravery amply "rewarded", for the interface 154to that file has been completely changed. Some changes were 155necessary to track the evolution of the regex package, and since 156I was changing it anyway I decided to do a general cleanup. 157