On Thu, 19 Sep 2002, Stefan Moebius <[EMAIL PROTECTED]> wrote:

> Ok, I read some documentation on sed and perl. Pretty confusing and
> somewhat platform dependent.

Oh, it gets even more confusing as soon as you add Java and the
different regexp implementations to the mix 8-).  See the notes in the
manual page for the task we are talking about here.

> 1. We never want to inadvertently change existing linebreaks.

I think I agree (bad wording, I know), but the current implementation
does, it changes lineends to the current platforms style, potentially
changing them as it goes.

> 2. In line-mode it is impossible to change linbreaks.

See above.  If you run the task in line-mode on a file with \r\n
linebreaks on Unix, you will effectively strip the cariage returns.
so we don't change where the linebreak occurs, but we may change the
style of it.  On second thought, this sounds like a bug.

> Consequences:
> 2.1 In line-mode one cannot change the number of lines in a file.

Good goal +1

> 3. A line is always finally terminated by '\n', i.e. "\r\n\n" are
> two lines.

Nope.  No line-feeds at all on a Mac (at least on MacOS 9).

Stefan

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to