mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-30 22:34:29 +08:00
495460066c
darcs-hash:20060123231706-35ec8-2a30db603eee503d944b06d101cc88ce59340309.gz
18 lines
497 B
Plaintext
18 lines
497 B
Plaintext
|
|
\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 succeeds, it runs <tt>make install</tt>, which installs the program.
|
|
<pre>
|
|
make; and make install
|
|
</pre>
|
|
|