This is the mail archive of the cygwin@sources.redhat.com 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]

Re: Has CR/LF and cat problem with textutils-2.0 been solved?


On Tue, Sep 26, 2000 at 12:16:21AM -0600, Erik Nolte wrote:
>Excuse me if this is a known problem, I can't find Cygnus's bug tracking
>database to know if this has been solved.

There is no bug tracking system for cygwin.

I've thought about implementing one but I quail at the thought of what would
show up there given our disappointing experience with the "todo" list.

>I'm experiencing the problems with "cat" that were described on this mailing
>list in July and August.  Specifically, cat is not filtering out CRs on
>textmode filesystems and it's causing commands like "javac `cat
>generatedlist`" to fail.  If I substitute the B20.1 cat for the 1.1.4
>version everything works.  The -B option to cat doesn't seem applicable and
>doesn't solve the problem.
>
>To reproduce the problem, try this (in a directory on a textmode
>filesystem):
>
>    ls / > x
>    echo `cat x`
>
>I get the following:
>
>    varup.log.full
>
>If I do "echo `cat x` | od -c" I see that everything's present, but the CRs
>are messing things up:
>    0000000   b   i   n  \r       c  \r       c   y   g   w   i   n   .   b
>    0000020   a   t  \r       c   y   g   w   i   n   .   i   c   o  \r
>    0000040   d  \r       e   t   c  \r       f  \r       h   o   m   e  \r
>    0000060       l   i   b  \r       s   e   t   u   p   .   l   o   g  \r
>    0000100       s   e   t   u   p   .   l   o   g   .   f   u   l   l  \r
>    0000120       t   m   p  \r       u   s   r  \r       v   a   r  \r  \n
>    0000140

I think it is arguable whether cat should strip CRs or not.  It is not arguable
whether bash's backtick handling should treat its input as text mode.

>B20.1 and UNIX systems produce the desired result:
>    bin
>    c
>    cygwin.bat
>    cygwin.ico
>    d
>    etc
>    f
>    home
>    lib
>    setup.log
>    setup.log.full
>    tmp
>    usr
>    var

Of course *UNIX* produces the desired result.

Anyway, I have Cc'ed the person who volunteered to be the maintainer for this
package.  Hopefully he will offer an opinion on this.

If he doesn't I'd like to survey this mailing list for the correct behavior.
If it is that cat should strip \r's then I'll drop back to the old version
unless someone wants to take the time to do more than post bug reports and
is interested in maintaining the textutils package.

cgf

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


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