off the top of my head this would read the entire file in order
Code:
var %file <yourfilehere>
var %lines $lines( %file )
var %i 1
while ( %i <= %lines ) {
  echo -a $read( %file ,n, %i )
  inc %i 1
}


unless you wanted every iteration in a new commmand

Code:
set %file <yourfilehere>
set %lines $lines(%file)
set %i 1
if ( %i > %lines ) { %i = 1 }
echo -a $read( %file ,n, %i )
inc %i 1


everytime the code is executed it will read the next line. Once it reaches the end of the file, it starts over. If you doin't want it to start over, remove the "if" line

or this would work for your case

Code:
$read(<yourfile>,n, $lines(<yourfile>) )

reads the last line of the file, which would be the last line written with the write command if no switches are used.

Last edited by CakerX; 02/01/07 12:49 PM.