projects
/
MojoFacets.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
832c828
)
added date-df header for .log files
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Tue, 27 Jun 2023 09:37:36 +0000
(11:37 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Tue, 27 Jun 2023 09:37:36 +0000
(11:37 +0200)
lib/MojoFacets/Import/Log.pm
patch
|
blob
|
history
diff --git
a/lib/MojoFacets/Import/Log.pm
b/lib/MojoFacets/Import/Log.pm
index
49be8fd
..
e0f03b1
100644
(file)
--- 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/, $_);