This is the mail archive of the cygwin 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]
Other format: [Raw text]

Re: sed and dos format


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/


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