Jason Van Cleve wrote:

Incidentally, I don't really mind the fact that sed won't acknowledge
other, less perfect end-of-line conventions, assuming there is genuine
value in so much pedantry.

DOS does DOS style stuff. Unix does likewise.

 I just think it would help to document that
behavior explicitly, for I cannot be the first person to have bumped
into this problem.

See: http://www.student.northpark.edu/pemente/sed/sedfaq3.html

Search for "DOS".

You apologists may say I had only to put two and two
together: to assume a particular treatment based on the unix
convention. But let's remember why we document things at all, to make
them easier to learn and understand.


You'll only run into it once to remember it.

I sense much hostility toward DOS newlines, a foolish relic from the
days of dot-matrix printers, as I understand.

Funny how unix has been around much longer than DOS, huh?

I actually think it's a relic of LINE printers, where you had to specify that the line was supposed to feed AND the carriage was supposed to return.

 However, there's little
point in pretending they don't exist, or that a developer using linux
will never encounter them.

No, but any developer that has been at it more than 5 minutes will know... and know how to take care of the issue.

It's that basic.

 And pardon me, but I can't help thinking a
command-line switch in sed enabling "$" to work with different newline
formats would make the tool more useful.

Kinda moot here. Take it up with the gnu folks. They are the ones that can make it or break it.

What we think here is of little relevance.

OR, edit the sed source, and make your own WITH this command line parameter. Just remember that your scripts won't be portable.

Damn, there's that remembering things again.... Must work on that.

Russ
_______________________________________________
EUGLUG mailing list
euglug@euglug.org
http://www.euglug.org/mailman/listinfo/euglug

Reply via email to