ifexist('OCTAVE_VERSION')% Patch for peculiar behaviour of ssh-ls under Linux.
% It is necessary to capture the ls warning message.
% To do it under the ssh protocol it is necessary to redirect the ls message in a text file.
% The file is 'OctaveStandardOutputMessage.txt' and it is
% saved in the Model directory.
[check,ax]=system(['ssh ',Parallel(indPC).UserName,'@',Parallel(indPC).ComputerName,' ls ',Parallel(indPC).RemoteDirectory,'/',PRCDir,'/',filename,' 2> OctaveStandardOutputMessage.txt']);
[check,ax]=system(['ssh ',ssh_token,' ',Parallel(indPC).UserName,'@',Parallel(indPC).ComputerName,' ls ',Parallel(indPC).RemoteDirectory,'/',PRCDir,'/',filename,' 2> OctaveStandardOutputMessage.txt']);
else
[check,ax]=system(['ssh ',Parallel(indPC).UserName,'@',Parallel(indPC).ComputerName,' ls ',Parallel(indPC).RemoteDirectory,'/',PRCDir,'/',filename]);
[check,ax]=system(['ssh ',ssh_token,' ',Parallel(indPC).UserName,'@',Parallel(indPC).ComputerName,' ls ',Parallel(indPC).RemoteDirectory,'/',PRCDir,'/',filename]);
end
ifcheck~=0||~isempty(strfind(ax,'No such file or directory'));
ax=[];
...
...
@@ -62,7 +67,7 @@ for indPC=1:length(Parallel),
end
end
dirlist=[dirlist,ax];
dirlist=char(dirlist,ax);
else
ifexist('OCTAVE_VERSION'),% Patch for peculiar behaviour of ls under Windows.