public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* CR-LF handling behavior of SED changed recently - this breaks a lot of MinGW cross build scripts
@ 2017-06-07 16:23 Soegtrop, Michael
  2017-06-07 17:23 ` Eric Blake
  0 siblings, 1 reply; 37+ messages in thread
From: Soegtrop, Michael @ 2017-06-07 16:23 UTC (permalink / raw)
  To: cygwin

Dear Cygwin Team,

in the latest version of cygwin with sed-4.4-1.tar.bz2 the behavior of sed regarding handling CR-LF sequences changed. The last version I tried where this was still working is sed-4.2.2-3.tar.bz2.

I would say that the documented behavior in both versions is that they replace CR-LF with LF, because both version have a documented option -b to switch of this behavior. But in version 4.4-1 this doesn't work anymore. This breaks a lot of build scripts, because var=$( prog | sed .) now usually adds a carriage return to the variable in case the called prog is a MinGW program - a common scenario in MinGW cross development.

Is this considered a bug in sed 4.4-1 or is the old behavior and the -b option considered deprecated and it was just forgotten to remove the documentation for the -b option?

Best regards,

Michael

Old behavior (sed 4.2.2-3):

$ echo -e "a\r\nb\r\nc\r" | sed 's/a//' | hexdump -C
+ echo -e 'a\r\nb\r\nc\r'
+ sed s/a//
+ hexdump -C
00000000  0a 62 0a 63 0a                                    |.b.c.|
00000005

New behavior (sed 4.4-1):

$ echo -e "a\r\nb\r\nc\r" | sed 's/a//' | hexdump -C
+ echo -e 'a\r\nb\r\nc\r'
+ sed s/a//
+ hexdump -C
00000000  0d 0a 62 0d 0a 63 0d 0a                           |..b..c..|
00000008
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2017-06-14 19:04 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-07 16:23 CR-LF handling behavior of SED changed recently - this breaks a lot of MinGW cross build scripts Soegtrop, Michael
2017-06-07 17:23 ` Eric Blake
2017-06-07 19:26   ` Brian Inglis
2017-06-08  8:50   ` Soegtrop, Michael
2017-06-08 13:31     ` Vince Rice
2017-06-08 14:52       ` Soegtrop, Michael
2017-06-08 15:04       ` Eric Blake
2017-06-08 15:08     ` Eric Blake
2017-06-08 17:34       ` cyg Simple
2017-06-08 18:51     ` L A Walsh
2017-06-08 19:57       ` Eric Blake
2017-06-09  8:14         ` Soegtrop, Michael
2017-06-09 14:06           ` cyg Simple
2017-06-09 15:01             ` Soegtrop, Michael
2017-06-09 15:35               ` Andrey Repin
2017-06-09 15:51               ` Eric Blake
2017-06-09 16:56                 ` Soegtrop, Michael
2017-06-09 18:42                   ` Hans-Bernhard Bröker
2017-06-09 19:30                     ` Erik Soderquist
2017-06-09 22:28                     ` Soegtrop, Michael
2017-06-09 22:43                       ` Harvey Stein
2017-06-09 23:16                       ` Ray Donnelly
2017-06-10 13:48                 ` cyg Simple
2017-06-10 14:21                   ` Hans-Bernhard Bröker
2017-06-11  2:31                   ` Eric Blake
2017-06-13 14:11                     ` cyg Simple
2017-06-13 17:34                       ` Brian Inglis
2017-06-14 16:07                         ` cyg Simple
2017-06-14 19:04                           ` Brian Inglis
2017-06-10 13:42               ` cyg Simple
2017-06-09 13:50     ` Brian Inglis
2017-06-09 15:05       ` Soegtrop, Michael
2017-06-09 15:35         ` Andrey Repin
2017-06-09 15:50           ` Dan Kegel
2017-06-09 16:09             ` Soegtrop, Michael
2017-06-10 21:09               ` Brian Inglis
2017-06-09 15:56           ` Eric Blake

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).