13,420
edits
Changes
no edit summary
{| width="40%" align="right" cellpadding="10"
|- valign="top"
|colspan="2"|{{Admon/note|Using '''&&''' and '''||''' Conditional Statements|A very useful trick when running several commands in sequence is to use conditional statments. The '''&&''' conditional will run the subsequent command only if the previous command returns a true (0) exit status, for example: <br>'''./configure && make'''. The '''||''' conditional will run the subsequent command only if the previous command returns a false (non-zero) exit status, for example: <br>'''./configure || echo "Houston, we have a problem"'''. These conditional can be combined, for example: <br>'''./configure && make || echo "Houston, we have a problem"'''}}