3 # watch the end of the current debug file (like tail -f) applying
4 # any regexes supplied on the command line.
8 # watchdbg g1tlh # watch everything g1tlh does
9 # watchdbg gb7baa gb7djk # watch the conversation between BAA and DJK
14 # search local then perl directories
16 # root of directory tree for this system
18 $root = $ENV{'DXSPIDER_ROOT'} if $ENV{'DXSPIDER_ROOT'};
20 unshift @INC, "$root/perl"; # this IS the right way round!
21 unshift @INC, "$root/local";
31 my $fp = DXLog::new('debug', 'dat', 'd');
32 my @today = Julian::unixtoj(time());
33 my $fh = $fp->open(@today) or die $!;
34 my $exp = join '|', @ARGV;
42 printit($line) if $line =~ m{(?:$exp)}oi;
49 # check that the debug hasn't rolled over to next day
51 my @now = Julian::unixtoj(time());
52 if ($today[1] != $now[1]) {
54 $fh = $fp->open(@now) or die $!;
62 my @line = split '\^', $line;
64 print atime($t), ' ', join('^', @line);