From: minima Date: Wed, 8 Aug 2001 16:51:45 +0000 (+0000) Subject: make sure that the actual line is printed in grepdbg & watchdbg esp. with X-Git-Tag: R_1_48~108 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=c876cb33f90144dd899169954ffeb3285302897f;p=spider.git make sure that the actual line is printed in grepdbg & watchdbg esp. with ALL the '^' and leading space characters as they really are --- diff --git a/Changes b/Changes index 20cea211..0df34ad5 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,8 @@ 02Aug01======================================================================= 1. correct manual and help references on accept/route and reject/route. Thanks to ea1dav for pointing out the errors +2. make sure that the actual line is printed in grepdbg & watchdbg esp. with +ALL the '^' and leading space characters as they really are 30Jul01======================================================================= 1. changes to manuals to add links etc. (g0vgs) 23Jul01======================================================================= diff --git a/perl/grepdbg b/perl/grepdbg index a14bf301..467c7853 100755 --- a/perl/grepdbg +++ b/perl/grepdbg @@ -63,9 +63,8 @@ for my $entry (@list) { if ($line =~ m{$string}io) { for (@prev) { s/([\x00-\x1f\x7f-\xff])/sprintf("\\x%02X", ord($1))/eg; - my @line = split '\^'; - my $t = shift @line; - print atime($t), ' ', join('^', @line), "\n"; + my ($t, $l) = split /\^/, $line, 2; + print atime($t), ' ', $l, "\n"; } @prev = (); } diff --git a/perl/watchdbg b/perl/watchdbg index dec39709..720904bf 100755 --- a/perl/watchdbg +++ b/perl/watchdbg @@ -77,12 +77,11 @@ sub printit my $line = shift; chomp $line; $line =~ s/([\x00-\x1f\x7f-\xff])/sprintf("\\x%02X", ord($1))/eg; - my @line = split '\^', $line; - my $t = shift @line; + my ($t, $l) = split /\^/, $line, 2; my ($sec,$min,$hour) = gmtime((defined $t) ? $t : time); my $buf = sprintf "%02d:%02d:%02d", $hour, $min, $sec; - print $buf, ' ', join('^', @line), "\n"; + print $buf, ' ', $l, "\n"; } } exit(0);