Blame NEWS

Packit 709fb3
GNU grep NEWS                                    -*- outline -*-
Packit 709fb3
Packit 709fb3
* Noteworthy changes in release 3.1 (2017-07-02) [stable]
Packit 709fb3
Packit 709fb3
** Improvements
Packit 709fb3
Packit 709fb3
  grep '[0-9]' is now just as fast as grep '[[:digit:]]' when run
Packit 709fb3
  in a multi-byte locale.  Before, it was several times slower.
Packit 709fb3
Packit 709fb3
** Changes in behavior
Packit 709fb3
Packit 709fb3
  Context no longer excludes selected lines omitted because of -m.
Packit 709fb3
  For example, 'grep "^" -m1 -A1' now outputs the first two input
Packit 709fb3
  lines, not just the first line.  This fixes a glitch that has been
Packit 709fb3
  present since -m was added in grep 2.5.
Packit 709fb3
Packit 709fb3
  The following changes affect only MS-Windows platforms.  First, the
Packit 709fb3
  --binary (-U) option now governs whether binary I/O is used, instead
Packit 709fb3
  of a heuristic that was sometimes incorrect.  Second, the
Packit 709fb3
  --unix-byte-offsets (-u) option now has no effect on MS-Windows too.
Packit 709fb3
Packit 709fb3
Packit 709fb3
* Noteworthy changes in release 3.0 (2017-02-09) [stable]
Packit 709fb3
Packit 709fb3
** Bug fixes
Packit 709fb3
Packit 709fb3
  grep without -F no longer goes awry when given two or more patterns
Packit 709fb3
  that contain no special characters other than '\' and also contain a
Packit 709fb3
  subpattern like '\.' that escapes a character to make it ordinary.
Packit 709fb3
  [bug introduced in grep 2.28]
Packit 709fb3
Packit 709fb3
  grep no longer fails to build on PCRE versions before 8.20.
Packit 709fb3
  [bug introduced in grep 2.28]
Packit 709fb3
Packit 709fb3
Packit 709fb3
* Noteworthy changes in release 2.28 (2017-02-06) [stable]
Packit 709fb3
Packit 709fb3
** Bug fixes
Packit 709fb3
Packit 709fb3
  When grep -Fo finds matches of differing length, it could
Packit 709fb3
  mistakenly print a shorter one.  Now it prints a longest one.
Packit 709fb3
  [bug introduced in grep-2.26]
Packit 709fb3
Packit 709fb3
  When standard output is /dev/null, grep no longer fails when
Packit 709fb3
  standard input is a file in the Linux /proc file system, or when
Packit 709fb3
  standard input is a pipe and standard output is in append mode.
Packit 709fb3
  [bugs introduced in grep-2.27]
Packit 709fb3
Packit 709fb3
  Fix performance regression with multiple patterns, e.g., for -Fi in
Packit 709fb3
  a multi-byte locale, or for -Fw in a single-byte locale.
Packit 709fb3
  [bugs introduced in grep-2.19, grep-2.22 and grep-2.26]
Packit 709fb3
Packit 709fb3
** Improvements
Packit 709fb3
Packit 709fb3
  Improve performance for -E or -G pattern lists that are easily
Packit 709fb3
  converted to -F format.
Packit 709fb3
Packit 709fb3
Packit 709fb3
* Noteworthy changes in release 2.27 (2016-12-06) [stable]
Packit 709fb3
Packit 709fb3
** Bug fixes
Packit 709fb3
Packit 709fb3
  grep no longer reports a false match in a multibyte, non-UTF8 locale
Packit 709fb3
  like zh_CN.gb18030, with a regular expression like ".*7" that just
Packit 709fb3
  happens to match the 4-byte representation of gb18030's \uC9, the
Packit 709fb3
  final byte of which is the digit "7".
Packit 709fb3
  [bug introduced in grep-2.19]
Packit 709fb3
Packit 709fb3
  Unless an early-exit option like -q, -l, -L, -m, or -f /dev/null is
Packit 709fb3
  specified, grep now reads all of a non-seekable standard input,
Packit 709fb3
  even if this cannot affect grep's output or exit status.  This works
Packit 709fb3
  better with nonportable scripts that run "PROGRAM | grep PATTERN
Packit 709fb3
  >/dev/null" where PROGRAM dies when writing into a broken pipe.
Packit 709fb3
  [bug introduced in grep-2.26]
Packit 709fb3
Packit 709fb3
  grep no longer mishandles ranges in nontrivial unibyte locales.
Packit 709fb3
  [bug introduced in grep-2.26]
Packit 709fb3
Packit 709fb3
  grep -P no longer attempts multiline matches.  This works more
Packit 709fb3
  intuitively with unusual patterns, and means that grep -Pz no longer
Packit 709fb3
  rejects patterns containing ^ and $ and works when combined with -x.
Packit 709fb3
  [bugs introduced in grep-2.23] A downside is that grep -P is now
Packit 709fb3
  significantly slower, albeit typically still faster than pcregrep.
Packit 709fb3
Packit 709fb3
  grep -m0 -L PAT FILE now outputs "FILE".  [bug introduced in grep-2.5]
Packit 709fb3
Packit 709fb3
  To output ':' and tab-align the following character C, grep -T no
Packit 709fb3
  longer outputs tab-backspace-':'-C, an approach that has problems if
Packit 709fb3
  run inside an Emacs shell window.  [bug introduced in grep-2.5.2]
Packit 709fb3
Packit 709fb3
  grep -T now uses worst-case widths of line numbers and byte offsets
Packit 709fb3
  instead of guessing widths that might not work with larger files.
Packit 709fb3
  [bug introduced in grep-2.5.2]
Packit 709fb3
Packit 709fb3
  grep's use of getprogname no longer causes a build failure on HP-UX.
Packit 709fb3
Packit 709fb3
** Improvements
Packit 709fb3
Packit 709fb3
  grep no longer reads the input in a few more cases when it is easy
Packit 709fb3
  to see that matching cannot succeed, e.g., 'grep -f /dev/null'.
Packit 709fb3
Packit 709fb3
Packit 709fb3
* Noteworthy changes in release 2.26 (2016-10-02) [stable]
Packit 709fb3
Packit 709fb3
** Bug fixes
Packit 709fb3
Packit 709fb3
  Grep no longer omits output merely because it follows an output line
Packit 709fb3
  suppressed due to encoding errors.  [bug introduced in grep-2.21]
Packit 709fb3
Packit 709fb3
  In the Shift_JIS locale, grep no longer mistakenly matches in the
Packit 709fb3
  middle of a multibyte character. [bug present since "the beginning"]
Packit 709fb3
Packit 709fb3
** Improvements
Packit 709fb3
Packit 709fb3
  grep can be much faster now when standard output is /dev/null.
Packit 709fb3
Packit 709fb3
  grep -F is now typically much faster when many patterns are given,
Packit 709fb3
  as it now uses the Aho-Corasick algorithm instead of the
Packit 709fb3
  Commentz-Walter algorithm in that case.
Packit 709fb3
Packit 709fb3
  grep -iF is typically much faster in a multibyte locale, if the
Packit 709fb3
  pattern and its case counterparts contain only single byte characters.
Packit 709fb3
Packit 709fb3
  grep with complicated expressions (e.g., back-references) and without
Packit 709fb3
  -i now uses the regex fastmap for better performance.
Packit 709fb3
Packit 709fb3
  In multibyte locales, grep now handles leading "." in patterns more
Packit 709fb3
  efficiently.
Packit 709fb3
Packit 709fb3
  grep now prints a "FILENAME:LINENO: " prefix when diagnosing an
Packit 709fb3
  invalid regular expression that was read from an '-f'-specified file.
Packit 709fb3
Packit 709fb3
Packit 709fb3
* Noteworthy changes in release 2.25 (2016-04-21) [stable]
Packit 709fb3
Packit 709fb3
** Bug fixes
Packit 709fb3
Packit 709fb3
  In the C or POSIX locale, grep now treats all bytes as valid
Packit 709fb3
  characters even if the C runtime library says otherwise.  The
Packit 709fb3
  revised behavior is more compatible with the original intent of
Packit 709fb3
  POSIX, and the next release of POSIX will likely make this official.
