Share September 2005: Project of the Month

MinGW - Minimalist GNU for Windows

Tracker: Bugs

5 "cat" outputs duplicate CR - ID: 2728605
Last Update: Settings changed ( earnie )

MSYS 1.0.11(0.46/3/2) 2009-01-29 00:39 i686 unknown; targ=MINGW32
cat (GNU coreutils) 5.97
Windows Server 2003 64-bit

When the text files a.txt and b.txt are concatenated (see attachment),
MSYS' cat.exe outputs a duplicate CR after about 1000 bytes. Both a.txt
and b.txt have CRLF line endings. Line lengths in these files seem to
matter, you can't trigger the bug with any kind of text files.

See bug.cmd in the attachment for how I invoked cat.exe to trigger the bug.
The bug does NOT occur when cat.exe is invoked from MSYS' bash.exe.


Jan Echternach ( jegrp ) - 2009-04-03 17:45

5

Closed

Invalid

Nobody/Anonymous

MSYS

None

Public


Comment ( 1 )

Date: 2009-04-03 19:41
Sender: earnieProject Admin

If you're using some other shell to redirect the output then it isn't a
problem with cat.exe since it is the shell that opened the pipes. You will
need to complain to Microsoft about its buggy cmd.exe or maybe there are
options where you can cause the pipes in the shell to be open in binary
mode instead of text mode.

This issue has been closed. If you have further questions then please ask
at mingw-users@lists.sourceforge.net.


Attached File ( 1 )

Filename Description Download
cat-duplicate-cr-bug.tar.gz "cat" input files and sample output Download

Changes ( 5 )

Field Old Value Date By
status_id Open 2009-04-03 19:41 earnie
resolution_id None 2009-04-03 19:41 earnie
allow_comments 1 2009-04-03 19:41 earnie
close_date - 2009-04-03 19:41 earnie
File Added 321108: cat-duplicate-cr-bug.tar.gz 2009-04-03 17:45 jegrp