projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
deploy a default input route if none present.
[spider.git]
/
cmd
/
save.pl
diff --git
a/cmd/save.pl
b/cmd/save.pl
index 8d7ece38c9f933fa1fb03c25ff1f2969ff6ef76e..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,7
+26,12
@@
if ($line =~ /-a/) { # append to the file
$app_req = '>>';
}
$app_req = '>>';
}
+#$DB::single = 1;
+
my ($fn, $rest) = split /\s+/, $line, 2;
my ($fn, $rest) = split /\s+/, $line, 2;
+$fn = "$main::root/packclus/$fn" unless $fn =~ m|^/|;
+$fn =~ s/\.\.//g;
+$fn =~ s|/+|/|g;
$fn .= '_' . cldate if $date_req;
$fn .= '_' . ztime if $time_req;
$fn =~ s/\s+//g;
$fn .= '_' . cldate if $date_req;
$fn .= '_' . ztime if $time_req;
$fn =~ s/\s+//g;