1.5.25-6: Win32 programs don't get correct >> redirection

Jack Brennen jbrennen@qualcomm.com
Fri Dec 14 01:34:00 GMT 2007


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/



More information about the Cygwin mailing list