From: Dobrica Pavlinusic Date: Tue, 27 Jun 2023 09:37:36 +0000 (+0200) Subject: added date-df header for .log files X-Git-Url: http://git.rot13.org/?p=MojoFacets.git;a=commitdiff_plain;h=36f5f56b9162b139fc9ab28f4d34fd877ddd624a added date-df header for .log files --- 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/, $_);