This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: redirect-append (>>) creates garbage-y file


On Mar 11 13:12, William Lebow wrote:
> echo foo | tee -a test3.txt : terminal output is okay but test3.text
> starts with 3 characters of garbage before the string foo
> 
> echo foo | tee test4.txt : terminal output is okay and test4.txt is okay too
> 
> So "tee -a" has the same issue as ">>" when creating a new file.
> 
> BTW, I believe that the garbage characters that precede the text is an encrypted
> version of the text in the file. This Credant software is protecting my txt files
> by encrypting them.

And it's doing something blatantly wrong.  Quite obviously, Cygwin
only writes the data once.  If it's in the file twice, once encrypted
and once unencrypted, then this Credant software does not understand
native NT writing with append mode(*).  You should report this as a bug.


Corinna

(*) http://msdn.microsoft.com/en-us/library/ms804364.aspx, see the
    ByteOffset description, last paragraph, the FILE_WRITE_TO_END_OF_FILE
    offset value.

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]