tolto lista file ftp e messaggi log

This commit is contained in:
2017-11-12 09:59:36 +01:00
parent 74023ded8c
commit 1272594594
2 changed files with 13 additions and 8 deletions

View File

@@ -119,11 +119,15 @@ sub matlabCalc {
} else {
$matlab_cmd = 'matlab_' . $matlab_cmd . '.cmd';
my @out_matlab = `ssh1 $matlab_ip 'cmd /c $matlab_cmd ' $tool`;
if (index($out_matlab[-1], "Failure") != -1) {
print getTimeStamp("log")
. " - pid $$ >> $tool MatLab calc executed: $out_matlab[-1]\n";
#print getTimeStamp("log") . " - @out_matlab";
#print getTimeStamp("log") . " - pid $$ >> $out_matlab[-1]";
. " - pid $$ >> $tool MatLab calc failed.\n";
print getTimeStamp("log") . " - pid $$ >> Execution ended.\n";
exit(1);
}
}
print getTimeStamp("log")
. " - pid $$ >> $tool MatLab calc executed.\n";
return;
}
@@ -233,8 +237,9 @@ sub trxelab {
. $ftp->message . "\n";
print getTimeStamp("log")
. " - pid $$ >> ftp target files list:\n"
. Dumper($ftp->ls());
. " - pid $$ >> ftp target lists "
. scalar $ftp->ls()
. " elements.\n";
$ftp->quit;
print getTimeStamp("log")

View File

@@ -4,5 +4,5 @@ use strict;
use Data::Dumper qw(Dumper);
chdir('/home/alex/Documenti');
system('dir');
my @arr = (2,3,4,5,6);
print scalar @arr . ".\n"; # First way to print array size