This is the mail archive of the
mailing list for the Cygwin project.
Re: CR-LF handling behavior of SED changed recently - this breaks a lot of MinGW cross build scripts
Soegtrop, Michael wrote:
No, the documented behavior is that CR-LF is converted to LF only for text-
mounted files; but pipelines are default binary-mounted. If you want to strip
CR from a pipeline, then make it explicit.
var=$( prog | sed .)
Rewrite that to var=$( prog | tr -d '\r' | sed .)
I have two problems with this:
1.) I build many (~ 50) unix libs and tools MinGW cross on cygwin from sources and this breaks many of the configure and other scripts.
But didn't one have to use 'sed -b' before, in order to
strip out CR's? I.e. wouldn't all the individual lib/tool maintainers have
been required to add '-b' to their sed scripts? Seems either way,
you have the undesirability of forcing external products to change to
Whereas, what I'd wonder is, how you are supplying input to sed
in the first place? I.e. how did CR's get into the stream to begin with.
If you used cygwin and some tool on cygwin generated CR's into the output
stream, I'd think that'd be a problem (or bug). But if you are mixing
DOS/Win-progs w/cygwin, then you need to adapt the DOS/Win progs' outputs to
not have CR in them.
Or am I missing something basic?
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple