[Bug 8791] sed : in substitution string \1 to \9 or & don't behave as per GNU & POSIX specification

bugzilla at busybox.net bugzilla at busybox.net
Mon Mar 14 17:28:56 UTC 2016


https://bugs.busybox.net/show_bug.cgi?id=8791

Ron Yorston <rmy at pobox.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rmy at pobox.com

--- Comment #1 from Ron Yorston <rmy at pobox.com> ---
This looks like a problem with line endings.  On Linux the only way I can get
the observed behaviour is to convert the input file to have CRLF line endings. 
The match then includes the CR. The output includes the first backreference,
you just can't see it because of the CR.  Piping the output through od shows
what's going on.  GNU sed on Linux exhibits the same behaviour.

Since CRLF is the normal line ending on Windows one could argue that including
the CR as part of the match there is incorrect.  I've raised an issue on
GitHub:

   https://github.com/rmyorston/busybox-w32/issues/52

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the busybox-cvs mailing list