Todd C. Miller <mill...@openbsd.org> wrote:

> On Thu, 29 Sep 2022 23:30:54 -0400, Daniel Dickman wrote:
> 
> > > On Sep 29, 2022, at 8:24 PM, Joerg Sonnenberger <jo...@bec.de> wrote:
> > > 
> > > On Thu, Sep 29, 2022 at 08:39:16PM +1000, Jonathan Gray wrote:
> > >> wc counts items in files.  Finding the longest item indeed sounds
> > >> like a task better suited to awk.
> >
> > Doesn’t gnu wc show that tabs have length 8 rather than length 1?
> 
> Yes.
> 
> > Do the other wc implementations differ?
> 
> FreeBSD and NetBSD "wc -L" counts it as a single character.

How about if I want a feature that finds the shortest line?
Will that be -S?

And what about a feature to count dangling whitespace at the end of
lines?  -W looks available for use. Actually there are many flag
characters available, because wc hasn't jumped the shark yet, as ls did.

Imagine the eventual synopsis, it kind of rolls off the tongue

NAME
    wc - word, line, and byte or character, or longest or shortest
         line, or dangling whitespace count

I'm looking forward to wc being able to edit files, and for further
extensibility because awk is slow, it can include a lisp interpreter.
Or maybe it should compile and run rust programs?  Safer that way.

I'm sure there are other people have other desireable features which I
haven't listed. For instance, could wc.c be the scaffold to use for the
long-desired web browser to be included in OpenBSD?

Reply via email to