]> git.nbdom.net Git - nb.git/commitdiff
--total
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Wed, 3 May 2023 21:51:26 +0000 (23:51 +0200)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Wed, 3 May 2023 21:51:26 +0000 (23:51 +0200)
bin/csv2human

index ab93d964cdb226014e3ac741cf928a7ed8ee24cb..c0645304a979b0fcaf2481107ac9d7b06a936c17 100755 (executable)
@@ -27,6 +27,7 @@ my $DEBUG = $main::DEBUG = 0;
 
 my %Opt = (
        'header' => 1,
+       'total' => 1,
        'sep' => "\t",
 );
 get_options(\%Opt);
@@ -113,7 +114,7 @@ while (my $line = shift @lines)
 }
 
 print $sep_line;
-print "$tot Records\n" if $VERBOSE;
+print "$tot Records\n" if $Opt{total};
 
 #################################################################################
 #
@@ -225,6 +226,7 @@ Description!
 
  -option[header|h!]    Print or not header separotor after first row
  -option[sep|s=s]       Separtor
+ -option[total|t!]       Print number of total record (default: $Opt{total})
  -option[format|f!]       Only format according to option --sep. Usefull for coding
  -option[verbose|v+]   Verbose mode: increase the verbosity level.
  -option[debug+]       Debug mode: increase the verbosity level.