diff options
author | axel <axel@liljencrantz.se> | 2005-09-20 23:31:55 +1000 |
---|---|---|
committer | axel <axel@liljencrantz.se> | 2005-09-20 23:31:55 +1000 |
commit | 7ddecde54372c25fcf526e2d24807c5dac9800aa (patch) | |
tree | 1bff6e0ccd096836adb74529d53a6debcf45375b /doc_src/or.txt | |
parent | 149594f974350bb364a76c73b91b1d5ffddaa1fa (diff) |
Add subdirectories
darcs-hash:20050920133155-ac50b-9a14c6c664dd03afbe8e15e7c7998fcfb5c3c750.gz
Diffstat (limited to 'doc_src/or.txt')
-rw-r--r-- | doc_src/or.txt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/doc_src/or.txt b/doc_src/or.txt new file mode 100644 index 00000000..3fc40f3c --- /dev/null +++ b/doc_src/or.txt @@ -0,0 +1,23 @@ + +\section or or - Conditionally execute a command + +\subsection or-synopsis Synopsis + <tt>or COMMAND1; COMMAND2</tt> + +\subsection or-description Description + +The \c or builtin is used to execute one command, and if it returns +non-zero status, also execute a second command. + +\subsection or-example Example + +The following code runs the \c make command to build a program, or if it fails, it runs <tt>make clean</tt>, which removes the files created by the build process +<pre> +or make; make clean +</pre> + +\c or and \c and can be nested, as in this example, that attempts to build and install a program, and removed the files created by the build process on failiure + +<pre> +or and make; make install; make clean +</pre> |