Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <17B78BDF120BD411B70100500422FC6309E110@IIS000> From: Bernard Dautrevaux To: "'Erik Nolte'" , Bernard Dautrevaux , "'Matthew Smith'" , Cygwin Subject: RE: Has CR/LF and cat problem with textutils-2.0 been solved? Date: Wed, 27 Sep 2000 09:26:47 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" > -----Original Message----- > From: Erik Nolte [mailto:enolte AT campuspipeline DOT 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 AT microprocess DOT com b DOT dautrevaux AT usa DOT net -------------------------------------------- -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com