From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16581 invoked by alias); 8 Jun 2017 18:51:53 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 12854 invoked by uid 89); 8 Jun 2017 18:51:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=BAYES_00,GIT_PATCH_2,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=H*F:U*cygwin, supplying, dear, Dear X-HELO: Ishtar.sc.tlinx.org Received: from ishtar.tlinx.org (HELO Ishtar.sc.tlinx.org) (173.164.175.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 08 Jun 2017 18:51:49 +0000 Received: from [192.168.3.12] (Athenae [192.168.3.12]) by Ishtar.sc.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id v58IpnbH069724; Thu, 8 Jun 2017 11:51:51 -0700 Message-ID: <59399CC5.60900@tlinx.org> Date: Thu, 08 Jun 2017 18:51:00 -0000 From: L A Walsh User-Agent: Thunderbird MIME-Version: 1.0 To: michael.soegtrop@intel.com CC: cygwin@cygwin.com Subject: Re: CR-LF handling behavior of SED changed recently - this breaks a lot of MinGW cross build scripts References: <0F7D3B1B3C4B894D824F5B822E3E5A175B2636E4@IRSMSX103.ger.corp.intel.com> <0F7D3B1B3C4B894D824F5B822E3E5A175B26CE47@IRSMSX102.ger.corp.intel.com> In-Reply-To: <0F7D3B1B3C4B894D824F5B822E3E5A175B26CE47@IRSMSX102.ger.corp.intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-06/txt/msg00070.txt.bz2 Soegtrop, Michael wrote: > Dear Eric, > > >> 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 support cygwin. 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 FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple