Menu ▾ ▴

Sed-4.0.6 for Windows

An MS-Windows (Win32) port of Sed-4.0.6 is available from
http://gnuwin32.sourceforge.net

Sed is a stream editor.
Changes from the previous Win32 port (3.02.80) are:

Sed 4.0.6

  • added parameter to `v' for the version of sed that is expected.

  • configure switch --without-included-regex to use the system regex matcher

  • fix for -i option under Cygwin


Sed 4.0.5

  • portability fixes

  • improvements to some error messages (e.g. y/abc/defg/ incorrectly said
    excess characters after command' instead ofy arguments have different
    lengths')

  • a',i', l',L', r' accept two addresses except in POSIXLY_CORRECT mode. Onlyq' and `Q' do not accept two address in standard (GNU) mode.


Sed 4.0.4

  • documentation fixes

  • update regex matcher


Sed 4.0.3

  • fix packaging problem (two missing translation catalogs)

Sed 4.0.2

  • more translations

  • fix build problems (vpath builds and bootstrap builds)


Sed 4.0.1

  • Remove last vestiges of super-sed

  • man page automatically built

  • more translations provided

  • portability improvements


Sed 4.0

  • Update regex matcher

Sed 3.96

  • `y' command supports multibyte character sets

  • Update regex matcher


Sed 3.95

  • `R' command reads a single line from a file.

  • CR-LF pairs are always ignored under Windows, even if (under Cygwin)
    a disk is mounted as binary.

  • More attention to errors on stdout

  • New `W' command to write first line of pattern space to a file

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

  • L' command formats and reflows paragraphs likefmt' 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.

  • New command `e' to pipe the output of a command into the output
    of sed.

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

  • Switched to obstacks in the parser -- less memory-related bugs
    (there were none AFAIK but you never know) and less memory usage.

  • 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.

  • Dumped buffering code. The performance loss is 10%, but it caused
    bugs in systems with CRLF termination. The current solution is
    not definitive, though.

  • 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

  • Bug fix: the // empty regular expressions now refers to the last
    regular expression that was matched, rather than to the last
    regular expression that was compiled. This richer behavior seems
    to be the correct one (albeit neither one is POSIXLY_CORRECT).

  • 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. The manual often
    refers to "GNU extensions", but if they are described here they are
    specific to this version.

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

  • Added feature to the w' command and to thew' 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' andM' modifiers to s' command for multi-line matching (Perl-style); in addresses, onlyM' works.

  • Added Q' command forsilent quit'; added ability to pass
    an exit code from a sed script to the caller.

  • Added T' command forbranch if failed'.

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

Posted by GnuWin 2003-04-06