X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:references:to:reply-to:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=b8gHDb1k6UVd1vYk 4mRjgq31MWcVYorJ+56w8UIIUGxPAt76uuB3ZjTS37YoBkNJyIbWcetuxTQn0L3n uR5cSYy79X8abRFoReBZ54Ci1sn2sk3DQFyOxenlQaXxTM2kRgI6iZiVnhp2DAOF 1sm6ozXacw6o5g8fKe3IQVBfKkI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:references:to:reply-to:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=4fEU3Egk1xTImZ/6ywSrd9 K5Kl8=; b=xZy6kBA6BexLtrxC4GCIPQJqvVQRTVtaqD0bKI6+AJrnK4inOFVg4C WmWyBi80oxmfZt2XDUh5pSJTnizPAvG6ufp78Fx5g2xsjuklnPAv8qrSOdaqQwG1 rQb8Bsi8e+JPzj56WJCAqSCz4lrXvVbwmIV3eeX0N74c710AZ7Z6I= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.1 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=H*R:D*ca, H*r:ip*192.168.1.100, Hx-spam-relays-external:sk:smtp-ou, H*RU:sk:smtp-ou X-HELO: smtp-out-no.shaw.ca X-Authority-Analysis: v=2.2 cv=eexNR/MH c=1 sm=1 tr=0 a=WqCeCkldcEjBO3QZneQsCg==:117 a=WqCeCkldcEjBO3QZneQsCg==:17 a=IkcTkHD0fZMA:10 a=CCpqsmhAAAAA:8 a=Kj0ZDfqHlC5XekxUkJwA:9 a=QEXdDO2ut3YA:10 a=PTI0W9KWGNUA:10 a=ul9cdbp4aOFLsgKbc677:22 Subject: Re: Problems opening pipes in binary mode References: <22716 DOT 14013 DOT 315000 DOT 162049 AT woitok DOT gmail DOT com> To: cygwin AT cygwin DOT com Reply-To: Brian DOT Inglis AT SystematicSw DOT ab DOT ca From: Brian Inglis Message-ID: <3a01723f-e44d-9017-2f2c-c7461b293bfb@SystematicSw.ab.ca> Date: Sun, 5 Mar 2017 10:04:53 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <22716.14013.315000.162049@woitok.gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfP86XZWlXkK/1wTrVw4BBCmyN664P1kcBCknqcEJHUzK3l/AD8xIXJi7ROy8BpMl9svl9C9x9aaTUN5ElHlqBncmxvTqN7Qqb2xmZkbB4xCGLVFSN0UQ 125mNf+swSetCJF3IELjYKxvBhr9KUOK4FtmKtjDP1CmV+lc7C0DwOZCGttS1+lTRwNr+CC/Cm9xng== X-IsSubscribed: yes On 2017-03-05 09:03, Dr Rainer Woitok wrote: > after some discussion the packages "awk", "grep", and "sed" were recent- > ly updated to open pipes in binary mode only. I do not want to revive > the discussion about pros and cons, I just want to make known how this > change broke one of my scripts. My script contains the line > cygcheck -cv | gawk '...' > which now produces utterly garbled output. The reason simply is that > "cygcheck" produces output lines with Windows style line ends. To test > just run the following: > $ cygcheck -cv | od -tcx1 | head -4 > 0000000 C y g w i n P a c k a g e I > 43 79 67 77 69 6e 20 50 61 63 6b 61 67 65 20 49 > 0000020 n f o r m a t i o n \r \n L a s t > 6e 66 6f 72 6d 61 74 69 6f 6e 0d 0a 4c 61 73 74 > So there obviously is at least one Cygwin tool which uses Windows style > "\r\n" line ends in its output. I don't know whether or not there are > any others, but in my opinion this move to binary mode pipes should not > have been made as long as there are Cygwin tools producing Windows style > line ends. Patched in: https://sourceware.org/ml/cygwin-cvs/2017-q1/msg00039.html should be picked up in next releases of cygcheck and strace in package cygwin. This has not been mentioned in cygwin-patches, cygwin-apps, or here in cygwin. -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada -- 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