delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/08/24/16:31:45

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <412BA662.703AA852@dessent.net>
Date: Tue, 24 Aug 2004 13:34:42 -0700
From: Brian Dessent <brian AT dessent DOT net>
Organization: My own little world...
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: sed and dos format
References: <NGBBLLIAMFLGJEOAJCCEOEFADNAA DOT _garbage_collector_ AT telia DOT com>
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com

Hannu E K Nevalainen wrote:

> james pentland also wrote:
> > this makes sed unusable or undesirable for a large
> > number of files i might want to edit.
> 
> I don't take this as an implication of 'bulk' edits. So your "many files"
> falls on this. Also; using sed implies automatic changes.

My response was addressing the point of view that he had lots of files
for a certain application that must remain with DOS line endings and
that they would all possibly be handled in various ways by various sed
scripts.  Obviously for a few random text files u2d is easier.

The poster asked about how to make sed work as he wanted, and to me
making a text mount addresses that question most directly.  Obviously if
he knows how to use sed he is aware of how to use u2d or add an explicit
\r in his scripts, so telling him to use u2d does not paint the whole
picture.  "How do I make X work? Use Y." is an incomplete response when
X can easily be made to work as requested.

I agree that text mode mounts have lots of issues but in the context of
his post I invisioned a specific application in a specific drectory or
tree that could all be mounted text, seperate from the rest of the
system.  Obviously mounting all kinds of things text without
consideration is a bad idea.

Regarding efficiency, I am strictly talking about the code path.  Having
Cygwin add a \r when the file is written the first time should be more
efficient than reprocessing the whole thing after it's been processed
the first time, or at the least reparsing the lines in an output filter
pipeline to insert \r's.  Again my reply was under the context of "lots
of files that *must* remain DOS-mode" where accidently forgetting a u2d
somewhere breaks things just as bad as some obscure text-mode bug in
some app.

This is beginning to get trollish so I will cease further comment in
this thread.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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