1*6fdbbb54STim J. RobbinsVersion 2.5.1 2*6fdbbb54STim J. Robbins - This is a bugfix release. No new features. 3*6fdbbb54STim J. Robbins 4*6fdbbb54STim J. RobbinsVersion 2.5 5*6fdbbb54STim J. Robbins - The new option --label allows to specify a different name for input 6*6fdbbb54STim J. Robbins from stdin. See the man or info pages for details. 7*6fdbbb54STim J. Robbins 8*6fdbbb54STim J. Robbins - The internal lib/getopt* files are no longer used on systems providing 9*6fdbbb54STim J. Robbins getopt functionality in their libc (e.g. glibc 2.2.x). 10*6fdbbb54STim J. Robbins If you need the old getopt files, use --with-included-getopt. 11*6fdbbb54STim J. Robbins 12*6fdbbb54STim J. Robbins - The new option --only-matching (-o) will print only the part of matching 13*6fdbbb54STim J. Robbins lines that matches the pattern. This is useful, for example, to extract 14*6fdbbb54STim J. Robbins IP addresses from log files. 15*6fdbbb54STim J. Robbins 16*6fdbbb54STim J. Robbins - i18n bug fixed ([A-Z0-9] wouldn't match A in locales other than C on 17*6fdbbb54STim J. Robbins systems using recent glibc builds 18*6fdbbb54STim J. Robbins 19*6fdbbb54STim J. Robbins - GNU grep can now be built with autoconf 2.52. 20*6fdbbb54STim J. Robbins 21*6fdbbb54STim J. Robbins - The new option --devices controls how grep handles device files. Its usage 22*6fdbbb54STim J. Robbins is analogous to --directories. 23*6fdbbb54STim J. Robbins 24*6fdbbb54STim J. Robbins - The new option --line-buffered fflush on everyline. There is a noticeable 25*6fdbbb54STim J. Robbins slow down when forcing line buffering. 26*6fdbbb54STim J. Robbins 27*6fdbbb54STim J. Robbins - Back references are now local to the regex. 28*6fdbbb54STim J. Robbins grep -e '\(a\)\1' -e '\(b\)\1' 29*6fdbbb54STim J. Robbins The last backref \1 in the second expression refer to \(b\) 30*6fdbbb54STim J. Robbins 31*6fdbbb54STim J. Robbins - The new option --include=PATTERN will only search matching files 32*6fdbbb54STim J. Robbins when recursing in directories 33*6fdbbb54STim J. Robbins 34*6fdbbb54STim J. Robbins - The new option --exclude=PATTERN will skip matching files when 35*6fdbbb54STim J. Robbins recursing in directories. 36*6fdbbb54STim J. Robbins 37*6fdbbb54STim J. Robbins - The new option --color will use the environment variable GREP_COLOR 38*6fdbbb54STim J. Robbins (default is red) to highlight the matching string. 39*6fdbbb54STim J. Robbins --color takes an optional argument specifying when to colorize a line: 40*6fdbbb54STim J. Robbins --color=always, --color=tty, --color=never 41*6fdbbb54STim J. Robbins 42*6fdbbb54STim J. Robbins - The following changes are for POSIX.2 conformance: 43*6fdbbb54STim J. Robbins 44*6fdbbb54STim J. Robbins . The -q or --quiet or --silent option now causes grep to exit 45*6fdbbb54STim J. Robbins with zero status when a input line is selected, even if an error 46*6fdbbb54STim J. Robbins also occurs. 47*6fdbbb54STim J. Robbins 48*6fdbbb54STim J. Robbins . The -s or --no-messages option no longer affects the exit status. 49*6fdbbb54STim J. Robbins 50*6fdbbb54STim J. Robbins . Bracket regular expressions like [a-z] are now locale-dependent. 51*6fdbbb54STim J. Robbins For example, many locales sort characters in dictionary order, 52*6fdbbb54STim J. Robbins and in these locales the regular expression [a-d] is not 53*6fdbbb54STim J. Robbins equivalent to [abcd]; it might be equivalent to [aBbCcDd], for 54*6fdbbb54STim J. Robbins example. To obtain the traditional interpretation of bracket 55*6fdbbb54STim J. Robbins expressions, you can use the C locale by setting the LC_ALL 56*6fdbbb54STim J. Robbins environment variable to the value "C". 57*6fdbbb54STim J. Robbins 58*6fdbbb54STim J. Robbins - The -C or --context option now requires an argument, partly for 59*6fdbbb54STim J. Robbins consistency, and partly because POSIX.2 recommends against 60*6fdbbb54STim J. Robbins optional arguments. 61*6fdbbb54STim J. Robbins 62*6fdbbb54STim J. Robbins - The new -P or --perl-regexp option tells grep to interpert the pattern as 63*6fdbbb54STim J. Robbins a Perl regular expression. 64*6fdbbb54STim J. Robbins 65*6fdbbb54STim J. Robbins - The new option --max-count=num makes grep stop reading a file after num 66*6fdbbb54STim J. Robbins matching lines. 67*6fdbbb54STim J. Robbins New option -m; equivalent to --max-count. 68*6fdbbb54STim J. Robbins 69*6fdbbb54STim J. Robbins - Translations for bg, ca, da, nb and tr have been added. 70*6fdbbb54STim J. Robbins 717a39f4daSAndrey A. ChernovVersion 2.4.2 727a39f4daSAndrey A. Chernov 737a39f4daSAndrey A. Chernov - Added more check in configure to default the grep-${version}/src/regex.c 747a39f4daSAndrey A. Chernov instead of the one in GNU Lib C. 757a39f4daSAndrey A. Chernov 767898cc4cSRuslan ErmilovVersion 2.4.1 777898cc4cSRuslan Ermilov 787898cc4cSRuslan Ermilov - If the final byte of an input file is not a newline, grep now silently 797898cc4cSRuslan Ermilov supplies one. 807898cc4cSRuslan Ermilov 81d513cb6cSRuslan Ermilov - The new option --binary-files=TYPE makes grep assume that a binary input 82d513cb6cSRuslan Ermilov file is of type TYPE. 83d513cb6cSRuslan Ermilov --binary-files='binary' (the default) outputs a 1-line summary of matches. 84d513cb6cSRuslan Ermilov --binary-files='without-match' assumes binary files do not match. 85d513cb6cSRuslan Ermilov --binary-files='text' treats binary files as text 867898cc4cSRuslan Ermilov (equivalent to the -a or --text option). 877898cc4cSRuslan Ermilov 887898cc4cSRuslan Ermilov - New option -I; equivalent to --binary-files='without-match'. 89d513cb6cSRuslan Ermilov 909ca25a7fSDavid E. O'BrienVersion 2.4: 919ca25a7fSDavid E. O'Brien 929ca25a7fSDavid E. O'Brien - egrep is now equivalent to `grep -E' as required by POSIX, 939ca25a7fSDavid E. O'Brien removing a longstanding source of confusion and incompatibility. 949ca25a7fSDavid E. O'Brien `grep' is now more forgiving about stray `{'s, for backward 959ca25a7fSDavid E. O'Brien compatibility with traditional egrep. 969ca25a7fSDavid E. O'Brien 979ca25a7fSDavid E. O'Brien - The lower bound of an interval is not optional. 989ca25a7fSDavid E. O'Brien You must use an explicit zero, e.g. `x{0,10}' instead of `x{,10}'. 999ca25a7fSDavid E. O'Brien (The old documentation incorrectly claimed that it was optional.) 1009ca25a7fSDavid E. O'Brien 1019ca25a7fSDavid E. O'Brien - The --revert-match option has been renamed to --invert-match. 1029ca25a7fSDavid E. O'Brien 1039ca25a7fSDavid E. O'Brien - The --fixed-regexp option has been renamed to --fixed-string. 1049ca25a7fSDavid E. O'Brien 1059ca25a7fSDavid E. O'Brien - New option -H or --with-filename. 1069ca25a7fSDavid E. O'Brien 1079ca25a7fSDavid E. O'Brien - New option --mmap. By default, GNU grep now uses read instead of mmap. 1089ca25a7fSDavid E. O'Brien This is faster on some hosts, and is safer on all. 1099ca25a7fSDavid E. O'Brien 1109ca25a7fSDavid E. O'Brien - The new option -z or --null-data causes `grep' to treat a zero byte 1119ca25a7fSDavid E. O'Brien (the ASCII NUL character) as a line terminator in input data, and 1129ca25a7fSDavid E. O'Brien to treat newlines as ordinary data. 1139ca25a7fSDavid E. O'Brien 1149ca25a7fSDavid E. O'Brien - The new option -Z or --null causes `grep' to output a zero byte 1159ca25a7fSDavid E. O'Brien instead of the normal separator after a file name. 1169ca25a7fSDavid E. O'Brien 1179ca25a7fSDavid E. O'Brien - These two options can be used with commands like `find -print0', 1189ca25a7fSDavid E. O'Brien `perl -0', `sort -z', and `xargs -0' to process arbitrary file names, 1199ca25a7fSDavid E. O'Brien even those that contain newlines. 1209ca25a7fSDavid E. O'Brien 1219ca25a7fSDavid E. O'Brien - The environment variable GREP_OPTIONS specifies default options; 1229ca25a7fSDavid E. O'Brien e.g. GREP_OPTIONS='--directories=skip' reestablishes grep 2.1's 1239ca25a7fSDavid E. O'Brien behavior of silently skipping directories. 1249ca25a7fSDavid E. O'Brien 1259ca25a7fSDavid E. O'Brien - You can specify a matcher multiple times without error, e.g. 1269ca25a7fSDavid E. O'Brien `grep -E -E' or `fgrep -F'. It is still an error to specify 1279ca25a7fSDavid E. O'Brien conflicting matchers. 1289ca25a7fSDavid E. O'Brien 1299ca25a7fSDavid E. O'Brien - -u and -U are now allowed on non-DOS hosts, and have no effect. 1309ca25a7fSDavid E. O'Brien 1319ca25a7fSDavid E. O'Brien - Modifications of the tests scripts to go around the "Broken Pipe" 1329ca25a7fSDavid E. O'Brien errors from bash. See Bash FAQ. 1339ca25a7fSDavid E. O'Brien 1349ca25a7fSDavid E. O'Brien - New option -r or --recursive or --directories=recurse. 1359ca25a7fSDavid E. O'Brien (This option was also in grep 2.3, but wasn't announced here.) 1369ca25a7fSDavid E. O'Brien 1379ca25a7fSDavid E. O'Brien - --without-included-regex disable, was causing bogus reports .i.e 1389ca25a7fSDavid E. O'Brien doing more harm then good. 1399ca25a7fSDavid E. O'Brien 1406b769ae7SDavid E. O'BrienVersion 2.3: 1416b769ae7SDavid E. O'Brien 1426b769ae7SDavid E. O'Brien - When searching a binary file FOO, grep now just reports 1436b769ae7SDavid E. O'Brien `Binary file FOO matches' instead of outputting binary data. 1446b769ae7SDavid E. O'Brien This is typically more useful than the old behavior, 1456b769ae7SDavid E. O'Brien and it is also more consistent with other utilities like `diff'. 1466b769ae7SDavid E. O'Brien A file is considered to be binary if it contains a NUL (i.e. zero) byte. 1476b769ae7SDavid E. O'Brien 1486b769ae7SDavid E. O'Brien The new -a or --text option causes `grep' to assume that all 1496b769ae7SDavid E. O'Brien input is text. (This option has the same meaning as with `diff'.) 1506b769ae7SDavid E. O'Brien Use it if you want binary data in your output. 1516b769ae7SDavid E. O'Brien 1526b769ae7SDavid E. O'Brien - `grep' now searches directories just like ordinary files; it no longer 1536b769ae7SDavid E. O'Brien silently skips directories. This is the traditional behavior of 1546b769ae7SDavid E. O'Brien Unix text utilities (in particular, of traditional `grep'). 1556b769ae7SDavid E. O'Brien Hence `grep PATTERN DIRECTORY' should report 1566b769ae7SDavid E. O'Brien `grep: DIRECTORY: Is a directory' on hosts where the operating system 1576b769ae7SDavid E. O'Brien does not permit programs to read directories directly, and 1586b769ae7SDavid E. O'Brien `grep: DIRECTORY: Binary file matches' (or nothing) otherwise. 1596b769ae7SDavid E. O'Brien 1606b769ae7SDavid E. O'Brien The new -d ACTION or --directories=ACTION option affects directory handling. 1619ca25a7fSDavid E. O'Brien `-d skip' causes `grep' to silently skip directories, as in grep 2.1; 1626b769ae7SDavid E. O'Brien `-d read' (the default) causes `grep' to read directories if possible, 1636b769ae7SDavid E. O'Brien as in earlier versions of grep. 1646b769ae7SDavid E. O'Brien 1656b769ae7SDavid E. O'Brien - The MS-DOS and Microsoft Windows ports now behave identically to the 1666b769ae7SDavid E. O'Brien GNU and Unix ports with respect to binary files and directories. 1676b769ae7SDavid E. O'Brien 1686b769ae7SDavid E. O'BrienVersion 2.2: 1696b769ae7SDavid E. O'Brien 1706b769ae7SDavid E. O'BrienBug fix release. 1716b769ae7SDavid E. O'Brien 1726b769ae7SDavid E. O'Brien - Status error number fix. 1736b769ae7SDavid E. O'Brien - Skipping directories removed. 1746b769ae7SDavid E. O'Brien - Many typos fix. 1756b769ae7SDavid E. O'Brien - -f /dev/null fix(not to consider as an empty pattern). 1766b769ae7SDavid E. O'Brien - Checks for wctype/wchar. 1776b769ae7SDavid E. O'Brien - -E was using the wrong matcher fix. 1786b769ae7SDavid E. O'Brien - bug in regex char class fix 1796b769ae7SDavid E. O'Brien - Fixes for DJGPP 1806b769ae7SDavid E. O'Brien 1816b769ae7SDavid E. O'BrienVersion 2.1: 1826b769ae7SDavid E. O'Brien 1836b769ae7SDavid E. O'BrienThis is a bug fix release(see Changelog) i.e. no new features. 1846b769ae7SDavid E. O'Brien 1856b769ae7SDavid E. O'Brien - More compliance to GNU standard. 1866b769ae7SDavid E. O'Brien - Long options. 1876b769ae7SDavid E. O'Brien - Internationalisation. 1886b769ae7SDavid E. O'Brien - Use automake/autoconf. 1896b769ae7SDavid E. O'Brien - Directory hierarchy change. 1906b769ae7SDavid E. O'Brien - Sigvec with -e on Linux corrected. 1916b769ae7SDavid E. O'Brien - Sigvec with -f on Linux corrected. 1926b769ae7SDavid E. O'Brien - Sigvec with the mmap() corrected. 1936b769ae7SDavid E. O'Brien - Bug in kwset corrected. 1946b769ae7SDavid E. O'Brien - -q, -L and -l stop on first match. 1956b769ae7SDavid E. O'Brien - New and improve regex.[ch] from Ulrich Drepper. 1966b769ae7SDavid E. O'Brien - New and improve dfa.[ch] from Arnold Robbins. 1976b769ae7SDavid E. O'Brien - Prototypes for over zealous C compiler. 1986b769ae7SDavid E. O'Brien - Not scanning a file, if it's a directory 1996b769ae7SDavid E. O'Brien (cause problems on Sun). 2006b769ae7SDavid E. O'Brien - Ported to MS-DOS/MS-Windows with DJGPP tools. 2016b769ae7SDavid E. O'Brien 2026b769ae7SDavid E. O'BrienSee Changelog for the full story and proper credits. 2036b769ae7SDavid E. O'Brien 204c0712724Scvs2svnVersion 2.0: 205c0712724Scvs2svn 206c0712724Scvs2svnThe most important user visible change is that egrep and fgrep have 207c0712724Scvs2svndisappeared as separate programs into the single grep program mandated 208c0712724Scvs2svnby POSIX 1003.2. New options -G, -E, and -F have been added, 209c0712724Scvs2svnselecting grep, egrep, and fgrep behavior respectively. For 210c0712724Scvs2svncompatibility with historical practice, hard links named egrep and 211c0712724Scvs2svnfgrep are also provided. See the manual page for details. 212c0712724Scvs2svn 213c0712724Scvs2svnIn addition, the regular expression facilities described in Posix 214c0712724Scvs2svndraft 11.2 are now supported, except for internationalization features 215c0712724Scvs2svnrelated to locale-dependent collating sequence information. 216c0712724Scvs2svn 217c0712724Scvs2svnThere is a new option, -L, which is like -l except it lists 218c0712724Scvs2svnfiles which don't contain matches. The reason this option was 219c0712724Scvs2svnadded is because '-l -v' doesn't do what you expect. 220c0712724Scvs2svn 221c0712724Scvs2svnPerformance has been improved; the amount of improvement is platform 222c0712724Scvs2svndependent, but (for example) grep 2.0 typically runs at least 30% faster 223c0712724Scvs2svnthan grep 1.6 on a DECstation using the MIPS compiler. Where possible, 224c0712724Scvs2svngrep now uses mmap() for file input; on a Sun 4 running SunOS 4.1 this 225c0712724Scvs2svnmay cut system time by as much as half, for a total reduction in running 226c0712724Scvs2svntime by nearly 50%. On machines that don't use mmap(), the buffering 227c0712724Scvs2svncode has been rewritten to choose more favorable alignments and buffer 228c0712724Scvs2svnsizes for read(). 229c0712724Scvs2svn 230c0712724Scvs2svnPortability has been substantially cleaned up, and an automatic 231c0712724Scvs2svnconfigure script is now provided. 232c0712724Scvs2svn 233c0712724Scvs2svnThe internals have changed in ways too numerous to mention. 234c0712724Scvs2svnPeople brave enough to reuse the DFA matcher in other programs 235c0712724Scvs2svnwill now have their bravery amply "rewarded", for the interface 236c0712724Scvs2svnto that file has been completely changed. Some changes were 237c0712724Scvs2svnnecessary to track the evolution of the regex package, and since 238c0712724Scvs2svnI was changing it anyway I decided to do a general cleanup. 239