Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

[We] use bad software and bad machines for the wrong things. -- R. W. Hamming


devel / comp.unix.shell / new interactive utility: pw ("Pipe Watch").

SubjectAuthor
o new interactive utility: pw ("Pipe Watch").Kaz Kylheku

1
new interactive utility: pw ("Pipe Watch").

<20220428141118.292@kylheku.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5276&group=comp.unix.shell#5276

  copy link   Newsgroups: comp.unix.shell comp.unix.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: 480-992-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.unix.shell,comp.unix.programmer
Subject: new interactive utility: pw ("Pipe Watch").
Date: Thu, 28 Apr 2022 22:35:48 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 52
Message-ID: <20220428141118.292@kylheku.com>
Injection-Date: Thu, 28 Apr 2022 22:35:48 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="eb7799e431a64fe1e4f6b7cb38351f39";
logging-data="22880"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/7lQz3wCrXVfhMj+RW3NVVNjJCFCcckPU="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:y3vM18vFArkk3T9Yvq9e1Fs+hes=
 by: Kaz Kylheku - Thu, 28 Apr 2022 22:35 UTC

Hi All,

I wrote an interative utility called "pw". This works similarly to a
pager:

yourcommand | pw

Man page and git repo: https://www.kylheku.com/cgit/pw/tree/pw.1

Just like an interative pageer such as "less", Like a pager, pw reads
lines from standard input and provides a display. However, it has
a different paradigm. "pw" keeps only a small FIFO buffer of lines
in memory (default 15), which is continuously updating. You cannot go
back in history. "pw" updates the display whenever a period of input
inactivity occurs (default 1s), or else once every lnog interval (10 s).

Platforms: I built this on Solaris 10, GNU/Linux, Mac OS. It compiled
on OpenBSD, but something is wrong. The tiny Makefile needs gmake.

"pw" offers

- horizontal scrolling through long lines (h, l keys or arrows).
- suspend/resume: freeze the display, while the FIFO keeps running.
- Vi-like commands:
:w file # save display to file
:a file # append display to file
:! cmd # pipe display to command

- Built in "grep stack":
:g regex # allow only lines matching regex into the FIFO
:v regex # allow only lines not matching regex into the FIFO
- patterns accumulate into a stack:
:r # pop most recent pattern from stack
:r! # pop all patterns

- trigger mode (like a scope!) to "freeze" recurring patterns:
/pattern # synchronize bottom line in display to pattern
?pattern # synchronize top line in display to pattern

- history recall and editing for : commands and /, ? trigger
patterns. (Ctrl-P, Ctrl-N or arrows).
- very basic editing: backspace, Ctrl-W, Ctrl-U.

To get started, try:

tcpdump -i <if> | pw

you will be surprised at how you can drill down into things.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor