blob: 94435c30451e1f2892213a5c3522cdfa38447cd7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
<h1 class="subsection">Reserved Words</h1> <p>Reserved words are words that have special meaning to the shell. They are used to begin and end the shell’s compound commands. </p> <p>The following words are recognized as reserved when unquoted and the first word of a command (see below for exceptions): </p> <table> <tr>
<td width="10%"><code>if</code></td>
<td width="10%"><code>then</code></td>
<td width="10%"><code>elif</code></td>
<td width="10%"><code>else</code></td>
<td width="12%"><code>fi</code></td>
<td width="10%"><code>time</code></td>
</tr> <tr>
<td width="10%"><code>for</code></td>
<td width="10%"><code>in</code></td>
<td width="10%"><code>until</code></td>
<td width="10%"><code>while</code></td>
<td width="12%"><code>do</code></td>
<td width="10%"><code>done</code></td>
</tr> <tr>
<td width="10%"><code>case</code></td>
<td width="10%"><code>esac</code></td>
<td width="10%"><code>coproc</code></td>
<td width="10%"><code>select</code></td>
<td width="12%"><code>function</code></td>
</tr> <tr>
<td width="10%"><code>{</code></td>
<td width="10%"><code>}</code></td>
<td width="10%"><code>[[</code></td>
<td width="10%"><code>]]</code></td>
<td width="12%"><code>!</code></td>
</tr> </table> <p><code>in</code> is recognized as a reserved word if it is the third word of a <code>case</code> or <code>select</code> command. <code>in</code> and <code>do</code> are recognized as reserved words if they are the third word in a <code>for</code> command. </p><div class="_attribution">
<p class="_attribution-p">
Copyright © 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.<br>Licensed under the GNU Free Documentation License.<br>
<a href="https://www.gnu.org/software/bash/manual/html_node/Reserved-Words.html" class="_attribution-link">https://www.gnu.org/software/bash/manual/html_node/Reserved-Words.html</a>
</p>
</div>
|