From 6fd69bdda8b4d185fb636047ab8914989fc66252 Mon Sep 17 00:00:00 2001 From: axel Date: Sun, 4 Jun 2006 09:15:17 +1000 Subject: Many minor edits and clarifications to the documentation, including comments about the exit status of a few commands darcs-hash:20060603231517-ac50b-03d252516eef21d4dd3a2ba0f5bb68e82525213b.gz --- doc_src/and.txt | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'doc_src/and.txt') diff --git a/doc_src/and.txt b/doc_src/and.txt index 4d45ea9c..bd884b1b 100644 --- a/doc_src/and.txt +++ b/doc_src/and.txt @@ -2,16 +2,23 @@ \section and and - Conditionally execute a command \subsection and-synopsis Synopsis - COMMAND1; and COMMAND2 +COMMAND1; and COMMAND2 \subsection and-description Description -The \c and builtin is used to execute a command if the current exit status (as set by the last previous command) is zero +The \c and builtin is used to execute a command if the current exit +status (as set by the last previous command) is zero + +The and command does not change the current exit status. \subsection and-example Example -The following code runs the \c make command to build a program, and if it succeeds, it runs make install, which installs the program. +The following code runs the \c make command to build a program, if the +build succceds, the program is installed. If either step fails, +make clean is run, which removes the files created by the +build process +
-make; and make install
+make; and make install; or make clean
 
-- cgit v1.2.3