From 36f5f56b9162b139fc9ab28f4d34fd877ddd624a Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Tue, 27 Jun 2023 11:37:36 +0200 Subject: [PATCH] added date-df header for .log files --- lib/MojoFacets/Import/Log.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/MojoFacets/Import/Log.pm b/lib/MojoFacets/Import/Log.pm index 49be8fd..e0f03b1 100644 --- a/lib/MojoFacets/Import/Log.pm +++ b/lib/MojoFacets/Import/Log.pm @@ -19,11 +19,13 @@ sub data { my $data = { items => [] }; my $need_header = 1; + my @header; + @header = qw(Filesystem 1K-blocks Used Available Use% Mounted-on) if $path =~ m/date-df/; + open(my $fh, $path) || die "$path: $!"; while(<$fh>) { chomp; warn "## $_\n"; - my @header; chomp; my @v = split(/\s/, $_); -- 2.20.1