X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=0.9 required=5.0 tests=AWL,BAYES_50,TW_MV,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="us-ascii" Subject: sed strips CRs Date: Fri, 10 Feb 2012 08:02:03 -0600 Message-ID: <2BF01EB27B56CC478AD6E5A0A28931F203F560E4@A1DAL1SWPES19MB.ams.acs-inc.net> From: "Nellis, Kenneth" To: 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 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id q1AE2lPJ025850 Cygwin 'sed' seems to be stripping CRs from its input. Linux sed doesn't do this. Example: $ seq 5 | unix2dos | tee foo | od -c 0000000 1 \r \n 2 \r \n 3 \r \n 4 \r \n 5 \r \n 0000017 $ sed 's/2/XXX/' foo | od -c 0000000 1 \n X X X \n 3 \n 4 \n 5 \n 0000014 $ uname -r 1.7.10(0.259/5/3) $ mount C:/cygwin/bin on /usr/bin type ntfs (binary,auto) C:/cygwin/lib on /usr/lib type ntfs (binary,auto) D:/cyghome on /home type ntfs (binary) C:/cygwin on / type ntfs (binary,auto) C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto) D: on /cygdrive/d type ntfs (binary,posix=0,user,noumount,auto) K: on /cygdrive/k type mvfs (binary,posix=0,user,noumount,auto) U: on /cygdrive/u type ntfs (binary,posix=0,user,noumount,auto) V: on /cygdrive/v type mvfs (binary,posix=0,user,noumount,auto) W: on /cygdrive/w type ntfs (binary,posix=0,user,noumount,auto) Y: on /cygdrive/y type ntfs (binary,posix=0,user,noumount,auto) Z: on /cygdrive/z type ntfs (binary,posix=0,user,noumount,auto) $ --Ken Nellis -- 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