/usr/share/kannel/contrib/webalizer/multi-line.pl is in kannel-extras 1.4.4-4.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | #!/usr/bin/perl -w
# This script joins multi-line entries from access.log
# cat bearerbox_access.log | multi-line.pl
$|=1;
$linenum=0;
$result="";
while($line = <STDIN>) {
$linenum++;
chop($line);
next if $line =~ /Log begins/;
next if $line =~ /Log ends/;
if ( $result ne "" && $line =~ /^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2} .+? .+? \[SMSC:.*?\] \[SVC:.*?\] \[from:.*?\] \[to:.*?\] \[flags:.:.:.:.:.+?\] \[msg:.+?:.*$/) {
$result = "";
print STDERR "$linenum:$line\n";
}
$result .= $line;
if($result =~ /^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2} .+? .+? \[SMSC:.*?\] \[SVC:.*?\] \[from:.*?\] \[to:.*?\] \[flags:.:.:.:.:.+?\] \[msg:.+?:.*?\] \[udh:.+?:.*?\]$/i) {
print $result."\n";
$result="";
}
}
|