From: Mischa POSLAWSKY Date: Sat, 7 Sep 2019 16:11:46 +0000 (+0200) Subject: indicate limited results in stats X-Git-Tag: v1.04~4 X-Git-Url: http://git.shiar.nl/barcat.git/commitdiff_plain/v1.03-19-g0938debbad?hp=0d44d3beafcd2718b0b0742d90d4745d1e241e4f indicate limited results in stats --- diff --git a/barcat b/barcat index 2c11048..c9b36ca 100755 --- a/barcat +++ b/barcat @@ -171,6 +171,11 @@ while ($nr <= $#lines) { show_lines(); if ($opt{stat}) { + if ($opt{hidemin} or $opt{hidemax}) { + $opt{hidemin} ||= 1; + $opt{hidemax} ||= @lines; + printf '%s of ', sum(@values[$opt{hidemin} - 1 .. $opt{hidemax} - 1]) // 0; + } my $total = sum @order; printf '%s total', $total; printf ' in %d values', scalar @values;