[2595] | 1 | GNU grep NEWS -*- outline -*-
|
---|
| 2 |
|
---|
| 3 | * Noteworthy changes in release 2.12 (2012-04-23) [stable]
|
---|
| 4 |
|
---|
| 5 | ** Bug fixes
|
---|
| 6 |
|
---|
| 7 | "echo P|grep --devices=skip P" once again prints P, as it did in 2.10
|
---|
| 8 | [bug introduced in grep-2.11]
|
---|
| 9 |
|
---|
| 10 | grep no longer segfaults with -r --exclude-dir and no file operand.
|
---|
| 11 | I.e., ":|grep -r --exclude-dir=D PAT" would segfault.
|
---|
| 12 | [bug introduced in grep-2.11]
|
---|
| 13 |
|
---|
| 14 | Recursive grep now uses fts for directory traversal, so it can
|
---|
| 15 | handle much-larger directories without reporting things like "File
|
---|
| 16 | name too long", and it can run much faster when dealing with large
|
---|
| 17 | directory hierarchies. [bug present since the beginning]
|
---|
| 18 |
|
---|
| 19 | grep -E 'a{1000000000}' now reports an overflow error rather than
|
---|
| 20 | silently acting like grep -E 'a\{1000000000}'.
|
---|
| 21 |
|
---|
| 22 | ** New features
|
---|
| 23 |
|
---|
| 24 | The -R option now has a long-option alias --dereference-recursive.
|
---|
| 25 |
|
---|
| 26 | ** Changes in behavior
|
---|
| 27 |
|
---|
| 28 | The -r (--recursive) option now follows only command-line symlinks.
|
---|
| 29 | Also, by default -r now reads a device only if it is named on the command
|
---|
| 30 | line; this can be overridden with --devices. -R acts as before, so
|
---|
| 31 | use -R if you prefer the old behavior of following all symlinks and
|
---|
| 32 | defaulting to reading all devices.
|
---|
| 33 |
|
---|
| 34 |
|
---|
| 35 | * Noteworthy changes in release 2.11 (2012-03-02) [stable]
|
---|
| 36 |
|
---|
| 37 | ** Bug fixes
|
---|
| 38 |
|
---|
| 39 | grep no longer dumps core on lines whose lengths do not fit in 'int'.
|
---|
| 40 | (e.g., lines longer than 2 GiB on a typical 64-bit host).
|
---|
| 41 | Instead, grep either works as expected, or reports an error.
|
---|
| 42 | An error can occur if not enough main memory is available, or if the
|
---|
| 43 | GNU C library's regular expression functions cannot handle such long lines.
|
---|
| 44 | [bug present since "the beginning"]
|
---|
| 45 |
|
---|
| 46 | The -m, -A, -B, and -C options no longer mishandle context line
|
---|
| 47 | counts that do not fit in 'int'. Also, grep -c's counts are now
|
---|
| 48 | limited by the type 'intmax_t' (typically less than 2**63) rather
|
---|
| 49 | than 'int' (typically less than 2**31).
|
---|
| 50 |
|
---|
| 51 | grep no longer silently suppresses errors when reading a directory
|
---|
| 52 | as if it were a text file. For example, "grep x ." now reports a
|
---|
| 53 | read error on most systems; formerly, it ignored the error.
|
---|
| 54 | [bug introduced in grep-2.5]
|
---|
| 55 |
|
---|
| 56 | grep now exits with status 2 if a directory loop is found,
|
---|
| 57 | instead of possibly exiting with status 0 or 1.
|
---|
| 58 | [bug introduced in grep-2.3]
|
---|
| 59 |
|
---|
| 60 | The -s option now suppresses certain input error diagnostics that it
|
---|
| 61 | formerly failed to suppress. These include errors when closing the
|
---|
| 62 | input, when lseeking the input, and when the input is also the output.
|
---|
| 63 | [bug introduced in grep-2.4]
|
---|
| 64 |
|
---|
| 65 | On POSIX systems, commands like "grep PAT < FILE >> FILE"
|
---|
| 66 | now report an error instead of looping.
|
---|
| 67 | [bug present since "the beginning"]
|
---|
| 68 |
|
---|
| 69 | The --include, --exclude, and --exclude-dir options now handle
|
---|
| 70 | command-line arguments more consistently. --include and --exclude
|
---|
| 71 | apply only to non-directories and --exclude-dir applies only to
|
---|
| 72 | directories. "-" (standard input) is never excluded, since it is
|
---|
| 73 | not a file name.
|
---|
| 74 | [bug introduced in grep-2.5]
|
---|
| 75 |
|
---|
| 76 | grep no longer rejects "grep -qr . > out", i.e., when run with -q
|
---|
| 77 | and an input file is the same as the output file, since with -q
|
---|
| 78 | grep generates no output, so there is no risk of infinite loop or
|
---|
| 79 | of an output-affecting race condition. Thus, the use of the following
|
---|
| 80 | options also disables the input-equals-output failure:
|
---|
| 81 | --max-count=N (-m) (for N >= 2)
|
---|
| 82 | --files-with-matches (-l)
|
---|
| 83 | --files-without-match (-L)
|
---|
| 84 | [bug introduced in grep-2.10]
|
---|
| 85 |
|
---|
| 86 | grep no longer emits an error message and quits on MS-Windows when
|
---|
| 87 | invoked with the -r option.
|
---|
| 88 |
|
---|
| 89 | grep no longer misinterprets some alternations involving anchors
|
---|
| 90 | (^, $, \< \> \B, \b). For example, grep -E "(^|\B)a" no
|
---|
| 91 | longer reports a match for the string "x a".
|
---|
| 92 | [bug present since "the beginning"]
|
---|
| 93 |
|
---|
| 94 | ** New features
|
---|
| 95 |
|
---|
| 96 | If no file operand is given, and a command-line -r or equivalent
|
---|
| 97 | option is given, grep now searches the working directory. Formerly
|
---|
| 98 | grep ignored the -r and searched standard input nonrecursively.
|
---|
| 99 | An -r found in GREP_OPTIONS does not have this new effect.
|
---|
| 100 |
|
---|
| 101 | grep now supports color highlighting of matches on MS-Windows.
|
---|
| 102 |
|
---|
| 103 | ** Changes in behavior
|
---|
| 104 |
|
---|
| 105 | Use of the --mmap option now elicits a warning. It has been a no-op
|
---|
| 106 | since March of 2010.
|
---|
| 107 |
|
---|
| 108 | grep no longer diagnoses write errors repeatedly; it exits after
|
---|
| 109 | diagnosing the first write error. This is better behavior when
|
---|
| 110 | writing to a dangling pipe.
|
---|
| 111 |
|
---|
| 112 | Syntax errors in GREP_COLORS are now ignored, instead of sometimes
|
---|
| 113 | eliciting warnings. This is more consistent with programs that
|
---|
| 114 | (e.g.) ignore errors in termcap entries.
|
---|
| 115 |
|
---|
| 116 | * Noteworthy changes in release 2.10 (2011-11-16) [stable]
|
---|
| 117 |
|
---|
| 118 | ** Bug fixes
|
---|
| 119 |
|
---|
| 120 | grep no longer mishandles high-bit-set pattern bytes on systems
|
---|
| 121 | where "char" is a signed type. [bug appears to affect only MS-Windows]
|
---|
| 122 |
|
---|
| 123 | On POSIX systems, grep now rejects a command like "grep -r pattern . > out",
|
---|
| 124 | in which the output file is also one of the inputs,
|
---|
| 125 | because it can result in an "infinite" disk-filling loop.
|
---|
| 126 | [bug present since "the beginning"]
|
---|
| 127 |
|
---|
| 128 | ** Build-related
|
---|
| 129 |
|
---|
| 130 | "make dist" no longer builds .tar.gz files.
|
---|
| 131 | xz is portable enough and in wide-enough use that distributing
|
---|
| 132 | only .tar.xz files is enough.
|
---|
| 133 |
|
---|
| 134 |
|
---|
| 135 | * Noteworthy changes in release 2.9 (2011-06-21) [stable]
|
---|
| 136 |
|
---|
| 137 | ** Bug fixes
|
---|
| 138 |
|
---|
| 139 | grep no longer clobbers heap for an ERE like '(^| )*( |$)'
|
---|
| 140 | [bug introduced in grep-2.6]
|
---|
| 141 |
|
---|
| 142 | grep is faster on regular expressions that match multibyte characters
|
---|
| 143 | in brackets (such as '[áéÃóú]').
|
---|
| 144 |
|
---|
| 145 | echo c|grep '[c]' would fail for any c in 0x80..0xff, with a uni-byte
|
---|
| 146 | encoding for which the byte-to-wide-char mapping is nontrivial. For
|
---|
| 147 | example, the ISO-88591 locales are not affected, but ru_RU.KOI8-R is.
|
---|
| 148 | [bug introduced in grep-2.6]
|
---|
| 149 |
|
---|
| 150 | grep -P no longer aborts when PCRE's backtracking limit is exceeded
|
---|
| 151 | Before, echo aaaaaaaaaaaaaab |grep -P '((a+)*)+$' would abort. Now,
|
---|
| 152 | it diagnoses the problem and exits with status 2.
|
---|
| 153 |
|
---|
| 154 |
|
---|
| 155 | * Noteworthy changes in release 2.8 (2011-05-13) [stable]
|
---|
| 156 |
|
---|
| 157 | ** Bug fixes
|
---|
| 158 |
|
---|
| 159 | echo c|grep '[c]' would fail for any c in 0x80..0xff, and in many locales.
|
---|
| 160 | E.g., printf '\xff\n'|grep "$(printf '[\xff]')" || echo FAIL
|
---|
| 161 | would print FAIL rather than the required matching line.
|
---|
| 162 | [bug introduced in grep-2.6]
|
---|
| 163 |
|
---|
| 164 | grep's interpretation of range expression is now more consistent with
|
---|
| 165 | that of other tools. [bug present since multi-byte character set
|
---|
| 166 | support was introduced in 2.5.2, though the steps needed to reproduce
|
---|
| 167 | it changed in grep-2.6]
|
---|
| 168 |
|
---|
| 169 | grep erroneously returned with exit status 1 on some memory allocation
|
---|
| 170 | failure. [bug present since "the beginning"]
|
---|
| 171 |
|
---|
| 172 |
|
---|
| 173 | * Noteworthy changes in release 2.7 (2010-09-16) [stable]
|
---|
| 174 |
|
---|
| 175 | ** Bug fixes
|
---|
| 176 |
|
---|
| 177 | grep --include=FILE works once again, rather than working like --exclude=FILE
|
---|
| 178 | [bug introduced in grep-2.6]
|
---|
| 179 |
|
---|
| 180 | Searching with grep -Fw for an empty string would not match an
|
---|
| 181 | empty line. [bug present since "the beginning"]
|
---|
| 182 |
|
---|
| 183 | X{0,0} is implemented correctly. It used to be a synonym of X{0,1}.
|
---|
| 184 | [bug present since "the beginning"]
|
---|
| 185 |
|
---|
| 186 | In multibyte locales, regular expressions including backreferences
|
---|
| 187 | no longer exhibit quadratic complexity (i.e., they are orders
|
---|
| 188 | of magnitude faster). [bug present since multi-byte character set
|
---|
| 189 | support was introduced in 2.5.2]
|
---|
| 190 |
|
---|
| 191 | In UTF-8 locales, regular expressions including "." can be orders
|
---|
| 192 | of magnitude faster. For example, "grep ." is now twice as fast
|
---|
| 193 | as "grep -v ^$", instead of being immensely slower. It remains
|
---|
| 194 | slow in other multibyte locales. [bug present since multi-byte
|
---|
| 195 | character set support was introduced in 2.5.2]
|
---|
| 196 |
|
---|
| 197 | --mmap was meant to be ignored in 2.6.x, but it was instead
|
---|
| 198 | removed by mistake. [bug introduced in 2.6]
|
---|
| 199 |
|
---|
| 200 | ** New features
|
---|
| 201 |
|
---|
| 202 | grep now diagnoses (and fails with exit status 2) commonly mistyped
|
---|
| 203 | regular expression like [:space:], [:digit:], etc. Before, those were
|
---|
| 204 | silently interpreted as [ac:eps] and [dgit:] respectively. Virtually
|
---|
| 205 | all who make that class of mistake should have used [[:space:]] or
|
---|
| 206 | [[:digit:]]. This new behavior is disabled when the POSIXLY_CORRECT
|
---|
| 207 | environment variable is set.
|
---|
| 208 |
|
---|
| 209 | On systems using glibc, grep can support equivalence classes. However,
|
---|
| 210 | whether they actually work depends on glibc's locale definitions.
|
---|
| 211 |
|
---|
| 212 | * Noteworthy changes in release 2.6.3 (2010-04-02) [stable]
|
---|
| 213 |
|
---|
| 214 | ** Bug fixes
|
---|
| 215 |
|
---|
| 216 | Searching with grep -F for an empty string in a multibyte locale
|
---|
| 217 | would hang grep. [bug introduced in 2.6.2]
|
---|
| 218 |
|
---|
| 219 | PCRE support is once again detected on systems with <pcre/pcre.h>
|
---|
| 220 | [bug introduced in 2.6.2]
|
---|
| 221 |
|
---|
| 222 |
|
---|
| 223 | * Noteworthy changes in release 2.6.2 (2010-03-29) [stable]
|
---|
| 224 |
|
---|
| 225 | ** Bug fixes
|
---|
| 226 |
|
---|
| 227 | grep -F no longer mistakenly reports a match when searching
|
---|
| 228 | for an incomplete prefix of a multibyte character.
|
---|
| 229 | [bug present since "the beginning"]
|
---|
| 230 |
|
---|
| 231 | grep -F no longer goes into an infinite loop when it finds a match for an
|
---|
| 232 | incomplete (non-prefix of a) multibyte character. [bug introduced in 2.6]
|
---|
| 233 |
|
---|
| 234 | Using any of the --include or --exclude* options would cause a NULL
|
---|
| 235 | dereference. [bugs introduced in 2.6]
|
---|
| 236 |
|
---|
| 237 | ** Build-related
|
---|
| 238 |
|
---|
| 239 | configure no longer relies on pkg-config to detect PCRE support.
|
---|
| 240 |
|
---|
| 241 |
|
---|
| 242 | * Noteworthy changes in release 2.6.1 (2010-03-25) [stable]
|
---|
| 243 |
|
---|
| 244 | ** Bug fixes
|
---|
| 245 |
|
---|
| 246 | Character classes could cause a segmentation fault if they included a
|
---|
| 247 | multibyte character. [bug introduced in 2.6]
|
---|
| 248 |
|
---|
| 249 | Character ranges would not work in single-byte character sets other
|
---|
| 250 | than C (for example, ISO-8859-1 or KOI8-R) and some multi-byte locales.
|
---|
| 251 | For example, this should print "1", but would find no match:
|
---|
| 252 | $ echo 1 | env -i LC_COLLATE=en_US.UTF-8 grep '[0-9]'
|
---|
| 253 | [bug introduced in 2.6]
|
---|
| 254 |
|
---|
| 255 | The output of grep was incorrect for whole-word (-w) matches if the
|
---|
| 256 | patterns included a back-reference. [bug introduced in grep-2.5.2]
|
---|
| 257 |
|
---|
| 258 | ** Portability
|
---|
| 259 |
|
---|
| 260 | Avoid a link failure on Solaris 8.
|
---|
| 261 |
|
---|
| 262 |
|
---|
| 263 | * Noteworthy changes in release 2.6 (2010-03-23) [stable]
|
---|
| 264 |
|
---|
| 265 | ** Speed improvements
|
---|
| 266 |
|
---|
| 267 | grep is much faster on multibyte character sets, especially (but not
|
---|
| 268 | limited to) UTF-8 character sets. The speed improvement is also very
|
---|
| 269 | pronounced with case-insensitive matches.
|
---|
| 270 |
|
---|
| 271 | ** Bug fixes
|
---|
| 272 |
|
---|
| 273 | Character classes would malfunction in multi-byte locales when using grep -i.
|
---|
| 274 | Examples which would print nothing for LC_ALL=en_US.UTF-8 include:
|
---|
| 275 | - for ranges, echo Z | grep -i '[a-z]'
|
---|
| 276 | - for single characters, echo Y | grep -i '[y]'
|
---|
| 277 | - for character types, echo Y | grep -i '[[:lower:]]'
|
---|
| 278 |
|
---|
| 279 | grep -i -o would fail to report some matches; grep -i --color, while not
|
---|
| 280 | missing any line containing a match, would fail to color some matches.
|
---|
| 281 |
|
---|
| 282 | grep would fail to report a match in a multibyte character set other than
|
---|
| 283 | UTF-8, if another match occurred earlier in the line but started in the
|
---|
| 284 | middle of a multibyte character.
|
---|
| 285 |
|
---|
| 286 | Various bugs in grep -P, caused by expressions such as [^b] or \S matching
|
---|
| 287 | newlines, were fixed. grep -P also supports the special sequences \Z and
|
---|
| 288 | \z, and can be combined with the command-line option -z to perform searches
|
---|
| 289 | on NUL-separated records.
|
---|
| 290 |
|
---|
| 291 | grep would mistakenly exit with status 1 upon error, rather than 2,
|
---|
| 292 | as it is documented to do.
|
---|
| 293 |
|
---|
| 294 | Using options like -1 -2 or -1 -v -2 results in two lines of
|
---|
| 295 | context (the last value that appears on the command line) instead
|
---|
| 296 | twelve (the concatenation of all the values). This is consistent
|
---|
| 297 | with the behavior of options -A/-B/-C.
|
---|
| 298 |
|
---|
| 299 | Two new command-line options, --group-separator=ARGUMENT and
|
---|
| 300 | --no-group-separator, enable further customization of the output
|
---|
| 301 | when -A, -B or -C is being used.
|
---|
| 302 |
|
---|
| 303 | ** Other changes
|
---|
| 304 |
|
---|
| 305 | egrep accepts the -E option and fgrep accepts the -F option. If egrep
|
---|
| 306 | and fgrep are given another of the -E/-F/-G options, they print a more
|
---|
| 307 | meaningful error message.
|
---|
| 308 |
|
---|
| 309 | * Noteworthy changes in release 2.5.4 (2009-02-10) [stable]
|
---|
| 310 |
|
---|
| 311 | - This is a bugfix release. No new features.
|
---|
| 312 |
|
---|
| 313 | Version 2.5.3
|
---|
| 314 | - The new option --exclude-dir allows to specify a directory pattern that
|
---|
| 315 | will be excluded from recursive grep.
|
---|
| 316 | - Numerous bug fixes
|
---|
| 317 |
|
---|
| 318 | Version 2.5.1
|
---|
| 319 | - This is a bugfix release. No new features.
|
---|
| 320 |
|
---|
| 321 | Version 2.5
|
---|
| 322 | - The new option --label allows to specify a different name for input
|
---|
| 323 | from stdin. See the man or info pages for details.
|
---|
| 324 |
|
---|
| 325 | - The internal lib/getopt* files are no longer used on systems providing
|
---|
| 326 | getopt functionality in their libc (e.g. glibc 2.2.x).
|
---|
| 327 | If you need the old getopt files, use --with-included-getopt.
|
---|
| 328 |
|
---|
| 329 | - The new option --only-matching (-o) will print only the part of matching
|
---|
| 330 | lines that matches the pattern. This is useful, for example, to extract
|
---|
| 331 | IP addresses from log files.
|
---|
| 332 |
|
---|
| 333 | - i18n bug fixed ([A-Z0-9] wouldn't match A in locales other than C on
|
---|
| 334 | systems using recent glibc builds
|
---|
| 335 |
|
---|
| 336 | - GNU grep can now be built with autoconf 2.52.
|
---|
| 337 |
|
---|
| 338 | - The new option --devices controls how grep handles device files. Its usage
|
---|
| 339 | is analogous to --directories.
|
---|
| 340 |
|
---|
| 341 | - The new option --line-buffered fflush on everyline. There is a noticeable
|
---|
| 342 | slow down when forcing line buffering.
|
---|
| 343 |
|
---|
| 344 | - Back references are now local to the regex.
|
---|
| 345 | grep -e '\(a\)\1' -e '\(b\)\1'
|
---|
| 346 | The last backref \1 in the second expression refer to \(b\)
|
---|
| 347 |
|
---|
| 348 | - The new option --include=PATTERN will search only matching files
|
---|
| 349 | when recursing in directories
|
---|
| 350 |
|
---|
| 351 | - The new option --exclude=PATTERN will skip matching files when
|
---|
| 352 | recursing in directories.
|
---|
| 353 |
|
---|
| 354 | - The new option --color will use the environment variable GREP_COLOR
|
---|
| 355 | (default is red) to highlight the matching string.
|
---|
| 356 | --color takes an optional argument specifying when to colorize a line:
|
---|
| 357 | --color=always, --color=tty, --color=never
|
---|
| 358 |
|
---|
| 359 | - The following changes are for POSIX.2 conformance:
|
---|
| 360 |
|
---|
| 361 | . The -q or --quiet or --silent option now causes grep to exit
|
---|
| 362 | with zero status when a input line is selected, even if an error
|
---|
| 363 | also occurs.
|
---|
| 364 |
|
---|
| 365 | . The -s or --no-messages option no longer affects the exit status.
|
---|
| 366 |
|
---|
| 367 | . Bracket regular expressions like [a-z] are now locale-dependent.
|
---|
| 368 | For example, many locales sort characters in dictionary order,
|
---|
| 369 | and in these locales the regular expression [a-d] is not
|
---|
| 370 | equivalent to [abcd]; it might be equivalent to [aBbCcDd], for
|
---|
| 371 | example. To obtain the traditional interpretation of bracket
|
---|
| 372 | expressions, you can use the C locale by setting the LC_ALL
|
---|
| 373 | environment variable to the value "C".
|
---|
| 374 |
|
---|
| 375 | - The -C or --context option now requires an argument, partly for
|
---|
| 376 | consistency, and partly because POSIX.2 recommends against
|
---|
| 377 | optional arguments.
|
---|
| 378 |
|
---|
| 379 | - The new -P or --perl-regexp option tells grep to interpret the pattern as
|
---|
| 380 | a Perl regular expression.
|
---|
| 381 |
|
---|
| 382 | - The new option --max-count=num makes grep stop reading a file after num
|
---|
| 383 | matching lines.
|
---|
| 384 | New option -m; equivalent to --max-count.
|
---|
| 385 |
|
---|
| 386 | - Translations for bg, ca, da, nb and tr have been added.
|
---|
| 387 |
|
---|
| 388 | Version 2.4.2
|
---|
| 389 |
|
---|
| 390 | - Added more check in configure to default the grep-${version}/src/regex.c
|
---|
| 391 | instead of the one in GNU Lib C.
|
---|
| 392 |
|
---|
| 393 | Version 2.4.1
|
---|
| 394 |
|
---|
| 395 | - If the final byte of an input file is not a newline, grep now silently
|
---|
| 396 | supplies one.
|
---|
| 397 |
|
---|
| 398 | - The new option --binary-files=TYPE makes grep assume that a binary input
|
---|
| 399 | file is of type TYPE.
|
---|
| 400 | --binary-files='binary' (the default) outputs a 1-line summary of matches.
|
---|
| 401 | --binary-files='without-match' assumes binary files do not match.
|
---|
| 402 | --binary-files='text' treats binary files as text
|
---|
| 403 | (equivalent to the -a or --text option).
|
---|
| 404 |
|
---|
| 405 | - New option -I; equivalent to --binary-files='without-match'.
|
---|
| 406 |
|
---|
| 407 | Version 2.4:
|
---|
| 408 |
|
---|
| 409 | - egrep is now equivalent to `grep -E' as required by POSIX,
|
---|
| 410 | removing a longstanding source of confusion and incompatibility.
|
---|
| 411 | `grep' is now more forgiving about stray `{'s, for backward
|
---|
| 412 | compatibility with traditional egrep.
|
---|
| 413 |
|
---|
| 414 | - The lower bound of an interval is not optional.
|
---|
| 415 | You must use an explicit zero, e.g. `x{0,10}' instead of `x{,10}'.
|
---|
| 416 | (The old documentation incorrectly claimed that it was optional.)
|
---|
| 417 |
|
---|
| 418 | - The --revert-match option has been renamed to --invert-match.
|
---|
| 419 |
|
---|
| 420 | - The --fixed-regexp option has been renamed to --fixed-string.
|
---|
| 421 |
|
---|
| 422 | - New option -H or --with-filename.
|
---|
| 423 |
|
---|
| 424 | - New option --mmap. By default, GNU grep now uses read instead of mmap.
|
---|
| 425 | This is faster on some hosts, and is safer on all.
|
---|
| 426 |
|
---|
| 427 | - The new option -z or --null-data causes `grep' to treat a zero byte
|
---|
| 428 | (the ASCII NUL character) as a line terminator in input data, and
|
---|
| 429 | to treat newlines as ordinary data.
|
---|
| 430 |
|
---|
| 431 | - The new option -Z or --null causes `grep' to output a zero byte
|
---|
| 432 | instead of the normal separator after a file name.
|
---|
| 433 |
|
---|
| 434 | - These two options can be used with commands like `find -print0',
|
---|
| 435 | `perl -0', `sort -z', and `xargs -0' to process arbitrary file names,
|
---|
| 436 | even those that contain newlines.
|
---|
| 437 |
|
---|
| 438 | - The environment variable GREP_OPTIONS specifies default options;
|
---|
| 439 | e.g. GREP_OPTIONS='--directories=skip' reestablishes grep 2.1's
|
---|
| 440 | behavior of silently skipping directories.
|
---|
| 441 |
|
---|
| 442 | - You can specify a matcher multiple times without error, e.g.
|
---|
| 443 | `grep -E -E' or `fgrep -F'. It is still an error to specify
|
---|
| 444 | conflicting matchers.
|
---|
| 445 |
|
---|
| 446 | - -u and -U are now allowed on non-DOS hosts, and have no effect.
|
---|
| 447 |
|
---|
| 448 | - Modifications of the tests scripts to go around the "Broken Pipe"
|
---|
| 449 | errors from bash. See Bash FAQ.
|
---|
| 450 |
|
---|
| 451 | - New option -r or --recursive or --directories=recurse.
|
---|
| 452 | (This option was also in grep 2.3, but wasn't announced here.)
|
---|
| 453 |
|
---|
| 454 | - --without-included-regex disable, was causing bogus reports .i.e
|
---|
| 455 | doing more harm then good.
|
---|
| 456 |
|
---|
| 457 | Version 2.3:
|
---|
| 458 |
|
---|
| 459 | - When searching a binary file FOO, grep now just reports
|
---|
| 460 | `Binary file FOO matches' instead of outputting binary data.
|
---|
| 461 | This is typically more useful than the old behavior,
|
---|
| 462 | and it is also more consistent with other utilities like `diff'.
|
---|
| 463 | A file is considered to be binary if it contains a NUL (i.e. zero) byte.
|
---|
| 464 |
|
---|
| 465 | The new -a or --text option causes `grep' to assume that all
|
---|
| 466 | input is text. (This option has the same meaning as with `diff'.)
|
---|
| 467 | Use it if you want binary data in your output.
|
---|
| 468 |
|
---|
| 469 | - `grep' now searches directories just like ordinary files; it no longer
|
---|
| 470 | silently skips directories. This is the traditional behavior of
|
---|
| 471 | Unix text utilities (in particular, of traditional `grep').
|
---|
| 472 | Hence `grep PATTERN DIRECTORY' should report
|
---|
| 473 | `grep: DIRECTORY: Is a directory' on hosts where the operating system
|
---|
| 474 | does not permit programs to read directories directly, and
|
---|
| 475 | `grep: DIRECTORY: Binary file matches' (or nothing) otherwise.
|
---|
| 476 |
|
---|
| 477 | The new -d ACTION or --directories=ACTION option affects directory handling.
|
---|
| 478 | `-d skip' causes `grep' to silently skip directories, as in grep 2.1;
|
---|
| 479 | `-d read' (the default) causes `grep' to read directories if possible,
|
---|
| 480 | as in earlier versions of grep.
|
---|
| 481 |
|
---|
| 482 | - The MS-DOS and Microsoft Windows ports now behave identically to the
|
---|
| 483 | GNU and Unix ports with respect to binary files and directories.
|
---|
| 484 |
|
---|
| 485 | Version 2.2:
|
---|
| 486 |
|
---|
| 487 | Bug fix release.
|
---|
| 488 |
|
---|
| 489 | - Status error number fix.
|
---|
| 490 | - Skipping directories removed.
|
---|
| 491 | - Many typos fix.
|
---|
| 492 | - -f /dev/null fix(not to consider as an empty pattern).
|
---|
| 493 | - Checks for wctype/wchar.
|
---|
| 494 | - -E was using the wrong matcher fix.
|
---|
| 495 | - bug in regex char class fix
|
---|
| 496 | - Fixes for DJGPP
|
---|
| 497 |
|
---|
| 498 | Version 2.1:
|
---|
| 499 |
|
---|
| 500 | This is a bug fix release(see Changelog) i.e. no new features.
|
---|
| 501 |
|
---|
| 502 | - More compliance to GNU standard.
|
---|
| 503 | - Long options.
|
---|
| 504 | - Internationalization.
|
---|
| 505 | - Use automake/autoconf.
|
---|
| 506 | - Directory hierarchy change.
|
---|
| 507 | - Sigvec with -e on Linux corrected.
|
---|
| 508 | - Sigvec with -f on Linux corrected.
|
---|
| 509 | - Sigvec with the mmap() corrected.
|
---|
| 510 | - Bug in kwset corrected.
|
---|
| 511 | - -q, -L and -l stop on first match.
|
---|
| 512 | - New and improve regex.[ch] from Ulrich Drepper.
|
---|
| 513 | - New and improve dfa.[ch] from Arnold Robbins.
|
---|
| 514 | - Prototypes for over zealous C compiler.
|
---|
| 515 | - Not scanning a file, if it's a directory
|
---|
| 516 | (cause problems on Sun).
|
---|
| 517 | - Ported to MS-DOS/MS-Windows with DJGPP tools.
|
---|
| 518 |
|
---|
| 519 | See Changelog for the full story and proper credits.
|
---|
| 520 |
|
---|
| 521 | Version 2.0:
|
---|
| 522 |
|
---|
| 523 | The most important user visible change is that egrep and fgrep have
|
---|
| 524 | disappeared as separate programs into the single grep program mandated
|
---|
| 525 | by POSIX 1003.2. New options -G, -E, and -F have been added,
|
---|
| 526 | selecting grep, egrep, and fgrep behavior respectively. For
|
---|
| 527 | compatibility with historical practice, hard links named egrep and
|
---|
| 528 | fgrep are also provided. See the manual page for details.
|
---|
| 529 |
|
---|
| 530 | In addition, the regular expression facilities described in Posix
|
---|
| 531 | draft 11.2 are now supported, except for internationalization features
|
---|
| 532 | related to locale-dependent collating sequence information.
|
---|
| 533 |
|
---|
| 534 | There is a new option, -L, which is like -l except it lists
|
---|
| 535 | files which don't contain matches. The reason this option was
|
---|
| 536 | added is because '-l -v' doesn't do what you expect.
|
---|
| 537 |
|
---|
| 538 | Performance has been improved; the amount of improvement is platform
|
---|
| 539 | dependent, but (for example) grep 2.0 typically runs at least 30% faster
|
---|
| 540 | than grep 1.6 on a DECstation using the MIPS compiler. Where possible,
|
---|
| 541 | grep now uses mmap() for file input; on a Sun 4 running SunOS 4.1 this
|
---|
| 542 | may cut system time by as much as half, for a total reduction in running
|
---|
| 543 | time by nearly 50%. On machines that don't use mmap(), the buffering
|
---|
| 544 | code has been rewritten to choose more favorable alignments and buffer
|
---|
| 545 | sizes for read().
|
---|
| 546 |
|
---|
| 547 | Portability has been substantially cleaned up, and an automatic
|
---|
| 548 | configure script is now provided.
|
---|
| 549 |
|
---|
| 550 | The internals have changed in ways too numerous to mention.
|
---|
| 551 | People brave enough to reuse the DFA matcher in other programs
|
---|
| 552 | will now have their bravery amply "rewarded", for the interface
|
---|
| 553 | to that file has been completely changed. Some changes were
|
---|
| 554 | necessary to track the evolution of the regex package, and since
|
---|
| 555 | I was changing it anyway I decided to do a general cleanup.
|
---|
| 556 |
|
---|
| 557 | ========================================================================
|
---|
| 558 | Copyright (C) 1992, 1997-2002, 2004-2012 Free Software Foundation, Inc.
|
---|
| 559 |
|
---|
| 560 | Copying and distribution of this file, with or without modification,
|
---|
| 561 | are permitted in any medium without royalty provided the copyright
|
---|
| 562 | notice and this notice are preserved.
|
---|
| 563 |
|
---|
| 564 | Permission is granted to copy, distribute and/or modify this document
|
---|
| 565 | under the terms of the GNU Free Documentation License, Version 1.3 or
|
---|
| 566 | any later version published by the Free Software Foundation; with no
|
---|
| 567 | Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
|
---|
| 568 | Texts. A copy of the license is included in the ``GNU Free
|
---|
| 569 | Documentation License'' file as part of this distribution.
|
---|