From c7869bb57730ae9d7e55f8aff2d1792b42d1984b Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Mon, 29 Feb 2016 14:57:23 +0000 Subject: [PATCH] Add total to csv2human --- etc/profile.d/functions | 2 ++ 1 file changed, 2 insertions(+) diff --git a/etc/profile.d/functions b/etc/profile.d/functions index 1f513ae2..7943a152 100644 --- a/etc/profile.d/functions +++ b/etc/profile.d/functions @@ -469,6 +469,7 @@ END { exit unless @lines; $i = 0; $t = -1; + $tot = @lines - ($noheader ? 0 : 1); $format = "| ".join(" | ",map {$t+=$_+3; "\%-".$_."s"} @len)." |".chr(10); $sep_line = "+".join("+",map {("-"x($_+2))} @len)."+".chr(10); print $sep_line; @@ -477,6 +478,7 @@ END { print $sep_line if !$noheader and !$i++; } print $sep_line; + print "$tot Records\n"; } ' $noheader } -- 2.47.3