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:reply-to:subject:to:references:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=SGbV9uhqlWcbZpCk f4LxwIr5ifxbNb3B1iR3bG2rFY67l6URromIBujSws20FwxqzW78GqIBbg3X+TEP 3NenBzyck5Yir8SxSGjT4pJCVDwnrkcI7CIlEPWiYID8m9iO+LDURG3u9Z4iRAJD 9OvIw8Q9kb1c2bJVw9f/4TOgDLw= 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:reply-to:subject:to:references:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=Gp8LE+rBlzcys+Is2piGOV 5+Zzc=; b=v7hntd25O435GVNIpVmASlbGyeZviOk9MwA9p5W31RRjG+A2uqqeAi Z30c5NATdZXR8NQEHOltgaTeGkq0cXef8oov8Hh3a7xD0AYRIxwsFPSuaPeOkiQK 27qXQNFpgFArcmZ+AQmlB4UCDuTx4prtxICes+H4FXwcaH8Q7wviU= 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.8 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=inglis, Inglis, Brian, Hx-languages-length:945 X-HELO: smtp-out-so.shaw.ca X-Authority-Analysis: v=2.3 cv=KuxjJ1eN c=1 sm=1 tr=0 a=MVEHjbUiAHxQW0jfcDq5EA==:117 a=MVEHjbUiAHxQW0jfcDq5EA==:17 a=IkcTkHD0fZMA:10 a=4Bk-y7KSnTpDDFk79A0A:9 a=QEXdDO2ut3YA:10 Reply-To: Brian DOT Inglis AT SystematicSw DOT ab DOT ca Subject: Re: 2.10.0: Cygwin now can not work well with a file in dos format. To: cygwin AT cygwin DOT com References: <2bfeabde DOT 39a8 DOT 16403e31153 DOT Coremail DOT tuyanyi AT 163 DOT com> <0F7D3B1B3C4B894D824F5B822E3E5A177880092C AT IRSMSX102 DOT ger DOT corp DOT intel DOT com> From: Brian Inglis Openpgp: preference=signencrypt Message-ID: <18573474-64a0-8848-bd87-1343475730db@SystematicSw.ab.ca> Date: Fri, 15 Jun 2018 16:02:49 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <0F7D3B1B3C4B894D824F5B822E3E5A177880092C@IRSMSX102.ger.corp.intel.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfOGErQzGur5jgpnuWtVcv1idouMBOfhyTNmntkfYaNz9mUm7hxZ2MFzuH0AWSur7045sWWlIZpUnTwa8efUD9f4Rco2YAAuiO0t7MJKl+VI+hntYcdqc GpCNzGi84MsgMg4sr7gAre2eRW6NjSHAaCyUVICZeTdINxLToaVxPpuAa7425uuKi3Ydz3nb5QCdng== X-IsSubscribed: yes On 2018-06-15 09:11, Soegtrop, Michael wrote: > what has been changed in sed and awk is handling of carriage returns. The sed > and awk of older Cygwin version strip \r from the input. Newer versions > behave like the same tools on Linux and don't strip CR. This is documented > in the release notes, intended behavior and has been discussed quite > extensively on the list (I complained about the same issue some-time last > year).> The options you have is either to strip the \r characters away first (e.g. > using tr) or to compile old versions of awk and/or sed from sources. Use sed commands: $ sed -e 's/\r$//' ... # strip input \r $ sed ... -e 's/$/\r/' ... # insert output \r or awk options: $ awk -v RS='\r?\n' # strip input \r $ awk -v ORS='\r\n' # insert output \r to work the same on any system. -- 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