NEWS revision 56915
1275970ScyVersion 2.4.1 2275970Scy 3275970Scy - If the final byte of an input file is not a newline, grep now silently 4275970Scy supplies one. 5275970Scy 6275970Scy - The new option --binary-files=TYPE makes grep assume that a binary input 7275970Scy file is of type TYPE. 8275970Scy --binary-files='binary' (the default) outputs a 1-line summary of matches. 9275970Scy --binary-files='without-match' assumes binary files do not match. 10275970Scy --binary-files='text' treats binary files as text 11275970Scy (equivalent to the -a or --text option). 12275970Scy 13275970Scy - New option -I; equivalent to --binary-files='without-match'. 14275970Scy 15275970ScyVersion 2.4: 16275970Scy 17275970Scy - egrep is now equivalent to `grep -E' as required by POSIX, 18275970Scy removing a longstanding source of confusion and incompatibility. 19275970Scy `grep' is now more forgiving about stray `{'s, for backward 20275970Scy compatibility with traditional egrep. 21275970Scy 22275970Scy - The lower bound of an interval is not optional. 23275970Scy You must use an explicit zero, e.g. `x{0,10}' instead of `x{,10}'. 24275970Scy (The old documentation incorrectly claimed that it was optional.) 25275970Scy 26275970Scy - The --revert-match option has been renamed to --invert-match. 27275970Scy 28275970Scy - The --fixed-regexp option has been renamed to --fixed-string. 29275970Scy 30275970Scy - New option -H or --with-filename. 31275970Scy 32275970Scy - New option --mmap. By default, GNU grep now uses read instead of mmap. 33275970Scy This is faster on some hosts, and is safer on all. 34275970Scy 35275970Scy - The new option -z or --null-data causes `grep' to treat a zero byte 36275970Scy (the ASCII NUL character) as a line terminator in input data, and 37275970Scy to treat newlines as ordinary data. 38275970Scy 39275970Scy - The new option -Z or --null causes `grep' to output a zero byte 40275970Scy instead of the normal separator after a file name. 41275970Scy 42275970Scy - These two options can be used with commands like `find -print0', 43275970Scy `perl -0', `sort -z', and `xargs -0' to process arbitrary file names, 44275970Scy even those that contain newlines. 45275970Scy 46275970Scy - The environment variable GREP_OPTIONS specifies default options; 47275970Scy e.g. GREP_OPTIONS='--directories=skip' reestablishes grep 2.1's 48275970Scy behavior of silently skipping directories. 49275970Scy 50275970Scy - You can specify a matcher multiple times without error, e.g. 51275970Scy `grep -E -E' or `fgrep -F'. It is still an error to specify 52275970Scy conflicting matchers. 53275970Scy 54275970Scy - -u and -U are now allowed on non-DOS hosts, and have no effect. 55275970Scy 56275970Scy - Modifications of the tests scripts to go around the "Broken Pipe" 57275970Scy errors from bash. See Bash FAQ. 58275970Scy 59275970Scy - New option -r or --recursive or --directories=recurse. 60275970Scy (This option was also in grep 2.3, but wasn't announced here.) 61275970Scy 62275970Scy - --without-included-regex disable, was causing bogus reports .i.e 63275970Scy doing more harm then good. 64275970Scy 65275970ScyVersion 2.3: 66275970Scy 67275970Scy - When searching a binary file FOO, grep now just reports 68275970Scy `Binary file FOO matches' instead of outputting binary data. 69275970Scy This is typically more useful than the old behavior, 70275970Scy and it is also more consistent with other utilities like `diff'. 71275970Scy A file is considered to be binary if it contains a NUL (i.e. zero) byte. 72275970Scy 73275970Scy The new -a or --text option causes `grep' to assume that all 74275970Scy input is text. (This option has the same meaning as with `diff'.) 75275970Scy Use it if you want binary data in your output. 76275970Scy 77275970Scy - `grep' now searches directories just like ordinary files; it no longer 78275970Scy silently skips directories. This is the traditional behavior of 79275970Scy Unix text utilities (in particular, of traditional `grep'). 80275970Scy Hence `grep PATTERN DIRECTORY' should report 81275970Scy `grep: DIRECTORY: Is a directory' on hosts where the operating system 82275970Scy does not permit programs to read directories directly, and 83275970Scy `grep: DIRECTORY: Binary file matches' (or nothing) otherwise. 84 85 The new -d ACTION or --directories=ACTION option affects directory handling. 86 `-d skip' causes `grep' to silently skip directories, as in grep 2.1; 87 `-d read' (the default) causes `grep' to read directories if possible, 88 as in earlier versions of grep. 89 90 - The MS-DOS and Microsoft Windows ports now behave identically to the 91 GNU and Unix ports with respect to binary files and directories. 92 93Version 2.2: 94 95Bug fix release. 96 97 - Status error number fix. 98 - Skipping directories removed. 99 - Many typos fix. 100 - -f /dev/null fix(not to consider as an empty pattern). 101 - Checks for wctype/wchar. 102 - -E was using the wrong matcher fix. 103 - bug in regex char class fix 104 - Fixes for DJGPP 105 106Version 2.1: 107 108This is a bug fix release(see Changelog) i.e. no new features. 109 110 - More compliance to GNU standard. 111 - Long options. 112 - Internationalisation. 113 - Use automake/autoconf. 114 - Directory hierarchy change. 115 - Sigvec with -e on Linux corrected. 116 - Sigvec with -f on Linux corrected. 117 - Sigvec with the mmap() corrected. 118 - Bug in kwset corrected. 119 - -q, -L and -l stop on first match. 120 - New and improve regex.[ch] from Ulrich Drepper. 121 - New and improve dfa.[ch] from Arnold Robbins. 122 - Prototypes for over zealous C compiler. 123 - Not scanning a file, if it's a directory 124 (cause problems on Sun). 125 - Ported to MS-DOS/MS-Windows with DJGPP tools. 126 127See Changelog for the full story and proper credits. 128 129Version 2.0: 130 131The most important user visible change is that egrep and fgrep have 132disappeared as separate programs into the single grep program mandated 133by POSIX 1003.2. New options -G, -E, and -F have been added, 134selecting grep, egrep, and fgrep behavior respectively. For 135compatibility with historical practice, hard links named egrep and 136fgrep are also provided. See the manual page for details. 137 138In addition, the regular expression facilities described in Posix 139draft 11.2 are now supported, except for internationalization features 140related to locale-dependent collating sequence information. 141 142There is a new option, -L, which is like -l except it lists 143files which don't contain matches. The reason this option was 144added is because '-l -v' doesn't do what you expect. 145 146Performance has been improved; the amount of improvement is platform 147dependent, but (for example) grep 2.0 typically runs at least 30% faster 148than grep 1.6 on a DECstation using the MIPS compiler. Where possible, 149grep now uses mmap() for file input; on a Sun 4 running SunOS 4.1 this 150may cut system time by as much as half, for a total reduction in running 151time by nearly 50%. On machines that don't use mmap(), the buffering 152code has been rewritten to choose more favorable alignments and buffer 153sizes for read(). 154 155Portability has been substantially cleaned up, and an automatic 156configure script is now provided. 157 158The internals have changed in ways too numerous to mention. 159People brave enough to reuse the DFA matcher in other programs 160will now have their bravery amply "rewarded", for the interface 161to that file has been completely changed. Some changes were 162necessary to track the evolution of the regex package, and since 163I was changing it anyway I decided to do a general cleanup. 164