On Wed, Apr 27, 2022 at 5:20 PM Kaz Kylheku <k...@kylheku.com> wrote: > Hi konsolebox, > > I was inspired by this thread to hack up a little utility called pw (Pipe > Watch) > over a couple hours late last night. > > Here is a link to the man page: > > https://www.kylheku.com/cgit/pw/tree/pw.1 > > You pipe your input to pw, similarly in concept to a pager. It doesn't behave > like a pager though; it maintains a small FIFO of the last bunch of lines > of the data source, which are updated to an interactive display. The FIFO > is continuously pumping data; the display just takes snapshots. > > I managed to cram a few features into it, like scrolling left-right over long > lines, a suspend mode which freezes the display, and some Vi-like > colon commands to save/append what is displayed to a file, or send it to a > pipe. > > If you have time, give it a try.
I tried it, thank you. I noticed that you missed adding a colon next to n in "ni:l:d". It works when I run `tail -f /var/log/messages | pw -d` but it only displays a single line. But if I add `-n +1` to tail, it shows all 15 lines. `tail -f /var/log/messages | cat` shows 10 lines. Is there any way I can configure pw to initially display 10 lines instead? -- konsolebox