3 # Implement an external "show/dx" command
5 # Copyright (c) 1998-2000 Dirk Koopman G1TLH
9 # search local then perl directories
11 # root of directory tree for this system
13 $root = $ENV{'DXSPIDER_ROOT'} if $ENV{'DXSPIDER_ROOT'};
15 unshift @INC, "$root/perl"; # this IS the right way round!
16 unshift @INC, "$root/local";
25 $dxdir = "/spider/cmd/show";
27 $s = readfilestr($dxdir, $dxcmd);
28 $dxproc = eval "sub { $s }";
35 $expr = join ' ', @ARGV if @ARGV;
43 last unless defined $myexpr;
45 last if $myexpr =~ /^q$/i;
47 my @out = map {"$_\n"} &$dxproc(undef, $myexpr);
48 shift @out; # remove return code