Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 Date: Wed, 24 Jul 2002 19:56:53 -0700 From: David MacMahon To: cygwin AT cygwin DOT com Subject: Re: cygwin 1.3.12 problem with using pipes Message-ID: <20020724195653.A1681@SmartSC.com> Mail-Followup-To: cygwin AT cygwin DOT com References: <039b01c23334$6471c9d0$0d32a8c0 AT ids DOT de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.22.1i I don't know whether this is related to your problem, but I've observed the following behavior... $ cat foo.sh #!/bin/bash foo="$(echo A;echo B;echo C;echo D)" echo "${foo}" | od -c echo echo "${foo#????}" | od -c $ ./foo.sh 0000000 A \n B \n C \n D \n 0000010 0000000 C \n D \n 0000004 $ ./foo.sh > /binmode-mount/foo.tmp && cat /binmode-mount/foo.tmp 0000000 A \n B \n C \n D \n 0000010 0000000 C \n D \n 0000004 $ ./foo.sh > /textmode-mount/foo.tmp && cat /textmode-mount/foo.tmp 0000000 A \r \n B \n C \n D \n 0000011 0000000 C \r \n D \n 0000005 Is that last one weird or what? Clearly, the extraneous carriage return comes in during the pipe to od, but only when the script's output is redirected to a file under a textmode mount point and only the first newline gets an extraneous carriage return. I'm pretty sure I get the same thing regardless of whether I have CYGWIN=binmode or CYGWIN=nobinmode. Dave -- David MacMahon, President Smart Software Consulting http://www.smartsc.com -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/