Packit 709fb3
  [bug introduced in grep-2.23]
Packit 709fb3
Packit 709fb3
  grep -Pz no longer mistakenly diagnoses patterns like [^a] that use
Packit 709fb3
  negated character classes. [bug introduced in grep-2.24]
Packit 709fb3
Packit 709fb3
  grep -oz now uses null bytes, not newlines, to terminate output lines.
Packit 709fb3
  [bug introduced in grep-2.5]
Packit 709fb3
Packit 709fb3
** Improvements
Packit 709fb3
Packit 709fb3
  grep now outputs details more consistently when reporting a write error.
Packit 709fb3
  E.g., "grep: write error: No space left on device" rather than just
Packit 709fb3
  "grep: write error".
Packit 709fb3
Packit 709fb3
Packit 709fb3
* Noteworthy changes in release 2.24 (2016-03-10) [stable]
Packit 709fb3
Packit 709fb3
** Bug fixes
Packit 709fb3
Packit 709fb3
  grep -z would match strings it should not.  To trigger the bug, you'd
Packit 709fb3
  have to use a regular expression including an anchor (^ or $) and a
Packit 709fb3
  feature like a range or a backreference, causing grep to forego its DFA
Packit 709fb3
  matcher and resort to using re_search.  With a multibyte locale, that
Packit 709fb3
  matcher could mistakenly match a string containing a newline.
Packit 709fb3
  For example, this command:
Packit 709fb3
    printf 'a\nb\0' | LC_ALL=en_US.utf-8 grep -z '^[a-b]*b'
Packit 709fb3
  would mistakenly match and print all four input bytes.  After the fix,
Packit 709fb3
  there is no match, as expected.
Packit 709fb3
  [bug introduced in grep-2.7]
Packit 709fb3
Packit 709fb3
  grep -Pz now diagnoses attempts to use patterns containing ^ and $,
Packit 709fb3
  instead of mishandling these patterns.  This problem seems to be
Packit 709fb3
  inherent to the PCRE API; removing this limitation is on PCRE's
Packit 709fb3
  maint/README wish list.  Patterns can continue to match literal ^
Packit 709fb3
  and $ by escaping them with \ (now needed even inside [...]).
Packit 709fb3
  [bug introduced in grep-2.5]
Packit 709fb3
Packit 709fb3
Packit 709fb3
* Noteworthy changes in release 2.23 (2016-02-04) [stable]
Packit 709fb3
Packit 709fb3
** Bug fixes
Packit 709fb3
Packit 709fb3
  Binary files are now less likely to generate diagnostics and more
Packit 709fb3
  likely to yield text matches.  grep now reports "Binary file FOO
Packit 709fb3
  matches" and suppresses further output instead of outputting a line
Packit 709fb3
  containing an encoding error; hence grep can now report matching text
Packit 709fb3
  before a later binary match.  Formerly, grep reported FOO to be
Packit 709fb3
  binary when it found an encoding error in FOO before generating
Packit 709fb3
  output for FOO, which meant it never reported both matching text and
Packit 709fb3
  matching binary data; this was less useful for searching text
Packit 709fb3
  containing encoding errors in non-matching lines.
Packit 709fb3
  [bug introduced in grep-2.21]
Packit 709fb3
Packit 709fb3
  grep -c no longer stops counting when finding binary data.
Packit 709fb3
  [bug introduced in grep-2.21]
Packit 709fb3
Packit 709fb3
  grep no longer outputs encoding errors in unibyte locales.
Packit 709fb3
  For example, if the byte '\x81' is not a valid character in a
Packit 709fb3
  unibyte locale, grep treats the byte as binary data.
Packit 709fb3
  [bug introduced in grep-2.21]
Packit 709fb3
Packit 709fb3
  grep -oP is no longer susceptible to an infinite loop when processing
Packit 709fb3
  invalid UTF8 just before a match.
Packit 709fb3
  [bug introduced in grep-2.22]
Packit 709fb3
Packit 709fb3
  --exclude and related options are now matched against trailing
Packit 709fb3
  parts of command-line arguments, not against the entire arguments.
Packit 709fb3
  This partly reverts the --exclude-related change in 2.22.
Packit 709fb3
  [bug introduced in grep-2.22]
Packit 709fb3
Packit 709fb3
  --line-buffer is no longer ineffective when combined with -l.
Packit 709fb3
  [bug introduced in grep-2.5]
Packit 709fb3
Packit 709fb3
  -xw is now equivalent to -x more consistently, with -P and with backrefs.
Packit 709fb3
  [bug only partially fixed in grep-2.19]
Packit 709fb3
Packit 709fb3
Packit 709fb3
* Noteworthy changes in release 2.22 (2015-11-01) [stable]
Packit 709fb3
Packit 709fb3
** Improvements
Packit 709fb3
Packit 709fb3
  Performance has improved for patterns containing very long strings,
Packit 709fb3
  reducing preprocessing time for an N-byte regexp from O(N^2) to
Packit 709fb3
  only slightly superlinear for most patterns.  Before, a command like
Packit 709fb3
  the following would take over a minute, but now, it takes less than
Packit 709fb3
  a second:
Packit 709fb3
  : | grep -f <(seq -s '' 99999)
Packit 709fb3
Packit 709fb3
  When building grep, 'configure' now uses PCRE's pkg-config module for
Packit 709fb3
  configuration information, rather than attempting to guess it by hand.
Packit 709fb3
Packit 709fb3
** Bug fixes
Packit 709fb3
Packit 709fb3
  A DFA matcher bug made this command mistakenly print its input line:
Packit 709fb3
    echo axb | grep -E '^x|x$'
Packit 709fb3
  Likewise for this equivalent command:
Packit 709fb3
    echo axb | grep -e '^x' -e 'x$'
Packit 709fb3
  [bug introduced in grep-2.19 ]
Packit 709fb3
Packit 709fb3
  grep no longer reads from uninitialized memory or from beyond the end
Packit 709fb3
  of the heap-allocated input buffer.  This fix addressed CVE-2015-1345.
Packit 709fb3
  [bug introduced in grep-2.19 ]
Packit 709fb3
Packit 709fb3
  With -z, '.' and '[^x]' in a pattern now consistently match newline.
Packit 709fb3
  Previously, they sometimes matched newline, and sometimes did not.
Packit 709fb3
  [bug introduced in grep-2.4]
Packit 709fb3
Packit 709fb3
  When the JIT stack is exhausted, grep -P now grows the stack rather
Packit 709fb3
  than reporting an internal PCRE error.
Packit 709fb3
Packit 709fb3
  'grep -D skip PATTERN FILE' no longer hangs if FILE is a fifo.
Packit 709fb3
  [bug introduced in grep-2.12]
Packit 709fb3
Packit 709fb3
  --exclude and related options are now matched against entire
Packit 709fb3
  command-line arguments, not against command-line components.
Packit 709fb3
  [bug introduced in grep-2.6]
Packit 709fb3
Packit 709fb3
  Fix performance degradation of grep -Fw in unibyte locales.
Packit 709fb3
  [bug introduced in grep-2.19 ]
Packit 709fb3
Packit 709fb3
Packit 709fb3
* Noteworthy changes in release 2.21 (2014-11-23) [stable]
Packit 709fb3
Packit 709fb3
** Improvements
Packit 709fb3
Packit 709fb3
  Performance has been greatly improved for searching files containing
Packit 709fb3
  holes, on platforms where lseek's SEEK_DATA flag works efficiently.
Packit 709fb3
Packit 709fb3
  Performance has improved for rejecting data that cannot match even
Packit 709fb3
  the first part of a nontrivial pattern.
Packit 709fb3
Packit 709fb3
  Performance has improved for very long strings in patterns.
Packit 709fb3
Packit 709fb3
  If a file contains data improperly encoded for the current locale,
Packit 709fb3
  and this is discovered before any of the file's contents are output,
Packit 709fb3
  grep now treats the file as binary.
Packit 709fb3
Packit 709fb3
  grep -P no longer reports an error and exits when given invalid UTF-8 data.
Packit 709fb3
  Instead, it considers the data to be non-matching.
