coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] wc: add -v option to print total counts every second.


From: Stephane Chazelas
Subject: Re: [PATCH] wc: add -v option to print total counts every second.
Date: Fri, 11 Mar 2016 13:22:36 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

2016-03-11 12:34:21 +0000, Pádraig Brady:
> On 11/03/16 09:19, Sina Siadat wrote:
> >* src/wc.c: add -v option and write live counts to stderr.
> 
> I'd be inclined to call it --progress.

Or --progress[=seconds]

> However I'm also inclined to think this might be better
> placed in a separate utility.  For example I see that pv
> can already count lines and bytes with -b and -l.
[...]

I'd tend to agree with that.

But one annoying limitation with pv is that the number is
printed in "human" form always (no way to have it raw), so after
1000, you get 1k.

Also note that  you have to choose between bytes and lines, you
can't have both, that's really two different modes of operations.

(there's currently no equivalent for -L or -m or -w either).

Adding timer capability to awk could be another approach.

-- 
Stephane




reply via email to

[Prev in Thread] Current Thread [Next in Thread]