Well, then, whichever way. We're drifting off the original topic,
   which was 'should d2u-and-friends (or equivalents) be added to
   coreutils?'.  Can we address Mike's original question now, before
   he gets completely discouraged by this side-track? :-)

Personally, I think dos2unix is such a simple and seldomly used hack
to write in one line of sed that I don't see the point of it being
included[0].  To wit:

cat FILE | sed 's/
$//'  # CR/LF to LF.
cat FILE | sed 's/$/\r/'  # LF to CR/LF.

Also, should other types of line-endings be handled?  Like for example
CR-only line-endings (old Mac format IIRC).

[0]: Many of the things in coreutils can be written using one line of
sed, like tac, basename, dirname, but these are much more general
tools than dos2unix; compare the number of times you do dirname or tac
with dos2unix.  IMHO.

Cheers.


_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to