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";
27 $dxdir = "/spider/cmd/show";
29 $s = readfilestr($dxdir, $dxcmd);
30 $dxproc = eval "sub { $s }";
37 $expr = join ' ', @ARGV if @ARGV;
45 last unless defined $myexpr;
47 last if $myexpr =~ /^q$/i;
49 my @out = map {"$_\n"} &$dxproc({priv=>0,call=>'GDX'}, $myexpr);
50 shift @out; # remove return code