From help-octave-request at bevo dot che dot wisc dot edu Fri Jan 28 02:38:25 2000 Subject: problem with system From: Martin Buenner To: "help-octave at bevo dot che dot wisc dot edu" Date: Fri, 28 Jan 2000 09:38:15 +0100 Dear octave users and developpers, inside octave I need to start a shell-script and to control its exit code. Currently, I am using 'system()' similar to [out,stat]=system('program'); if stat,error('theres a problem');endif Unfortunately, from time to time 'stat' is not zero even if the script has exited correctly. If I run the following code i.e. for testing N=0;for i=1:1000,[out,stat]=system('ls');if stat,N++,endif;endfor the result will be N=(80-100). What's the problem? Best regards, Martin -- ***************************************************************** * Dr. Martin J. Buenner * * EPCOS AG * * Surface Acoustic Wave Components * * OFW E NT * * Anzinger Str. 13 Phone: ++49 89 636 26182 * * D-81617 Munich Fax: ++49 89 636 27304 * * Germany E-mail: martin dot buenner at epcos dot com * ***************************************************************** ----------------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.che.wisc.edu/octave/octave.html How to fund new projects: http://www.che.wisc.edu/octave/funding.html Subscription information: http://www.che.wisc.edu/octave/archive.html -----------------------------------------------------------------------