On Tue, May 26, 2020 at 11:39:42PM +0200, Stefano Zacchiroli wrote:
> I'm hereby proposing the inclusion of the attached "stocat" utility to
> moreutils. It's like cat, but output lines with a given probability,
> defaulting to 10%. It's very useful for random sampling (and *much*
> more efficient at that than using "shuf" which is unwieldy on very
> large inputs) and, while it can be implemented instead with awk/perl
> oneliners, those oneliners aren't very mnemonic and are error prone.

Heya, as I haven't heard back about this, but others have asked me about
how to best use stocat, I've now released it as an independent tool
here:

  https://gitlab.com/zacchiro/stocat

I'm happy to reconsider if/when it gets integrated into moreutils.

Cheers
-- 
Stefano Zacchiroli . z...@upsilon.cc . upsilon.cc/zack . . o . . . o . o
Computer Science Professor . CTO Software Heritage . . . . . o . . . o o
Former Debian Project Leader & OSI Board Director  . . . o o o . . . o .
« the first rule of tautology club is the first rule of tautology club »

Reply via email to