execute_unix
PURPOSE
[varargout] = execute_unix(unix_str,nout,errmsg,logfid);
SYNOPSIS
function [status,varargout] = execute_unix(unix_str,nout,errmsg,logfid)
DESCRIPTION
CROSS-REFERENCE INFORMATION
This function calls:
This function is called by:
SOURCE CODE
0001 function [status,varargout] = execute_unix(unix_str,nout,errmsg,logfid)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 if nargin < 4
0014 logfid = 1;
0015 end
0016
0017 if nargin < 3
0018 errmsg = '';
0019 end
0020
0021 if nargin < 2;
0022 nout = 1;
0023 end
0024
0025 fprintf(logfid,'%s\n', unix_str);
0026 [retval{1:nout}] = unix(unix_str);
0027
0028 status = retval{1};
0029 if status
0030 error(errmsg)
0031 end
0032
0033 for iout = 2:nout
0034 varargout{iout-1} = retval{iout};
0035 end
0036
0037 return
Generated on Wed 20-Sep-2023 04:00:50 by m2html © 2003