X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=0.5 required=5.0 tests=AWL,BAYES_00,NIXSPAM_IXHASH,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Subject: RE: sed strips CRs Date: Mon, 13 Feb 2012 08:39:12 -0600 Message-ID: <2BF01EB27B56CC478AD6E5A0A28931F203F5655A@A1DAL1SWPES19MB.ams.acs-inc.net> In-Reply-To: References: From: "Nellis, Kenneth" To: Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id q1DEdUiD023569 From: Earnie Boyd >On Sat, Feb 11, 2012 at 12:56 PM, Corinna Vinschen wrote:> >> That's why I wrote "on systems supporting this mode".  Sed input is >> text input in the first place.  Therefore it's using textmode in the >> first place.  This is done so for a long time.  If it's not what you >> need, there's a workaround, the -b option. > > I was stressing the issue of the confusion. That being, Cygwin is > different than Linux as well as it is similar. Many expect it to be > exactly matching. I agree that it's confusing. More confusion: sed's man page does not mention the -b option, although sed --help does. grep also strips CRs, but has option -U to suppress this behavior. awk also strips CRs. I could not find an awk option to suppress this. IMHO it would be preferable to replace this confusing state and align these tools with Cygwin's philosophy to work like GNU/Linux. The standard response to issues dealing with CRLF files is to point the user to dos2unix and text mode mounts. This should be adequate without the hidden behavior of sed/grep/awk and probably others. Respectfully submitted, Ken Nellis