Reading files backwards

shop shop at paynesparkman.com
Mon Apr 22 10:31:01 EDT 2002


I have found that referring to files as URLs is a beautiful thing because it
allows you to refer to a file as if it were a variable which means you can
use all your chunk expressions on it.  Sooo, try

put the last line of url "file:blabla.txt" into r

The only exception I've found to my opening statement is that delete doesn't
seem to work with URLs.  I.E. delete the last line of url "file:blabla.txt"
returns an error.

Rich
Payne Sparkman Mfg.
shop at paynesparkman.com

----- Original Message -----
From: <xbury.cs at clearstream.com>
To: <metacard at lists.runrev.com>
Sent: Monday, April 22, 2002 7:54 AM
Subject: Reading files backwards


> Hi Gang,
>
> Got a problem which may help others if there is a solution...
> I need to read the very last line from a file that's 3 - 20MBs large...
> So I tried:
>
> open file blabla for reading
> read from file blabla for -100
> put the result into r
> put it into x
> close file blabla
>
> Unfortunately I never got an answer back, MC crashed...
> No result, no error...
>
> I dont want to resort to external programs (tail.exe) to do this...
> Does anyone have a standard scripted solution?
>
> Thanks in advance
> Xavier
>
>
>
> Visit us at http://www.clearstream.com/_focus1.htm
>
> IMPORTANT MESSAGE
>
> Internet communications are not secure and therefore Clearstream
International does not accept legal responsibility for the contents of this
message.
>
> The information contained in this e-mail is confidential and may be
legally privileged. It is intended solely for the addressee. If you are not
the intended recipient, any disclosure, copying, distribution or any action
taken or omitted to be taken in reliance on it, is prohibited and may be
unlawful. Any views expressed in this e-mail are those of the individual
sender, except where the sender specifically states them to be the views of
Clearstream International or of any of its affiliates or subsidiaries.
>
> END OF DISCLAIMER
> _______________________________________________
> metacard mailing list
> metacard at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/metacard




More information about the metacard mailing list