aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc_src/and.txt
blob: 4d45ea9ce85a5c0e87d63bdc0138e1e19561b013 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

\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>