Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Normally, on *nix based systems, commands return a 0 value for success and non zero value if the command was unsuccessful. In the shell, the exit status of the last command gets stored in the "$?" variable. </p> <p>So, lets say you run your make install and check the exit status like so:</p> <pre><code># make install # echo $? </code></pre> <p>If the command was successful, the echo statement will print out a 0, otherwise you will get some other numerical value. Alternatively you can then test the contents if the $? with "if".</p> <pre><code>if [ $? -eq 0 ]; then { echo "OK" };else { echo "Not Ok" };fi </code></pre> <p>You can also use the exit status in a different way. The following command line will execute each command, in order ONLY if the preceding command was successful</p> <pre><code>./configure &amp;&amp; make &amp;&amp; make install &amp;&amp; echo "All good!" </code></pre> <p>Think of each COMMAND as a FUNCTION that returns a VALUE (its exit status)</p> <p>&amp;&amp; is the AND operator for bash (The shell you are probably using.) and || is the OR operator. </p> <p>You can extend the above command line to also handle the case where the "make install" step fails, for example:</p> <pre><code>./configure &amp;&amp; make &amp;&amp; make install &amp;&amp; echo "All good!" || echo "Something's awry" </code></pre> <p>Of course, this is just an example, but I think that you can solve your problem by taking advantage of the fact that you can test the exit status of commands. </p> <p>This link should help you: <a href="http://tldp.org/LDP/abs/html/exit-status.html" rel="nofollow">http://tldp.org/LDP/abs/html/exit-status.html</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload