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

View File

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