in reply to Re^2: Run sequential processes (Matlab, SAS, etc.) from Perl
in thread Run sequential processes (Matlab, SAS, etc.) from Perl
If I understand correctly, when you type in the command "matlab...", that program starts a process in the background and returns immediately to the command line while this background process is still running. If you type in a command that uses the output file that matlab creates, it doesn't work because matlab is still working on that output file. So, make a simple script file with the commands as described by others. Right after the matlab command, put in the "fg" command. That moves the most recently started background process into the foreground. Now the next command won't get executed until this now foreground process finishes.
An alternative is to use the "wait" command. wait command. Just put "wait" after the matlab command. See the example in the link.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Run sequential processes (Matlab, SAS, etc.) from Perl
by rizzy (Sexton) on Nov 30, 2010 at 21:09 UTC |