delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/08/22/14:31:37

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-Id: <4.3.1.2.20000822122153.01ecdb80@pop.ma.ultranet.com>
X-Sender: lhall AT pop DOT ma DOT ultranet DOT com
X-Mailer: QUALCOMM Windows Eudora Version 4.3.1
Date: Tue, 22 Aug 2000 12:27:27 -0400
To: Earnie Boyd <earnie_boyd AT yahoo DOT com>, "Fifer, Eric" <EFifer AT sanwaint DOT com>,
=?iso-8859-1?Q?=22=27Eirik=5FNordbr=F8den=27=22?= <eirik DOT nordbroden AT scandpower DOT no>,
"cygwin AT sourceware DOT cygnus DOT com" <cygwin AT hotpop DOT com>
From: "Larry Hall (RFK Partners, Inc)" <lhall AT rfk DOT com>
Subject: RE: CR/LF and read is shell scripts
In-Reply-To: <20000822155843.19581.qmail@web120.yahoomail.com>
Mime-Version: 1.0

At 11:58 AM 8/22/2000, Earnie Boyd wrote:
>--- "Fifer, Eric" <EFifer AT sanwaint DOT com> wrote:
> > 
> > >Anyone that has got an idea?
> > 
> > Try something like 'sed -n p' instead of 'cat'.
> > 
> > The cat currently included with cygwin does not
> > work correctly on text mounts.  See my previous
> > email for details.
> > 
>
>Let me see if IIRC.  You, Eric Fifer, had said that cat is forcing binary mode
>file processing regardless of the text/binary mode default settings.  Cat,
>IIRC, comes from the textutils package.  This implies that cat is a text
>utility and processing of files should default to text mode processing.
>
>IIRC, you had also suggested a switch --binmode for processing binary files
>with cat.  I believe that this should be the case.  So given this cat should be
>changed to:
>
>Process stdin in text mode and stdout in binary mode.
>Process stdin and stdout in binary mode if --binmode is given.
>Process stdin and stdout in text mode if --textmode is given.
>Process stdin in binary if --binmode-in is given.
>Process stdout in text mode if --textmode-out is given.
>The switch --textmode-in and --binmode-out should also be supported.
>
>Comments?
>
>Cheers,
>
>=====
>---
>    Earnie Boyd: <mailto:earnie_boyd AT yahoo DOT com>
>             __Cygwin: POSIX on Windows__


If you want my opinion, cat under Cygwin should open files using the MS
text mode option (which reads text or binary files properly) and write 
it as the target file system or pipe suggests by default.  The flags you
suggest are fine options.  Of course, they should work on files and 
stdin/stdout in the same way.


Larry Hall                              lhall AT rfk DOT com
RFK Partners, Inc.                      http://www.rfk.com
118 Washington Street                   (508) 893-9779 - RFK Office
Holliston, MA 01746                     (508) 893-9889 - FAX



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019