diff options
author | axel <axel@liljencrantz.se> | 2006-11-11 20:52:08 +1000 |
---|---|---|
committer | axel <axel@liljencrantz.se> | 2006-11-11 20:52:08 +1000 |
commit | 04b7da336d9a2da17628da19e7f879304f8d25ad (patch) | |
tree | 3a34ad684b10b3cef1cd42713b433a179bc7414f /doc_src/if.txt | |
parent | 5f69f2bb0cc593e158541a5951fcd8277428bd99 (diff) |
Documentation updates
darcs-hash:20061111105208-ac50b-27e335ba701b021d3119206e91d68c8504d45c2b.gz
Diffstat (limited to 'doc_src/if.txt')
-rw-r--r-- | doc_src/if.txt | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/doc_src/if.txt b/doc_src/if.txt index f1238002..ed19fbe0 100644 --- a/doc_src/if.txt +++ b/doc_src/if.txt @@ -5,10 +5,15 @@ \subsection if-description Description -<tt>if</tt> will execute the command CONDITION. If the condition's exit -status is 0, the commands COMMANDS_TRUE will execute. If it is not 0 and -<tt>else</tt> is given, COMMANDS_FALSE will be executed. Hint: use -<a href="#begin"><tt>begin; ...; end</tt></a> for complex conditions. +<tt>if</tt> will execute the command CONDITION. If the condition's +exit status is 0, the commands COMMANDS_TRUE will execute. If the +exit status is not 0 and <tt>else</tt> is given, COMMANDS_FALSE will +be executed. + +In order to use the exit status of mutiple commands as the condition +of an if block, use <a href="#begin"><tt>begin; ...; end</tt></a> and +the short circut commands <a href="commands.html#and">and</a> and <a +href="commands.html#or">or</a>. The exit status of the last foreground command to exit can always be accessed using the <a href="index.html#variables-status">$status</a> |