Re: Reading LAST line from text file without iterating through the
file?
On Sat, 26 Feb 2011, Peter Duniho wrote:
On 2/26/11 9:27 PM, Arved Sandstrom wrote:
The usefulness of the term "text file" for me is that it describes a
file that can be opened, viewed and used by every application, tool and
utility, on every OS and platform, that purports to be a "text editor".
Then I think you need to define "text file" more narrowly than what is
actually out there. In this thread alone, there have been mentioned a
number of true text file formats that are simply not readable in your
average or even above-average text editor found on mainstream OSs.
Either (a) according to Arved's definition, which is highly appealing to
me, they are not true text file formats, or (b) they *are* readable with
the standard text editors *on the OSs on which they are found*, in which
case, perhaps they are.
Perhaps talking about plain text is a bit like talking about plain
speaking. I might deny that saying "alea iacta est" is plain speaking, and
i would be correct where i'm standing, because i'm standing in an
English-speaking country, but in the Vatican or ancient Rome, it would
have been perfectly plain. The term 'plain' need not mean the same thing
in all times and places.
Nonetheless, in general discourse on a newsgroups like this, there is a
presumption that we're standing in the lands of the tribe of Ken Thompson,
which has come to occupy the greater part of the world, and than plain
text means ASCII or one of its successors, with lines terminated by CR
and/or LF, and no funny business. This is not a universal truth, but it is
a truth where we are right now.
tom
--
One chants out between two worlds Fire - Walk With Me.