projects
/
zc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
442647b
)
correct stripping of ascii dump
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sat, 3 Oct 2020 18:09:38 +0000
(20:09 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sat, 3 Oct 2020 18:09:38 +0000
(20:09 +0200)
unpack.pl
patch
|
blob
|
history
diff --git
a/unpack.pl
b/unpack.pl
index
9ffb3ec
..
0251ba8
100755
(executable)
--- a/
unpack.pl
+++ b/
unpack.pl
@@
-9,6
+9,8
@@
use Protocol;
my $debug = $ENV{DEBUG};
+$| = 1;
+
warn "## protocol = ",dump( $protocol ) if $debug;
my $pkg_nr = 0;
@@
-157,8
+159,8
@@
while(<>) {
( $timestamp, $sensor, $imei, $up_down ) = ( $1, $2, $3, $4 );
$stat->{$sensor}->{$imei}->{$up_down}++;
} elsif ( m{^\s+} ) {
- s/\s\s\S\S\S+//g; # remove ascii
s/^\s+/ /;
+ s/\s\s.+$//g; # remove ascii
$raw .= $_;
warn "++ $_\n";
} else {