X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00 X-Spam-Check-By: sourceware.org From: William Lebow To: "cygwin AT cygwin DOT com" Date: Tue, 9 Mar 2010 14:41:19 -0500 Subject: RE: redirect-append (>>) creates garbage-y file Message-ID: <01499D518A9B6F4493FC5A2D32F7A4FC51B52C97B2@MB-EXBX01.north.pf.com> References: <01499D518A9B6F4493FC5A2D32F7A4FC51B519F1C9 AT MB-EXBX01 DOT north DOT pf DOT com> In-Reply-To: <01499D518A9B6F4493FC5A2D32F7A4FC51B519F1C9@MB-EXBX01.north.pf.com> Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 I've diagnosed this problem further. It is an interaction between cygwin an= d a security package called "Credant Guardian Shield" that my company insta= lls 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" cre= ates a file that starts with a bunch of garbage, and ends with the expected= text. -- Bill -----Original Message----- From: William Lebow [mailto:William DOT Lebow AT phaseforward DOT com]=20 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 ins= talling on my new Dell laptop running Windows XP professional. I'd be grate= ful for any advice or hints from this group. I am doing a simple redirect-append (>>, that is) to create a new file. Whe= n I do this the new file has twice as many characters as I expect and the f= irst 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 fir= st 3 characters are unwanted $ echo abc >> test1.txt $ wc test1.txt 1 1 7 test1.txt $ cat test1.txt 0=91=91abc $ 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 fi= rst 7 characters are unwanted $ echo abcdefg >> test2.txt $ wc test2.txt 1 1 15 test2.txt $ cat test2.txt =91=91\zB=91=91abcdefg 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