Packit 709fb3
Packit 709fb3
** Bug fixes
Packit 709fb3
Packit 709fb3
  grep no longer mishandles patterns that contain \w or \W in multibyte
Packit 709fb3
  locales.
Packit 709fb3
Packit 709fb3
  grep would fail to count newlines internally when operating in non-UTF8
Packit 709fb3
  multibyte locales, leading it to print potentially many lines that did
Packit 709fb3
  not match.  E.g., the command, "seq 10 | env LC_ALL=zh_CN src/grep -n .."
Packit 709fb3
  would print this:
Packit 709fb3
  1:1
Packit 709fb3
  2
Packit 709fb3
  3
Packit 709fb3
  4
Packit 709fb3
  5
Packit 709fb3
  6
Packit 709fb3
  7
Packit 709fb3
  8
Packit 709fb3
  9
Packit 709fb3
  10
Packit 709fb3
  implying that the match, "10" was on line 1.
Packit 709fb3
  [bug introduced in grep-2.19]
Packit 709fb3
Packit 709fb3
  grep -F -x -o no longer prints an extra newline for each match.
Packit 709fb3
  [bug introduced in grep-2.19]
Packit 709fb3
Packit 709fb3
  grep in a non-UTF8 multibyte locale could mistakenly match in the middle
Packit 709fb3
  of a multibyte character when using a '^'-anchored alternate in a pattern,
Packit 709fb3
  leading it to print non-matching lines.  [bug present since "the beginning"]
Packit 709fb3
Packit 709fb3
  grep -F Y no longer fails to match in non-UTF8 multibyte locales like
Packit 709fb3
  Shift-JIS, when the input contains a 2-byte character, XY, followed by
Packit 709fb3
  the single-byte search pattern, Y.  grep would find the first, middle-
Packit 709fb3
  of-multibyte matching "Y", and then mistakenly advance an internal
Packit 709fb3
  pointer one byte too far, skipping over the target "Y" just after that.
Packit 709fb3
  [bug introduced in grep-2.19]
Packit 709fb3
Packit 709fb3
  grep -E rejected unmatched ')', instead of treating it like '\)'.
Packit 709fb3
  [bug present since "the beginning"]
Packit 709fb3
Packit 709fb3
  On NetBSD, grep -r no longer reports "Inappropriate file type or format"
Packit 709fb3
  when refusing to follow a symbolic link.
Packit 709fb3
  [bug introduced in grep-2.12]
Packit 709fb3
Packit 709fb3
** Changes in behavior
Packit 709fb3
Packit 709fb3
  The GREP_OPTIONS environment variable is now obsolescent, and grep
Packit 709fb3
  now warns if it is used.  Please use an alias or script instead.
Packit 709fb3
Packit 709fb3
  In locales with multibyte character encodings other than UTF-8,
Packit 709fb3
  grep -P now reports an error and exits instead of misbehaving.
Packit 709fb3
Packit 709fb3
  When searching binary data, grep now may treat non-text bytes as
Packit 709fb3
  line terminators.  This can boost performance significantly.
Packit 709fb3
Packit 709fb3
  grep -z no longer automatically treats the byte '\200' as binary data.
Packit 709fb3
Packit 709fb3
* Noteworthy changes in release 2.20 (2014-06-03) [stable]
Packit 709fb3
Packit 709fb3
** Bug fixes
Packit 709fb3
Packit 709fb3
  grep --max-count=N FILE would no longer stop reading after the Nth match.
Packit 709fb3
  I.e., while grep would still print the correct output, it would continue
Packit 709fb3
  reading until end of input, and hence, potentially forever.
Packit 709fb3
  [bug introduced in grep-2.19]
Packit 709fb3
Packit 709fb3
  A command like echo aa|grep -E 'a(b$|c$)' would mistakenly
Packit 709fb3
  report the input as a matched line.
Packit 709fb3
  [bug introduced in grep-2.19]
Packit 709fb3
Packit 709fb3
** Changes in behavior
Packit 709fb3
Packit 709fb3
  grep --exclude-dir='FOO/' now excludes the directory FOO.
Packit 709fb3
  Previously, the trailing slash meant the option was ineffective.
Packit 709fb3
Packit 709fb3
Packit 709fb3
* Noteworthy changes in release 2.19 (2014-05-22) [stable]
Packit 709fb3
Packit 709fb3
** Improvements
Packit 709fb3
Packit 709fb3
  Performance has improved, typically by 10% and in some cases by a
Packit 709fb3
  factor of 200.  However, performance of grep -P in UTF-8 locales has
Packit 709fb3
  gotten worse as part of the fix for the crashes mentioned below.
Packit 709fb3
Packit 709fb3
** Bug fixes
Packit 709fb3
Packit 709fb3
  grep no longer mishandles patterns like [a-[.z.]], and no longer
Packit 709fb3
  mishandles patterns like [^a] in locales that have multicharacter
Packit 709fb3
  collating sequences so that [^a] can match a string of two characters.
Packit 709fb3
Packit 709fb3
  grep no longer mishandles an empty pattern at the end of a pattern list.
Packit 709fb3
  [bug introduced in grep-2.5]
Packit 709fb3
Packit 709fb3
  grep -C NUM now outputs separators consistently even when NUM is zero,
Packit 709fb3
  and similarly for grep -A NUM and grep -B NUM.
Packit 709fb3
  [bug present since "the beginning"]
Packit 709fb3
Packit 709fb3
  grep -f no longer mishandles patterns containing NUL bytes.
Packit 709fb3
  [bug introduced in grep-2.11]
Packit 709fb3
Packit 709fb3
  Plain grep, grep -E, and grep -F now treat encoding errors in patterns
Packit 709fb3
  the same way the GNU regular expression matcher treats them, with respect
Packit 709fb3
  to whether the errors can match parts of multibyte characters in data.
Packit 709fb3
  [bug present since "the beginning"]
Packit 709fb3
Packit 709fb3
  grep -w no longer mishandles a potential match adjacent to a letter that
Packit 709fb3
  takes up two or more bytes in a multibyte encoding.
Packit 709fb3
  Similarly, the patterns '\<', '\>', '\b', and '\B' no longer
Packit 709fb3
  mishandle word-boundary matches in multibyte locales.
Packit 709fb3
  [bug present since "the beginning"]
Packit 709fb3
Packit 709fb3
  grep -P now reports an error and exits when given invalid UTF-8 data.
Packit 709fb3
  Previously it was unreliable, and sometimes crashed or looped.
Packit 709fb3
  [bug introduced in grep-2.16]
Packit 709fb3
Packit 709fb3
  grep -P now works with -w and -x and backreferences. Before,
Packit 709fb3
  echo aa|grep -Pw '(.)\1' would fail to match, yet
Packit 709fb3
  echo aa|grep -Pw '(.)\2' would match.
Packit 709fb3
Packit 709fb3
  grep -Pw now works like grep -w in that the matched string has to be
Packit 709fb3
  preceded and followed by non-word components or the beginning and end
Packit 709fb3
  of the line (as opposed to word boundaries before).  Before, this
Packit 709fb3
  echo a@@a| grep -Pw @@ would match, yet this
Packit 709fb3
  echo a@@a| grep -w @@ would not.  Now, they both fail to match,
Packit 709fb3
  per the documentation on how grep's -w works.
Packit 709fb3
Packit 709fb3
  grep -i no longer mishandles patterns containing titlecase characters.
Packit 709fb3
  For example, in a locale containing the titlecase character
Packit 709fb3
  'Lj' (U+01C8 LATIN CAPITAL LETTER L WITH SMALL LETTER J),
Packit 709fb3
  'grep -i Lj' now matches both 'LJ' (U+01C7 LATIN CAPITAL LETTER LJ)
Packit 709fb3
  and 'lj' (U+01C9 LATIN SMALL LETTER LJ).
Packit 709fb3
Packit 709fb3
Packit 709fb3
* Noteworthy changes in release 2.18 (2014-02-20) [stable]
Packit 709fb3
Packit 709fb3
** Bug fixes
Packit 709fb3
Packit 709fb3
  grep no longer mishandles patterns like [^^-~] in unibyte locales.
Packit 709fb3
  [bug introduced in grep-2.8]
