From 0938debbadf7ca76424951f37363d78ade4c8775 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sat, 7 Sep 2019 18:11:46 +0200 Subject: [PATCH] indicate limited results in stats --- barcat | 5 +++++ 1 file changed, 5 insertions(+) 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; -- 2.30.0