Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Weirdness in comm(1)

At Sun, 29 Nov 2009 01:42:08 +0700, Robert Elz <kre%munnari.OZ.AU@localhost> 
Subject: Re: Weirdness in comm(1)
> Personally, I think that all text processing applications (ones intended
> to process text files) should be defined to have undefined behaviour when
> given a non-text file as input (including not being composed of a number of
> lines (including 0) each of which ends in a \n.

I think it may be easier and safer all around to always think of
newlines as separators rather than as _necessary_ terminators in unix
text files.

Of course lots of tools fail to work this way now, so many so that
common text editors either automatically add a final newline to a text
file, or offer to add it, where the user did not type one.  Perhaps they
could be fixed in time though rather than just continuing to allow their
current undefined behaviour.

                                                Greg A. Woods
                                                Planix, Inc.

<>       +1 416 218 0099

Attachment: pgp4yPU4eheKD.pgp
Description: PGP signature

Home | Main Index | Thread Index | Old Index