projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added better anti spot-sucking
[spider.git]
/
cmd
/
save.pl
diff --git
a/cmd/save.pl
b/cmd/save.pl
index 5a3cacdd87a392c12d1fd4001135a88383e179f0..0c4c8b225288be4c6580a4372fb79e43d9f3723b 100644
(file)
--- a/
cmd/save.pl
+++ b/
cmd/save.pl
@@
-1,13
+1,15
@@
#
# save the output of ANY command to a file
#
#
# save the output of ANY command to a file
#
+# From an idea by Rene OZ1LQH
+#
# Copyright (c) 2002 Dirk Koopman G1TLH
#
# $Id$
#
my ($self, $line) = @_;
# Copyright (c) 2002 Dirk Koopman G1TLH
#
# $Id$
#
my ($self, $line) = @_;
-return (1, $self->msg('e5')) if $self->priv < 9 || $self->remotecmd;
+return (1, $self->msg('e5')) if $self->priv < 9 || $self->remotecmd
|| $self->inscript
;
my ($date_req, $time_req);
my $app_req = '>';
my ($date_req, $time_req);
my $app_req = '>';
@@
-24,9
+26,11
@@
if ($line =~ /-a/) { # append to the file
$app_req = '>>';
}
$app_req = '>>';
}
+#$DB::single = 1;
+
my ($fn, $rest) = split /\s+/, $line, 2;
$fn = "$main::root/packclus/$fn" unless $fn =~ m|^/|;
my ($fn, $rest) = split /\s+/, $line, 2;
$fn = "$main::root/packclus/$fn" unless $fn =~ m|^/|;
-$fn =~ s/
.
.//g;
+$fn =~ s/
\.\
.//g;
$fn =~ s|/+|/|g;
$fn .= '_' . cldate if $date_req;
$fn .= '_' . ztime if $time_req;
$fn =~ s|/+|/|g;
$fn .= '_' . cldate if $date_req;
$fn .= '_' . ztime if $time_req;