NEWS revision 131554
1131554StjrVersion 2.5.1 2131554Stjr - This is a bugfix release. No new features. 3131554Stjr 4131554StjrVersion 2.5 5131554Stjr - The new option --label allows to specify a different name for input 6131554Stjr from stdin. See the man or info pages for details. 7131554Stjr 8131554Stjr - The internal lib/getopt* files are no longer used on systems providing 9131554Stjr getopt functionality in their libc (e.g. glibc 2.2.x). 10131554Stjr If you need the old getopt files, use --with-included-getopt. 11131554Stjr 12131554Stjr - The new option --only-matching (-o) will print only the part of matching 13131554Stjr lines that matches the pattern. This is useful, for example, to extract 14131554Stjr IP addresses from log files. 15131554Stjr 16131554Stjr - i18n bug fixed ([A-Z0-9] wouldn't match A in locales other than C on 17131554Stjr systems using recent glibc builds 18131554Stjr 19131554Stjr - GNU grep can now be built with autoconf 2.52. 20131554Stjr 21131554Stjr - The new option --devices controls how grep handles device files. Its usage 22131554Stjr is analogous to --directories. 23131554Stjr 24131554Stjr - The new option --line-buffered fflush on everyline. There is a noticeable 25131554Stjr slow down when forcing line buffering. 26131554Stjr 27131554Stjr - Back references are now local to the regex. 28131554Stjr grep -e '\(a\)\1' -e '\(b\)\1' 29131554Stjr The last backref \1 in the second expression refer to \(b\) 30131554Stjr 31131554Stjr - The new option --include=PATTERN will only search matching files 32131554Stjr when recursing in directories 33131554Stjr 34131554Stjr - The new option --exclude=PATTERN will skip matching files when 35131554Stjr recursing in directories. 36131554Stjr 37131554Stjr - The new option --color will use the environment variable GREP_COLOR 38131554Stjr (default is red) to highlight the matching string. 39131554Stjr --color takes an optional argument specifying when to colorize a line: 40131554Stjr --color=always, --color=tty, --color=never 41131554Stjr 42131554Stjr - The following changes are for POSIX.2 conformance: 43131554Stjr 44131554Stjr . The -q or --quiet or --silent option now causes grep to exit 45131554Stjr with zero status when a input line is selected, even if an error 46131554Stjr also occurs. 47131554Stjr 48131554Stjr . The -s or --no-messages option no longer affects the exit status. 49131554Stjr 50131554Stjr . Bracket regular expressions like [a-z] are now locale-dependent. 51131554Stjr For example, many locales sort characters in dictionary order, 52131554Stjr and in these locales the regular expression [a-d] is not 53131554Stjr equivalent to [abcd]; it might be equivalent to [aBbCcDd], for 54131554Stjr example. To obtain the traditional interpretation of bracket 55131554Stjr expressions, you can use the C locale by setting the LC_ALL 56131554Stjr environment variable to the value "C". 57131554Stjr 58131554Stjr - The -C or --context option now requires an argument, partly for 59131554Stjr consistency, and partly because POSIX.2 recommends against 60131554Stjr optional arguments. 61131554Stjr 62131554Stjr - The new -P or --perl-regexp option tells grep to interpert the pattern as 63131554Stjr a Perl regular expression. 64131554Stjr 65131554Stjr - The new option --max-count=num makes grep stop reading a file after num 66131554Stjr matching lines. 67131554Stjr New option -m; equivalent to --max-count. 68131554Stjr 69131554Stjr - Translations for bg, ca, da, nb and tr have been added. 70131554Stjr 71126432SacheVersion 2.4.2 72126432Sache 73126432Sache - Added more check in configure to default the grep-${version}/src/regex.c 74126432Sache instead of the one in GNU Lib C. 75126432Sache 7656915SruVersion 2.4.1 7756915Sru 7856915Sru - If the final byte of an input file is not a newline, grep now silently 7956915Sru supplies one. 8056915Sru 8156230Sru - The new option --binary-files=TYPE makes grep assume that a binary input 8256230Sru file is of type TYPE. 8356230Sru --binary-files='binary' (the default) outputs a 1-line summary of matches. 8456230Sru --binary-files='without-match' assumes binary files do not match. 8556230Sru --binary-files='text' treats binary files as text 8656915Sru (equivalent to the -a or --text option). 8756230Sru 8856915Sru - New option -I; equivalent to --binary-files='without-match'. 8956915Sru 9055360SobrienVersion 2.4: 9155360Sobrien 9255360Sobrien - egrep is now equivalent to `grep -E' as required by POSIX, 9355360Sobrien removing a longstanding source of confusion and incompatibility. 9455360Sobrien `grep' is now more forgiving about stray `{'s, for backward 9555360Sobrien compatibility with traditional egrep. 9655360Sobrien 9755360Sobrien - The lower bound of an interval is not optional. 9855360Sobrien You must use an explicit zero, e.g. `x{0,10}' instead of `x{,10}'. 9955360Sobrien (The old documentation incorrectly claimed that it was optional.) 10055360Sobrien 10155360Sobrien - The --revert-match option has been renamed to --invert-match. 10255360Sobrien 10355360Sobrien - The --fixed-regexp option has been renamed to --fixed-string. 10455360Sobrien 10555360Sobrien - New option -H or --with-filename. 10655360Sobrien 10755360Sobrien - New option --mmap. By default, GNU grep now uses read instead of mmap. 10855360Sobrien This is faster on some hosts, and is safer on all. 10955360Sobrien 11055360Sobrien - The new option -z or --null-data causes `grep' to treat a zero byte 11155360Sobrien (the ASCII NUL character) as a line terminator in input data, and 11255360Sobrien to treat newlines as ordinary data. 11355360Sobrien 11455360Sobrien - The new option -Z or --null causes `grep' to output a zero byte 11555360Sobrien instead of the normal separator after a file name. 11655360Sobrien 11755360Sobrien - These two options can be used with commands like `find -print0', 11855360Sobrien `perl -0', `sort -z', and `xargs -0' to process arbitrary file names, 11955360Sobrien even those that contain newlines. 12055360Sobrien 12155360Sobrien - The environment variable GREP_OPTIONS specifies default options; 12255360Sobrien e.g. GREP_OPTIONS='--directories=skip' reestablishes grep 2.1's 12355360Sobrien behavior of silently skipping directories. 12455360Sobrien 12555360Sobrien - You can specify a matcher multiple times without error, e.g. 12655360Sobrien `grep -E -E' or `fgrep -F'. It is still an error to specify 12755360Sobrien conflicting matchers. 12855360Sobrien 12955360Sobrien - -u and -U are now allowed on non-DOS hosts, and have no effect. 13055360Sobrien 13155360Sobrien - Modifications of the tests scripts to go around the "Broken Pipe" 13255360Sobrien errors from bash. See Bash FAQ. 13355360Sobrien 13455360Sobrien - New option -r or --recursive or --directories=recurse. 13555360Sobrien (This option was also in grep 2.3, but wasn't announced here.) 13655360Sobrien 13755360Sobrien - --without-included-regex disable, was causing bogus reports .i.e 13855360Sobrien doing more harm then good. 13955360Sobrien 14053574SobrienVersion 2.3: 14153574Sobrien 14253574Sobrien - When searching a binary file FOO, grep now just reports 14353574Sobrien `Binary file FOO matches' instead of outputting binary data. 14453574Sobrien This is typically more useful than the old behavior, 14553574Sobrien and it is also more consistent with other utilities like `diff'. 14653574Sobrien A file is considered to be binary if it contains a NUL (i.e. zero) byte. 14753574Sobrien 14853574Sobrien The new -a or --text option causes `grep' to assume that all 14953574Sobrien input is text. (This option has the same meaning as with `diff'.) 15053574Sobrien Use it if you want binary data in your output. 15153574Sobrien 15253574Sobrien - `grep' now searches directories just like ordinary files; it no longer 15353574Sobrien silently skips directories. This is the traditional behavior of 15453574Sobrien Unix text utilities (in particular, of traditional `grep'). 15553574Sobrien Hence `grep PATTERN DIRECTORY' should report 15653574Sobrien `grep: DIRECTORY: Is a directory' on hosts where the operating system 15753574Sobrien does not permit programs to read directories directly, and 15853574Sobrien `grep: DIRECTORY: Binary file matches' (or nothing) otherwise. 15953574Sobrien 16053574Sobrien The new -d ACTION or --directories=ACTION option affects directory handling. 16155360Sobrien `-d skip' causes `grep' to silently skip directories, as in grep 2.1; 16253574Sobrien `-d read' (the default) causes `grep' to read directories if possible, 16353574Sobrien as in earlier versions of grep. 16453574Sobrien 16553574Sobrien - The MS-DOS and Microsoft Windows ports now behave identically to the 16653574Sobrien GNU and Unix ports with respect to binary files and directories. 16753574Sobrien 16853574SobrienVersion 2.2: 16953574Sobrien 17053574SobrienBug fix release. 17153574Sobrien 17253574Sobrien - Status error number fix. 17353574Sobrien - Skipping directories removed. 17453574Sobrien - Many typos fix. 17553574Sobrien - -f /dev/null fix(not to consider as an empty pattern). 17653574Sobrien - Checks for wctype/wchar. 17753574Sobrien - -E was using the wrong matcher fix. 17853574Sobrien - bug in regex char class fix 17953574Sobrien - Fixes for DJGPP 18053574Sobrien 18153574SobrienVersion 2.1: 18253574Sobrien 18353574SobrienThis is a bug fix release(see Changelog) i.e. no new features. 18453574Sobrien 18553574Sobrien - More compliance to GNU standard. 18653574Sobrien - Long options. 18753574Sobrien - Internationalisation. 18853574Sobrien - Use automake/autoconf. 18953574Sobrien - Directory hierarchy change. 19053574Sobrien - Sigvec with -e on Linux corrected. 19153574Sobrien - Sigvec with -f on Linux corrected. 19253574Sobrien - Sigvec with the mmap() corrected. 19353574Sobrien - Bug in kwset corrected. 19453574Sobrien - -q, -L and -l stop on first match. 19553574Sobrien - New and improve regex.[ch] from Ulrich Drepper. 19653574Sobrien - New and improve dfa.[ch] from Arnold Robbins. 19753574Sobrien - Prototypes for over zealous C compiler. 19853574Sobrien - Not scanning a file, if it's a directory 19953574Sobrien (cause problems on Sun). 20053574Sobrien - Ported to MS-DOS/MS-Windows with DJGPP tools. 20153574Sobrien 20253574SobrienSee Changelog for the full story and proper credits. 20353574Sobrien 20494SnateVersion 2.0: 20594Snate 20694SnateThe most important user visible change is that egrep and fgrep have 20794Snatedisappeared as separate programs into the single grep program mandated 20894Snateby POSIX 1003.2. New options -G, -E, and -F have been added, 20994Snateselecting grep, egrep, and fgrep behavior respectively. For 21094Snatecompatibility with historical practice, hard links named egrep and 21194Snatefgrep are also provided. See the manual page for details. 21294Snate 21394SnateIn addition, the regular expression facilities described in Posix 21494Snatedraft 11.2 are now supported, except for internationalization features 21594Snaterelated to locale-dependent collating sequence information. 21694Snate 21794SnateThere is a new option, -L, which is like -l except it lists 21894Snatefiles which don't contain matches. The reason this option was 21994Snateadded is because '-l -v' doesn't do what you expect. 22094Snate 22194SnatePerformance has been improved; the amount of improvement is platform 22294Snatedependent, but (for example) grep 2.0 typically runs at least 30% faster 22394Snatethan grep 1.6 on a DECstation using the MIPS compiler. Where possible, 22494Snategrep now uses mmap() for file input; on a Sun 4 running SunOS 4.1 this 22594Snatemay cut system time by as much as half, for a total reduction in running 22694Snatetime by nearly 50%. On machines that don't use mmap(), the buffering 22794Snatecode has been rewritten to choose more favorable alignments and buffer 22894Snatesizes for read(). 22994Snate 23094SnatePortability has been substantially cleaned up, and an automatic 23194Snateconfigure script is now provided. 23294Snate 23394SnateThe internals have changed in ways too numerous to mention. 23494SnatePeople brave enough to reuse the DFA matcher in other programs 23594Snatewill now have their bravery amply "rewarded", for the interface 23694Snateto that file has been completely changed. Some changes were 23794Snatenecessary to track the evolution of the regex package, and since 23894SnateI was changing it anyway I decided to do a general cleanup. 239