[REBOL] tailing file ? Re:
From: jelinem1:nationwide at: 22-Sep-2000 16:59
If the file is small enough to read it all into memory the solution is too
simple. Due to the nature of why one uses tail in the first place, though,
that scenario is too good to be true. What you would have to do is open a
port on the file, go to the end of the file (would 'tail work for file
positioning?) then backup, counting eol characters (or char sequences). Not
real slick when you have to code it for the first time, but add this to
your dialect and voila! you have a REBOL easy-to-use UNIX tail.
After you've written it, send it to me so I'll have it, too. :)
- Michael Jelinek
BTW, UNIX tail displays the last x lines of a file to the screen (standard
out).
[youpi--technologies--wanadoo--fr] on 09/22/2000 06:00:47 AM
From: [youpi--technologies--wanadoo--fr] on 09/22/2000 06:00 AM
Please respond to [list--rebol--com]
To: [list--rebol--com]
cc:
Subject: [REBOL] tailing file ?
Would like to do an equivalent of tail function of Unix under Windows. Is
there any straight way to do that easily in Rebol ?
I hope to contribute more efficiently in rebol list in a few month when I
will know rebol better.
Thanks.