Discussion:
Bug#694057: ed: add a mode to deal with crlf-terminated lines
(too old to reply)
Matthew Vernon
2012-11-23 12:00:03 UTC
Permalink
Package: ed
Version: 1.6-2
Severity: wishlist
Tags: upstream

Hi,

ed doesn't deal very nicely with text files generated on inferior
operating systems, e.g. those that have lines that end crlf. The
failure mode is that queries / replacement regexps involving $ don't
do what you want.

It would be nice if ed could have a -crlf mode or similar (or even
arbitrary line-ending mode). Any chance? :)

Thanks,

Matthew

-- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-3-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages ed depends on:
ii dpkg 1.16.9
ii install-info 4.13a.dfsg.1-10
ii libc6 2.13-35

ed recommends no packages.

ed suggests no packages.

-- no debconf information
--
To UNSUBSCRIBE, email to debian-bugs-dist-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Lev Lamberov
2018-03-17 08:40:02 UTC
Permalink
Hi,

there's a somewhat old (from 2012) wishlist bug in the Debian BTS
[694057], asking for a proper support of crlf-terminated lines (or
arbitrary line-endings) in ed. Are there any plans to support the
requested mode?

[694057] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=694057
Post by Matthew Vernon
ed doesn't deal very nicely with text files generated on inferior
operating systems, e.g. those that have lines that end crlf. The
failure mode is that queries / replacement regexps involving $ don't
do what you want.
It would be nice if ed could have a -crlf mode or similar (or even
arbitrary line-ending mode). Any chance? :)
I'm not pretending to implement it, just want to let upstream know about
the requested functionality.

Regards,
Lev Lamberov
Antonio Diaz Diaz
2018-03-17 19:40:02 UTC
Permalink
Hi Lev,
Post by Lev Lamberov
there's a somewhat old (from 2012) wishlist bug in the Debian BTS
[694057], asking for a proper support of crlf-terminated lines (or
arbitrary line-endings) in ed. Are there any plans to support the
requested mode?
I knew about the issue, but I have not yet done anything about it
because it seems neither easy nor well defined, and implementing it
properly is likely to cause some headaches, for example when stripping
escaped newlines. IMHO using two characters to end a line is a bad idea.

I'll make an attempt at a --crlf option as soon as I find the time.

Best regards,
Antonio.
Lev Lamberov
2018-03-18 06:20:01 UTC
Permalink
Post by Antonio Diaz Diaz
Post by Lev Lamberov
there's a somewhat old (from 2012) wishlist bug in the Debian BTS
[694057], asking for a proper support of crlf-terminated lines (or
arbitrary line-endings) in ed. Are there any plans to support the
requested mode?
I knew about the issue, but I have not yet done anything about it
because it seems neither easy nor well defined, and implementing it
properly is likely to cause some headaches, for example when stripping
escaped newlines. IMHO using two characters to end a line is a bad idea.
I'll make an attempt at a --crlf option as soon as I find the time.
Thank you for your answer, Antonio.

Loading...