| [2557] | 1 | Version 2.5.1
|
|---|
| 2 | - This is a bugfix release. No new features.
|
|---|
| 3 |
|
|---|
| 4 | Version 2.5
|
|---|
| 5 | - The new option --label allows to specify a different name for input
|
|---|
| 6 | from stdin. See the man or info pages for details.
|
|---|
| 7 |
|
|---|
| 8 | - The internal lib/getopt* files are no longer used on systems providing
|
|---|
| 9 | getopt functionality in their libc (e.g. glibc 2.2.x).
|
|---|
| 10 | If you need the old getopt files, use --with-included-getopt.
|
|---|
| 11 |
|
|---|
| 12 | - The new option --only-matching (-o) will print only the part of matching
|
|---|
| 13 | lines that matches the pattern. This is useful, for example, to extract
|
|---|
| 14 | IP addresses from log files.
|
|---|
| 15 |
|
|---|
| 16 | - i18n bug fixed ([A-Z0-9] wouldn't match A in locales other than C on
|
|---|
| 17 | systems using recent glibc builds
|
|---|
| 18 |
|
|---|
| 19 | - GNU grep can now be built with autoconf 2.52.
|
|---|
| 20 |
|
|---|
| 21 | - The new option --devices controls how grep handles device files. Its usage
|
|---|
| 22 | is analogous to --directories.
|
|---|
| 23 |
|
|---|
| 24 | - The new option --line-buffered fflush on everyline. There is a noticeable
|
|---|
| 25 | slow down when forcing line buffering.
|
|---|
| 26 |
|
|---|
| 27 | - Back references are now local to the regex.
|
|---|
| 28 | grep -e '\(a\)\1' -e '\(b\)\1'
|
|---|
| 29 | The last backref \1 in the second expression refer to \(b\)
|
|---|
| 30 |
|
|---|
| 31 | - The new option --include=PATTERN will only search matching files
|
|---|
| 32 | when recursing in directories
|
|---|
| 33 |
|
|---|
| 34 | - The new option --exclude=PATTERN will skip matching files when
|
|---|
| 35 | recursing in directories.
|
|---|
| 36 |
|
|---|
| 37 | - The new option --color will use the environment variable GREP_COLOR
|
|---|
| 38 | (default is red) to highlight the matching string.
|
|---|
| 39 | --color takes an optional argument specifying when to colorize a line:
|
|---|
| 40 | --color=always, --color=tty, --color=never
|
|---|
| 41 |
|
|---|
| 42 | - The following changes are for POSIX.2 conformance:
|
|---|
| 43 |
|
|---|
| 44 | . The -q or --quiet or --silent option now causes grep to exit
|
|---|
| 45 | with zero status when a input line is selected, even if an error
|
|---|
| 46 | also occurs.
|
|---|
| 47 |
|
|---|
| 48 | . The -s or --no-messages option no longer affects the exit status.
|
|---|
| 49 |
|
|---|
| 50 | . Bracket regular expressions like [a-z] are now locale-dependent.
|
|---|
| 51 | For example, many locales sort characters in dictionary order,
|
|---|
| 52 | and in these locales the regular expression [a-d] is not
|
|---|
| 53 | equivalent to [abcd]; it might be equivalent to [aBbCcDd], for
|
|---|
| 54 | example. To obtain the traditional interpretation of bracket
|
|---|
| 55 | expressions, you can use the C locale by setting the LC_ALL
|
|---|
| 56 | environment variable to the value "C".
|
|---|
| 57 |
|
|---|
| 58 | - The -C or --context option now requires an argument, partly for
|
|---|
| 59 | consistency, and partly because POSIX.2 recommends against
|
|---|
| 60 | optional arguments.
|
|---|
| |
|---|