I have a logfile that is generating hundreds of lines per second – say, 12 specific lines, 16× per sec.

I want to run either a command-line or a shell script that can display this logfile neatly in real-time. But if I run `tail -f logfile.txt`, the text rapidly scrolls off the terminal window and can't be read by human eyes. I haven't yet mastered the command line so this is all I can think of doing right now.

I want the terminal window to just print 12 lines at a time and automatically refresh, something like:

```
// while ( Ctrl+C hasn't been hit )
// {
//   clear terminal window
//   print last 12 lines of logfile.txt
//   wait until logfile is 12 lines longer
// }

```

Any ideas?

EDIT: it turns out I can do `tail -f logfile.txt` and just set the terminal window height to 12. This gets me pretty close to what I want, but it seems like a "naive" approach. Hoping somebody has a more elegant solution.