[devel] [bonzini на gnu.org: GNU sed 3.95 released]

Dmitry V. Levin =?iso-8859-1?q?ldv_=CE=C1_altlinux=2Eorg?=
Ср Окт 2 12:44:32 MSD 2002


FYI

----- Forwarded message from Bonzini <bonzini на gnu.org> -----

Date: Wed, 2 Oct 2002 08:07:09 +0200
From: "Bonzini" <bonzini на gnu.org>
To: <gnu-announce на gnu.org>
Cc: <libc-alpha на sources.redhat.com>
Subject: GNU sed 3.95 released

GNU sed 3.95 has been released.  This is an alpha release for the upcoming
GNU sed 4.0 release.

GNU sed 3.95 merges most of the changes in the free-software super-sed
project.  In particular:

* Can customize line wrap width on single `l' commands

* `L' command formats and reflows paragraphs like `fmt' does.

* The test suite makefiles are better organized (this change is transparent
however).

* Compiles and bootstraps out-of-the-box under MinGW32 and Cygwin.

* Optimizes cases when pattern space is truncated at its start or at its end
by `D' or by a substitution command with an empty RHS. For example scripts
like this,

    seq 1 10000 | tr \\n \  | ./sed ':a; s/^[0-9][0-9]* //; ta'

whose behavior was quadratic with previous versions of sed, have now linear
behavior.

* Bug fix: Made the behavior of s/A*/x/g (i.e. `s' command with a
possibly empty LHS) more consistent:

       pattern               GNU sed 3.x       GNU sed 4.x
        B                      xBx               xBx
        BC                     xBxCx             xBxCx
        BAC                    xBxxCx            xBxCx
        BAAC                   xBxxCx            xBxCx

* Check for invalid backreferences in the RHS of the `s' command (e.g.
s/1234/\1/)

* Support for \[lLuUE] in the RHS of the `s' command like in Perl.

* New regular expression matcher

* Bug fix: if a file was redirected to be stdin, sed did not consume it.  So
      (sed d; sed G) < TESTFILE

double-spaced TESTFILE, while the equivalent `useless use of cat'
      cat TESTFILE | (sed d; sed G)

printed nothing (which is the correct behavior).  A test for this bug was
added to the test suite.

* The documentation is now much better, with a few examples provided, and a
thorough description of regular expressions.

* New option -i, to support in-place editing a la Perl.  Usually one had to
use ed or, for more complex tasks, resort to Perl; this is not necessary
anymore.

* Added new command-line options:
  -u, --unbuffered
    Do not attempt to read-ahead more than required; do not buffer stdout.
  -l N, --line-length=N
    Specify the desired line-wrap length for the `l' command.
    A length of "0" means "never wrap".

* Documented command-line option:
  -r, --regexp-extended
    Use extended regexps -- e.g. (abc+) instead of \(abc\+\)

* Added feature to the `w' command and to the `w' option of the `s' command:
if the file name is /dev/stderr, it means the standard error (inspired by
awk); and similarly for /dev/stdout.  This is disabled if POSIXLY_CORRECT is
set.

* Added `m' and `M' modifiers to `s' command for multi-line matching
(Perl-style); in addresses, only `M' works.

* New option `e' to pass the output of the `s' command through the Bourne
shell and get the result into pattern space.

* Added `e' commnad to pipe the output of a command into the output of sed.

* Added `Q' command for `silent quit'; added ability to pass an exit code
from a sed script to the caller.

* Added `R' command to read a single line from a file.

* Added `W' command to write first line of pattern space to a file

* Added `T' command for `branch if failed'.

* Added `v' command, which is a do-nothing intended to fail on seds that do
not support super-sed's extensions.

* New internationalization translations added: fr ru de it el sk pt_BR sv
(some of them need updating)

* The s/// command now understands the following escapes (in both halves):
 \a an "alert" (BEL)
 \f a form-feed
 \n a newline
 \r a carriage-return
 \t a horizontal tab
 \v a vertical tab
 \oNNN a character with the octal value NNN
 \dNNN a character with the decimal value NNN
 \xNN a character with the hexadecimal value NN
This behavior is disabled if POSIXLY_CORRECT is set, at least for the time
being (until I can be convinced that this behavior does not violate the
POSIX standard).  (Incidentally, \b (backspace) was omitted because of the
conflict with the existing "word boundary" meaning. \ooo octal format was
omitted because of the conflict with backreference syntax.)

* If POSIXLY_CORRECT is set, the empty RE // now is the null match instead
of "repeat the last REmatch".  As far as I can tell this behavior is
mandated by POSIX, but it would break too many
legacy sed scripts to blithely change GNU sed's default behavior.

This release is known to have bugs.  Some can remain in GNU sed 4.0, but not
those that for example give problems when configuring packages, because this
would seriously hinder the usability of a GNU system.  Please try GNU sed
3.95 to configure your favorite packages on your favorite architecture, and
report whatever goes wrong to the maintainer at bonzini на gnu.org

(libc-alpha CCed because the bigger test suite might interest the folks
there)

URLs:
-----

ftp://alpha.gnu.org/gnu/sed/sed-3.95.tar.gz
FTP site for GNU sed 3.95

http://sed.sf.net/grabbag/ssed
Web site for super-sed

Paolo Bonzini


----- End forwarded message -----

--
ldv
----------- следующая часть -----------
Было удалено вложение не в текстовом формате...
Имя     : =?iso-8859-1?q?=CF=D4=D3=D5=D4=D3=D4=D7=D5=C5=D4?=
Тип     : application/pgp-signature
Размер  : 189 байтов
Описание: =?iso-8859-1?q?=CF=D4=D3=D5=D4=D3=D4=D7=D5=C5=D4?=
Url     : <http://lists.altlinux.org/pipermail/devel/attachments/20021002/8ad0e3da/attachment-0001.bin>


Подробная информация о списке рассылки Devel