.ssh/config: cosmo8: -User; it is not used by Termux.
[nethome.git] / bin / upsc-log-diff
index 6c21015..7ca44e3 100755 (executable)
@@ -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;