Just to throw in one more option:
alias mytimer {
set -e %myvariable 1
.timermytimer -o 0 1 myfilter
}
alias -l myfilter {
filter -fkr $+(%myvariable,-,$calc(11+%myvariable)) mymessages.txt myalias
if ($filtered) inc %myvariable 12
else {
unset %myvariable
.timermytimer off
write -c mymessages.txt
echo -a Done!
}
}
alias -l myalias {
echo -s Here's the whole line: $1
}
/mytimer starts a timer that spits out 12 lines at a time, and clears the file after there's no more lines left.
If you stop it early and start again, it will repeat the same lines.