1999-05-22 20:39:20 +00:00
|
|
|
#
|
|
|
|
# the type command, display bulls and files
|
|
|
|
#
|
|
|
|
# Copyright (c) 1999 Dirk Koopman G1TLH
|
|
|
|
#
|
2007-07-11 15:41:51 +00:00
|
|
|
#
|
1999-05-22 20:39:20 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
my ($self, $line) = @_;
|
|
|
|
my @f = split /\s+/, $line;
|
|
|
|
my $root = "$main::root/packclus";
|
|
|
|
my @out;
|
|
|
|
my @file;
|
|
|
|
my @d;
|
|
|
|
my @slot;
|
|
|
|
|
|
|
|
if (@f) {
|
|
|
|
my $fn = lc $f[0];
|
2000-07-30 11:16:12 +00:00
|
|
|
$fn =~ s([^A-Za-z0-9_/])()g;
|
|
|
|
$fn =~ s(^/+)();
|
1999-05-22 20:39:20 +00:00
|
|
|
$root = "$root/$fn";
|
|
|
|
}
|
|
|
|
|
|
|
|
open(INP, $root) or return (1, $self->msg('e3', 'type', $f[0]));
|
|
|
|
@out = <INP>;
|
|
|
|
close(INP);
|
|
|
|
|
|
|
|
return (1, @out);
|