The pipe idea (prog1 | prog2 | prog3) works best when these prog's are designed to read STDIN and output to STDOUT (not directly to files). I don't think that is what you want.
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.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|