Has CR/LF and cat problem with textutils-2.0 been solved?
Bernard Dautrevaux
Dautrevaux@microprocess.com
Wed Sep 27 00:36:00 GMT 2000
> -----Original Message-----
> From: Erik Nolte [ mailto:enolte@campuspipeline.com ]
> Sent: Tuesday, September 26, 2000 8:46 PM
> To: Bernard Dautrevaux; 'Matthew Smith'; Cygwin
> Subject: Re: Has CR/LF and cat problem with textutils-2.0 been solved?
>
>
>
> It's interesting that cat was placed in the line-oriented
> textutils package
> rather than something like fileutils or shellutils. But then
> again so was
> od and the checksum utilities like sum and md5sum.
>
> What cat's -B option for? Since it's not in the FSF documentation, I
> thought it was a cygwin addition that forced cat to *not* do
> the LF to CR-LF
> output translation. To me it implies that cat is reading and
> writing in
> textmode, not binmode.
>
> Since it will take a while to fix all the shells, should a
> --text flag be
> added to cat? I know it's ugly, but it saves people the
> trouble of having
> to find a B20.1 version of cat.
I don't think so; the first reason is that you have the problem for all
commands you use in backticks, be it cat or ls or a series of echoes (or at
least you should have the problem; I had to reinstall B20.1 for another
reason -- user compatibility for support :-) -- so I can't check right now,
but th eproper behavior is that all these write in text and as such they may
output CR/LFs).
The second reason is that cygwin *must* be UNIX compatible, so a cygwin-only
option to cat would be unusable for all people sharing shell scripts or
Makefiles between UNIX and cygwin ;-(
The third reason is that (as Chris already answered) you can use ash instead
of bash: ash *was* fixed in this respect and correctly strip CRs from the
output of backticks.
The last reason is that you can look at the source and submit a patch :-)
Regards,
Bernard
--------------------------------------------
Bernard Dautrevaux
Microprocess Ingenierie
97 bis, rue de Colombes
92400 COURBEVOIE
FRANCE
Tel: +33 (0) 1 47 68 80 80
Fax: +33 (0) 1 47 88 97 85
e-mail: dautrevaux@microprocess.com
b.dautrevaux@usa.net
--------------------------------------------
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
More information about the Cygwin
mailing list