Packit 709fb3
Packit 709fb3
  grep -i in a multibyte, non-UTF8 locale could be up to 200 times slower
Packit 709fb3
  than in 2.16.  [bug introduced in grep-2.17]
Packit 709fb3
Packit 709fb3
Packit 709fb3
* Noteworthy changes in release 2.17 (2014-02-17) [stable]
Packit 709fb3
Packit 709fb3
** Improvements
Packit 709fb3
Packit 709fb3
  grep -i in a multibyte locale is now typically 10 times faster
Packit 709fb3
  for patterns that do not contain \ or [.
Packit 709fb3
Packit 709fb3
  grep (without -i) in a multibyte locale is now up to 7 times faster
Packit 709fb3
  when processing many matched lines.
Packit 709fb3
Packit 709fb3
** Maintenance
Packit 709fb3
Packit 709fb3
  grep's --mmap option was disabled in March of 2010, and began to
Packit 709fb3
  elicit a warning in January of 2012.  Now it is completely gone.
Packit 709fb3
Packit 709fb3
Packit 709fb3
* Noteworthy changes in release 2.16 (2014-01-01) [stable]
Packit 709fb3
Packit 709fb3
** Bug fixes
Packit 709fb3
Packit 709fb3
  Fix gnulib-provided maint.mk so that the release procedure described
Packit 709fb3
  in README-release actually does what we want.  Before that fix, that
Packit 709fb3
  procedure resulted in a grep-2.15 tarball that would lead to a grep
Packit 709fb3
  binary whose --version-reported version number was 2.14.51...
Packit 709fb3
Packit 709fb3
  The fix to make \s and \S work with multi-byte white space broke
Packit 709fb3
  the use of each shortcut whenever followed by a repetition operator.
Packit 709fb3
  For example, \s*, \s+, \s? and \s{3} would all malfunction in a
Packit 709fb3
  multi-byte locale.  [bug introduced in grep-2.15]
Packit 709fb3
Packit 709fb3
  The fix to make grep -P work better with UTF-8 made it possible for
Packit 709fb3
  grep to evoke a larger set of PCRE errors, some of which could trigger
Packit 709fb3
  an abort.  E.g., this would abort:
Packit 709fb3
    printf '\x82'|LC_ALL=en_US.UTF-8 grep -P y
Packit 709fb3
  Now grep handles arbitrary PCRE errors.  [bug introduced in grep-2.15]
Packit 709fb3
Packit 709fb3
  Handle very long lines (2GiB and longer) on systems with a deficient
Packit 709fb3
  read system call.
Packit 709fb3
Packit 709fb3
* Noteworthy changes in release 2.15 (2013-10-26) [stable]
Packit 709fb3
Packit 709fb3
** Bug fixes
Packit 709fb3
Packit 709fb3
  grep's \s and \S failed to work with multi-byte white space characters.
Packit 709fb3
  For example, \s would fail to match a non-breaking space, and this
Packit 709fb3
  would print nothing: printf '\xc2\xa0' | LC_ALL=en_US.UTF-8 grep '\s'
Packit 709fb3
  A related bug is that \S would mistakenly match an invalid multibyte
Packit 709fb3
  character.  For example, the following would match:
Packit 709fb3
    printf '\x82\n' | LC_ALL=en_US.UTF-8 grep '^\S$'
Packit 709fb3
  [bug present since grep-2.6]
Packit 709fb3
Packit 709fb3
  grep -i would segfault on systems using UTF-16-based wchar_t (Cygwin)
Packit 709fb3
  when converting an input string containing certain 4-byte UTF-8
Packit 709fb3
  sequences to lower case.  The conversions to wchar_t and back to
Packit 709fb3
  a UTF-8 multibyte string did not take surrogate pairs into account.
Packit 709fb3
  [bug present since at least grep-2.6, though the segfault is new with 2.13]
Packit 709fb3
Packit 709fb3
  grep -E would segfault when given a regexp like '([^.]*[M]){1,2}'
Packit 709fb3
  for any multibyte character M. [bug introduced in grep-2.6, which would
Packit 709fb3
  segfault, but 2.7 and 2.8 had no problem, and 2.9 through 2.14 would
Packit 709fb3
  hit a failed assertion. ]
Packit 709fb3
Packit 709fb3
  grep -F would get stuck in an infinite loop when given a search string
Packit 709fb3
  that is an invalid byte sequence in the current locale and that matches
Packit 709fb3
  the bytes of the input twice on a line.  Now grep fails with exit status 1.
Packit 709fb3
Packit 709fb3
  grep -P could misbehave.  While multi-byte mode is only supported by PCRE
Packit 709fb3
  with UTF-8 locales, grep did not activate it.  This would cause failures
Packit 709fb3
  to match multibyte characters against some regular expressions, especially
Packit 709fb3
  those including the '.' or '\p' metacharacters.
Packit 709fb3
Packit 709fb3
** New features
Packit 709fb3
Packit 709fb3
  grep -P can now use a just-in-time compiler to greatly speed up matches,
Packit 709fb3
  This feature is transparent to the user; no flag is required to enable
Packit 709fb3
  it.  It is only available if the corresponding support in the PCRE
Packit 709fb3
  library is detected when grep is compiled.
Packit 709fb3
Packit 709fb3
Packit 709fb3
* Noteworthy changes in release 2.14 (2012-08-20) [stable]
Packit 709fb3
Packit 709fb3
** Bug fixes
Packit 709fb3
Packit 709fb3
  grep -i '^$' could exit 0 (i.e., report a match) in a multi-byte locale,
Packit 709fb3
  even though there was no match, and the command generated no output.
Packit 709fb3
  E.g., seq 2 | LC_ALL=en_US.utf8 grep -il '^$' would mistakenly print
Packit 709fb3
  "(standard input)".  Related, seq 9 | LC_ALL=en_US.utf8 grep -in '^$'
Packit 709fb3
  would print "2:4:6:8:10:12:14:16" and exit 0.  Now it prints nothing
Packit 709fb3
  and exits with status of 1.  [bug introduced in grep-2.6]
Packit 709fb3
Packit 709fb3
  'grep' no longer falsely reports text files as being binary on file
Packit 709fb3
  systems that compress contents or that store tiny contents in metadata.
Packit 709fb3
Packit 709fb3
Packit 709fb3
* Noteworthy changes in release 2.13 (2012-07-04) [stable]
Packit 709fb3
Packit 709fb3
** Bug fixes
Packit 709fb3
Packit 709fb3
  grep -i, in a multi-byte locale, when matching a line containing a character
Packit 709fb3
  like the UTF-8 Turkish I-with-dot (U+0130) (whose lower-case representation
Packit 709fb3
  occupies fewer bytes), would print an incomplete output line.
Packit 709fb3
  Similarly, with a matched line containing a character (e.g., the Latin
Packit 709fb3
  capital I in a Turkish UTF-8 locale), where the lower-case representation
Packit 709fb3
  occupies more bytes, grep could print garbage.
Packit 709fb3
  [bug introduced in grep-2.6]
Packit 709fb3
Packit 709fb3
  --include and --exclude can again be combined, and again apply to
Packit 709fb3
  the command line, e.g., "grep --include='*.[ch]' --exclude='system.h'
Packit 709fb3
  PATTERN *" again reads all *.c and *.h files except for system.h.
Packit 709fb3
  [bug introduced in grep-2.6]
Packit 709fb3
Packit 709fb3
** New features
Packit 709fb3
Packit 709fb3
  'grep' without -z now treats a sparse file as binary, if it can
Packit 709fb3
  easily determine that the file is sparse.
Packit 709fb3
Packit 709fb3
** Dropped features
Packit 709fb3
Packit 709fb3
  Bootstrapping with Makefile.boot has been broken since grep 2.6,
Packit 709fb3
  and was removed.
Packit 709fb3
Packit 709fb3
Packit 709fb3
* Noteworthy changes in release 2.12 (2012-04-23) [stable]
Packit 709fb3
Packit 709fb3
** Bug fixes
Packit 709fb3
Packit 709fb3
  "echo P|grep --devices=skip P" once again prints P, as it did in 2.10
Packit 709fb3
  [bug introduced in grep-2.11]
Packit 709fb3
Packit 709fb3
  grep no longer segfaults with -r --exclude-dir and no file operand.
Packit 709fb3
  I.e., ":|grep -r --exclude-dir=D PAT" would segfault.
Packit 709fb3
  [bug introduced in grep-2.11]
Packit 709fb3
Packit 709fb3
  Recursive grep now uses fts for directory traversal, so it can
Packit 709fb3
  handle much-larger directories without reporting things like "File
Packit 709fb3
  name too long", and it can run much faster when dealing with large
Packit 709fb3
  directory hierarchies. [bug present since the beginning]
Packit 709fb3
Packit 709fb3
  grep -E 'a{1000000000}' now reports an overflow error rather than
Packit 709fb3
  silently acting like grep -E 'a\{1000000000}'.
Packit 709fb3
Packit 709fb3
  grep -E 'a{,10}' was not treated equivalently to grep -E 'a{0,10}'.
Packit 709fb3
Packit 709fb3
** New features
Packit 709fb3
Packit 709fb3
  The -R option now has a long-option alias --dereference-recursive.
Packit 709fb3
Packit 709fb3
** Changes in behavior
Packit 709fb3
Packit 709fb3
  The -r (--recursive) option now follows only command-line symlinks.
Packit 709fb3
  Also, by default -r now reads a device only if it is named on the command
Packit 709fb3
  line; this can be overridden with --devices.  -R acts as before, so
Packit 709fb3
  use -R if you prefer the old behavior of following all symlinks and
Packit 709fb3
  defaulting to reading all devices.
Packit 709fb3
Packit 709fb3
Packit 709fb3
* Noteworthy changes in release 2.11 (2012-03-02) [stable]
Packit 709fb3
Packit 709fb3
** Bug fixes
Packit 709fb3
Packit 709fb3
  grep no longer dumps core on lines whose lengths do not fit in 'int'.
Packit 709fb3
  (e.g., lines longer than 2 GiB on a typical 64-bit host).
Packit 709fb3
  Instead, grep either works as expected, or reports an error.
Packit 709fb3
  An error can occur if not enough main memory is available, or if the
Packit 709fb3
  GNU C library's regular expression functions cannot handle such long lines.
Packit 709fb3
  [bug present since "the beginning"]
Packit 709fb3
Packit 709fb3
  The -m, -A, -B, and -C options no longer mishandle context line
Packit 709fb3
  counts that do not fit in 'int'.  Also, grep -c's counts are now
Packit 709fb3
  limited by the type 'intmax_t' (typically less than 2**63) rather
Packit 709fb3
  than 'int' (typically less than 2**31).
Packit 709fb3
Packit 709fb3
  grep no longer silently suppresses errors when reading a directory
Packit 709fb3
  as if it were a text file.  For example, "grep x ." now reports a
Packit 709fb3
  read error on most systems; formerly, it ignored the error.
Packit 709fb3
  [bug introduced in grep-2.5]
Packit 709fb3
Packit 709fb3
  grep now exits with status 2 if a directory loop is found,
Packit 709fb3
  instead of possibly exiting with status 0 or 1.
Packit 709fb3
  [bug introduced in grep-2.3]
Packit 709fb3
Packit 709fb3
  The -s option now suppresses certain input error diagnostics that it
Packit 709fb3
  formerly failed to suppress.  These include errors when closing the
Packit 709fb3
  input, when lseeking the input, and when the input is also the output.
Packit 709fb3
  [bug introduced in grep-2.4]
Packit 709fb3
Packit 709fb3
  On POSIX systems, commands like "grep PAT < FILE >> FILE"
Packit 709fb3
  now report an error instead of looping.
Packit 709fb3
  [bug present since "the beginning"]
Packit 709fb3
Packit 709fb3
  The --include, --exclude, and --exclude-dir options now handle
Packit 709fb3
  command-line arguments more consistently.  --include and --exclude
Packit 709fb3
  apply only to non-directories and --exclude-dir applies only to
Packit 709fb3
  directories.  "-" (standard input) is never excluded, since it is
Packit 709fb3
  not a file name.
Packit 709fb3
  [bug introduced in grep-2.5]
Packit 709fb3
Packit 709fb3
  grep no longer rejects "grep -qr . > out", i.e., when run with -q
Packit 709fb3
  and an input file is the same as the output file, since with -q
Packit 709fb3
  grep generates no output, so there is no risk of infinite loop or
Packit 709fb3
  of an output-affecting race condition.  Thus, the use of the following
Packit 709fb3
  options also disables the input-equals-output failure:
Packit 709fb3
    --max-count=N (-m) (for N >= 2)
Packit 709fb3
    --files-with-matches (-l)
Packit 709fb3
    --files-without-match (-L)
Packit 709fb3
  [bug introduced in grep-2.10]
Packit 709fb3
Packit 709fb3
  grep no longer emits an error message and quits on MS-Windows when
Packit 709fb3
  invoked with the -r option.
Packit 709fb3
Packit 709fb3
  grep no longer misinterprets some alternations involving anchors
Packit 709fb3
  (^, $, \<  \>  \B, \b).  For example, grep -E "(^|\B)a" no
Packit 709fb3
  longer reports a match for the string "x a".
Packit 709fb3
  [bug present since "the beginning"]
Packit 709fb3
Packit 709fb3
** New features
Packit 709fb3
Packit 709fb3
  If no file operand is given, and a command-line -r or equivalent
Packit 709fb3
  option is given, grep now searches the working directory.  Formerly
Packit 709fb3
  grep ignored the -r and searched standard input nonrecursively.
Packit 709fb3
  An -r found in GREP_OPTIONS does not have this new effect.
Packit 709fb3
Packit 709fb3
  grep now supports color highlighting of matches on MS-Windows.
Packit 709fb3
Packit 709fb3
** Changes in behavior
Packit 709fb3
Packit 709fb3
  Use of the --mmap option now elicits a warning.  It has been a no-op
Packit 709fb3
  since March of 2010.
Packit 709fb3
Packit 709fb3
  grep no longer diagnoses write errors repeatedly; it exits after
Packit 709fb3
  diagnosing the first write error.  This is better behavior when
Packit 709fb3
  writing to a dangling pipe.
Packit 709fb3
Packit 709fb3
  Syntax errors in GREP_COLORS are now ignored, instead of sometimes
Packit 709fb3
  eliciting warnings.  This is more consistent with programs that
Packit 709fb3
  (e.g.) ignore errors in termcap entries.
Packit 709fb3
Packit 709fb3
* Noteworthy changes in release 2.10 (2011-11-16) [stable]
Packit 709fb3
Packit 709fb3
** Bug fixes
Packit 709fb3
Packit 709fb3
  grep no longer mishandles high-bit-set pattern bytes on systems
Packit 709fb3
  where "char" is a signed type. [bug appears to affect only MS-Windows]
Packit 709fb3
Packit 709fb3
  On POSIX systems, grep now rejects a command like "grep -r pattern . > out",
Packit 709fb3
  in which the output file is also one of the inputs,
Packit 709fb3
  because it can result in an "infinite" disk-filling loop.
Packit 709fb3
  [bug present since "the beginning"]
Packit 709fb3
Packit 709fb3
** Build-related
Packit 709fb3
Packit 709fb3
  "make dist" no longer builds .tar.gz files.
Packit 709fb3
  xz is portable enough and in wide-enough use that distributing
Packit 709fb3
  only .tar.xz files is enough.
Packit 709fb3
Packit 709fb3
Packit 709fb3
* Noteworthy changes in release 2.9 (2011-06-21) [stable]
Packit 709fb3
Packit 709fb3
** Bug fixes
Packit 709fb3
Packit 709fb3
  grep no longer clobbers heap for an ERE like '(^| )*( |$)'
Packit 709fb3
  [bug introduced in grep-2.6]
Packit 709fb3
Packit 709fb3
  grep is faster on regular expressions that match multibyte characters
Packit 709fb3
  in brackets (such as '[áéíóú]').
Packit 709fb3
Packit 709fb3
  echo c|grep '[c]' would fail for any c in 0x80..0xff, with a uni-byte
Packit 709fb3
  encoding for which the byte-to-wide-char mapping is nontrivial.  For
Packit 709fb3
  example, the ISO-88591 locales are not affected, but ru_RU.KOI8-R is.
Packit 709fb3
  [bug introduced in grep-2.6]
Packit 709fb3
Packit 709fb3
  grep -P no longer aborts when PCRE's backtracking limit is exceeded
Packit 709fb3
  Before, echo aaaaaaaaaaaaaab |grep -P '((a+)*)+$' would abort.  Now,
Packit 709fb3
  it diagnoses the problem and exits with status 2.
Packit 709fb3
Packit 709fb3
Packit 709fb3
* Noteworthy changes in release 2.8 (2011-05-13) [stable]
Packit 709fb3
Packit 709fb3
** Bug fixes
Packit 709fb3
Packit 709fb3
  echo c|grep '[c]' would fail for any c in 0x80..0xff, and in many locales.
Packit 709fb3
  E.g., printf '\xff\n'|grep "$(printf '[\xff]')" || echo FAIL
Packit 709fb3
  would print FAIL rather than the required matching line.
Packit 709fb3
  [bug introduced in grep-2.6]
Packit 709fb3
Packit 709fb3
  grep's interpretation of range expression is now more consistent with
Packit 709fb3
  that of other tools.  [bug present since multi-byte character set
Packit 709fb3
  support was introduced in 2.5.2, though the steps needed to reproduce
Packit 709fb3
  it changed in grep-2.6]
Packit 709fb3
Packit 709fb3
  grep erroneously returned with exit status 1 on some memory allocation
Packit 709fb3
  failure. [bug present since "the beginning"]
Packit 709fb3
Packit 709fb3
Packit 709fb3
* Noteworthy changes in release 2.7 (2010-09-16) [stable]
Packit 709fb3
Packit 709fb3
** Bug fixes
Packit 709fb3
Packit 709fb3
  grep --include=FILE works once again, rather than working like --exclude=FILE
Packit 709fb3
  [bug introduced in grep-2.6]
Packit 709fb3
Packit 709fb3
  Searching with grep -Fw for an empty string would not match an
Packit 709fb3
  empty line. [bug present since "the beginning"]
Packit 709fb3
Packit 709fb3
  X{0,0} is implemented correctly.  It used to be a synonym of X{0,1}.
Packit 709fb3
  [bug present since "the beginning"]
Packit 709fb3
Packit 709fb3
  In multibyte locales, regular expressions including backreferences
Packit 709fb3
  no longer exhibit quadratic complexity (i.e., they are orders
Packit 709fb3
  of magnitude faster). [bug present since multi-byte character set
Packit 709fb3
  support was introduced in 2.5.2]
Packit 709fb3
Packit 709fb3
  In UTF-8 locales, regular expressions including "." can be orders
Packit 709fb3
  of magnitude faster.  For example, "grep ." is now twice as fast
Packit 709fb3
  as "grep -v ^$", instead of being immensely slower.  It remains
Packit 709fb3
  slow in other multibyte locales. [bug present since multi-byte
Packit 709fb3
  character set support was introduced in 2.5.2]
Packit 709fb3
Packit 709fb3
  --mmap was meant to be ignored in 2.6.x, but it was instead
Packit 709fb3
  removed by mistake.  [bug introduced in 2.6]
Packit 709fb3
Packit 709fb3
** New features
Packit 709fb3
Packit 709fb3
  grep now diagnoses (and fails with exit status 2) commonly mistyped
Packit 709fb3
  regular expression like [:space:], [:digit:], etc.  Before, those were
Packit 709fb3
  silently interpreted as [ac:eps] and [dgit:] respectively.  Virtually
Packit 709fb3
  all who make that class of mistake should have used [[:space:]] or
Packit 709fb3
  [[:digit:]].  This new behavior is disabled when the POSIXLY_CORRECT
Packit 709fb3
  environment variable is set.
Packit 709fb3
Packit 709fb3
  On systems using glibc, grep can support equivalence classes.  However,
Packit 709fb3
  whether they actually work depends on glibc's locale definitions.
Packit 709fb3
Packit 709fb3
* Noteworthy changes in release 2.6.3 (2010-04-02) [stable]
Packit 709fb3
Packit 709fb3
** Bug fixes
Packit 709fb3
Packit 709fb3
  Searching with grep -F for an empty string in a multibyte locale
Packit 709fb3
  would hang grep. [bug introduced in 2.6.2]
Packit 709fb3
Packit 709fb3
  PCRE support is once again detected on systems with <pcre/pcre.h>
Packit 709fb3
  [bug introduced in 2.6.2]
Packit 709fb3
Packit 709fb3
Packit 709fb3
* Noteworthy changes in release 2.6.2 (2010-03-29) [stable]
Packit 709fb3
Packit 709fb3
** Bug fixes
Packit 709fb3
Packit 709fb3
  grep -F no longer mistakenly reports a match when searching
Packit 709fb3
  for an incomplete prefix of a multibyte character.
Packit 709fb3
  [bug present since "the beginning"]
Packit 709fb3
Packit 709fb3
  grep -F no longer goes into an infinite loop when it finds a match for an
Packit 709fb3
  incomplete (non-prefix of a) multibyte character.  [bug introduced in 2.6]
Packit 709fb3
Packit 709fb3
  Using any of the --include or --exclude* options would cause a NULL
Packit 709fb3
  dereference.  [bugs introduced in 2.6]
Packit 709fb3
Packit 709fb3
** Build-related
Packit 709fb3
Packit 709fb3
  configure no longer relies on pkg-config to detect PCRE support.
Packit 709fb3
Packit 709fb3
Packit 709fb3
* Noteworthy changes in release 2.6.1 (2010-03-25) [stable]
Packit 709fb3
Packit 709fb3
** Bug fixes
Packit 709fb3
Packit 709fb3
  Character classes could cause a segmentation fault if they included a
Packit 709fb3
  multibyte character.  [bug introduced in 2.6]
Packit 709fb3
Packit 709fb3
  Character ranges would not work in single-byte character sets other
Packit 709fb3
  than C (for example, ISO-8859-1 or KOI8-R) and some multi-byte locales.
Packit 709fb3
  For example, this should print "1", but would find no match:
Packit 709fb3
    $ echo 1 | env -i LC_COLLATE=en_US.UTF-8 grep '[0-9]'
Packit 709fb3
  [bug introduced in 2.6]
Packit 709fb3
Packit 709fb3
  The output of grep was incorrect for whole-word (-w) matches if the
Packit 709fb3
  patterns included a back-reference. [bug introduced in grep-2.5.2]
Packit 709fb3
Packit 709fb3
** Portability
Packit 709fb3
Packit 709fb3
  Avoid a link failure on Solaris 8.
Packit 709fb3
Packit 709fb3
Packit 709fb3
* Noteworthy changes in release 2.6 (2010-03-23) [stable]
Packit 709fb3
Packit 709fb3
** Speed improvements
Packit 709fb3
Packit 709fb3
  grep is much faster on multibyte character sets, especially (but not
Packit 709fb3
  limited to) UTF-8 character sets.  The speed improvement is also very
Packit 709fb3
  pronounced with case-insensitive matches.
Packit 709fb3
Packit 709fb3
** Bug fixes
Packit 709fb3
Packit 709fb3
  Character classes would malfunction in multi-byte locales when using grep -i.
Packit 709fb3
  Examples which would print nothing for LC_ALL=en_US.UTF-8 include:
Packit 709fb3
  - for ranges, echo Z | grep -i '[a-z]'
Packit 709fb3
  - for single characters, echo Y | grep -i '[y]'
Packit 709fb3
  - for character types, echo Y | grep -i '[[:lower:]]'
Packit 709fb3
Packit 709fb3
  grep -i -o would fail to report some matches; grep -i --color, while not
Packit 709fb3
  missing any line containing a match, would fail to color some matches.
Packit 709fb3
Packit 709fb3
  grep would fail to report a match in a multibyte character set other than
Packit 709fb3
  UTF-8, if another match occurred earlier in the line but started in the
Packit 709fb3
  middle of a multibyte character.
Packit 709fb3
Packit 709fb3
  Various bugs in grep -P, caused by expressions such as [^b] or \S matching
Packit 709fb3
  newlines, were fixed.  grep -P also supports the special sequences \Z and
Packit 709fb3
  \z, and can be combined with the command-line option -z to perform searches
Packit 709fb3
  on NUL-separated records.
Packit 709fb3
Packit 709fb3
  grep would mistakenly exit with status 1 upon error, rather than 2,
Packit 709fb3
  as it is documented to do.
Packit 709fb3
Packit 709fb3
  Using options like -1 -2 or -1 -v -2 results in two lines of
Packit 709fb3
  context (the last value that appears on the command line) instead
Packit 709fb3
  twelve (the concatenation of all the values).  This is consistent
Packit 709fb3
  with the behavior of options -A/-B/-C.
Packit 709fb3
Packit 709fb3
  Two new command-line options, --group-separator=ARGUMENT and
Packit 709fb3
  --no-group-separator, enable further customization of the output
Packit 709fb3
  when -A, -B or -C is being used.
Packit 709fb3
Packit 709fb3
** Other changes
Packit 709fb3
Packit 709fb3
  egrep accepts the -E option and fgrep accepts the -F option.  If egrep
Packit 709fb3
  and fgrep are given another of the -E/-F/-G options, they print a more
Packit 709fb3
  meaningful error message.
Packit 709fb3
Packit 709fb3
* Noteworthy changes in release 2.5.4 (2009-02-10) [stable]
Packit 709fb3
Packit 709fb3
  - This is a bugfix release. No new features.
Packit 709fb3
Packit 709fb3
Version 2.5.3
Packit 709fb3
  - The new option --exclude-dir allows to specify a directory pattern that
Packit 709fb3
    will be excluded from recursive grep.
Packit 709fb3
  - Numerous bug fixes
Packit 709fb3
Packit 709fb3
Version 2.5.1
Packit 709fb3
  - This is a bugfix release. No new features.
Packit 709fb3
Packit 709fb3
Version 2.5
Packit 709fb3
  - The new option --label allows to specify a different name for input
Packit 709fb3
    from stdin. See the man or info pages for details.
Packit 709fb3
Packit 709fb3
  - The internal lib/getopt* files are no longer used on systems providing
Packit 709fb3
    getopt functionality in their libc (e.g. glibc 2.2.x).
Packit 709fb3
    If you need the old getopt files, use --with-included-getopt.
Packit 709fb3
Packit 709fb3
  - The new option --only-matching (-o) will print only the part of matching
Packit 709fb3
    lines that matches the pattern. This is useful, for example, to extract
Packit 709fb3
    IP addresses from log files.
Packit 709fb3
Packit 709fb3
  - i18n bug fixed ([A-Z0-9] wouldn't match A in locales other than C on
Packit 709fb3
    systems using recent glibc builds
Packit 709fb3
Packit 709fb3
  - GNU grep can now be built with autoconf 2.52.
Packit 709fb3
Packit 709fb3
  - The new option --devices controls how grep handles device files. Its usage
Packit 709fb3
    is analogous to --directories.
Packit 709fb3
Packit 709fb3
  - The new option --line-buffered fflush on everyline.  There is a noticeable
Packit 709fb3
    slow down when forcing line buffering.
Packit 709fb3
Packit 709fb3
  - Back references  are now local to the regex.
Packit 709fb3
    grep -e '\(a\)\1' -e '\(b\)\1'
Packit 709fb3
    The last backref \1 in the second expression refer to \(b\)
Packit 709fb3
Packit 709fb3
  - The new option --include=PATTERN will search only matching files
Packit 709fb3
    when recursing in directories
Packit 709fb3
Packit 709fb3
  - The new option --exclude=PATTERN will skip matching files when
Packit 709fb3
    recursing in directories.
Packit 709fb3
Packit 709fb3
  - The new option --color will use the environment variable GREP_COLOR
Packit 709fb3
    (default is red) to highlight the matching string.
Packit 709fb3
    --color takes an optional argument specifying when to colorize a line:
Packit 709fb3
      --color=always, --color=tty, --color=never
Packit 709fb3
Packit 709fb3
  - The following changes are for POSIX conformance:
Packit 709fb3
Packit 709fb3
    . The -q or --quiet or --silent option now causes grep to exit
Packit 709fb3
      with zero status when a input line is selected, even if an error
Packit 709fb3
      also occurs.
Packit 709fb3
Packit 709fb3
    . The -s or --no-messages option no longer affects the exit status.
Packit 709fb3
Packit 709fb3
    . Bracket regular expressions like [a-z] are now locale-dependent.
Packit 709fb3
      For example, many locales sort characters in dictionary order,
Packit 709fb3
      and in these locales the regular expression [a-d] is not
Packit 709fb3
      equivalent to [abcd]; it might be equivalent to [aBbCcDd], for
Packit 709fb3
      example.  To obtain the traditional interpretation of bracket
Packit 709fb3
      expressions, you can use the C locale by setting the LC_ALL
Packit 709fb3
      environment variable to the value "C".
Packit 709fb3
Packit 709fb3
  - The -C or --context option now requires an argument, partly for
Packit 709fb3
    consistency, and partly because POSIX recommends against
Packit 709fb3
    optional arguments.
Packit 709fb3
Packit 709fb3
  - The new -P or --perl-regexp option tells grep to interpret the pattern as
Packit 709fb3
    a Perl regular expression.
Packit 709fb3
Packit 709fb3
  - The new option --max-count=num makes grep stop reading a file after num
Packit 709fb3
    matching lines.
Packit 709fb3
    New option -m; equivalent to --max-count.
Packit 709fb3
Packit 709fb3
  - Translations for bg, ca, da, nb and tr have been added.
Packit 709fb3
Packit 709fb3
Version 2.4.2
Packit 709fb3
Packit 709fb3
  - Added more check in configure to default the grep-${version}/src/regex.c
Packit 709fb3
    instead of the one in GNU Lib C.
Packit 709fb3
Packit 709fb3
Version 2.4.1
Packit 709fb3
Packit 709fb3
  - If the final byte of an input file is not a newline, grep now silently
Packit 709fb3
    supplies one.
Packit 709fb3
Packit 709fb3
  - The new option --binary-files=TYPE makes grep assume that a binary input
Packit 709fb3
    file is of type TYPE.
Packit 709fb3
    --binary-files='binary' (the default) outputs a 1-line summary of matches.
Packit 709fb3
    --binary-files='without-match' assumes binary files do not match.
Packit 709fb3
    --binary-files='text' treats binary files as text
Packit 709fb3
        (equivalent to the -a or --text option).
Packit 709fb3
Packit 709fb3
  - New option -I; equivalent to --binary-files='without-match'.
Packit 709fb3
Packit 709fb3
Version 2.4:
Packit 709fb3
Packit 709fb3
  - egrep is now equivalent to 'grep -E' as required by POSIX,
Packit 709fb3
    removing a longstanding source of confusion and incompatibility.
Packit 709fb3
    'grep' is now more forgiving about stray '{'s, for backward
Packit 709fb3
    compatibility with traditional egrep.
Packit 709fb3
Packit 709fb3
  - The lower bound of an interval is not optional.
Packit 709fb3
    You must use an explicit zero, e.g. 'x{0,10}' instead of 'x{,10}'.
Packit 709fb3
    (The old documentation incorrectly claimed that it was optional.)
Packit 709fb3
Packit 709fb3
  - The --revert-match option has been renamed to --invert-match.
Packit 709fb3
Packit 709fb3
  - The --fixed-regexp option has been renamed to --fixed-string.
Packit 709fb3
Packit 709fb3
  - New option -H or --with-filename.
Packit 709fb3
Packit 709fb3
  - New option --mmap.  By default, GNU grep now uses read instead of mmap.
Packit 709fb3
    This is faster on some hosts, and is safer on all.
Packit 709fb3
Packit 709fb3
  - The new option -z or --null-data causes 'grep' to treat a zero byte
Packit 709fb3
    (the ASCII NUL character) as a line terminator in input data, and
Packit 709fb3
    to treat newlines as ordinary data.
Packit 709fb3
Packit 709fb3
  - The new option -Z or --null causes 'grep' to output a zero byte
Packit 709fb3
    instead of the normal separator after a file name.
Packit 709fb3
Packit 709fb3
  - These two options can be used with commands like 'find -print0',
Packit 709fb3
    'perl -0', 'sort -z', and 'xargs -0' to process arbitrary file names,
Packit 709fb3
    even those that contain newlines.
Packit 709fb3
Packit 709fb3
  - The environment variable GREP_OPTIONS specifies default options;
Packit 709fb3
    e.g. GREP_OPTIONS='--directories=skip' reestablishes grep 2.1's
Packit 709fb3
    behavior of silently skipping directories.
Packit 709fb3
Packit 709fb3
  - You can specify a matcher multiple times without error, e.g.
Packit 709fb3
    'grep -E -E' or 'fgrep -F'.  It is still an error to specify
Packit 709fb3
    conflicting matchers.
Packit 709fb3
Packit 709fb3
  - -u and -U are now allowed on non-DOS hosts, and have no effect.
Packit 709fb3
Packit 709fb3
  - Modifications of the tests scripts to go around the "Broken Pipe"
Packit 709fb3
    errors from bash. See Bash FAQ.
Packit 709fb3
Packit 709fb3
  - New option -r or --recursive or --directories=recurse.
Packit 709fb3
    (This option was also in grep 2.3, but wasn't announced here.)
Packit 709fb3
Packit 709fb3
  - --without-included-regex disable, was causing bogus reports .i.e
Packit 709fb3
    doing more harm then good.
Packit 709fb3
Packit 709fb3
Version 2.3:
Packit 709fb3
Packit 709fb3
  - When searching a binary file FOO, grep now just reports
Packit 709fb3
    "Binary file FOO matches" instead of outputting binary data.
Packit 709fb3
    This is typically more useful than the old behavior,
Packit 709fb3
    and it is also more consistent with other utilities like 'diff'.
Packit 709fb3
    A file is considered to be binary if it contains a NUL (i.e. zero) byte.
Packit 709fb3
Packit 709fb3
    The new -a or --text option causes 'grep' to assume that all
Packit 709fb3
    input is text.  (This option has the same meaning as with 'diff'.)
Packit 709fb3
    Use it if you want binary data in your output.
Packit 709fb3
Packit 709fb3
  - 'grep' now searches directories just like ordinary files; it no longer
Packit 709fb3
    silently skips directories.  This is the traditional behavior of
Packit 709fb3
    Unix text utilities (in particular, of traditional 'grep').
Packit 709fb3
    Hence 'grep PATTERN DIRECTORY' should report
Packit 709fb3
    "grep: DIRECTORY: Is a directory" on hosts where the operating system
Packit 709fb3
    does not permit programs to read directories directly, and
Packit 709fb3
    "grep: DIRECTORY: Binary file matches" (or nothing) otherwise.
Packit 709fb3
Packit 709fb3
    The new -d ACTION or --directories=ACTION option affects directory handling.
Packit 709fb3
    '-d skip' causes 'grep' to silently skip directories, as in grep 2.1;
Packit 709fb3
    '-d read' (the default) causes 'grep' to read directories if possible,
Packit 709fb3
    as in earlier versions of grep.
Packit 709fb3
Packit 709fb3
  - The MS-DOS and Microsoft Windows ports now behave identically to the
Packit 709fb3
    GNU and Unix ports with respect to binary files and directories.
Packit 709fb3
Packit 709fb3
Version 2.2:
Packit 709fb3
Packit 709fb3
Bug fix release.
Packit 709fb3
Packit 709fb3
  - Status error number fix.
Packit 709fb3
  - Skipping directories removed.
Packit 709fb3
  - Many typos fix.
Packit 709fb3
  - -f /dev/null fix(not to consider as an empty pattern).
Packit 709fb3
  - Checks for wctype/wchar.
Packit 709fb3
  - -E was using the wrong matcher fix.
Packit 709fb3
  - bug in regex char class fix
Packit 709fb3
  - Fixes for DJGPP
Packit 709fb3
Packit 709fb3
Version 2.1:
Packit 709fb3
Packit 709fb3
This is a bug fix release(see Changelog) i.e. no new features.
Packit 709fb3
Packit 709fb3
  - More compliance to GNU standard.
Packit 709fb3
  - Long options.
Packit 709fb3
  - Internationalization.
Packit 709fb3
  - Use automake/autoconf.
Packit 709fb3
  - Directory hierarchy change.
Packit 709fb3
  - Sigvec with -e on Linux corrected.
Packit 709fb3
  - Sigvec with -f on Linux corrected.
Packit 709fb3
  - Sigvec with the mmap() corrected.
Packit 709fb3
  - Bug in kwset corrected.
Packit 709fb3
  - -q, -L and -l stop on first match.
Packit 709fb3
  - New and improve regex.[ch] from Ulrich Drepper.
Packit 709fb3
  - New and improve dfa.[ch] from Arnold Robbins.
Packit 709fb3
  - Prototypes for over zealous C compiler.
Packit 709fb3
  - Not scanning a file, if it's a directory
Packit 709fb3
    (cause problems on Sun).
Packit 709fb3
  - Ported to MS-DOS/MS-Windows with DJGPP tools.
Packit 709fb3
Packit 709fb3
See Changelog for the full story and proper credits.
Packit 709fb3
Packit 709fb3
Version 2.0:
Packit 709fb3
Packit 709fb3
The most important user visible change is that egrep and fgrep have
Packit 709fb3
disappeared as separate programs into the single grep program mandated
Packit 709fb3
by POSIX 1003.2.  New options -G, -E, and -F have been added,
Packit 709fb3
selecting grep, egrep, and fgrep behavior respectively.  For
Packit 709fb3
compatibility with historical practice, hard links named egrep and
Packit 709fb3
fgrep are also provided.  See the manual page for details.
Packit 709fb3
Packit 709fb3
In addition, the regular expression facilities described in Posix
Packit 709fb3
draft 11.2 are now supported, except for internationalization features
Packit 709fb3
related to locale-dependent collating sequence information.
Packit 709fb3
Packit 709fb3
There is a new option, -L, which is like -l except it lists
Packit 709fb3
files which don't contain matches.  The reason this option was
Packit 709fb3
added is because '-l -v' doesn't do what you expect.
Packit 709fb3
Packit 709fb3
Performance has been improved; the amount of improvement is platform
Packit 709fb3
dependent, but (for example) grep 2.0 typically runs at least 30% faster
Packit 709fb3
than grep 1.6 on a DECstation using the MIPS compiler.  Where possible,
Packit 709fb3
grep now uses mmap() for file input; on a Sun 4 running SunOS 4.1 this
Packit 709fb3
may cut system time by as much as half, for a total reduction in running
Packit 709fb3
time by nearly 50%.  On machines that don't use mmap(), the buffering
Packit 709fb3
code has been rewritten to choose more favorable alignments and buffer
Packit 709fb3
sizes for read().
Packit 709fb3
Packit 709fb3
Portability has been substantially cleaned up, and an automatic
Packit 709fb3
configure script is now provided.
Packit 709fb3
Packit 709fb3
The internals have changed in ways too numerous to mention.
Packit 709fb3
People brave enough to reuse the DFA matcher in other programs
Packit 709fb3
will now have their bravery amply "rewarded", for the interface
Packit 709fb3
to that file has been completely changed.  Some changes were
Packit 709fb3
necessary to track the evolution of the regex package, and since
Packit 709fb3
I was changing it anyway I decided to do a general cleanup.
Packit 709fb3
Packit 709fb3
========================================================================
Packit 709fb3
Copyright (C) 1992, 1997-2002, 2004-2017 Free Software Foundation, Inc.
Packit 709fb3
Packit 709fb3
  Copying and distribution of this file, with or without modification,
Packit 709fb3
  are permitted in any medium without royalty provided the copyright
Packit 709fb3
  notice and this notice are preserved.
Packit 709fb3
Packit 709fb3
Permission is granted to copy, distribute and/or modify this document
Packit 709fb3
under the terms of the GNU Free Documentation License, Version 1.3 or
Packit 709fb3
any later version published by the Free Software Foundation; with no
Packit 709fb3
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
Packit 709fb3
Texts.  A copy of the license is included in the "GNU Free
Packit 709fb3
Documentation License" file as part of this distribution.