delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/12/13/20:35:01

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
X-IronPort-AV: E=McAfee;i="5100,188,5185"; a="125556"
Message-ID: <4761DDA1.9050700@qualcomm.com>
Date: Thu, 13 Dec 2007 17:34:25 -0800
From: Jack Brennen <jbrennen AT qualcomm DOT com>
User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: 1.5.25-6: Win32 programs don't get correct >> redirection
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Running Cygwin version 1.5.25-6 with version 3.2.25-17 of bash with Win 
XP Pro...


Start up bash.

Enter these commands in order:


sh-3.2$ echo ABCDEFGHIJKLMNOPQRST > foo.txt
sh-3.2$ echo UVWXYZ >> foo.txt
sh-3.2$ cat foo.txt
ABCDEFGHIJKLMNOPQRST
UVWXYZ
sh-3.2$ echo ABCDEFGHIJKLMNOPQRST > foo.txt
sh-3.2$ cmd /c echo UVWXYZ >> foo.txt
sh-3.2$ cat foo.txt
UVWXYZ
IJKLMNOPQRST
sh-3.2$


The first time that we use the ">>" redirection operator, it works 
correctly.

The second time that we use the ">>" redirection operator, it overwrites 
the beginning of the file rather than appending to the end.
The only difference is that the Win32 command interpreter CMD.EXE is 
echoing the text rather than bash.



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019