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";
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({priv=>0,call=>'GDX'}, $myexpr);
48 shift @out; # remove return code