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