Would the seek command help?

Presumably it would move the file pointer to the specified point without having to load the entire file into RAM.

If you knew your lines were shorter than a given length, say 1000 chars, you could so something like:

  open file tFile for append
  seek relative -1000 in file tFile
  repeat
     read from file tFile until cr
     if it is not empty then
        put it after tBuffer
     else
        delete last line of tBuffer
        write tBuffer to file tFile
     end if
  end repeat
  close file tFile

This is off the top of my head to test before using on real data. ;)

--
 Richard Gaskin
 Fourth World
 Rev training and consulting: http://www.fourthworld.com
 Webzine for Rev developers: http://www.revjournal.com
 revJournal blog: http://revjournal.com/blog.irv
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to