X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Message-ID: <4B976EB6.3030704@towo.net> Date: Wed, 10 Mar 2010 11:04:38 +0100 From: Thomas Wolff User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.8) Gecko/20100227 Lightning/1.0b1 Thunderbird/3.0.3 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: redirect-append (>>) creates garbage-y file References: <01499D518A9B6F4493FC5A2D32F7A4FC51B519F1C9 AT MB-EXBX01 DOT north DOT pf DOT com> <01499D518A9B6F4493FC5A2D32F7A4FC51B52C97B2 AT MB-EXBX01 DOT north DOT pf DOT com> In-Reply-To: <01499D518A9B6F4493FC5A2D32F7A4FC51B52C97B2@MB-EXBX01.north.pf.com> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes 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 On 09.03.2010 20:41, William Lebow wrote: > I've diagnosed this problem further. It is an interaction between cygwin and a security package called "Credant Guardian Shield" that my company installs on all of its laptops. I can't say specifically that it is a cygwin bug, but this bad behavior is not present in earlier versions. > > As described below, the problem is a command like "echo foo>> foo.txt" creates a file that starts with a bunch of garbage, and ends with the expected text. > It would be interesting to check whether it only occurs if you append to a file from the command line or also if an application opens a file in append mode, in which case the issue would be much more critical I think. In any case, I would also submit a bug report to that security package. ------ Thomas > -- Bill > > > > -----Original Message----- > From: William Lebow [mailto:William DOT Lebow AT phaseforward DOT com] > Sent: Sunday, March 07, 2010 2:58 PM > To: cygwin AT cygwin DOT com > Cc: blebow AT alum DOT mit DOT edu > Subject: redirect-append (>>) creates garbage-y file > > I'm a long time cygwin user, but I am having the weirdest problem after installing on my new Dell laptop running Windows XP professional. I'd be grateful for any advice or hints from this group. > > I am doing a simple redirect-append (>>, that is) to create a new file. When I do this the new file has twice as many characters as I expect and the first bunch of characters are seemingly garbage. > > This only happens with ">>" and only if I am creating a new file. > Using ">>" to append to a file is no problem. > Using ">" to create a new file is not problem > > So far this has not been reproducable on any other PC. > > I am using the bash version 3.2.49(23)-release (i686-pc-wygwin) , with the 1007.1.0.0 cygwin1 dll-- see attached output from cygcheck. > > Some examples follow:: > > ################################# > #### Example 1 > #### I expect 4 characters (including the terminator); I get 7 #### The first 3 characters are unwanted > $ echo abc>> test1.txt > $ wc test1.txt > 1 1 7 test1.txt > $ cat test1.txt > 0‘‘abc > > $ hexedit test1.txt > 00000000 30 B5 A2 61 62 63 0A 0..abc. > > ################################# > #### Example 2 > #### I expect 8 characters (including the terminator); I get 15 #### The first 7 characters are unwanted > $ echo abcdefg>> test2.txt > $ wc test2.txt > 1 1 15 test2.txt > $ cat test2.txt > ‘‘\zB‘‘abcdefg > > hexedit test2.txt > 00000000 AD EB 5C 7A 42 B6 C5 61 62 63 64 65 66 67 0A ..\zB..abcdefg. > > > ################################# > #### Example 3 > #### Use> instead of>> and I get exactly what I should get > $ echo abc> test3.txt > $ wc test3.txt > 1 1 4 test3.txt > $ cat test3.txt > abc > > > > Many thanks for any help > > -- Bill > > -- > 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 > > -- 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