git://git.jankratochvil.net
/
nethome.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cf96bcb
)
upsc-log-diff: +$line
author
Jan Kratochvil
<jan@jankratochvil.net>
Mon, 21 Jun 2021 12:15:09 +0000
(14:15 +0200)
committer
Jan Kratochvil
<jan@jankratochvil.net>
Mon, 21 Jun 2021 12:15:09 +0000
(14:15 +0200)
bin/upsc-log-diff
patch
|
blob
|
history
diff --git
a/bin/upsc-log-diff
b/bin/upsc-log-diff
index
6c21015
..
7ca44e3
100755
(executable)
--- a/
bin/upsc-log-diff
+++ b/
bin/upsc-log-diff
@@
-12,7
+12,9
@@
my $F="/var/log/upsc.log";
open F,$F or die "$F: $!";
my $prev;
my $this="";
+my $line;
while (<F>) {
+ $line=$.;
chomp;
if (!/^$/) {
$this.="$_\n";
@@
-30,8
+32,8
@@
while (<F>) {
local *TD;
my $td="diff -u $ta $tb|";
open TD,$td or die "$td: $!";
- <TD>=~/^\Q--- / or die
$_
;
- <TD>=~/^\Q+++ / or die
$_
;
+ <TD>=~/^\Q--- / or die
"line $line: $_"
;
+ <TD>=~/^\Q+++ / or die
"line $line: $_"
;
while (<TD>) {
next if /^[@ ]/;
print;