From 9b4a549f0eb3bfc68f5965cf21437eff85cb608b Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Thu, 20 Apr 2023 02:58:58 +0200 Subject: [PATCH] VERBOSE=0 when option --format --- bin/csv2human | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/bin/csv2human b/bin/csv2human index 5eb27e87..ab93d964 100755 --- a/bin/csv2human +++ b/bin/csv2human @@ -42,6 +42,10 @@ $main::_DATA_ = undef; use Encode; binmode( STDOUT, "utf8:" ); + +# +# Calculate lengths +# my @len = (); my @lines = (); @@ -61,6 +65,9 @@ while (<>) { exit unless @lines; +# +# Build format string +# my $tot = @lines - ($Opt{header} ? 1 : 0); my $t = -1; @@ -72,8 +79,12 @@ if ($Opt{format}) { my $sep = " ".$Opt{sep}." "; $format = join($sep,map {$t+=$_+length($sep); "\%-".$_."s"} @len).chr(10); $sep_line = ""; + $VERBOSE = 0; } +# +# Print +# print $sep_line; my $i = 0; my $count; -- 2.47.3