projects
/
safeq
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
27f469f
)
added IP address as first column
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Tue, 26 Feb 2019 08:25:49 +0000
(09:25 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Tue, 26 Feb 2019 08:25:49 +0000
(09:25 +0100)
xq.pl
patch
|
blob
|
history
diff --git
a/xq.pl
b/xq.pl
index
854f21f
..
5245ab2
100755
(executable)
--- a/
xq.pl
+++ b/
xq.pl
@@
-35,23
+35,24
@@
warn "# info=",dump($info) if $debug;
my @headers = @{ $info->{hdrs} };
unshift @headers, 'id' if $op eq 'list';
my @headers = @{ $info->{hdrs} };
unshift @headers, 'id' if $op eq 'list';
+unshift @headers, 'IP';
print join("\t", @headers),"\n";
foreach my $l ( @{ $info->{info} } ) {
warn "## l=",dump($l) if $debug > 1;
print join("\t", @headers),"\n";
foreach my $l ( @{ $info->{info} } ) {
warn "## l=",dump($l) if $debug > 1;
- $l->[3]
=
$info->{stats}->[ $l->[3] ];
- $l->[4]
=
$info->{types}->[ $l->[4] ];
+ $l->[3]
.= ':' .
$info->{stats}->[ $l->[3] ];
+ $l->[4]
.= ':' .
$info->{types}->[ $l->[4] ];
- print join("\t", @$l), "\n";
+ print join("\t",
$ip,
@$l), "\n";
}
foreach my $l ( @{ $info->{jHst} } ) {
warn "## l=",dump($l) if $debug > 1;
}
foreach my $l ( @{ $info->{jHst} } ) {
warn "## l=",dump($l) if $debug > 1;
- $l->[2]
=
$info->{stsAry}->[ $l->[2] ];
- $l->[3]
=
$info->{types}->[ $l->[3] ];
+ $l->[2]
.= ':' .
$info->{stsAry}->[ $l->[2] ];
+ $l->[3]
.= ':' .
$info->{types}->[ $l->[3] ];
- print join("\t", @$l),"\n";
+ print join("\t",
$ip,
@$l),"\n";
}
}