I didn't know $read(file,N) still read through looking when you supply the line number...
Anyway I had not used fread before and so I tested it with this
alias readfile {
var %file = $sfile($logdir*.log)
var %parm = $$?="Enter word(s) to find"
.fopen logs %file
echo -a $fopen(logs).fname
echo -a errors: $ferr
:findnext
.fseek -w logs $+(*, %parm ,*)
if ($ferr > 0) { goto end }
if ($feof > 0) { goto end }
elseif ($ferr <= 0) { echo -a $fread(logs) | goto findnext }
:end
fclose logs
}
It is also fast but maybe more awkward than the /filter
any pointers on using the fread file handling?