X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org MIME-Version: 1.0 In-Reply-To: <905541703.20120214045615@mtu-net.ru> References: <2BF01EB27B56CC478AD6E5A0A28931F203F5655A AT A1DAL1SWPES19MB DOT ams DOT acs-inc DOT net> <905541703 DOT 20120214045615 AT mtu-net DOT ru> Date: Tue, 14 Feb 2012 07:34:17 -0500 Message-ID: Subject: Re: sed strips CRs From: Earnie Boyd To: Andrey Repin Cc: "Nellis, Kenneth" Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes 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 On Mon, Feb 13, 2012 at 7:56 PM, Andrey Repin wrote: > Greetings, Nellis, Kenneth! > >> 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. > > While your reasoning is sound, I prefer them to behave the way they are for my > own goals. > I can't possible alter between text and binary mounts, or use d2u on and off > in an attempt to produce consistent and predictable end results. Consistent behavior is what I see as the issue. IMO, sed, grep and awk should behave the same as on UNIX for consistent and predictable behavior. Treating CR as white space not only helps the Windows user it also helps the Unix user when Windows files are transferred to it. I know that for sed at least treating CR as white space works very well. -- Earnie -- https://sites.google.com/site/earnieboyd -- 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