NEWS revision 55360
11541SrgrimesVersion 2.4: 21541Srgrimes 31541Srgrimes - egrep is now equivalent to `grep -E' as required by POSIX, 41541Srgrimes removing a longstanding source of confusion and incompatibility. 51541Srgrimes `grep' is now more forgiving about stray `{'s, for backward 61541Srgrimes compatibility with traditional egrep. 71541Srgrimes 81541Srgrimes - The lower bound of an interval is not optional. 91541Srgrimes You must use an explicit zero, e.g. `x{0,10}' instead of `x{,10}'. 101541Srgrimes (The old documentation incorrectly claimed that it was optional.) 111541Srgrimes 121541Srgrimes - The --revert-match option has been renamed to --invert-match. 131541Srgrimes 141541Srgrimes - The --fixed-regexp option has been renamed to --fixed-string. 151541Srgrimes 161541Srgrimes - New option -H or --with-filename. 171541Srgrimes 181541Srgrimes - New option --mmap. By default, GNU grep now uses read instead of mmap. 191541Srgrimes This is faster on some hosts, and is safer on all. 201541Srgrimes 211541Srgrimes - The new option -z or --null-data causes `grep' to treat a zero byte 221541Srgrimes (the ASCII NUL character) as a line terminator in input data, and 231541Srgrimes to treat newlines as ordinary data. 241541Srgrimes 251541Srgrimes - The new option -Z or --null causes `grep' to output a zero byte 261541Srgrimes instead of the normal separator after a file name. 271541Srgrimes 281541Srgrimes - These two options can be used with commands like `find -print0', 291541Srgrimes `perl -0', `sort -z', and `xargs -0' to process arbitrary file names, 301541Srgrimes even those that contain newlines. 311541Srgrimes 321541Srgrimes - The environment variable GREP_OPTIONS specifies default options; 331541Srgrimes e.g. GREP_OPTIONS='--directories=skip' reestablishes grep 2.1's 341541Srgrimes behavior of silently skipping directories. 351541Srgrimes 361541Srgrimes - You can specify a matcher multiple times without error, e.g. 37116181Sobrien `grep -E -E' or `fgrep -F'. It is still an error to specify 38116181Sobrien conflicting matchers. 39116181Sobrien 401541Srgrimes - -u and -U are now allowed on non-DOS hosts, and have no effect. 4196009Sjeff 421541Srgrimes - Modifications of the tests scripts to go around the "Broken Pipe" 431541Srgrimes errors from bash. See Bash FAQ. 441541Srgrimes 45166639Srodrigc - New option -r or --recursive or --directories=recurse. 46166639Srodrigc (This option was also in grep 2.3, but wasn't announced here.) 471541Srgrimes 481541Srgrimes - --without-included-regex disable, was causing bogus reports .i.e 49185071Sjhb doing more harm then good. 50185071Sjhb 51185071SjhbVersion 2.3: 52185071Sjhb 531541Srgrimes - When searching a binary file FOO, grep now just reports 541541Srgrimes `Binary file FOO matches' instead of outputting binary data. 551541Srgrimes This is typically more useful than the old behavior, 561541Srgrimes and it is also more consistent with other utilities like `diff'. 571541Srgrimes A file is considered to be binary if it contains a NUL (i.e. zero) byte. 581541Srgrimes 59137726Sphk The new -a or --text option causes `grep' to assume that all 601541Srgrimes input is text. (This option has the same meaning as with `diff'.) 611541Srgrimes Use it if you want binary data in your output. 6210551Sdyson 631541Srgrimes - `grep' now searches directories just like ordinary files; it no longer 641541Srgrimes silently skips directories. This is the traditional behavior of 651541Srgrimes Unix text utilities (in particular, of traditional `grep'). 661541Srgrimes Hence `grep PATTERN DIRECTORY' should report 6722521Sdyson `grep: DIRECTORY: Is a directory' on hosts where the operating system 681541Srgrimes does not permit programs to read directories directly, and 691541Srgrimes `grep: DIRECTORY: Binary file matches' (or nothing) otherwise. 701541Srgrimes 711541Srgrimes The new -d ACTION or --directories=ACTION option affects directory handling. 721541Srgrimes `-d skip' causes `grep' to silently skip directories, as in grep 2.1; 73137726Sphk `-d read' (the default) causes `grep' to read directories if possible, 74137726Sphk as in earlier versions of grep. 751541Srgrimes 761541Srgrimes - The MS-DOS and Microsoft Windows ports now behave identically to the 771541Srgrimes GNU and Unix ports with respect to binary files and directories. 781541Srgrimes 791541SrgrimesVersion 2.2: 801541Srgrimes 8122521SdysonBug fix release. 8222521Sdyson 831541Srgrimes - Status error number fix. 841541Srgrimes - Skipping directories removed. 851541Srgrimes - Many typos fix. 861541Srgrimes - -f /dev/null fix(not to consider as an empty pattern). 871541Srgrimes - Checks for wctype/wchar. 881541Srgrimes - -E was using the wrong matcher fix. 891541Srgrimes - bug in regex char class fix 901541Srgrimes - Fixes for DJGPP 9122521Sdyson 921541SrgrimesVersion 2.1: 931541Srgrimes 9422521SdysonThis is a bug fix release(see Changelog) i.e. no new features. 9522521Sdyson 961541Srgrimes - More compliance to GNU standard. 971541Srgrimes - Long options. 981541Srgrimes - Internationalisation. 991541Srgrimes - Use automake/autoconf. 10010551Sdyson - Directory hierarchy change. 10110551Sdyson - Sigvec with -e on Linux corrected. 10210551Sdyson - Sigvec with -f on Linux corrected. 10310551Sdyson - Sigvec with the mmap() corrected. 1041541Srgrimes - Bug in kwset corrected. 1051541Srgrimes - -q, -L and -l stop on first match. 106 - New and improve regex.[ch] from Ulrich Drepper. 107 - New and improve dfa.[ch] from Arnold Robbins. 108 - Prototypes for over zealous C compiler. 109 - Not scanning a file, if it's a directory 110 (cause problems on Sun). 111 - Ported to MS-DOS/MS-Windows with DJGPP tools. 112 113See Changelog for the full story and proper credits. 114 115Version 2.0: 116 117The most important user visible change is that egrep and fgrep have 118disappeared as separate programs into the single grep program mandated 119by POSIX 1003.2. New options -G, -E, and -F have been added, 120selecting grep, egrep, and fgrep behavior respectively. For 121compatibility with historical practice, hard links named egrep and 122fgrep are also provided. See the manual page for details. 123 124In addition, the regular expression facilities described in Posix 125draft 11.2 are now supported, except for internationalization features 126related to locale-dependent collating sequence information. 127 128There is a new option, -L, which is like -l except it lists 129files which don't contain matches. The reason this option was 130added is because '-l -v' doesn't do what you expect. 131 132Performance has been improved; the amount of improvement is platform 133dependent, but (for example) grep 2.0 typically runs at least 30% faster 134than grep 1.6 on a DECstation using the MIPS compiler. Where possible, 135grep now uses mmap() for file input; on a Sun 4 running SunOS 4.1 this 136may cut system time by as much as half, for a total reduction in running 137time by nearly 50%. On machines that don't use mmap(), the buffering 138code has been rewritten to choose more favorable alignments and buffer 139sizes for read(). 140 141Portability has been substantially cleaned up, and an automatic 142configure script is now provided. 143 144The internals have changed in ways too numerous to mention. 145People brave enough to reuse the DFA matcher in other programs 146will now have their bravery amply "rewarded", for the interface 147to that file has been completely changed. Some changes were 148necessary to track the evolution of the regex package, and since 149I was changing it anyway I decided to do a general cleanup. 150