In article <11ed…@dont-email.me>, Janis Papanagnou <jani…@hotmail.com> wrote:
>On 2026-11-27 22:42, Dan Cross wrote:
>> >> Years ago, on Plan 9 (which does not have a `find` command), I >> had the epiphany that `find` was really just a series of filters >> with one addition: an `or` operator. I wrote something called, >> `sor`, for "stream or", that took a series of "tests" as command >> line arguments and applied each in turn to a series of strings >> it read from stdin; it was assumed that each string named a >> file, and the tests would probe characteristics of those files. >> If any test succeeded, it emitted the string, otherwise it >> didn't. >> >> I wrote another little program called `walk` that just generated >> a list of file names rooted at some set of directories (I think >> I added a `-d` option to limit depth). Between `walk`, `sor`, >> the shell, and the usual complement of unix-y filters, I could >> do pretty much whatever `find` could do. >> >> It wasn't super fast, but it was a fun little exercise.
> >The advantage of Unix philosophy to comparably simply build ones >own tools. :-) > >Have you noticed (and probably tried?) the 'tw' ("tree-walk") tool >from AT&T's AST package? - I'd be interested to hear from users of >'tw' what they think about it from their practical experience with >it.
Hmm, I don't think I have. In fact, I'm fairly certain I'd never heard of it before; at least, it didn't make an impression. Looking at it now, or at least the troff source for a blurb about it, it seems fairly un-Unixy to me; it's more like a DSL for walking directory hierarchies: https://github.com/att/ast/blob/master/src/cmd/tw/PROMO.mm - Dan C.