R
Robin Wenger
Is it possible to read the last text line from a text file WITHOUT reading the previous (n-1) lines?
Robin
Robin
Is it possible to read the last text line from a text file WITHOUT reading the previous (n-1) lines?
Robin
Is it possible to read the last text line from a text file WITHOUT reading the previous (n-1) lines?
Robin
Is it possible to read the last text line from a text file WITHOUT reading the previous (n-1) lines?
Yes, but it's tricky. You need a random-access file and seek backwards
to a newline.
Is it possible to read the last text line from a text file WITHOUT reading the previous (n-1) lines?
$ echo RandomAccessFile | hivemind | cut
Is it possible to read the last text line from a text file WITHOUT reading the previous (n-1) lines?
Robin
Yes, under certain circumstances. For example, if you know "n" and know thatIs it possible to read the last text line from a text file WITHOUT
reading the previous (n-1) lines?
Robin
Is it possible to read the last text line from a text file WITHOUT reading the previous (n-1) lines?
Is it possible to read the last text line from a text file WITHOUT reading the previous (n-1) lines?
"Record formats" are not relevant here, nor was someone else's concern
about compressed formats -- the OP clearly said "a text file", by which
is generally understood flat ASCII with CR, LF, or CRLF as line delimiter.
[...]
Obsolete systems do not interest me.
then…
Since those days, the world has standardized on ASCII flat files for
text files.
LOL!
Windows text files are flat ASCII files (with CRLF line ends). Mac text
files are flat ASCII files (with CR line ends). Unix text files are flat
ASCII files (with LF line ends). And that exhausts 99.99% of the
operating system market share right there, if not more, not counting
smartphones which are all too modern to be using weird legacy formats for
text files.
I can't remember the last time I had to interoperate with any machine
that had anything other than standard ASCII as the native format for text
files. It's gotta be decades.
Obsolete systems do not interest me.
Since those days, the world has
standardized on ASCII flat files for text files.
Ken said:[...]
Obsolete systems do not interest me.
then…
Since those days, the world has standardized on ASCII flat files
for text files.
LOL!
Windows text files are flat ASCII files (with CRLF line ends). Mac
text files are flat ASCII files (with CR line ends). Unix text files
are flat ASCII files (with LF line ends). And that exhausts 99.99%
of the operating system market share right there, if not more, not
counting smartphones which are all too modern to be using weird
legacy formats for text files.
I can't remember the last time I had to interoperate with any
machine that had anything other than standard ASCII as the native
format for text files. It's gotta be decades.
Ken said:On 2/24/11 9:06 PM, Ken Wesson wrote:
[...]
Obsolete systems do not interest me.
then…
Since those days, the world has standardized on ASCII flat files
for text files.
LOL!
Windows text files are flat ASCII files (with CRLF line ends). Mac
text files are flat ASCII files (with CR line ends). Unix text files
are flat ASCII files (with LF line ends). And that exhausts 99.99%
of the operating system market share right there, if not more, not
counting smartphones which are all too modern to be using weird
legacy formats for text files.
I can't remember the last time I had to interoperate with any
machine that had anything other than standard ASCII as the native
format for text files. It's gotta be decades.
I remember when we used a seven-bit character code to write my native
language. We could toggle the way we viewed the character codes where
we had put those characters that were not in ASCII. It was either
brackets and braces or those letters, but never both.
V{nkyr{-{{kk|si{. It's not a happy memory.
Used by "obsolete systems". A key point in my amusement.
Windows text files are flat ASCII files (with CRLF line ends).
it's not (...) ASCII (...).
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.