mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-12 07:57:22 +00:00
f6b2b9f9a5
darcs-hash:20060105153753-ac50b-4413a5d2652232bb38c97f5c673251193fc848ec.gz
17 lines
496 B
Text
17 lines
496 B
Text
|
|
\section and and - Conditionally execute a command
|
|
|
|
\subsection and-synopsis Synopsis
|
|
<tt>COMMAND1; and COMMAND2</tt>
|
|
|
|
\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
|
|
|
|
\subsection and-example Example
|
|
|
|
The following code runs the \c make command to build a program, and if it suceeds, it runs <tt>make install</tt>, which installs the program.
|
|
<pre>
|
|
make; and make install
|
|
</pre>
|
|
|