]> git.ipfire.org Git - thirdparty/bash.git/blob - doc/bashref.html
commit bash-20040902 snapshot
[thirdparty/bash.git] / doc / bashref.html
1 <HTML>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
3 <!-- Created on August, 30 2004 by texi2html 1.64 -->
4 <!--
5 Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
6 Karl Berry <karl@freefriends.org>
7 Olaf Bachmann <obachman@mathematik.uni-kl.de>
8 and many others.
9 Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
10 Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
11
12 -->
13 <HEAD>
14 <TITLE>Bash Reference Manual: </TITLE>
15
16 <META NAME="description" CONTENT="Bash Reference Manual: ">
17 <META NAME="keywords" CONTENT="Bash Reference Manual: ">
18 <META NAME="resource-type" CONTENT="document">
19 <META NAME="distribution" CONTENT="global">
20 <META NAME="Generator" CONTENT="texi2html 1.64">
21
22 </HEAD>
23
24 <BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
25
26 <A NAME="SEC_Top"></A>
27 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
28 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
29 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
30 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
31 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
32 </TR></TABLE>
33 <H1>Bash Reference Manual</H1></P><P>
34
35 This text is a brief description of the features that are present in
36 the Bash shell (version 3.0, 27 August 2004)..
37 </P><P>
38
39 This is Edition 3.0, last updated 27 August 2004,
40 of <CITE>The GNU Bash Reference Manual</CITE>,
41 for <CODE>Bash</CODE>, Version 3.0.
42 </P><P>
43
44 Bash contains features that appear in other popular shells, and some
45 features that only appear in Bash. Some of the shells that Bash has
46 borrowed concepts from are the Bourne Shell (<TT>`sh'</TT>), the Korn Shell
47 (<TT>`ksh'</TT>), and the C-shell (<TT>`csh'</TT> and its successor,
48 <TT>`tcsh'</TT>). The following menu breaks the features up into
49 categories based upon which one of these other shells inspired the
50 feature.
51 </P><P>
52
53 This manual is meant as a brief introduction to features found in
54 Bash. The Bash manual page should be used as the definitive
55 reference on shell behavior.
56 </P><P>
57
58 <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
59 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC1">1. Introduction</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">An introduction to the shell.</TD></TR>
60 </TABLE>
61
62 <br>
63 <TABLE BORDER=0 CELLSPACING=0>
64 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC4">2. Definitions</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Some definitions used in the rest of this
65 manual.</TD></TR>
66 </TABLE>
67
68 <br>
69 <TABLE BORDER=0 CELLSPACING=0>
70 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC5">3. Basic Shell Features</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">The shell "building blocks".</TD></TR>
71 </TABLE>
72
73 <br>
74 <TABLE BORDER=0 CELLSPACING=0>
75 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC56">4. Shell Builtin Commands</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Commands that are a part of the shell.</TD></TR>
76 </TABLE>
77
78 <br>
79 <TABLE BORDER=0 CELLSPACING=0>
80 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC61">5. Shell Variables</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Variables used or set by Bash.</TD></TR>
81 </TABLE>
82
83 <br>
84 <TABLE BORDER=0 CELLSPACING=0>
85 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC64">6. Bash Features</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Features found only in Bash.</TD></TR>
86 </TABLE>
87
88 <br>
89 <TABLE BORDER=0 CELLSPACING=0>
90 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC87">7. Job Control</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">A chapter describing what job control is
91 and how Bash allows you to use it.</TD></TR>
92 </TABLE>
93
94 <br>
95 <TABLE BORDER=0 CELLSPACING=0>
96 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC115">9. Using History Interactively</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Chapter dealing with history expansion
97 rules.</TD></TR>
98 </TABLE>
99
100 <br>
101 <TABLE BORDER=0 CELLSPACING=0>
102 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC91">8. Command Line Editing</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Chapter describing the command line
103 editing features.</TD></TR>
104 </TABLE>
105
106 <br>
107 <TABLE BORDER=0 CELLSPACING=0>
108 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC122">10. Installing Bash</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to build and install Bash on your system.</TD></TR>
109 </TABLE>
110
111 <br>
112 <TABLE BORDER=0 CELLSPACING=0>
113 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC131">A. Reporting Bugs</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to report bugs in Bash.</TD></TR>
114 </TABLE>
115
116 <br>
117 <TABLE BORDER=0 CELLSPACING=0>
118 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC132">B. Major Differences From The Bourne Shell</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">A terse list of the differences
119 between Bash and historical
120 versions of /bin/sh.</TD></TR>
121 </TABLE>
122
123 <br>
124 <TABLE BORDER=0 CELLSPACING=0>
125 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC134">C. Copying This Manual</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Copying this manual.</TD></TR>
126 </TABLE>
127
128 <br>
129 <TABLE BORDER=0 CELLSPACING=0>
130 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC137">Index of Shell Builtin Commands</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Index of Bash builtin commands.</TD></TR>
131 </TABLE>
132
133 <br>
134 <TABLE BORDER=0 CELLSPACING=0>
135 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC138">Index of Shell Reserved Words</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Index of Bash reserved words.</TD></TR>
136 </TABLE>
137
138 <br>
139 <TABLE BORDER=0 CELLSPACING=0>
140 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC139">Parameter and Variable Index</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Quick reference helps you find the
141 variable you want.</TD></TR>
142 </TABLE>
143
144 <br>
145 <TABLE BORDER=0 CELLSPACING=0>
146 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC140">Function Index</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Index of bindable Readline functions.</TD></TR>
147 </TABLE>
148
149 <br>
150 <TABLE BORDER=0 CELLSPACING=0>
151 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC141">Concept Index</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">General index for concepts described in
152 this manual.</TD></TR>
153 </TABLE></BLOCKQUOTE>
154 <P>
155
156 <HR SIZE=1>
157 <A NAME="SEC1"></A>
158 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
159 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top"> &lt; </A>]</TD>
160 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC2"> &gt; </A>]</TD>
161 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
162 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top"> Up </A>]</TD>
163 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC4"> &gt;&gt; </A>]</TD>
164 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
165 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
166 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
167 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
168 </TR></TABLE>
169 <A NAME="Introduction"></A>
170 <H1> 1. Introduction </H1>
171 <!--docid::SEC1::-->
172 <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
173 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC2">1.1 What is Bash?</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">A short description of Bash.</TD></TR>
174 </TABLE>
175
176 <br>
177 <TABLE BORDER=0 CELLSPACING=0>
178 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC3">1.2 What is a shell?</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">A brief introduction to shells.</TD></TR>
179 </TABLE></BLOCKQUOTE>
180 <P>
181
182 <A NAME="What is Bash?"></A>
183 <HR SIZE="6">
184 <A NAME="SEC2"></A>
185 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
186 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC1"> &lt; </A>]</TD>
187 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC3"> &gt; </A>]</TD>
188 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
189 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC1"> Up </A>]</TD>
190 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC4"> &gt;&gt; </A>]</TD>
191 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
192 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
193 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
194 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
195 </TR></TABLE>
196 <H2> 1.1 What is Bash? </H2>
197 <!--docid::SEC2::-->
198 <P>
199
200 Bash is the shell, or command language interpreter,
201 for the GNU operating system.
202 The name is an acronym for the <SAMP>`Bourne-Again SHell'</SAMP>,
203 a pun on Stephen Bourne, the author of the direct ancestor of
204 the current Unix shell <CODE>sh</CODE>,
205 which appeared in the Seventh Edition Bell Labs Research version
206 of Unix.
207 </P><P>
208
209 Bash is largely compatible with <CODE>sh</CODE> and incorporates useful
210 features from the Korn shell <CODE>ksh</CODE> and the C shell <CODE>csh</CODE>.
211 It is intended to be a conformant implementation of the IEEE
212 POSIX Shell and Tools specification (IEEE Working Group 1003.2).
213 It offers functional improvements over <CODE>sh</CODE> for both interactive and
214 programming use.
215 </P><P>
216
217 While the GNU operating system provides other shells, including
218 a version of <CODE>csh</CODE>, Bash is the default shell.
219 Like other GNU software, Bash is quite portable. It currently runs
220 on nearly every version of Unix and a few other operating systems -
221 independently-supported ports exist for MS-DOS, OS/2,
222 and Windows platforms.
223 </P><P>
224
225 <A NAME="What is a shell?"></A>
226 <HR SIZE="6">
227 <A NAME="SEC3"></A>
228 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
229 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC2"> &lt; </A>]</TD>
230 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC4"> &gt; </A>]</TD>
231 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
232 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC1"> Up </A>]</TD>
233 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC4"> &gt;&gt; </A>]</TD>
234 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
235 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
236 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
237 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
238 </TR></TABLE>
239 <H2> 1.2 What is a shell? </H2>
240 <!--docid::SEC3::-->
241 <P>
242
243 At its base, a shell is simply a macro processor that executes
244 commands. The term macro processor means functionality where text
245 and symbols are expanded to create larger expressions.
246 </P><P>
247
248 A Unix shell is both a command interpreter and a programming
249 language. As a command interpreter, the shell provides the user
250 interface to the rich set of GNU utilities. The programming
251 language features allow these utilitites to be combined.
252 Files containing commands can be created, and become
253 commands themselves. These new commands have the same status as
254 system commands in directories such as <TT>`/bin'</TT>, allowing users
255 or groups to establish custom environments to automate their common
256 tasks.
257 </P><P>
258
259 Shells may be used interactively or non-interactively. In
260 interactive mode, they accept input typed from the keyboard.
261 When executing non-interactively, shells execute commands read
262 from a file.
263 </P><P>
264
265 A shell allows execution of GNU commands, both synchronously and
266 asynchronously.
267 The shell waits for synchronous commands to complete before accepting
268 more input; asynchronous commands continue to execute in parallel
269 with the shell while it reads and executes additional commands.
270 The <EM>redirection</EM> constructs permit
271 fine-grained control of the input and output of those commands.
272 Moreover, the shell allows control over the contents of commands'
273 environments.
274 </P><P>
275
276 Shells also provide a small set of built-in
277 commands (<EM>builtins</EM>) implementing functionality impossible
278 or inconvenient to obtain via separate utilities.
279 For example, <CODE>cd</CODE>, <CODE>break</CODE>, <CODE>continue</CODE>, and
280 <CODE>exec</CODE>) cannot be implemented outside of the shell because
281 they directly manipulate the shell itself.
282 The <CODE>history</CODE>, <CODE>getopts</CODE>, <CODE>kill</CODE>, or <CODE>pwd</CODE>
283 builtins, among others, could be implemented in separate utilities,
284 but they are more convenient to use as builtin commands.
285 All of the shell builtins are described in
286 subsequent sections.
287 </P><P>
288
289 While executing commands is essential, most of the power (and
290 complexity) of shells is due to their embedded programming
291 languages. Like any high-level language, the shell provides
292 variables, flow control constructs, quoting, and functions.
293 </P><P>
294
295 Shells offer features geared specifically for
296 interactive use rather than to augment the programming language.
297 These interactive features include job control, command line
298 editing, command history and aliases. Each of these features is
299 described in this manual.
300 </P><P>
301
302 <A NAME="Definitions"></A>
303 <HR SIZE="6">
304 <A NAME="SEC4"></A>
305 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
306 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC3"> &lt; </A>]</TD>
307 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC5"> &gt; </A>]</TD>
308 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC5"> &lt;&lt; </A>]</TD>
309 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top"> Up </A>]</TD>
310 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC5"> &gt;&gt; </A>]</TD>
311 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
312 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
313 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
314 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
315 </TR></TABLE>
316 <H1> 2. Definitions </H1>
317 <!--docid::SEC4::-->
318 These definitions are used throughout the remainder of this manual.
319 <P>
320
321 <DL COMPACT>
322
323 <DT><CODE>POSIX</CODE>
324 <DD><A NAME="IDX1"></A>
325 A family of open system standards based on Unix. Bash
326 is concerned with POSIX 1003.2, the Shell and Tools Standard.
327 <P>
328
329 <DT><CODE>blank</CODE>
330 <DD>A space or tab character.
331 <P>
332
333 <DT><CODE>builtin</CODE>
334 <DD><A NAME="IDX2"></A>
335 A command that is implemented internally by the shell itself, rather
336 than by an executable program somewhere in the file system.
337 <P>
338
339 <DT><CODE>control operator</CODE>
340 <DD><A NAME="IDX3"></A>
341 A <CODE>word</CODE> that performs a control function. It is a <CODE>newline</CODE>
342 or one of the following:
343 <SAMP>`||'</SAMP>, <SAMP>`&#38;&#38;'</SAMP>, <SAMP>`&#38;'</SAMP>, <SAMP>`;'</SAMP>, <SAMP>`;;'</SAMP>,
344 <SAMP>`|'</SAMP>, <SAMP>`('</SAMP>, or <SAMP>`)'</SAMP>.
345 <P>
346
347 <DT><CODE>exit status</CODE>
348 <DD><A NAME="IDX4"></A>
349 The value returned by a command to its caller. The value is restricted
350 to eight bits, so the maximum value is 255.
351 <P>
352
353 <DT><CODE>field</CODE>
354 <DD><A NAME="IDX5"></A>
355 A unit of text that is the result of one of the shell expansions. After
356 expansion, when executing a command, the resulting fields are used as
357 the command name and arguments.
358 <P>
359
360 <DT><CODE>filename</CODE>
361 <DD><A NAME="IDX6"></A>
362 A string of characters used to identify a file.
363 <P>
364
365 <DT><CODE>job</CODE>
366 <DD><A NAME="IDX7"></A>
367 A set of processes comprising a pipeline, and any processes descended
368 from it, that are all in the same process group.
369 <P>
370
371 <DT><CODE>job control</CODE>
372 <DD><A NAME="IDX8"></A>
373 A mechanism by which users can selectively stop (suspend) and restart
374 (resume) execution of processes.
375 <P>
376
377 <DT><CODE>metacharacter</CODE>
378 <DD><A NAME="IDX9"></A>
379 A character that, when unquoted, separates words. A metacharacter is
380 a <CODE>blank</CODE> or one of the following characters:
381 <SAMP>`|'</SAMP>, <SAMP>`&#38;'</SAMP>, <SAMP>`;'</SAMP>, <SAMP>`('</SAMP>, <SAMP>`)'</SAMP>, <SAMP>`&#60;'</SAMP>, or
382 <SAMP>`&#62;'</SAMP>.
383 <P>
384
385 <DT><CODE>name</CODE>
386 <DD><A NAME="IDX10"></A>
387 <A NAME="IDX11"></A>
388 A <CODE>word</CODE> consisting solely of letters, numbers, and underscores,
389 and beginning with a letter or underscore. <CODE>Name</CODE>s are used as
390 shell variable and function names.
391 Also referred to as an <CODE>identifier</CODE>.
392 <P>
393
394 <DT><CODE>operator</CODE>
395 <DD><A NAME="IDX12"></A>
396 A <CODE>control operator</CODE> or a <CODE>redirection operator</CODE>.
397 See section <A HREF="bashref.html#SEC38">3.6 Redirections</A>, for a list of redirection operators.
398 <P>
399
400 <DT><CODE>process group</CODE>
401 <DD><A NAME="IDX13"></A>
402 A collection of related processes each having the same process
403 group ID.
404 <P>
405
406 <DT><CODE>process group ID</CODE>
407 <DD><A NAME="IDX14"></A>
408 A unique identifer that represents a <CODE>process group</CODE>
409 during its lifetime.
410 <P>
411
412 <DT><CODE>reserved word</CODE>
413 <DD><A NAME="IDX15"></A>
414 A <CODE>word</CODE> that has a special meaning to the shell. Most reserved
415 words introduce shell flow control constructs, such as <CODE>for</CODE> and
416 <CODE>while</CODE>.
417 <P>
418
419 <DT><CODE>return status</CODE>
420 <DD><A NAME="IDX16"></A>
421 A synonym for <CODE>exit status</CODE>.
422 <P>
423
424 <DT><CODE>signal</CODE>
425 <DD><A NAME="IDX17"></A>
426 A mechanism by which a process may be notified by the kernel
427 of an event occurring in the system.
428 <P>
429
430 <DT><CODE>special builtin</CODE>
431 <DD><A NAME="IDX18"></A>
432 A shell builtin command that has been classified as special by the
433 POSIX 1003.2 standard.
434 <P>
435
436 <DT><CODE>token</CODE>
437 <DD><A NAME="IDX19"></A>
438 A sequence of characters considered a single unit by the shell. It is
439 either a <CODE>word</CODE> or an <CODE>operator</CODE>.
440 <P>
441
442 <DT><CODE>word</CODE>
443 <DD><A NAME="IDX20"></A>
444 A <CODE>token</CODE> that is not an <CODE>operator</CODE>.
445 </DL>
446 <P>
447
448 <A NAME="Basic Shell Features"></A>
449 <HR SIZE="6">
450 <A NAME="SEC5"></A>
451 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
452 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC4"> &lt; </A>]</TD>
453 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC6"> &gt; </A>]</TD>
454 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC56"> &lt;&lt; </A>]</TD>
455 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top"> Up </A>]</TD>
456 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC56"> &gt;&gt; </A>]</TD>
457 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
458 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
459 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
460 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
461 </TR></TABLE>
462 <H1> 3. Basic Shell Features </H1>
463 <!--docid::SEC5::-->
464 <P>
465
466 Bash is an acronym for <SAMP>`Bourne-Again SHell'</SAMP>.
467 The Bourne shell is
468 the traditional Unix shell originally written by Stephen Bourne.
469 All of the Bourne shell builtin commands are available in Bash,
470 The rules for evaluation and quoting are taken from the POSIX
471 specification for the `standard' Unix shell.
472 </P><P>
473
474 This chapter briefly summarizes the shell's `building blocks':
475 commands, control structures, shell functions, shell <I>parameters</I>,
476 shell expansions,
477 <I>redirections</I>, which are a way to direct input and output from
478 and to named files, and how the shell executes commands.
479 </P><P>
480
481 <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
482 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC6">3.1 Shell Syntax</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">What your input means to the shell.</TD></TR>
483 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC15">3.2 Shell Commands</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">The types of commands you can use.</TD></TR>
484 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC23">3.3 Shell Functions</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Grouping commands by name.</TD></TR>
485 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC24">3.4 Shell Parameters</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How the shell stores values.</TD></TR>
486 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC27">3.5 Shell Expansions</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How Bash expands parameters and the various
487 expansions available.</TD></TR>
488 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC38">3.6 Redirections</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">A way to control where input and output go.</TD></TR>
489 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC48">3.7 Executing Commands</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">What happens when you run a command.</TD></TR>
490 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC55">3.8 Shell Scripts</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Executing files of shell commands.</TD></TR>
491 </TABLE></BLOCKQUOTE>
492 <P>
493
494 <A NAME="Shell Syntax"></A>
495 <HR SIZE="6">
496 <A NAME="SEC6"></A>
497 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
498 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC5"> &lt; </A>]</TD>
499 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC7"> &gt; </A>]</TD>
500 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC5"> &lt;&lt; </A>]</TD>
501 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC5"> Up </A>]</TD>
502 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC15"> &gt;&gt; </A>]</TD>
503 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
504 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
505 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
506 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
507 </TR></TABLE>
508 <H2> 3.1 Shell Syntax </H2>
509 <!--docid::SEC6::-->
510 <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
511 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC7">3.1.1 Shell Operation</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">The basic operation of the shell.</TD></TR>
512 </TABLE>
513
514 <br>
515 <TABLE BORDER=0 CELLSPACING=0>
516 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC8">3.1.2 Quoting</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to remove the special meaning from characters.</TD></TR>
517 </TABLE>
518
519 <br>
520 <TABLE BORDER=0 CELLSPACING=0>
521 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC14">3.1.3 Comments</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to specify comments.</TD></TR>
522 </TABLE></BLOCKQUOTE>
523 <P>
524
525 When the shell reads input, it proceeds through a
526 sequence of operations. If the input indicates the beginning of a
527 comment, the shell ignores the comment symbol (<SAMP>`#'</SAMP>), and the rest
528 of that line.
529
530 Otherwise, roughly speaking, the shell reads its input and
531 divides the input into words and operators, employing the quoting rules
532 to select which meanings to assign various words and characters.
533 </P><P>
534
535 The shell then parses these tokens into commands and other constructs,
536 removes the special meaning of certain words or characters, expands
537 others, redirects input and output as needed, executes the specified
538 command, waits for the command's exit status, and makes that exit status
539 available for further inspection or processing.
540 </P><P>
541
542 <A NAME="Shell Operation"></A>
543 <HR SIZE="6">
544 <A NAME="SEC7"></A>
545 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
546 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC6"> &lt; </A>]</TD>
547 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC8"> &gt; </A>]</TD>
548 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC5"> &lt;&lt; </A>]</TD>
549 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC6"> Up </A>]</TD>
550 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC15"> &gt;&gt; </A>]</TD>
551 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
552 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
553 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
554 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
555 </TR></TABLE>
556 <H3> 3.1.1 Shell Operation </H3>
557 <!--docid::SEC7::-->
558 <P>
559
560 The following is a brief description of the shell's operation when it
561 reads and executes a command. Basically, the shell does the
562 following:
563 </P><P>
564
565 <OL>
566 <LI>
567 Reads its input from a file (see section <A HREF="bashref.html#SEC55">3.8 Shell Scripts</A>), from a string
568 supplied as an argument to the <SAMP>`-c'</SAMP> invocation option
569 (see section <A HREF="bashref.html#SEC65">6.1 Invoking Bash</A>), or from the user's terminal.
570 <P>
571
572 <LI>
573 Breaks the input into words and operators, obeying the quoting rules
574 described in <A HREF="bashref.html#SEC8">3.1.2 Quoting</A>. These tokens are separated by
575 <CODE>metacharacters</CODE>. Alias expansion is performed by this step
576 (see section <A HREF="bashref.html#SEC80">6.6 Aliases</A>).
577 <P>
578
579 <LI>
580 Parses the tokens into simple and compound commands
581 (see section <A HREF="bashref.html#SEC15">3.2 Shell Commands</A>).
582 <P>
583
584 <LI>
585 Performs the various shell expansions (see section <A HREF="bashref.html#SEC27">3.5 Shell Expansions</A>), breaking
586 the expanded tokens into lists of filenames (see section <A HREF="bashref.html#SEC35">3.5.8 Filename Expansion</A>)
587 and commands and arguments.
588 <P>
589
590 <LI>
591 Performs any necessary redirections (see section <A HREF="bashref.html#SEC38">3.6 Redirections</A>) and removes
592 the redirection operators and their operands from the argument list.
593 <P>
594
595 <LI>
596 Executes the command (see section <A HREF="bashref.html#SEC48">3.7 Executing Commands</A>).
597 <P>
598
599 <LI>
600 Optionally waits for the command to complete and collects its exit
601 status (see section <A HREF="bashref.html#SEC53">3.7.5 Exit Status</A>).
602 <P>
603
604 </OL>
605 <P>
606
607 <A NAME="Quoting"></A>
608 <HR SIZE="6">
609 <A NAME="SEC8"></A>
610 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
611 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC7"> &lt; </A>]</TD>
612 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC9"> &gt; </A>]</TD>
613 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC14"> &lt;&lt; </A>]</TD>
614 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC6"> Up </A>]</TD>
615 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC14"> &gt;&gt; </A>]</TD>
616 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
617 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
618 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
619 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
620 </TR></TABLE>
621 <H3> 3.1.2 Quoting </H3>
622 <!--docid::SEC8::-->
623 <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
624 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC9">3.1.2.1 Escape Character</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to remove the special meaning from a single
625 character.</TD></TR>
626 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC10">3.1.2.2 Single Quotes</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to inhibit all interpretation of a sequence
627 of characters.</TD></TR>
628 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC11">3.1.2.3 Double Quotes</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to suppress most of the interpretation of a
629 sequence of characters.</TD></TR>
630 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC12">3.1.2.4 ANSI-C Quoting</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to expand ANSI-C sequences in quoted strings.</TD></TR>
631 </TABLE>
632
633 <br>
634 <TABLE BORDER=0 CELLSPACING=0>
635 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC13">3.1.2.5 Locale-Specific Translation</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to translate strings into different languages.</TD></TR>
636 </TABLE></BLOCKQUOTE>
637 <P>
638
639 Quoting is used to remove the special meaning of certain
640 characters or words to the shell. Quoting can be used to
641 disable special treatment for special characters, to prevent
642 reserved words from being recognized as such, and to prevent
643 parameter expansion.
644 </P><P>
645
646 Each of the shell metacharacters (see section <A HREF="bashref.html#SEC4">2. Definitions</A>)
647 has special meaning to the shell and must be quoted if it is to
648 represent itself.
649 When the command history expansion facilities are being used, the
650 <VAR>history expansion</VAR> character, usually <SAMP>`!'</SAMP>, must be quoted
651 to prevent history expansion. See section <A HREF="bashref.html#SEC116">9.1 Bash History Facilities</A>, for
652 more details concerning history expansion.
653 </P><P>
654
655 There are three quoting mechanisms: the
656 <VAR>escape character</VAR>, single quotes, and double quotes.
657 </P><P>
658
659 <A NAME="Escape Character"></A>
660 <HR SIZE="6">
661 <A NAME="SEC9"></A>
662 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
663 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC8"> &lt; </A>]</TD>
664 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC10"> &gt; </A>]</TD>
665 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC14"> &lt;&lt; </A>]</TD>
666 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC8"> Up </A>]</TD>
667 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC14"> &gt;&gt; </A>]</TD>
668 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
669 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
670 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
671 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
672 </TR></TABLE>
673 <H4> 3.1.2.1 Escape Character </H4>
674 <!--docid::SEC9::-->
675 A non-quoted backslash <SAMP>`\'</SAMP> is the Bash escape character.
676 It preserves the literal value of the next character that follows,
677 with the exception of <CODE>newline</CODE>. If a <CODE>\newline</CODE> pair
678 appears, and the backslash itself is not quoted, the <CODE>\newline</CODE>
679 is treated as a line continuation (that is, it is removed from
680 the input stream and effectively ignored).
681 <P>
682
683 <A NAME="Single Quotes"></A>
684 <HR SIZE="6">
685 <A NAME="SEC10"></A>
686 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
687 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC9"> &lt; </A>]</TD>
688 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC11"> &gt; </A>]</TD>
689 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC11"> &lt;&lt; </A>]</TD>
690 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC8"> Up </A>]</TD>
691 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC14"> &gt;&gt; </A>]</TD>
692 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
693 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
694 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
695 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
696 </TR></TABLE>
697 <H4> 3.1.2.2 Single Quotes </H4>
698 <!--docid::SEC10::-->
699 <P>
700
701 Enclosing characters in single quotes (<SAMP>`''</SAMP>) preserves the literal value
702 of each character within the quotes. A single quote may not occur
703 between single quotes, even when preceded by a backslash.
704 </P><P>
705
706 <A NAME="Double Quotes"></A>
707 <HR SIZE="6">
708 <A NAME="SEC11"></A>
709 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
710 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC10"> &lt; </A>]</TD>
711 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC12"> &gt; </A>]</TD>
712 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC12"> &lt;&lt; </A>]</TD>
713 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC8"> Up </A>]</TD>
714 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC14"> &gt;&gt; </A>]</TD>
715 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
716 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
717 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
718 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
719 </TR></TABLE>
720 <H4> 3.1.2.3 Double Quotes </H4>
721 <!--docid::SEC11::-->
722 <P>
723
724 Enclosing characters in double quotes (<SAMP>`"'</SAMP>) preserves the literal value
725 of all characters within the quotes, with the exception of
726 <SAMP>`$'</SAMP>, <SAMP>``'</SAMP>, and <SAMP>`\'</SAMP>.
727 The characters <SAMP>`$'</SAMP> and <SAMP>``'</SAMP>
728 retain their special meaning within double quotes (see section <A HREF="bashref.html#SEC27">3.5 Shell Expansions</A>).
729 The backslash retains its special meaning only when followed by one of
730 the following characters:
731 <SAMP>`$'</SAMP>, <SAMP>``'</SAMP>, <SAMP>`"'</SAMP>, <SAMP>`\'</SAMP>, or <CODE>newline</CODE>.
732 Within double quotes, backslashes that are followed by one of these
733 characters are removed. Backslashes preceding characters without a
734 special meaning are left unmodified.
735 A double quote may be quoted within double quotes by preceding it with
736 a backslash.
737 When command history is being used, the double quote may not be used to
738 quote the history expansion character.
739 </P><P>
740
741 The special parameters <SAMP>`*'</SAMP> and <SAMP>`@'</SAMP> have special meaning
742 when in double quotes (see section <A HREF="bashref.html#SEC30">3.5.3 Shell Parameter Expansion</A>).
743 </P><P>
744
745 <A NAME="ANSI-C Quoting"></A>
746 <HR SIZE="6">
747 <A NAME="SEC12"></A>
748 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
749 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC11"> &lt; </A>]</TD>
750 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC13"> &gt; </A>]</TD>
751 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC13"> &lt;&lt; </A>]</TD>
752 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC8"> Up </A>]</TD>
753 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC14"> &gt;&gt; </A>]</TD>
754 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
755 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
756 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
757 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
758 </TR></TABLE>
759 <H4> 3.1.2.4 ANSI-C Quoting </H4>
760 <!--docid::SEC12::-->
761 <P>
762
763 Words of the form <CODE>$'<VAR>string</VAR>'</CODE> are treated specially. The
764 word expands to <VAR>string</VAR>, with backslash-escaped characters replaced
765 as specified by the ANSI C standard. Backslash escape sequences, if
766 present, are decoded as follows:
767 </P><P>
768
769 <DL COMPACT>
770 <DT><CODE>\a</CODE>
771 <DD>alert (bell)
772 <DT><CODE>\b</CODE>
773 <DD>backspace
774 <DT><CODE>\e</CODE>
775 <DD>an escape character (not ANSI C)
776 <DT><CODE>\f</CODE>
777 <DD>form feed
778 <DT><CODE>\n</CODE>
779 <DD>newline
780 <DT><CODE>\r</CODE>
781 <DD>carriage return
782 <DT><CODE>\t</CODE>
783 <DD>horizontal tab
784 <DT><CODE>\v</CODE>
785 <DD>vertical tab
786 <DT><CODE>\\</CODE>
787 <DD>backslash
788 <DT><CODE>\'</CODE>
789 <DD>single quote
790 <DT><CODE>\<VAR>nnn</VAR></CODE>
791 <DD>the eight-bit character whose value is the octal value <VAR>nnn</VAR>
792 (one to three digits)
793 <DT><CODE>\x<VAR>HH</VAR></CODE>
794 <DD>the eight-bit character whose value is the hexadecimal value <VAR>HH</VAR>
795 (one or two hex digits)
796 <DT><CODE>\c<VAR>x</VAR></CODE>
797 <DD>a control-<VAR>x</VAR> character
798 </DL>
799 <P>
800
801 The expanded result is single-quoted, as if the dollar sign had not
802 been present.
803 </P><P>
804
805 <A NAME="Locale Translation"></A>
806 <HR SIZE="6">
807 <A NAME="SEC13"></A>
808 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
809 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC12"> &lt; </A>]</TD>
810 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC14"> &gt; </A>]</TD>
811 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC14"> &lt;&lt; </A>]</TD>
812 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC8"> Up </A>]</TD>
813 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC14"> &gt;&gt; </A>]</TD>
814 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
815 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
816 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
817 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
818 </TR></TABLE>
819 <H4> 3.1.2.5 Locale-Specific Translation </H4>
820 <!--docid::SEC13::-->
821 <P>
822
823 A double-quoted string preceded by a dollar sign (<SAMP>`$'</SAMP>) will cause
824 the string to be translated according to the current locale.
825 If the current locale is <CODE>C</CODE> or <CODE>POSIX</CODE>, the dollar sign
826 is ignored.
827 If the string is translated and replaced, the replacement is
828 double-quoted.
829 </P><P>
830
831 <A NAME="IDX21"></A>
832 <A NAME="IDX22"></A>
833 <A NAME="IDX23"></A>
834 Some systems use the message catalog selected by the <CODE>LC_MESSAGES</CODE>
835 shell variable. Others create the name of the message catalog from the
836 value of the <CODE>TEXTDOMAIN</CODE> shell variable, possibly adding a
837 suffix of <SAMP>`.mo'</SAMP>. If you use the <CODE>TEXTDOMAIN</CODE> variable, you
838 may need to set the <CODE>TEXTDOMAINDIR</CODE> variable to the location of
839 the message catalog files. Still others use both variables in this
840 fashion:
841 <CODE>TEXTDOMAINDIR</CODE>/<CODE>LC_MESSAGES</CODE>/LC_MESSAGES/<CODE>TEXTDOMAIN</CODE>.mo.
842 </P><P>
843
844 <A NAME="Comments"></A>
845 <HR SIZE="6">
846 <A NAME="SEC14"></A>
847 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
848 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC13"> &lt; </A>]</TD>
849 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC15"> &gt; </A>]</TD>
850 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC5"> &lt;&lt; </A>]</TD>
851 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC6"> Up </A>]</TD>
852 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC15"> &gt;&gt; </A>]</TD>
853 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
854 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
855 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
856 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
857 </TR></TABLE>
858 <H3> 3.1.3 Comments </H3>
859 <!--docid::SEC14::-->
860 <P>
861
862 In a non-interactive shell, or an interactive shell in which the
863 <CODE>interactive_comments</CODE> option to the <CODE>shopt</CODE>
864 builtin is enabled (see section <A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A>),
865 a word beginning with <SAMP>`#'</SAMP>
866 causes that word and all remaining characters on that line to
867 be ignored. An interactive shell without the <CODE>interactive_comments</CODE>
868 option enabled does not allow comments. The <CODE>interactive_comments</CODE>
869 option is on by default in interactive shells.
870 See section <A HREF="bashref.html#SEC74">6.3 Interactive Shells</A>, for a description of what makes
871 a shell interactive.
872 </P><P>
873
874 <A NAME="Shell Commands"></A>
875 <HR SIZE="6">
876 <A NAME="SEC15"></A>
877 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
878 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC14"> &lt; </A>]</TD>
879 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC16"> &gt; </A>]</TD>
880 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC23"> &lt;&lt; </A>]</TD>
881 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC5"> Up </A>]</TD>
882 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC23"> &gt;&gt; </A>]</TD>
883 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
884 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
885 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
886 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
887 </TR></TABLE>
888 <H2> 3.2 Shell Commands </H2>
889 <!--docid::SEC15::-->
890 <P>
891
892 A simple shell command such as <CODE>echo a b c</CODE> consists of the command
893 itself followed by arguments, separated by spaces.
894 </P><P>
895
896 More complex shell commands are composed of simple commands arranged together
897 in a variety of ways: in a pipeline in which the output of one command
898 becomes the input of a second, in a loop or conditional construct, or in
899 some other grouping.
900 </P><P>
901
902 <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
903 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC16">3.2.1 Simple Commands</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">The most common type of command.</TD></TR>
904 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC17">3.2.2 Pipelines</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Connecting the input and output of several
905 commands.</TD></TR>
906 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC18">3.2.3 Lists of Commands</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to execute commands sequentially.</TD></TR>
907 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC19">3.2.4 Compound Commands</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Shell commands for control flow.</TD></TR>
908 </TABLE></BLOCKQUOTE>
909 <P>
910
911 <A NAME="Simple Commands"></A>
912 <HR SIZE="6">
913 <A NAME="SEC16"></A>
914 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
915 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC15"> &lt; </A>]</TD>
916 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC17"> &gt; </A>]</TD>
917 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC23"> &lt;&lt; </A>]</TD>
918 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC15"> Up </A>]</TD>
919 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC23"> &gt;&gt; </A>]</TD>
920 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
921 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
922 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
923 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
924 </TR></TABLE>
925 <H3> 3.2.1 Simple Commands </H3>
926 <!--docid::SEC16::-->
927 <P>
928
929 A simple command is the kind of command encountered most often.
930 It's just a sequence of words separated by <CODE>blank</CODE>s, terminated
931 by one of the shell's control operators (see section <A HREF="bashref.html#SEC4">2. Definitions</A>). The
932 first word generally specifies a command to be executed, with the
933 rest of the words being that command's arguments.
934 </P><P>
935
936 The return status (see section <A HREF="bashref.html#SEC53">3.7.5 Exit Status</A>) of a simple command is
937 its exit status as provided
938 by the POSIX 1003.1 <CODE>waitpid</CODE> function, or 128+<VAR>n</VAR> if
939 the command was terminated by signal <VAR>n</VAR>.
940 </P><P>
941
942 <A NAME="Pipelines"></A>
943 <HR SIZE="6">
944 <A NAME="SEC17"></A>
945 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
946 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC16"> &lt; </A>]</TD>
947 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC18"> &gt; </A>]</TD>
948 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC18"> &lt;&lt; </A>]</TD>
949 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC15"> Up </A>]</TD>
950 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC23"> &gt;&gt; </A>]</TD>
951 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
952 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
953 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
954 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
955 </TR></TABLE>
956 <H3> 3.2.2 Pipelines </H3>
957 <!--docid::SEC17::-->
958 <P>
959
960 A <CODE>pipeline</CODE> is a sequence of simple commands separated by
961 <SAMP>`|'</SAMP>.
962 </P><P>
963
964 <A NAME="IDX24"></A>
965 <A NAME="IDX25"></A>
966 <A NAME="IDX26"></A>
967 The format for a pipeline is
968 <TABLE><tr><td>&nbsp;</td><td class=example><pre>[<CODE>time</CODE> [<CODE>-p</CODE>]] [<CODE>!</CODE>] <VAR>command1</VAR> [<CODE>|</CODE> <VAR>command2</VAR> <small>...</small>]
969 </pre></td></tr></table></P><P>
970
971 The output of each command in the pipeline is connected via a pipe
972 to the input of the next command.
973 That is, each command reads the previous command's output.
974 </P><P>
975
976 The reserved word <CODE>time</CODE> causes timing statistics
977 to be printed for the pipeline once it finishes.
978 The statistics currently consist of elapsed (wall-clock) time and
979 user and system time consumed by the command's execution.
980 The <SAMP>`-p'</SAMP> option changes the output format to that specified
981 by POSIX.
982 The <CODE>TIMEFORMAT</CODE> variable may be set to a format string that
983 specifies how the timing information should be displayed.
984 See section <A HREF="bashref.html#SEC63">5.2 Bash Variables</A>, for a description of the available formats.
985 The use of <CODE>time</CODE> as a reserved word permits the timing of
986 shell builtins, shell functions, and pipelines. An external
987 <CODE>time</CODE> command cannot time these easily.
988 </P><P>
989
990 If the pipeline is not executed asynchronously (see section <A HREF="bashref.html#SEC18">3.2.3 Lists of Commands</A>), the
991 shell waits for all commands in the pipeline to complete.
992 </P><P>
993
994 Each command in a pipeline is executed in its own subshell
995 (see section <A HREF="bashref.html#SEC51">3.7.3 Command Execution Environment</A>). The exit
996 status of a pipeline is the exit status of the last command in the
997 pipeline, unless the <CODE>pipefail</CODE> option is enabled
998 (see section <A HREF="bashref.html#SEC59">4.3 The Set Builtin</A>).
999 If <CODE>pipefail</CODE> is enabled, the pipeline's return status is the
1000 value of the last (rightmost) command to exit with a non-zero status,
1001 or zero if all commands exit successfully.
1002 If the reserved word <SAMP>`!'</SAMP> precedes the pipeline, the
1003 exit status is the logical negation of the exit status as described
1004 above.
1005 The shell waits for all commands in the pipeline to terminate before
1006 returning a value.
1007 </P><P>
1008
1009 <A NAME="Lists"></A>
1010 <HR SIZE="6">
1011 <A NAME="SEC18"></A>
1012 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1013 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC17"> &lt; </A>]</TD>
1014 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC19"> &gt; </A>]</TD>
1015 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC19"> &lt;&lt; </A>]</TD>
1016 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC15"> Up </A>]</TD>
1017 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC23"> &gt;&gt; </A>]</TD>
1018 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
1019 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
1020 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
1021 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
1022 </TR></TABLE>
1023 <H3> 3.2.3 Lists of Commands </H3>
1024 <!--docid::SEC18::-->
1025 <P>
1026
1027 A <CODE>list</CODE> is a sequence of one or more pipelines separated by one
1028 of the operators <SAMP>`;'</SAMP>, <SAMP>`&#38;'</SAMP>, <SAMP>`&#38;&#38;'</SAMP>, or <SAMP>`||'</SAMP>,
1029 and optionally terminated by one of <SAMP>`;'</SAMP>, <SAMP>`&#38;'</SAMP>, or a
1030 <CODE>newline</CODE>.
1031 </P><P>
1032
1033 Of these list operators, <SAMP>`&#38;&#38;'</SAMP> and <SAMP>`||'</SAMP>
1034 have equal precedence, followed by <SAMP>`;'</SAMP> and <SAMP>`&#38;'</SAMP>,
1035 which have equal precedence.
1036 </P><P>
1037
1038 A sequence of one or more newlines may appear in a <CODE>list</CODE>
1039 to delimit commands, equivalent to a semicolon.
1040 </P><P>
1041
1042 If a command is terminated by the control operator <SAMP>`&#38;'</SAMP>,
1043 the shell executes the command asynchronously in a subshell.
1044 This is known as executing the command in the <VAR>background</VAR>.
1045 The shell does not wait for the command to finish, and the return
1046 status is 0 (true).
1047 When job control is not active (see section <A HREF="bashref.html#SEC87">7. Job Control</A>),
1048 the standard input for asynchronous commands, in the absence of any
1049 explicit redirections, is redirected from <CODE>/dev/null</CODE>.
1050 </P><P>
1051
1052 Commands separated by a <SAMP>`;'</SAMP> are executed sequentially; the shell
1053 waits for each command to terminate in turn. The return status is the
1054 exit status of the last command executed.
1055 </P><P>
1056
1057 The control operators <SAMP>`&#38;&#38;'</SAMP> and <SAMP>`||'</SAMP>
1058 denote AND lists and OR lists, respectively.
1059 An AND list has the form
1060 <TABLE><tr><td>&nbsp;</td><td class=example><pre><VAR>command1</VAR> &#38;&#38; <VAR>command2</VAR>
1061 </pre></td></tr></table></P><P>
1062
1063 <VAR>command2</VAR> is executed if, and only if, <VAR>command1</VAR>
1064 returns an exit status of zero.
1065 </P><P>
1066
1067 An OR list has the form
1068 <TABLE><tr><td>&nbsp;</td><td class=example><pre><VAR>command1</VAR> || <VAR>command2</VAR>
1069 </pre></td></tr></table></P><P>
1070
1071 <VAR>command2</VAR> is executed if, and only if, <VAR>command1</VAR>
1072 returns a non-zero exit status.
1073 </P><P>
1074
1075 The return status of
1076 AND and OR lists is the exit status of the last command
1077 executed in the list.
1078 </P><P>
1079
1080 <A NAME="Compound Commands"></A>
1081 <HR SIZE="6">
1082 <A NAME="SEC19"></A>
1083 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1084 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC18"> &lt; </A>]</TD>
1085 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC20"> &gt; </A>]</TD>
1086 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC23"> &lt;&lt; </A>]</TD>
1087 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC15"> Up </A>]</TD>
1088 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC23"> &gt;&gt; </A>]</TD>
1089 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
1090 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
1091 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
1092 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
1093 </TR></TABLE>
1094 <H3> 3.2.4 Compound Commands </H3>
1095 <!--docid::SEC19::-->
1096 <P>
1097
1098 <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
1099 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC20">3.2.4.1 Looping Constructs</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Shell commands for iterative action.</TD></TR>
1100 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Shell commands for conditional execution.</TD></TR>
1101 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC22">3.2.4.3 Grouping Commands</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Ways to group commands.</TD></TR>
1102 </TABLE></BLOCKQUOTE>
1103 <P>
1104
1105 Compound commands are the shell programming constructs.
1106 Each construct begins with a reserved word or control operator and is
1107 terminated by a corresponding reserved word or operator.
1108 Any redirections (see section <A HREF="bashref.html#SEC38">3.6 Redirections</A>) associated with a compound command
1109 apply to all commands within that compound command unless explicitly overridden.
1110 </P><P>
1111
1112 Bash provides looping constructs, conditional commands, and mechanisms
1113 to group commands and execute them as a unit.
1114 </P><P>
1115
1116 <A NAME="Looping Constructs"></A>
1117 <HR SIZE="6">
1118 <A NAME="SEC20"></A>
1119 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1120 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC19"> &lt; </A>]</TD>
1121 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC21"> &gt; </A>]</TD>
1122 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC23"> &lt;&lt; </A>]</TD>
1123 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC19"> Up </A>]</TD>
1124 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC23"> &gt;&gt; </A>]</TD>
1125 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
1126 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
1127 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
1128 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
1129 </TR></TABLE>
1130 <H4> 3.2.4.1 Looping Constructs </H4>
1131 <!--docid::SEC20::-->
1132 <P>
1133
1134 Bash supports the following looping constructs.
1135 </P><P>
1136
1137 Note that wherever a <SAMP>`;'</SAMP> appears in the description of a
1138 command's syntax, it may be replaced with one or more newlines.
1139 </P><P>
1140
1141 <DL COMPACT>
1142 <DT><CODE>until</CODE>
1143 <DD><A NAME="IDX27"></A>
1144 <A NAME="IDX28"></A>
1145 <A NAME="IDX29"></A>
1146 The syntax of the <CODE>until</CODE> command is:
1147 <TABLE><tr><td>&nbsp;</td><td class=example><pre>until <VAR>test-commands</VAR>; do <VAR>consequent-commands</VAR>; done
1148 </pre></td></tr></table>Execute <VAR>consequent-commands</VAR> as long as
1149 <VAR>test-commands</VAR> has an exit status which is not zero.
1150 The return status is the exit status of the last command executed
1151 in <VAR>consequent-commands</VAR>, or zero if none was executed.
1152 <P>
1153
1154 <DT><CODE>while</CODE>
1155 <DD><A NAME="IDX30"></A>
1156 The syntax of the <CODE>while</CODE> command is:
1157 <TABLE><tr><td>&nbsp;</td><td class=example><pre>while <VAR>test-commands</VAR>; do <VAR>consequent-commands</VAR>; done
1158 </pre></td></tr></table><P>
1159
1160 Execute <VAR>consequent-commands</VAR> as long as
1161 <VAR>test-commands</VAR> has an exit status of zero.
1162 The return status is the exit status of the last command executed
1163 in <VAR>consequent-commands</VAR>, or zero if none was executed.
1164 </P><P>
1165
1166 <DT><CODE>for</CODE>
1167 <DD><A NAME="IDX31"></A>
1168 The syntax of the <CODE>for</CODE> command is:
1169 <P>
1170
1171 <TABLE><tr><td>&nbsp;</td><td class=example><pre>for <VAR>name</VAR> [in <VAR>words</VAR> <small>...</small>]; do <VAR>commands</VAR>; done
1172 </pre></td></tr></table>Expand <VAR>words</VAR>, and execute <VAR>commands</VAR> once for each member
1173 in the resultant list, with <VAR>name</VAR> bound to the current member.
1174 If <SAMP>`in <VAR>words</VAR>'</SAMP> is not present, the <CODE>for</CODE> command
1175 executes the <VAR>commands</VAR> once for each positional parameter that is
1176 set, as if <SAMP>`in "$@"'</SAMP> had been specified
1177 (see section <A HREF="bashref.html#SEC26">3.4.2 Special Parameters</A>).
1178 The return status is the exit status of the last command that executes.
1179 If there are no items in the expansion of <VAR>words</VAR>, no commands are
1180 executed, and the return status is zero.
1181 </P><P>
1182
1183 An alternate form of the <CODE>for</CODE> command is also supported:
1184 </P><P>
1185
1186 <TABLE><tr><td>&nbsp;</td><td class=example><pre>for (( <VAR>expr1</VAR> ; <VAR>expr2</VAR> ; <VAR>expr3</VAR> )) ; do <VAR>commands</VAR> ; done
1187 </pre></td></tr></table>First, the arithmetic expression <VAR>expr1</VAR> is evaluated according
1188 to the rules described below (see section <A HREF="bashref.html#SEC79">6.5 Shell Arithmetic</A>).
1189 The arithmetic expression <VAR>expr2</VAR> is then evaluated repeatedly
1190 until it evaluates to zero.
1191 Each time <VAR>expr2</VAR> evaluates to a non-zero value, <VAR>commands</VAR> are
1192 executed and the arithmetic expression <VAR>expr3</VAR> is evaluated.
1193 If any expression is omitted, it behaves as if it evaluates to 1.
1194 The return value is the exit status of the last command in <VAR>list</VAR>
1195 that is executed, or false if any of the expressions is invalid.
1196 </P><P>
1197
1198 </DL>
1199 <P>
1200
1201 The <CODE>break</CODE> and <CODE>continue</CODE> builtins (see section <A HREF="bashref.html#SEC57">4.1 Bourne Shell Builtins</A>)
1202 may be used to control loop execution.
1203 </P><P>
1204
1205 <A NAME="Conditional Constructs"></A>
1206 <HR SIZE="6">
1207 <A NAME="SEC21"></A>
1208 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1209 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC20"> &lt; </A>]</TD>
1210 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC22"> &gt; </A>]</TD>
1211 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC22"> &lt;&lt; </A>]</TD>
1212 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC19"> Up </A>]</TD>
1213 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC23"> &gt;&gt; </A>]</TD>
1214 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
1215 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
1216 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
1217 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
1218 </TR></TABLE>
1219 <H4> 3.2.4.2 Conditional Constructs </H4>
1220 <!--docid::SEC21::-->
1221 <P>
1222
1223 <DL COMPACT>
1224 <DT><CODE>if</CODE>
1225 <DD><A NAME="IDX32"></A>
1226 <A NAME="IDX33"></A>
1227 <A NAME="IDX34"></A>
1228 <A NAME="IDX35"></A>
1229 <A NAME="IDX36"></A>
1230 The syntax of the <CODE>if</CODE> command is:
1231 <P>
1232
1233 <TABLE><tr><td>&nbsp;</td><td class=example><pre>if <VAR>test-commands</VAR>; then
1234 <VAR>consequent-commands</VAR>;
1235 [elif <VAR>more-test-commands</VAR>; then
1236 <VAR>more-consequents</VAR>;]
1237 [else <VAR>alternate-consequents</VAR>;]
1238 fi
1239 </pre></td></tr></table></P><P>
1240
1241 The <VAR>test-commands</VAR> list is executed, and if its return status is zero,
1242 the <VAR>consequent-commands</VAR> list is executed.
1243 If <VAR>test-commands</VAR> returns a non-zero status, each <CODE>elif</CODE> list
1244 is executed in turn, and if its exit status is zero,
1245 the corresponding <VAR>more-consequents</VAR> is executed and the
1246 command completes.
1247 If <SAMP>`else <VAR>alternate-consequents</VAR>'</SAMP> is present, and
1248 the final command in the final <CODE>if</CODE> or <CODE>elif</CODE> clause
1249 has a non-zero exit status, then <VAR>alternate-consequents</VAR> is executed.
1250 The return status is the exit status of the last command executed, or
1251 zero if no condition tested true.
1252 </P><P>
1253
1254 <DT><CODE>case</CODE>
1255 <DD><A NAME="IDX37"></A>
1256 <A NAME="IDX38"></A>
1257 <A NAME="IDX39"></A>
1258 The syntax of the <CODE>case</CODE> command is:
1259 <P>
1260
1261 <TABLE><tr><td>&nbsp;</td><td class=example><pre><CODE>case <VAR>word</VAR> in [ [(] <VAR>pattern</VAR> [| <VAR>pattern</VAR>]<small>...</small>) <VAR>command-list</VAR> ;;]<small>...</small> esac</CODE>
1262 </pre></td></tr></table></P><P>
1263
1264 <CODE>case</CODE> will selectively execute the <VAR>command-list</VAR> corresponding to
1265 the first <VAR>pattern</VAR> that matches <VAR>word</VAR>.
1266 The <SAMP>`|'</SAMP> is used to separate multiple patterns, and the <SAMP>`)'</SAMP>
1267 operator terminates a pattern list.
1268 A list of patterns and an associated command-list is known
1269 as a <VAR>clause</VAR>. Each clause must be terminated with <SAMP>`;;'</SAMP>.
1270 The <VAR>word</VAR> undergoes tilde expansion, parameter expansion, command
1271 substitution, arithmetic expansion, and quote removal before matching is
1272 attempted. Each <VAR>pattern</VAR> undergoes tilde expansion, parameter
1273 expansion, command substitution, and arithmetic expansion.
1274 </P><P>
1275
1276 There may be an arbitrary number of <CODE>case</CODE> clauses, each terminated
1277 by a <SAMP>`;;'</SAMP>. The first pattern that matches determines the
1278 command-list that is executed.
1279 </P><P>
1280
1281 Here is an example using <CODE>case</CODE> in a script that could be used to
1282 describe one interesting feature of an animal:
1283 </P><P>
1284
1285 <TABLE><tr><td>&nbsp;</td><td class=example><pre>echo -n "Enter the name of an animal: "
1286 read ANIMAL
1287 echo -n "The $ANIMAL has "
1288 case $ANIMAL in
1289 horse | dog | cat) echo -n "four";;
1290 man | kangaroo ) echo -n "two";;
1291 *) echo -n "an unknown number of";;
1292 esac
1293 echo " legs."
1294 </pre></td></tr></table></P><P>
1295
1296 The return status is zero if no <VAR>pattern</VAR> is matched. Otherwise, the
1297 return status is the exit status of the <VAR>command-list</VAR> executed.
1298 </P><P>
1299
1300 <DT><CODE>select</CODE>
1301 <DD><A NAME="IDX40"></A>
1302 <P>
1303
1304 The <CODE>select</CODE> construct allows the easy generation of menus.
1305 It has almost the same syntax as the <CODE>for</CODE> command:
1306 </P><P>
1307
1308 <TABLE><tr><td>&nbsp;</td><td class=example><pre>select <VAR>name</VAR> [in <VAR>words</VAR> <small>...</small>]; do <VAR>commands</VAR>; done
1309 </pre></td></tr></table></P><P>
1310
1311 The list of words following <CODE>in</CODE> is expanded, generating a list
1312 of items. The set of expanded words is printed on the standard
1313 error output stream, each preceded by a number. If the
1314 <SAMP>`in <VAR>words</VAR>'</SAMP> is omitted, the positional parameters are printed,
1315 as if <SAMP>`in "$@"'</SAMP> had been specifed.
1316 The <CODE>PS3</CODE> prompt is then displayed and a line is read from the
1317 standard input.
1318 If the line consists of a number corresponding to one of the displayed
1319 words, then the value of <VAR>name</VAR> is set to that word.
1320 If the line is empty, the words and prompt are displayed again.
1321 If <CODE>EOF</CODE> is read, the <CODE>select</CODE> command completes.
1322 Any other value read causes <VAR>name</VAR> to be set to null.
1323 The line read is saved in the variable <CODE>REPLY</CODE>.
1324 </P><P>
1325
1326 The <VAR>commands</VAR> are executed after each selection until a
1327 <CODE>break</CODE> command is executed, at which
1328 point the <CODE>select</CODE> command completes.
1329 </P><P>
1330
1331 Here is an example that allows the user to pick a filename from the
1332 current directory, and displays the name and index of the file
1333 selected.
1334 </P><P>
1335
1336 <TABLE><tr><td>&nbsp;</td><td class=example><pre>select fname in *;
1337 do
1338 echo you picked $fname \($REPLY\)
1339 break;
1340 done
1341 </pre></td></tr></table></P><P>
1342
1343 <DT><CODE>((<small>...</small>))</CODE>
1344 <DD><TABLE><tr><td>&nbsp;</td><td class=example><pre>(( <VAR>expression</VAR> ))
1345 </pre></td></tr></table><P>
1346
1347 The arithmetic <VAR>expression</VAR> is evaluated according to the rules
1348 described below (see section <A HREF="bashref.html#SEC79">6.5 Shell Arithmetic</A>).
1349 If the value of the expression is non-zero, the return status is 0;
1350 otherwise the return status is 1. This is exactly equivalent to
1351 <TABLE><tr><td>&nbsp;</td><td class=example><pre>let "<VAR>expression</VAR>"
1352 </pre></td></tr></table>See section <A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A>, for a full description of the <CODE>let</CODE> builtin.
1353 </P><P>
1354
1355 <DT><CODE>[[<small>...</small>]]</CODE>
1356 <DD><A NAME="IDX41"></A>
1357 <A NAME="IDX42"></A>
1358 <TABLE><tr><td>&nbsp;</td><td class=example><pre>[[ <VAR>expression</VAR> ]]
1359 </pre></td></tr></table><P>
1360
1361 Return a status of 0 or 1 depending on the evaluation of
1362 the conditional expression <VAR>expression</VAR>.
1363 Expressions are composed of the primaries described below in
1364 <A HREF="bashref.html#SEC78">6.4 Bash Conditional Expressions</A>.
1365 Word splitting and filename expansion are not performed on the words
1366 between the <SAMP>`[['</SAMP> and <SAMP>`]]'</SAMP>; tilde expansion, parameter and
1367 variable expansion, arithmetic expansion, command substitution, process
1368 substitution, and quote removal are performed.
1369 Conditional operators such as <SAMP>`-f'</SAMP> must be unquoted to be recognized
1370 as primaries.
1371 </P><P>
1372
1373 When the <SAMP>`=='</SAMP> and <SAMP>`!='</SAMP> operators are used, the string to the
1374 right of the operator is considered a pattern and matched according
1375 to the rules described below in <A HREF="bashref.html#SEC36">3.5.8.1 Pattern Matching</A>.
1376 The return value is 0 if the string matches or does not match
1377 the pattern, respectively, and 1 otherwise.
1378 Any part of the pattern may be quoted to force it to be matched as a
1379 string.
1380 </P><P>
1381
1382 An additional binary operator, <SAMP>`=~'</SAMP>, is available, with the same
1383 precedence as <SAMP>`=='</SAMP> and <SAMP>`!='</SAMP>.
1384 When it is used, the string to the right of the operator is considered
1385 an extended regular expression and matched accordingly (as in <I>regex</I>3)).
1386 The return value is 0 if the string matches
1387 the pattern, and 1 otherwise.
1388 If the regular expression is syntactically incorrect, the conditional
1389 expression's return value is 2.
1390 If the shell option <CODE>nocaseglob</CODE>
1391 (see the description of <CODE>shopt</CODE> in <A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A>)
1392 is enabled, the match is performed without regard to the case
1393 of alphabetic characters.
1394 Substrings matched by parenthesized subexpressions within the regular
1395 expression are saved in the array variable <CODE>BASH_REMATCH</CODE>.
1396 The element of <CODE>BASH_REMATCH</CODE> with index 0 is the portion of the string
1397 matching the entire regular expression.
1398 The element of <CODE>BASH_REMATCH</CODE> with index <VAR>n</VAR> is the portion of the
1399 string matching the <VAR>n</VAR>th parenthesized subexpression.
1400 </P><P>
1401
1402 Expressions may be combined using the following operators, listed
1403 in decreasing order of precedence:
1404 </P><P>
1405
1406 <DL COMPACT>
1407 <DT><CODE>( <VAR>expression</VAR> )</CODE>
1408 <DD>Returns the value of <VAR>expression</VAR>.
1409 This may be used to override the normal precedence of operators.
1410 <P>
1411
1412 <DT><CODE>! <VAR>expression</VAR></CODE>
1413 <DD>True if <VAR>expression</VAR> is false.
1414 <P>
1415
1416 <DT><CODE><VAR>expression1</VAR> &#38;&#38; <VAR>expression2</VAR></CODE>
1417 <DD>True if both <VAR>expression1</VAR> and <VAR>expression2</VAR> are true.
1418 <P>
1419
1420 <DT><CODE><VAR>expression1</VAR> || <VAR>expression2</VAR></CODE>
1421 <DD>True if either <VAR>expression1</VAR> or <VAR>expression2</VAR> is true.
1422 </DL>
1423 The <CODE>&#38;&#38;</CODE> and <CODE>||</CODE> operators do not evaluate <VAR>expression2</VAR> if the
1424 value of <VAR>expression1</VAR> is sufficient to determine the return
1425 value of the entire conditional expression.
1426 <P>
1427
1428 </DL>
1429 <P>
1430
1431 <A NAME="Command Grouping"></A>
1432 <HR SIZE="6">
1433 <A NAME="SEC22"></A>
1434 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1435 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC21"> &lt; </A>]</TD>
1436 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC23"> &gt; </A>]</TD>
1437 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC23"> &lt;&lt; </A>]</TD>
1438 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC19"> Up </A>]</TD>
1439 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC23"> &gt;&gt; </A>]</TD>
1440 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
1441 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
1442 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
1443 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
1444 </TR></TABLE>
1445 <H4> 3.2.4.3 Grouping Commands </H4>
1446 <!--docid::SEC22::-->
1447 <P>
1448
1449 Bash provides two ways to group a list of commands to be executed
1450 as a unit. When commands are grouped, redirections may be applied
1451 to the entire command list. For example, the output of all the
1452 commands in the list may be redirected to a single stream.
1453 </P><P>
1454
1455 <DL COMPACT>
1456 <DT><CODE>()</CODE>
1457 <DD><TABLE><tr><td>&nbsp;</td><td class=example><pre>( <VAR>list</VAR> )
1458 </pre></td></tr></table><P>
1459
1460 Placing a list of commands between parentheses causes a subshell
1461 environment to be created (see section <A HREF="bashref.html#SEC51">3.7.3 Command Execution Environment</A>), and each
1462 of the commands in <VAR>list</VAR> to be executed in that subshell. Since the
1463 <VAR>list</VAR> is executed in a subshell, variable assignments do not remain in
1464 effect after the subshell completes.
1465 </P><P>
1466
1467 <DT><CODE>{}</CODE>
1468 <DD><A NAME="IDX43"></A>
1469 <A NAME="IDX44"></A>
1470 <TABLE><tr><td>&nbsp;</td><td class=example><pre>{ <VAR>list</VAR>; }
1471 </pre></td></tr></table><P>
1472
1473 Placing a list of commands between curly braces causes the list to
1474 be executed in the current shell context. No subshell is created.
1475 The semicolon (or newline) following <VAR>list</VAR> is required.
1476 </DL>
1477 <P>
1478
1479 In addition to the creation of a subshell, there is a subtle difference
1480 between these two constructs due to historical reasons. The braces
1481 are <CODE>reserved words</CODE>, so they must be separated from the <VAR>list</VAR>
1482 by <CODE>blank</CODE>s. The parentheses are <CODE>operators</CODE>, and are
1483 recognized as separate tokens by the shell even if they are not separated
1484 from the <VAR>list</VAR> by whitespace.
1485 </P><P>
1486
1487 The exit status of both of these constructs is the exit status of
1488 <VAR>list</VAR>.
1489 </P><P>
1490
1491 <A NAME="Shell Functions"></A>
1492 <HR SIZE="6">
1493 <A NAME="SEC23"></A>
1494 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1495 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC22"> &lt; </A>]</TD>
1496 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC24"> &gt; </A>]</TD>
1497 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC24"> &lt;&lt; </A>]</TD>
1498 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC5"> Up </A>]</TD>
1499 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC56"> &gt;&gt; </A>]</TD>
1500 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
1501 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
1502 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
1503 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
1504 </TR></TABLE>
1505 <H2> 3.3 Shell Functions </H2>
1506 <!--docid::SEC23::-->
1507 <P>
1508
1509 Shell functions are a way to group commands for later execution
1510 using a single name for the group. They are executed just like
1511 a "regular" command.
1512 When the name of a shell function is used as a simple command name,
1513 the list of commands associated with that function name is executed.
1514 Shell functions are executed in the current
1515 shell context; no new process is created to interpret them.
1516 </P><P>
1517
1518 Functions are declared using this syntax:
1519 <A NAME="IDX45"></A>
1520 <TABLE><tr><td>&nbsp;</td><td class=example><pre>[ <CODE>function</CODE> ] <VAR>name</VAR> () <VAR>compound-command</VAR> [ <VAR>redirections</VAR> ]
1521 </pre></td></tr></table></P><P>
1522
1523 This defines a shell function named <VAR>name</VAR>. The reserved
1524 word <CODE>function</CODE> is optional.
1525 If the <CODE>function</CODE> reserved
1526 word is supplied, the parentheses are optional.
1527 The <VAR>body</VAR> of the function is the compound command
1528 <VAR>compound-command</VAR> (see section <A HREF="bashref.html#SEC19">3.2.4 Compound Commands</A>).
1529 That command is usually a <VAR>list</VAR> enclosed between { and }, but
1530 may be any compound command listed above.
1531 <VAR>compound-command</VAR> is executed whenever <VAR>name</VAR> is specified as the
1532 name of a command.
1533 Any redirections (see section <A HREF="bashref.html#SEC38">3.6 Redirections</A>) associated with the shell function
1534 are performed when the function is executed.
1535 </P><P>
1536
1537 The exit status of a function definition is zero unless a syntax error
1538 occurs or a readonly function with the same name already exists.
1539 When executed, the exit status of a function is the exit status of the
1540 last command executed in the body.
1541 </P><P>
1542
1543 Note that for historical reasons, in the most common usage the curly braces
1544 that surround the body of the function must be separated from the body by
1545 <CODE>blank</CODE>s or newlines.
1546 This is because the braces are reserved words and are only recognized
1547 as such when they are separated by whitespace.
1548 Also, when using the braces, the <VAR>list</VAR> must be terminated by a semicolon,
1549 a <SAMP>`&#38;'</SAMP>, or a newline.
1550 </P><P>
1551
1552 When a function is executed, the arguments to the
1553 function become the positional parameters
1554 during its execution (see section <A HREF="bashref.html#SEC25">3.4.1 Positional Parameters</A>).
1555 The special parameter <SAMP>`#'</SAMP> that expands to the number of
1556 positional parameters is updated to reflect the change.
1557 Special parameter <CODE>0</CODE> is unchanged.
1558 The first element of the <CODE>FUNCNAME</CODE> variable is set to the
1559 name of the function while the function is executing.
1560 All other aspects of the shell execution
1561 environment are identical between a function and its caller
1562 with the exception that the <CODE>DEBUG</CODE> trap
1563 below) is not inherited unless the function has been given the
1564 <CODE>trace</CODE> attribute using the <CODE>declare</CODE> builtin or
1565 the <CODE>-o functrace</CODE> option has been enabled with
1566 the <CODE>set</CODE> builtin,
1567 (in which case all functions inherit the <CODE>DEBUG</CODE> trap).
1568 See section <A HREF="bashref.html#SEC57">4.1 Bourne Shell Builtins</A>, for the description of the
1569 <CODE>trap</CODE> builtin.
1570 </P><P>
1571
1572 If the builtin command <CODE>return</CODE>
1573 is executed in a function, the function completes and
1574 execution resumes with the next command after the function
1575 call.
1576 Any command associated with the <CODE>RETURN</CODE> trap is executed
1577 before execution resumes.
1578 When a function completes, the values of the
1579 positional parameters and the special parameter <SAMP>`#'</SAMP>
1580 are restored to the values they had prior to the function's
1581 execution. If a numeric argument is given to <CODE>return</CODE>,
1582 that is the function's return status; otherwise the function's
1583 return status is the exit status of the last command executed
1584 before the <CODE>return</CODE>.
1585 </P><P>
1586
1587 Variables local to the function may be declared with the
1588 <CODE>local</CODE> builtin. These variables are visible only to
1589 the function and the commands it invokes.
1590 </P><P>
1591
1592 Function names and definitions may be listed with the
1593 <SAMP>`-f'</SAMP> option to the <CODE>declare</CODE> or <CODE>typeset</CODE>
1594 builtin commands (see section <A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A>).
1595 The <SAMP>`-F'</SAMP> option to <CODE>declare</CODE> or <CODE>typeset</CODE>
1596 will list the function names only
1597 (and optionally the source file and line number, if the <CODE>extdebug</CODE>
1598 shell option is enabled).
1599 Functions may be exported so that subshells
1600 automatically have them defined with the
1601 <SAMP>`-f'</SAMP> option to the <CODE>export</CODE> builtin
1602 (see section <A HREF="bashref.html#SEC57">4.1 Bourne Shell Builtins</A>).
1603 Note that shell functions and variables with the same name may result
1604 in multiple identically-named entries in the environment passed to the
1605 shell's children.
1606 Care should be taken in cases where this may cause a problem.
1607 </P><P>
1608
1609 Functions may be recursive. No limit is placed on the number of
1610 recursive calls.
1611 </P><P>
1612
1613 <A NAME="Shell Parameters"></A>
1614 <HR SIZE="6">
1615 <A NAME="SEC24"></A>
1616 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1617 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC23"> &lt; </A>]</TD>
1618 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC25"> &gt; </A>]</TD>
1619 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC27"> &lt;&lt; </A>]</TD>
1620 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC5"> Up </A>]</TD>
1621 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC27"> &gt;&gt; </A>]</TD>
1622 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
1623 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
1624 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
1625 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
1626 </TR></TABLE>
1627 <H2> 3.4 Shell Parameters </H2>
1628 <!--docid::SEC24::-->
1629 <P>
1630
1631 <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
1632 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC25">3.4.1 Positional Parameters</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">The shell's command-line arguments.</TD></TR>
1633 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC26">3.4.2 Special Parameters</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Parameters denoted by special characters.</TD></TR>
1634 </TABLE></BLOCKQUOTE>
1635 <P>
1636
1637 A <VAR>parameter</VAR> is an entity that stores values.
1638 It can be a <CODE>name</CODE>, a number, or one of the special characters
1639 listed below.
1640 A <VAR>variable</VAR> is a parameter denoted by a <CODE>name</CODE>.
1641 A variable has a <VAR>value</VAR> and zero or more <VAR>attributes</VAR>.
1642 Attributes are assigned using the <CODE>declare</CODE> builtin command
1643 (see the description of the <CODE>declare</CODE> builtin in <A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A>).
1644 </P><P>
1645
1646 A parameter is set if it has been assigned a value. The null string is
1647 a valid value. Once a variable is set, it may be unset only by using
1648 the <CODE>unset</CODE> builtin command.
1649 </P><P>
1650
1651 A variable may be assigned to by a statement of the form
1652 <TABLE><tr><td>&nbsp;</td><td class=example><pre><VAR>name</VAR>=[<VAR>value</VAR>]
1653 </pre></td></tr></table>If <VAR>value</VAR>
1654 is not given, the variable is assigned the null string. All
1655 <VAR>value</VAR>s undergo tilde expansion, parameter and variable expansion,
1656 command substitution, arithmetic expansion, and quote
1657 removal (detailed below). If the variable has its <CODE>integer</CODE>
1658 attribute set, then <VAR>value</VAR>
1659 is evaluated as an arithmetic expression even if the <CODE>$((<small>...</small>))</CODE>
1660 expansion is not used (see section <A HREF="bashref.html#SEC32">3.5.5 Arithmetic Expansion</A>).
1661 Word splitting is not performed, with the exception
1662 of <CODE>"$@"</CODE> as explained below.
1663 Filename expansion is not performed.
1664 Assignment statements may also appear as arguments to the
1665 <CODE>alias</CODE>,
1666 <CODE>declare</CODE>, <CODE>typeset</CODE>, <CODE>export</CODE>, <CODE>readonly</CODE>,
1667 and <CODE>local</CODE> builtin commands.
1668 </P><P>
1669
1670 <A NAME="Positional Parameters"></A>
1671 <HR SIZE="6">
1672 <A NAME="SEC25"></A>
1673 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1674 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC24"> &lt; </A>]</TD>
1675 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC26"> &gt; </A>]</TD>
1676 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC27"> &lt;&lt; </A>]</TD>
1677 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC24"> Up </A>]</TD>
1678 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC27"> &gt;&gt; </A>]</TD>
1679 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
1680 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
1681 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
1682 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
1683 </TR></TABLE>
1684 <H3> 3.4.1 Positional Parameters </H3>
1685 <!--docid::SEC25::-->
1686 <P>
1687
1688 A <VAR>positional parameter</VAR> is a parameter denoted by one or more
1689 digits, other than the single digit <CODE>0</CODE>. Positional parameters are
1690 assigned from the shell's arguments when it is invoked,
1691 and may be reassigned using the <CODE>set</CODE> builtin command.
1692 Positional parameter <CODE>N</CODE> may be referenced as <CODE>${N}</CODE>, or
1693 as <CODE>$N</CODE> when <CODE>N</CODE> consists of a single digit.
1694 Positional parameters may not be assigned to with assignment statements.
1695 The <CODE>set</CODE> and <CODE>shift</CODE> builtins are used to set and
1696 unset them (see section <A HREF="bashref.html#SEC56">4. Shell Builtin Commands</A>).
1697 The positional parameters are
1698 temporarily replaced when a shell function is executed
1699 (see section <A HREF="bashref.html#SEC23">3.3 Shell Functions</A>).
1700 </P><P>
1701
1702 When a positional parameter consisting of more than a single
1703 digit is expanded, it must be enclosed in braces.
1704 </P><P>
1705
1706 <A NAME="Special Parameters"></A>
1707 <HR SIZE="6">
1708 <A NAME="SEC26"></A>
1709 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1710 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC25"> &lt; </A>]</TD>
1711 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC27"> &gt; </A>]</TD>
1712 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC27"> &lt;&lt; </A>]</TD>
1713 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC24"> Up </A>]</TD>
1714 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC27"> &gt;&gt; </A>]</TD>
1715 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
1716 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
1717 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
1718 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
1719 </TR></TABLE>
1720 <H3> 3.4.2 Special Parameters </H3>
1721 <!--docid::SEC26::-->
1722 <P>
1723
1724 The shell treats several parameters specially. These parameters may
1725 only be referenced; assignment to them is not allowed.
1726 </P><P>
1727
1728 <DL COMPACT>
1729
1730 <A NAME="IDX46"></A>
1731 <DT><CODE>*</CODE>
1732 <DD><A NAME="IDX47"></A>
1733 Expands to the positional parameters, starting from one. When the
1734 expansion occurs within double quotes, it expands to a single word
1735 with the value of each parameter separated by the first character
1736 of the <CODE>IFS</CODE>
1737 special variable. That is, <CODE>"$*"</CODE> is equivalent
1738 to <CODE>"$1<VAR>c</VAR>$2<VAR>c</VAR><small>...</small>"</CODE>, where <VAR>c</VAR>
1739 is the first character of the value of the <CODE>IFS</CODE>
1740 variable.
1741 If <CODE>IFS</CODE> is unset, the parameters are separated by spaces.
1742 If <CODE>IFS</CODE> is null, the parameters are joined without intervening
1743 separators.
1744 <P>
1745
1746 <A NAME="IDX48"></A>
1747 <DT><CODE>@</CODE>
1748 <DD><A NAME="IDX49"></A>
1749 Expands to the positional parameters, starting from one. When the
1750 expansion occurs within double quotes, each parameter expands to a
1751 separate word. That is, <CODE>"$@"</CODE> is equivalent to
1752 <CODE>"$1" "$2" <small>...</small></CODE>.
1753 If the double-quoted expansion occurs within a word, the expansion of
1754 the first parameter is joined with the beginning part of the original
1755 word, and the expansion of the last parameter is joined with the last
1756 part of the original word.
1757 When there are no positional parameters, <CODE>"$@"</CODE> and
1758 <CODE>$@</CODE>
1759 expand to nothing (i.e., they are removed).
1760 <P>
1761
1762 <A NAME="IDX50"></A>
1763 <DT><CODE>#</CODE>
1764 <DD><A NAME="IDX51"></A>
1765 Expands to the number of positional parameters in decimal.
1766 <P>
1767
1768 <A NAME="IDX52"></A>
1769 <DT><CODE>?</CODE>
1770 <DD><A NAME="IDX53"></A>
1771 Expands to the exit status of the most recently executed foreground
1772 pipeline.
1773 <P>
1774
1775 <A NAME="IDX54"></A>
1776 <DT><CODE>-</CODE>
1777 <DD><A NAME="IDX55"></A>
1778 (A hyphen.) Expands to the current option flags as specified upon
1779 invocation, by the <CODE>set</CODE>
1780 builtin command, or those set by the shell itself
1781 (such as the <SAMP>`-i'</SAMP> option).
1782 <P>
1783
1784 <A NAME="IDX56"></A>
1785 <DT><CODE>$</CODE>
1786 <DD><A NAME="IDX57"></A>
1787 Expands to the process ID of the shell. In a <CODE>()</CODE> subshell, it
1788 expands to the process ID of the invoking shell, not the subshell.
1789 <P>
1790
1791 <A NAME="IDX58"></A>
1792 <DT><CODE>!</CODE>
1793 <DD><A NAME="IDX59"></A>
1794 Expands to the process ID of the most recently executed background
1795 (asynchronous) command.
1796 <P>
1797
1798 <A NAME="IDX60"></A>
1799 <DT><CODE>0</CODE>
1800 <DD><A NAME="IDX61"></A>
1801 Expands to the name of the shell or shell script. This is set at
1802 shell initialization. If Bash is invoked with a file of commands
1803 (see section <A HREF="bashref.html#SEC55">3.8 Shell Scripts</A>), <CODE>$0</CODE> is set to the name of that file.
1804 If Bash is started with the <SAMP>`-c'</SAMP> option (see section <A HREF="bashref.html#SEC65">6.1 Invoking Bash</A>),
1805 then <CODE>$0</CODE> is set to the first argument after the string to be
1806 executed, if one is present. Otherwise, it is set
1807 to the filename used to invoke Bash, as given by argument zero.
1808 <P>
1809
1810 <A NAME="IDX62"></A>
1811 <DT><CODE>_</CODE>
1812 <DD><A NAME="IDX63"></A>
1813 (An underscore.)
1814 At shell startup, set to the absolute filename of the shell or shell
1815 script being executed as passed in the argument list.
1816 Subsequently, expands to the last argument to the previous command,
1817 after expansion.
1818 Also set to the full pathname of each command executed and placed in
1819 the environment exported to that command.
1820 When checking mail, this parameter holds the name of the mail file.
1821 </DL>
1822 <P>
1823
1824 <A NAME="Shell Expansions"></A>
1825 <HR SIZE="6">
1826 <A NAME="SEC27"></A>
1827 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1828 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC26"> &lt; </A>]</TD>
1829 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC28"> &gt; </A>]</TD>
1830 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC38"> &lt;&lt; </A>]</TD>
1831 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC5"> Up </A>]</TD>
1832 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC38"> &gt;&gt; </A>]</TD>
1833 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
1834 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
1835 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
1836 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
1837 </TR></TABLE>
1838 <H2> 3.5 Shell Expansions </H2>
1839 <!--docid::SEC27::-->
1840 <P>
1841
1842 Expansion is performed on the command line after it has been split into
1843 <CODE>token</CODE>s. There are seven kinds of expansion performed:
1844 <UL>
1845 <LI>brace expansion
1846 <LI>tilde expansion
1847 <LI>parameter and variable expansion
1848 <LI>command substitution
1849 <LI>arithmetic expansion
1850 <LI>word splitting
1851 <LI>filename expansion
1852 </UL>
1853 <P>
1854
1855 <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
1856 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC28">3.5.1 Brace Expansion</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Expansion of expressions within braces.</TD></TR>
1857 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC29">3.5.2 Tilde Expansion</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Expansion of the ~ character.</TD></TR>
1858 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC30">3.5.3 Shell Parameter Expansion</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How Bash expands variables to their values.</TD></TR>
1859 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC31">3.5.4 Command Substitution</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Using the output of a command as an argument.</TD></TR>
1860 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC32">3.5.5 Arithmetic Expansion</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to use arithmetic in shell expansions.</TD></TR>
1861 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC33">3.5.6 Process Substitution</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">A way to write and read to and from a
1862 command.</TD></TR>
1863 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC34">3.5.7 Word Splitting</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How the results of expansion are split into separate
1864 arguments.</TD></TR>
1865 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC35">3.5.8 Filename Expansion</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">A shorthand for specifying filenames matching patterns.</TD></TR>
1866 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC37">3.5.9 Quote Removal</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How and when quote characters are removed from
1867 words.</TD></TR>
1868 </TABLE></BLOCKQUOTE>
1869 <P>
1870
1871 The order of expansions is: brace expansion, tilde expansion,
1872 parameter, variable, and arithmetic expansion and
1873 command substitution
1874 (done in a left-to-right fashion), word splitting, and filename
1875 expansion.
1876 </P><P>
1877
1878 On systems that can support it, there is an additional expansion
1879 available: <VAR>process substitution</VAR>. This is performed at the
1880 same time as parameter, variable, and arithmetic expansion and
1881 command substitution.
1882 </P><P>
1883
1884 Only brace expansion, word splitting, and filename expansion
1885 can change the number of words of the expansion; other expansions
1886 expand a single word to a single word.
1887 The only exceptions to this are the expansions of
1888 <CODE>"$@"</CODE> (see section <A HREF="bashref.html#SEC26">3.4.2 Special Parameters</A>) and <CODE>"${<VAR>name</VAR>[@]}"</CODE>
1889 (see section <A HREF="bashref.html#SEC81">6.7 Arrays</A>).
1890 </P><P>
1891
1892 After all expansions, <CODE>quote removal</CODE> (see section <A HREF="bashref.html#SEC37">3.5.9 Quote Removal</A>)
1893 is performed.
1894 </P><P>
1895
1896 <A NAME="Brace Expansion"></A>
1897 <HR SIZE="6">
1898 <A NAME="SEC28"></A>
1899 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1900 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC27"> &lt; </A>]</TD>
1901 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC29"> &gt; </A>]</TD>
1902 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC38"> &lt;&lt; </A>]</TD>
1903 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC27"> Up </A>]</TD>
1904 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC38"> &gt;&gt; </A>]</TD>
1905 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
1906 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
1907 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
1908 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
1909 </TR></TABLE>
1910 <H3> 3.5.1 Brace Expansion </H3>
1911 <!--docid::SEC28::-->
1912 <P>
1913
1914 Brace expansion is a mechanism by which arbitrary strings may be generated.
1915 This mechanism is similar to
1916 <VAR>filename expansion</VAR> (see section <A HREF="bashref.html#SEC35">3.5.8 Filename Expansion</A>),
1917 but the file names generated need not exist.
1918 Patterns to be brace expanded take the form of an optional <VAR>preamble</VAR>,
1919 followed by either a series of comma-separated strings or a sequnce expression
1920 between a pair of braces,
1921 followed by an optional <VAR>postscript</VAR>.
1922 The preamble is prefixed to each string contained within the braces, and
1923 the postscript is then appended to each resulting string, expanding left
1924 to right.
1925 </P><P>
1926
1927 Brace expansions may be nested.
1928 The results of each expanded string are not sorted; left to right order
1929 is preserved.
1930 For example,
1931 <TABLE><tr><td>&nbsp;</td><td class=example><pre>bash$ echo a{d,c,b}e
1932 ade ace abe
1933 </pre></td></tr></table></P><P>
1934
1935 A sequence expression takes the form <CODE>{<VAR>x</VAR>..<VAR>y</VAR>}</CODE>,
1936 where <VAR>x</VAR> and <VAR>y</VAR> are either integers or single characters.
1937 When integers are supplied, the expression expands to each number between
1938 <VAR>x</VAR> and <VAR>y</VAR>, inclusive.
1939 When characters are supplied, the expression expands to each character
1940 lexicographically between <VAR>x</VAR> and <VAR>y</VAR>, inclusive. Note that
1941 both <VAR>x</VAR> and <VAR>y</VAR> must be of the same type.
1942 </P><P>
1943
1944 Brace expansion is performed before any other expansions,
1945 and any characters special to other expansions are preserved
1946 in the result. It is strictly textual. Bash
1947 does not apply any syntactic interpretation to the context of the
1948 expansion or the text between the braces.
1949 To avoid conflicts with parameter expansion, the string <SAMP>`${'</SAMP>
1950 is not considered eligible for brace expansion.
1951 </P><P>
1952
1953 A correctly-formed brace expansion must contain unquoted opening
1954 and closing braces, and at least one unquoted comma or a valid
1955 sequence expression.
1956 Any incorrectly formed brace expansion is left unchanged.
1957 </P><P>
1958
1959 A { or <SAMP>`,'</SAMP> may be quoted with a backslash to prevent its
1960 being considered part of a brace expression.
1961 To avoid conflicts with parameter expansion, the string <SAMP>`${'</SAMP>
1962 is not considered eligible for brace expansion.
1963 </P><P>
1964
1965 This construct is typically used as shorthand when the common
1966 prefix of the strings to be generated is longer than in the
1967 above example:
1968 <TABLE><tr><td>&nbsp;</td><td class=example><pre>mkdir /usr/local/src/bash/{old,new,dist,bugs}
1969 </pre></td></tr></table>or
1970 <TABLE><tr><td>&nbsp;</td><td class=example><pre>chown root /usr/{ucb/{ex,edit},lib/{ex?.?*,how_ex}}
1971 </pre></td></tr></table></P><P>
1972
1973 <A NAME="Tilde Expansion"></A>
1974 <HR SIZE="6">
1975 <A NAME="SEC29"></A>
1976 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
1977 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC28"> &lt; </A>]</TD>
1978 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC30"> &gt; </A>]</TD>
1979 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC30"> &lt;&lt; </A>]</TD>
1980 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC27"> Up </A>]</TD>
1981 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC38"> &gt;&gt; </A>]</TD>
1982 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
1983 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
1984 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
1985 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
1986 </TR></TABLE>
1987 <H3> 3.5.2 Tilde Expansion </H3>
1988 <!--docid::SEC29::-->
1989 <P>
1990
1991 If a word begins with an unquoted tilde character (<SAMP>`~'</SAMP>), all of the
1992 characters up to the first unquoted slash (or all characters,
1993 if there is no unquoted slash) are considered a <VAR>tilde-prefix</VAR>.
1994 If none of the characters in the tilde-prefix are quoted, the
1995 characters in the tilde-prefix following the tilde are treated as a
1996 possible <VAR>login name</VAR>.
1997 If this login name is the null string, the tilde is replaced with the
1998 value of the <CODE>HOME</CODE> shell variable.
1999 If <CODE>HOME</CODE> is unset, the home directory of the user executing the
2000 shell is substituted instead.
2001 Otherwise, the tilde-prefix is replaced with the home directory
2002 associated with the specified login name.
2003 </P><P>
2004
2005 If the tilde-prefix is <SAMP>`~+'</SAMP>, the value of
2006 the shell variable <CODE>PWD</CODE> replaces the tilde-prefix.
2007 If the tilde-prefix is <SAMP>`~-'</SAMP>, the value of the shell variable
2008 <CODE>OLDPWD</CODE>, if it is set, is substituted.
2009 </P><P>
2010
2011 If the characters following the tilde in the tilde-prefix consist of a
2012 number <VAR>N</VAR>, optionally prefixed by a <SAMP>`+'</SAMP> or a <SAMP>`-'</SAMP>,
2013 the tilde-prefix is replaced with the
2014 corresponding element from the directory stack, as it would be displayed
2015 by the <CODE>dirs</CODE> builtin invoked with the characters following tilde
2016 in the tilde-prefix as an argument (see section <A HREF="bashref.html#SEC82">6.8 The Directory Stack</A>).
2017 If the tilde-prefix, sans the tilde, consists of a number without a
2018 leading <SAMP>`+'</SAMP> or <SAMP>`-'</SAMP>, <SAMP>`+'</SAMP> is assumed.
2019 </P><P>
2020
2021 If the login name is invalid, or the tilde expansion fails, the word is
2022 left unchanged.
2023 </P><P>
2024
2025 Each variable assignment is checked for unquoted tilde-prefixes immediately
2026 following a <SAMP>`:'</SAMP> or <SAMP>`='</SAMP>.
2027 In these cases, tilde expansion is also performed.
2028 Consequently, one may use file names with tildes in assignments to
2029 <CODE>PATH</CODE>, <CODE>MAILPATH</CODE>, and <CODE>CDPATH</CODE>,
2030 and the shell assigns the expanded value.
2031 </P><P>
2032
2033 The following table shows how Bash treats unquoted tilde-prefixes:
2034 </P><P>
2035
2036 <DL COMPACT>
2037 <DT><CODE>~</CODE>
2038 <DD>The value of <CODE>$HOME</CODE>
2039 <DT><CODE>~/foo</CODE>
2040 <DD><TT>`$HOME/foo'</TT>
2041 <P>
2042
2043 <DT><CODE>~fred/foo</CODE>
2044 <DD>The subdirectory <CODE>foo</CODE> of the home directory of the user
2045 <CODE>fred</CODE>
2046 <P>
2047
2048 <DT><CODE>~+/foo</CODE>
2049 <DD><TT>`$PWD/foo'</TT>
2050 <P>
2051
2052 <DT><CODE>~-/foo</CODE>
2053 <DD><TT>`${OLDPWD-'~-'}/foo'</TT>
2054 <P>
2055
2056 <DT><CODE>~<VAR>N</VAR></CODE>
2057 <DD>The string that would be displayed by <SAMP>`dirs +<VAR>N</VAR>'</SAMP>
2058 <P>
2059
2060 <DT><CODE>~+<VAR>N</VAR></CODE>
2061 <DD>The string that would be displayed by <SAMP>`dirs +<VAR>N</VAR>'</SAMP>
2062 <P>
2063
2064 <DT><CODE>~-<VAR>N</VAR></CODE>
2065 <DD>The string that would be displayed by <SAMP>`dirs -<VAR>N</VAR>'</SAMP>
2066 <P>
2067
2068 </DL>
2069 <P>
2070
2071 <A NAME="Shell Parameter Expansion"></A>
2072 <HR SIZE="6">
2073 <A NAME="SEC30"></A>
2074 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2075 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC29"> &lt; </A>]</TD>
2076 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC31"> &gt; </A>]</TD>
2077 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC31"> &lt;&lt; </A>]</TD>
2078 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC27"> Up </A>]</TD>
2079 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC38"> &gt;&gt; </A>]</TD>
2080 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
2081 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
2082 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
2083 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
2084 </TR></TABLE>
2085 <H3> 3.5.3 Shell Parameter Expansion </H3>
2086 <!--docid::SEC30::-->
2087 <P>
2088
2089 The <SAMP>`$'</SAMP> character introduces parameter expansion,
2090 command substitution, or arithmetic expansion. The parameter name
2091 or symbol to be expanded may be enclosed in braces, which
2092 are optional but serve to protect the variable to be expanded from
2093 characters immediately following it which could be
2094 interpreted as part of the name.
2095 </P><P>
2096
2097 When braces are used, the matching ending brace is the first <SAMP>`}'</SAMP>
2098 not escaped by a backslash or within a quoted string, and not within an
2099 embedded arithmetic expansion, command substitution, or parameter
2100 expansion.
2101 </P><P>
2102
2103 The basic form of parameter expansion is ${<VAR>parameter</VAR>}.
2104 The value of <VAR>parameter</VAR> is substituted. The braces are required
2105 when <VAR>parameter</VAR>
2106 is a positional parameter with more than one digit,
2107 or when <VAR>parameter</VAR>
2108 is followed by a character that is not to be
2109 interpreted as part of its name.
2110 </P><P>
2111
2112 If the first character of <VAR>parameter</VAR> is an exclamation point,
2113 a level of variable indirection is introduced.
2114 Bash uses the value of the variable formed from the rest of
2115 <VAR>parameter</VAR> as the name of the variable; this variable is then
2116 expanded and that value is used in the rest of the substitution, rather
2117 than the value of <VAR>parameter</VAR> itself.
2118 This is known as <CODE>indirect expansion</CODE>.
2119 The exceptions to this are the expansions of ${!<VAR>prefix*</VAR>}
2120 and ${!<VAR>name</VAR>[@]}
2121 described below.
2122 The exclamation point must immediately follow the left brace in order to
2123 introduce indirection.
2124 </P><P>
2125
2126 In each of the cases below, <VAR>word</VAR> is subject to tilde expansion,
2127 parameter expansion, command substitution, and arithmetic expansion.
2128 </P><P>
2129
2130 When not performing substring expansion, Bash tests for a parameter
2131 that is unset or null; omitting the colon results in a test only for a
2132 parameter that is unset. Put another way, if the colon is included,
2133 the operator tests for both existence and that the value is not null;
2134 if the colon is omitted, the operator tests only for existence.
2135 </P><P>
2136
2137 <DL COMPACT>
2138
2139 <DT><CODE>${<VAR>parameter</VAR>:-<VAR>word</VAR>}</CODE>
2140 <DD>If <VAR>parameter</VAR> is unset or null, the expansion of
2141 <VAR>word</VAR> is substituted. Otherwise, the value of
2142 <VAR>parameter</VAR> is substituted.
2143 <P>
2144
2145 <DT><CODE>${<VAR>parameter</VAR>:=<VAR>word</VAR>}</CODE>
2146 <DD>If <VAR>parameter</VAR>
2147 is unset or null, the expansion of <VAR>word</VAR>
2148 is assigned to <VAR>parameter</VAR>.
2149 The value of <VAR>parameter</VAR> is then substituted.
2150 Positional parameters and special parameters may not be assigned to
2151 in this way.
2152 <P>
2153
2154 <DT><CODE>${<VAR>parameter</VAR>:?<VAR>word</VAR>}</CODE>
2155 <DD>If <VAR>parameter</VAR>
2156 is null or unset, the expansion of <VAR>word</VAR> (or a message
2157 to that effect if <VAR>word</VAR>
2158 is not present) is written to the standard error and the shell, if it
2159 is not interactive, exits. Otherwise, the value of <VAR>parameter</VAR> is
2160 substituted.
2161 <P>
2162
2163 <DT><CODE>${<VAR>parameter</VAR>:+<VAR>word</VAR>}</CODE>
2164 <DD>If <VAR>parameter</VAR>
2165 is null or unset, nothing is substituted, otherwise the expansion of
2166 <VAR>word</VAR> is substituted.
2167 <P>
2168
2169 <DT><CODE>${<VAR>parameter</VAR>:<VAR>offset</VAR>}</CODE>
2170 <DD><DT><CODE>${<VAR>parameter</VAR>:<VAR>offset</VAR>:<VAR>length</VAR>}</CODE>
2171 <DD>Expands to up to <VAR>length</VAR> characters of <VAR>parameter</VAR>
2172 starting at the character specified by <VAR>offset</VAR>.
2173 If <VAR>length</VAR> is omitted, expands to the substring of
2174 <VAR>parameter</VAR> starting at the character specified by <VAR>offset</VAR>.
2175 <VAR>length</VAR> and <VAR>offset</VAR> are arithmetic expressions
2176 (see section <A HREF="bashref.html#SEC79">6.5 Shell Arithmetic</A>).
2177 This is referred to as Substring Expansion.
2178 <P>
2179
2180 <VAR>length</VAR> must evaluate to a number greater than or equal to zero.
2181 If <VAR>offset</VAR> evaluates to a number less than zero, the value
2182 is used as an offset from the end of the value of <VAR>parameter</VAR>.
2183 If <VAR>parameter</VAR> is <SAMP>`@'</SAMP>, the result is <VAR>length</VAR> positional
2184 parameters beginning at <VAR>offset</VAR>.
2185 If <VAR>parameter</VAR> is an array name indexed by <SAMP>`@'</SAMP> or <SAMP>`*'</SAMP>,
2186 the result is the <VAR>length</VAR>
2187 members of the array beginning with <CODE>${<VAR>parameter</VAR>[<VAR>offset</VAR>]}</CODE>.
2188 Substring indexing is zero-based unless the positional parameters
2189 are used, in which case the indexing starts at 1.
2190 </P><P>
2191
2192 <DT><CODE>${!<VAR>prefix</VAR>*}</CODE>
2193 <DD><DT><CODE>${!<VAR>prefix</VAR>@}</CODE>
2194 <DD>Expands to the names of variables whose names begin with <VAR>prefix</VAR>,
2195 separated by the first character of the <CODE>IFS</CODE> special variable.
2196 <P>
2197
2198 <DT><CODE>${!<VAR>name</VAR>[@]}</CODE>
2199 <DD><DT><CODE>${!<VAR>name</VAR>[*]}</CODE>
2200 <DD>If <VAR>name</VAR> is an array variable, expands to the list of array indices
2201 (keys) assigned in <VAR>name</VAR>.
2202 If <VAR>name</VAR> is not an array, expands to 0 if <VAR>name</VAR> is set and null
2203 otherwise.
2204 When <SAMP>`@'</SAMP> is used and the expansion appears within double quotes, each
2205 key expands to a separate word.
2206 <P>
2207
2208 <DT><CODE>${#<VAR>parameter</VAR>}</CODE>
2209 <DD>The length in characters of the expanded value of <VAR>parameter</VAR> is
2210 substituted.
2211 If <VAR>parameter</VAR> is <SAMP>`*'</SAMP> or <SAMP>`@'</SAMP>, the value substituted
2212 is the number of positional parameters.
2213 If <VAR>parameter</VAR> is an array name subscripted by <SAMP>`*'</SAMP> or <SAMP>`@'</SAMP>,
2214 the value substituted is the number of elements in the array.
2215 <P>
2216
2217 <DT><CODE>${<VAR>parameter</VAR>#<VAR>word</VAR>}</CODE>
2218 <DD><DT><CODE>${<VAR>parameter</VAR>##<VAR>word</VAR>}</CODE>
2219 <DD>The <VAR>word</VAR>
2220 is expanded to produce a pattern just as in filename
2221 expansion (see section <A HREF="bashref.html#SEC35">3.5.8 Filename Expansion</A>). If the pattern matches
2222 the beginning of the expanded value of <VAR>parameter</VAR>,
2223 then the result of the expansion is the expanded value of <VAR>parameter</VAR>
2224 with the shortest matching pattern (the <SAMP>`#'</SAMP> case) or the
2225 longest matching pattern (the <SAMP>`##'</SAMP> case) deleted.
2226 If <VAR>parameter</VAR> is <SAMP>`@'</SAMP> or <SAMP>`*'</SAMP>,
2227 the pattern removal operation is applied to each positional
2228 parameter in turn, and the expansion is the resultant list.
2229 If <VAR>parameter</VAR> is an array variable subscripted with
2230 <SAMP>`@'</SAMP> or <SAMP>`*'</SAMP>,
2231 the pattern removal operation is applied to each member of the
2232 array in turn, and the expansion is the resultant list.
2233 <P>
2234
2235 <DT><CODE>${<VAR>parameter</VAR>%<VAR>word</VAR>}</CODE>
2236 <DD><DT><CODE>${<VAR>parameter</VAR>%%<VAR>word</VAR>}</CODE>
2237 <DD>The <VAR>word</VAR> is expanded to produce a pattern just as in
2238 filename expansion.
2239 If the pattern matches a trailing portion of the expanded value of
2240 <VAR>parameter</VAR>, then the result of the expansion is the value of
2241 <VAR>parameter</VAR> with the shortest matching pattern (the <SAMP>`%'</SAMP> case)
2242 or the longest matching pattern (the <SAMP>`%%'</SAMP> case) deleted.
2243 If <VAR>parameter</VAR> is <SAMP>`@'</SAMP> or <SAMP>`*'</SAMP>,
2244 the pattern removal operation is applied to each positional
2245 parameter in turn, and the expansion is the resultant list.
2246 If <VAR>parameter</VAR>
2247 is an array variable subscripted with <SAMP>`@'</SAMP> or <SAMP>`*'</SAMP>,
2248 the pattern removal operation is applied to each member of the
2249 array in turn, and the expansion is the resultant list.
2250 <P>
2251
2252 <DT><CODE>${<VAR>parameter</VAR>/<VAR>pattern</VAR>/<VAR>string</VAR>}</CODE>
2253 <DD><DT><CODE>${<VAR>parameter</VAR>//<VAR>pattern</VAR>/<VAR>string</VAR>}</CODE>
2254 <DD><P>
2255
2256 The <VAR>pattern</VAR> is expanded to produce a pattern just as in
2257 filename expansion.
2258 <VAR>Parameter</VAR> is expanded and the longest match of <VAR>pattern</VAR>
2259 against its value is replaced with <VAR>string</VAR>.
2260 In the first form, only the first match is replaced.
2261 The second form causes all matches of <VAR>pattern</VAR> to be
2262 replaced with <VAR>string</VAR>.
2263 If <VAR>pattern</VAR> begins with <SAMP>`#'</SAMP>, it must match at the beginning
2264 of the expanded value of <VAR>parameter</VAR>.
2265 If <VAR>pattern</VAR> begins with <SAMP>`%'</SAMP>, it must match at the end
2266 of the expanded value of <VAR>parameter</VAR>.
2267 If <VAR>string</VAR> is null, matches of <VAR>pattern</VAR> are deleted
2268 and the <CODE>/</CODE> following <VAR>pattern</VAR> may be omitted.
2269 If <VAR>parameter</VAR> is <SAMP>`@'</SAMP> or <SAMP>`*'</SAMP>,
2270 the substitution operation is applied to each positional
2271 parameter in turn, and the expansion is the resultant list.
2272 If <VAR>parameter</VAR>
2273 is an array variable subscripted with <SAMP>`@'</SAMP> or <SAMP>`*'</SAMP>,
2274 the substitution operation is applied to each member of the
2275 array in turn, and the expansion is the resultant list.
2276 </P><P>
2277
2278 </DL>
2279 <P>
2280
2281 <A NAME="Command Substitution"></A>
2282 <HR SIZE="6">
2283 <A NAME="SEC31"></A>
2284 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2285 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC30"> &lt; </A>]</TD>
2286 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC32"> &gt; </A>]</TD>
2287 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC32"> &lt;&lt; </A>]</TD>
2288 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC27"> Up </A>]</TD>
2289 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC38"> &gt;&gt; </A>]</TD>
2290 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
2291 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
2292 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
2293 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
2294 </TR></TABLE>
2295 <H3> 3.5.4 Command Substitution </H3>
2296 <!--docid::SEC31::-->
2297 <P>
2298
2299 Command substitution allows the output of a command to replace
2300 the command itself.
2301 Command substitution occurs when a command is enclosed as follows:
2302 <TABLE><tr><td>&nbsp;</td><td class=example><pre>$(<VAR>command</VAR>)
2303 </pre></td></tr></table>or
2304 <TABLE><tr><td>&nbsp;</td><td class=example><pre>`<VAR>command</VAR>`
2305 </pre></td></tr></table></P><P>
2306
2307 Bash performs the expansion by executing <VAR>command</VAR> and
2308 replacing the command substitution with the standard output of the
2309 command, with any trailing newlines deleted.
2310 Embedded newlines are not deleted, but they may be removed during
2311 word splitting.
2312 The command substitution <CODE>$(cat <VAR>file</VAR>)</CODE> can be
2313 replaced by the equivalent but faster <CODE>$(&#60; <VAR>file</VAR>)</CODE>.
2314 </P><P>
2315
2316 When the old-style backquote form of substitution is used,
2317 backslash retains its literal meaning except when followed by
2318 <SAMP>`$'</SAMP>, <SAMP>``'</SAMP>, or <SAMP>`\'</SAMP>.
2319 The first backquote not preceded by a backslash terminates the
2320 command substitution.
2321 When using the <CODE>$(<VAR>command</VAR>)</CODE> form, all characters between
2322 the parentheses make up the command; none are treated specially.
2323 </P><P>
2324
2325 Command substitutions may be nested. To nest when using the backquoted
2326 form, escape the inner backquotes with backslashes.
2327 </P><P>
2328
2329 If the substitution appears within double quotes, word splitting and
2330 filename expansion are not performed on the results.
2331 </P><P>
2332
2333 <A NAME="Arithmetic Expansion"></A>
2334 <HR SIZE="6">
2335 <A NAME="SEC32"></A>
2336 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2337 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC31"> &lt; </A>]</TD>
2338 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC33"> &gt; </A>]</TD>
2339 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC33"> &lt;&lt; </A>]</TD>
2340 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC27"> Up </A>]</TD>
2341 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC38"> &gt;&gt; </A>]</TD>
2342 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
2343 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
2344 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
2345 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
2346 </TR></TABLE>
2347 <H3> 3.5.5 Arithmetic Expansion </H3>
2348 <!--docid::SEC32::-->
2349 <P>
2350
2351 Arithmetic expansion allows the evaluation of an arithmetic expression
2352 and the substitution of the result. The format for arithmetic expansion is:
2353 </P><P>
2354
2355 <TABLE><tr><td>&nbsp;</td><td class=example><pre>$(( <VAR>expression</VAR> ))
2356 </pre></td></tr></table></P><P>
2357
2358 The expression is treated as if it were within double quotes, but
2359 a double quote inside the parentheses is not treated specially.
2360 All tokens in the expression undergo parameter expansion, command
2361 substitution, and quote removal.
2362 Arithmetic expansions may be nested.
2363 </P><P>
2364
2365 The evaluation is performed according to the rules listed below
2366 (see section <A HREF="bashref.html#SEC79">6.5 Shell Arithmetic</A>).
2367 If the expression is invalid, Bash prints a message indicating
2368 failure to the standard error and no substitution occurs.
2369 </P><P>
2370
2371 <A NAME="Process Substitution"></A>
2372 <HR SIZE="6">
2373 <A NAME="SEC33"></A>
2374 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2375 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC32"> &lt; </A>]</TD>
2376 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC34"> &gt; </A>]</TD>
2377 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC34"> &lt;&lt; </A>]</TD>
2378 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC27"> Up </A>]</TD>
2379 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC38"> &gt;&gt; </A>]</TD>
2380 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
2381 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
2382 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
2383 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
2384 </TR></TABLE>
2385 <H3> 3.5.6 Process Substitution </H3>
2386 <!--docid::SEC33::-->
2387 <P>
2388
2389 Process substitution is supported on systems that support named
2390 pipes (FIFOs) or the <TT>`/dev/fd'</TT> method of naming open files.
2391 It takes the form of
2392 <TABLE><tr><td>&nbsp;</td><td class=example><pre>&#60;(<VAR>list</VAR>)
2393 </pre></td></tr></table>or
2394 <TABLE><tr><td>&nbsp;</td><td class=example><pre>&#62;(<VAR>list</VAR>)
2395 </pre></td></tr></table>The process <VAR>list</VAR> is run with its input or output connected to a
2396 FIFO or some file in <TT>`/dev/fd'</TT>. The name of this file is
2397 passed as an argument to the current command as the result of the
2398 expansion. If the <CODE>&#62;(<VAR>list</VAR>)</CODE> form is used, writing to
2399 the file will provide input for <VAR>list</VAR>. If the
2400 <CODE>&#60;(<VAR>list</VAR>)</CODE> form is used, the file passed as an
2401 argument should be read to obtain the output of <VAR>list</VAR>.
2402 Note that no space may appear between the <CODE>&#60;</CODE> or <CODE>&#62;</CODE>
2403 and the left parenthesis, otherwise the construct would be interpreted
2404 as a redirection.
2405 </P><P>
2406
2407 When available, process substitution is performed simultaneously with
2408 parameter and variable expansion, command substitution, and arithmetic
2409 expansion.
2410 </P><P>
2411
2412 <A NAME="Word Splitting"></A>
2413 <HR SIZE="6">
2414 <A NAME="SEC34"></A>
2415 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2416 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC33"> &lt; </A>]</TD>
2417 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC35"> &gt; </A>]</TD>
2418 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC35"> &lt;&lt; </A>]</TD>
2419 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC27"> Up </A>]</TD>
2420 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC38"> &gt;&gt; </A>]</TD>
2421 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
2422 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
2423 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
2424 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
2425 </TR></TABLE>
2426 <H3> 3.5.7 Word Splitting </H3>
2427 <!--docid::SEC34::-->
2428 <P>
2429
2430 The shell scans the results of parameter expansion, command substitution,
2431 and arithmetic expansion that did not occur within double quotes for
2432 word splitting.
2433 </P><P>
2434
2435 The shell treats each character of <CODE>$IFS</CODE>
2436 as a delimiter, and splits the results of the other
2437 expansions into words on these characters. If
2438 <CODE>IFS</CODE> is unset, or its value is exactly <CODE>&#60;space&#62;&#60;tab&#62;&#60;newline&#62;</CODE>,
2439 the default, then any sequence of <CODE>IFS</CODE>
2440 characters serves to delimit words. If <CODE>IFS</CODE>
2441 has a value other than the default, then sequences of
2442 the whitespace characters <CODE>space</CODE> and <CODE>tab</CODE>
2443 are ignored at the beginning and end of the
2444 word, as long as the whitespace character is in the
2445 value of <CODE>IFS</CODE> (an <CODE>IFS</CODE> whitespace character).
2446 Any character in <CODE>IFS</CODE> that is not <CODE>IFS</CODE>
2447 whitespace, along with any adjacent <CODE>IFS</CODE>
2448 whitespace characters, delimits a field. A sequence of <CODE>IFS</CODE>
2449 whitespace characters is also treated as a delimiter.
2450 If the value of <CODE>IFS</CODE> is null, no word splitting occurs.
2451 </P><P>
2452
2453 Explicit null arguments (<CODE>""</CODE> or <CODE>"</CODE>) are retained.
2454 Unquoted implicit null arguments, resulting from the expansion of
2455 parameters that have no values, are removed.
2456 If a parameter with no value is expanded within double quotes, a
2457 null argument results and is retained.
2458 </P><P>
2459
2460 Note that if no expansion occurs, no splitting
2461 is performed.
2462 </P><P>
2463
2464 <A NAME="Filename Expansion"></A>
2465 <HR SIZE="6">
2466 <A NAME="SEC35"></A>
2467 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2468 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC34"> &lt; </A>]</TD>
2469 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC36"> &gt; </A>]</TD>
2470 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC37"> &lt;&lt; </A>]</TD>
2471 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC27"> Up </A>]</TD>
2472 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC37"> &gt;&gt; </A>]</TD>
2473 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
2474 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
2475 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
2476 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
2477 </TR></TABLE>
2478 <H3> 3.5.8 Filename Expansion </H3>
2479 <!--docid::SEC35::-->
2480 <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
2481 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC36">3.5.8.1 Pattern Matching</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How the shell matches patterns.</TD></TR>
2482 </TABLE></BLOCKQUOTE>
2483 <A NAME="IDX64"></A>
2484 <A NAME="IDX65"></A>
2485 <A NAME="IDX66"></A>
2486 <A NAME="IDX67"></A>
2487 <P>
2488
2489 After word splitting, unless the <SAMP>`-f'</SAMP> option has been set
2490 (see section <A HREF="bashref.html#SEC59">4.3 The Set Builtin</A>), Bash scans each word for the characters
2491 <SAMP>`*'</SAMP>, <SAMP>`?'</SAMP>, and <SAMP>`['</SAMP>.
2492 If one of these characters appears, then the word is
2493 regarded as a <VAR>pattern</VAR>,
2494 and replaced with an alphabetically sorted list of
2495 file names matching the pattern. If no matching file names are found,
2496 and the shell option <CODE>nullglob</CODE> is disabled, the word is left
2497 unchanged.
2498 If the <CODE>nullglob</CODE> option is set, and no matches are found, the word
2499 is removed.
2500 If the <CODE>failglob</CODE> shell option is set, and no matches are found,
2501 an error message is printed and the command is not executed.
2502 If the shell option <CODE>nocaseglob</CODE> is enabled, the match is performed
2503 without regard to the case of alphabetic characters.
2504 </P><P>
2505
2506 When a pattern is used for filename generation, the character <SAMP>`.'</SAMP>
2507 at the start of a filename or immediately following a slash
2508 must be matched explicitly, unless the shell option <CODE>dotglob</CODE> is set.
2509 When matching a file name, the slash character must always be
2510 matched explicitly.
2511 In other cases, the <SAMP>`.'</SAMP> character is not treated specially.
2512 </P><P>
2513
2514 See the description of <CODE>shopt</CODE> in <A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A>,
2515 for a description of the <CODE>nocaseglob</CODE>, <CODE>nullglob</CODE>,
2516 <CODE>failglob</CODE>, and <CODE>dotglob</CODE> options.
2517 </P><P>
2518
2519 The <CODE>GLOBIGNORE</CODE>
2520 shell variable may be used to restrict the set of filenames matching a
2521 pattern. If <CODE>GLOBIGNORE</CODE>
2522 is set, each matching filename that also matches one of the patterns in
2523 <CODE>GLOBIGNORE</CODE> is removed from the list of matches. The filenames
2524 <TT>`.'</TT> and <TT>`..'</TT>
2525 are always ignored when <CODE>GLOBIGNORE</CODE>
2526 is set and not null.
2527 However, setting <CODE>GLOBIGNORE</CODE> to a non-null value has the effect of
2528 enabling the <CODE>dotglob</CODE>
2529 shell option, so all other filenames beginning with a
2530 <SAMP>`.'</SAMP> will match.
2531 To get the old behavior of ignoring filenames beginning with a
2532 <SAMP>`.'</SAMP>, make <SAMP>`.*'</SAMP> one of the patterns in <CODE>GLOBIGNORE</CODE>.
2533 The <CODE>dotglob</CODE> option is disabled when <CODE>GLOBIGNORE</CODE>
2534 is unset.
2535 </P><P>
2536
2537 <A NAME="Pattern Matching"></A>
2538 <HR SIZE="6">
2539 <A NAME="SEC36"></A>
2540 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2541 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC35"> &lt; </A>]</TD>
2542 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC37"> &gt; </A>]</TD>
2543 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC37"> &lt;&lt; </A>]</TD>
2544 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC35"> Up </A>]</TD>
2545 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC37"> &gt;&gt; </A>]</TD>
2546 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
2547 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
2548 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
2549 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
2550 </TR></TABLE>
2551 <H4> 3.5.8.1 Pattern Matching </H4>
2552 <!--docid::SEC36::-->
2553 <P>
2554
2555 Any character that appears in a pattern, other than the special pattern
2556 characters described below, matches itself.
2557 The NUL character may not occur in a pattern.
2558 A backslash escapes the following character; the
2559 escaping backslash is discarded when matching.
2560 The special pattern characters must be quoted if they are to be matched
2561 literally.
2562 </P><P>
2563
2564 The special pattern characters have the following meanings:
2565 <DL COMPACT>
2566 <DT><CODE>*</CODE>
2567 <DD>Matches any string, including the null string.
2568 <DT><CODE>?</CODE>
2569 <DD>Matches any single character.
2570 <DT><CODE>[<small>...</small>]</CODE>
2571 <DD>Matches any one of the enclosed characters. A pair of characters
2572 separated by a hyphen denotes a <VAR>range expression</VAR>;
2573 any character that sorts between those two characters, inclusive,
2574 using the current locale's collating sequence and character set,
2575 is matched. If the first character following the
2576 <SAMP>`['</SAMP> is a <SAMP>`!'</SAMP> or a <SAMP>`^'</SAMP>
2577 then any character not enclosed is matched. A <SAMP>`-'</SAMP>
2578 may be matched by including it as the first or last character
2579 in the set. A <SAMP>`]'</SAMP> may be matched by including it as the first
2580 character in the set.
2581 The sorting order of characters in range expressions is determined by
2582 the current locale and the value of the <CODE>LC_COLLATE</CODE> shell variable,
2583 if set.
2584 <P>
2585
2586 For example, in the default C locale, <SAMP>`[a-dx-z]'</SAMP> is equivalent to
2587 <SAMP>`[abcdxyz]'</SAMP>. Many locales sort characters in dictionary order, and in
2588 these locales <SAMP>`[a-dx-z]'</SAMP> is typically not equivalent to <SAMP>`[abcdxyz]'</SAMP>;
2589 it might be equivalent to <SAMP>`[aBbCcDdxXyYz]'</SAMP>, for example. To obtain
2590 the traditional interpretation of ranges in bracket expressions, you can
2591 force the use of the C locale by setting the <CODE>LC_COLLATE</CODE> or
2592 <CODE>LC_ALL</CODE> environment variable to the value <SAMP>`C'</SAMP>.
2593 </P><P>
2594
2595 Within <SAMP>`['</SAMP> and <SAMP>`]'</SAMP>, <VAR>character classes</VAR> can be specified
2596 using the syntax
2597 <CODE>[:</CODE><VAR>class</VAR><CODE>:]</CODE>, where <VAR>class</VAR> is one of the
2598 following classes defined in the POSIX 1003.2 standard:
2599 <TABLE><tr><td>&nbsp;</td><td class=example><pre>alnum alpha ascii blank cntrl digit graph lower
2600 print punct space upper word xdigit
2601 </pre></td></tr></table>A character class matches any character belonging to that class.
2602 The <CODE>word</CODE> character class matches letters, digits, and the character
2603 <SAMP>`_'</SAMP>.
2604 </P><P>
2605
2606 Within <SAMP>`['</SAMP> and <SAMP>`]'</SAMP>, an <VAR>equivalence class</VAR> can be
2607 specified using the syntax <CODE>[=</CODE><VAR>c</VAR><CODE>=]</CODE>, which
2608 matches all characters with the same collation weight (as defined
2609 by the current locale) as the character <VAR>c</VAR>.
2610 </P><P>
2611
2612 Within <SAMP>`['</SAMP> and <SAMP>`]'</SAMP>, the syntax <CODE>[.</CODE><VAR>symbol</VAR><CODE>.]</CODE>
2613 matches the collating symbol <VAR>symbol</VAR>.
2614 </DL>
2615 <P>
2616
2617 If the <CODE>extglob</CODE> shell option is enabled using the <CODE>shopt</CODE>
2618 builtin, several extended pattern matching operators are recognized.
2619 In the following description, a <VAR>pattern-list</VAR> is a list of one
2620 or more patterns separated by a <SAMP>`|'</SAMP>.
2621 Composite patterns may be formed using one or more of the following
2622 sub-patterns:
2623 </P><P>
2624
2625 <DL COMPACT>
2626 <DT><CODE>?(<VAR>pattern-list</VAR>)</CODE>
2627 <DD>Matches zero or one occurrence of the given patterns.
2628 <P>
2629
2630 <DT><CODE>*(<VAR>pattern-list</VAR>)</CODE>
2631 <DD>Matches zero or more occurrences of the given patterns.
2632 <P>
2633
2634 <DT><CODE>+(<VAR>pattern-list</VAR>)</CODE>
2635 <DD>Matches one or more occurrences of the given patterns.
2636 <P>
2637
2638 <DT><CODE>@(<VAR>pattern-list</VAR>)</CODE>
2639 <DD>Matches exactly one of the given patterns.
2640 <P>
2641
2642 <DT><CODE>!(<VAR>pattern-list</VAR>)</CODE>
2643 <DD>Matches anything except one of the given patterns.
2644 </DL>
2645 <P>
2646
2647 <A NAME="Quote Removal"></A>
2648 <HR SIZE="6">
2649 <A NAME="SEC37"></A>
2650 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2651 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC36"> &lt; </A>]</TD>
2652 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC38"> &gt; </A>]</TD>
2653 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC38"> &lt;&lt; </A>]</TD>
2654 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC27"> Up </A>]</TD>
2655 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC38"> &gt;&gt; </A>]</TD>
2656 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
2657 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
2658 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
2659 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
2660 </TR></TABLE>
2661 <H3> 3.5.9 Quote Removal </H3>
2662 <!--docid::SEC37::-->
2663 <P>
2664
2665 After the preceding expansions, all unquoted occurrences of the
2666 characters <SAMP>`\'</SAMP>, <SAMP>`''</SAMP>, and <SAMP>`"'</SAMP> that did not
2667 result from one of the above expansions are removed.
2668 </P><P>
2669
2670 <A NAME="Redirections"></A>
2671 <HR SIZE="6">
2672 <A NAME="SEC38"></A>
2673 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2674 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC37"> &lt; </A>]</TD>
2675 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC39"> &gt; </A>]</TD>
2676 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC48"> &lt;&lt; </A>]</TD>
2677 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC5"> Up </A>]</TD>
2678 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC48"> &gt;&gt; </A>]</TD>
2679 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
2680 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
2681 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
2682 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
2683 </TR></TABLE>
2684 <H2> 3.6 Redirections </H2>
2685 <!--docid::SEC38::-->
2686 <P>
2687
2688 Before a command is executed, its input and output
2689 may be <VAR>redirected</VAR>
2690 using a special notation interpreted by the shell.
2691 Redirection may also be used to open and close files for the
2692 current shell execution environment. The following redirection
2693 operators may precede or appear anywhere within a
2694 simple command or may follow a command.
2695 Redirections are processed in the order they appear, from
2696 left to right.
2697 </P><P>
2698
2699 In the following descriptions, if the file descriptor number is
2700 omitted, and the first character of the redirection operator is
2701 <SAMP>`&#60;'</SAMP>, the redirection refers to the standard input (file
2702 descriptor 0). If the first character of the redirection operator
2703 is <SAMP>`&#62;'</SAMP>, the redirection refers to the standard output (file
2704 descriptor 1).
2705 </P><P>
2706
2707 The word following the redirection operator in the following
2708 descriptions, unless otherwise noted, is subjected to brace expansion,
2709 tilde expansion, parameter expansion, command substitution, arithmetic
2710 expansion, quote removal, filename expansion, and word splitting.
2711 If it expands to more than one word, Bash reports an error.
2712 </P><P>
2713
2714 Note that the order of redirections is significant. For example,
2715 the command
2716 <TABLE><tr><td>&nbsp;</td><td class=example><pre>ls &#62; <VAR>dirlist</VAR> 2&#62;&#38;1
2717 </pre></td></tr></table>directs both standard output (file descriptor 1) and standard error
2718 (file descriptor 2) to the file <VAR>dirlist</VAR>, while the command
2719 <TABLE><tr><td>&nbsp;</td><td class=example><pre>ls 2&#62;&#38;1 &#62; <VAR>dirlist</VAR>
2720 </pre></td></tr></table>directs only the standard output to file <VAR>dirlist</VAR>,
2721 because the standard error was duplicated as standard output
2722 before the standard output was redirected to <VAR>dirlist</VAR>.
2723 </P><P>
2724
2725 Bash handles several filenames specially when they are used in
2726 redirections, as described in the following table:
2727 </P><P>
2728
2729 <DL COMPACT>
2730 <DT><CODE>/dev/fd/<VAR>fd</VAR></CODE>
2731 <DD>If <VAR>fd</VAR> is a valid integer, file descriptor <VAR>fd</VAR> is duplicated.
2732 <P>
2733
2734 <DT><CODE>/dev/stdin</CODE>
2735 <DD>File descriptor 0 is duplicated.
2736 <P>
2737
2738 <DT><CODE>/dev/stdout</CODE>
2739 <DD>File descriptor 1 is duplicated.
2740 <P>
2741
2742 <DT><CODE>/dev/stderr</CODE>
2743 <DD>File descriptor 2 is duplicated.
2744 <P>
2745
2746 <DT><CODE>/dev/tcp/<VAR>host</VAR>/<VAR>port</VAR></CODE>
2747 <DD>If <VAR>host</VAR> is a valid hostname or Internet address, and <VAR>port</VAR>
2748 is an integer port number or service name, Bash attempts to open a TCP
2749 connection to the corresponding socket.
2750 <P>
2751
2752 <DT><CODE>/dev/udp/<VAR>host</VAR>/<VAR>port</VAR></CODE>
2753 <DD>If <VAR>host</VAR> is a valid hostname or Internet address, and <VAR>port</VAR>
2754 is an integer port number or service name, Bash attempts to open a UDP
2755 connection to the corresponding socket.
2756 <P>
2757
2758 </DL>
2759 <P>
2760
2761 A failure to open or create a file causes the redirection to fail.
2762 </P><P>
2763
2764 <HR SIZE="6">
2765 <A NAME="SEC39"></A>
2766 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2767 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC38"> &lt; </A>]</TD>
2768 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC40"> &gt; </A>]</TD>
2769 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC48"> &lt;&lt; </A>]</TD>
2770 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC38"> Up </A>]</TD>
2771 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC48"> &gt;&gt; </A>]</TD>
2772 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
2773 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
2774 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
2775 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
2776 </TR></TABLE>
2777 <H3> 3.6.1 Redirecting Input </H3>
2778 <!--docid::SEC39::-->
2779 Redirection of input causes the file whose name results from
2780 the expansion of <VAR>word</VAR>
2781 to be opened for reading on file descriptor <CODE>n</CODE>,
2782 or the standard input (file descriptor 0) if <CODE>n</CODE>
2783 is not specified.
2784 <P>
2785
2786 The general format for redirecting input is:
2787 <TABLE><tr><td>&nbsp;</td><td class=example><pre>[<VAR>n</VAR>]&#60;<VAR>word</VAR>
2788 </pre></td></tr></table></P><P>
2789
2790 <HR SIZE="6">
2791 <A NAME="SEC40"></A>
2792 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2793 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC39"> &lt; </A>]</TD>
2794 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC41"> &gt; </A>]</TD>
2795 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC41"> &lt;&lt; </A>]</TD>
2796 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC38"> Up </A>]</TD>
2797 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC48"> &gt;&gt; </A>]</TD>
2798 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
2799 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
2800 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
2801 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
2802 </TR></TABLE>
2803 <H3> 3.6.2 Redirecting Output </H3>
2804 <!--docid::SEC40::-->
2805 Redirection of output causes the file whose name results from
2806 the expansion of <VAR>word</VAR>
2807 to be opened for writing on file descriptor <VAR>n</VAR>,
2808 or the standard output (file descriptor 1) if <VAR>n</VAR>
2809 is not specified. If the file does not exist it is created;
2810 if it does exist it is truncated to zero size.
2811 <P>
2812
2813 The general format for redirecting output is:
2814 <TABLE><tr><td>&nbsp;</td><td class=example><pre>[<VAR>n</VAR>]&#62;[|]<VAR>word</VAR>
2815 </pre></td></tr></table></P><P>
2816
2817 If the redirection operator is <SAMP>`&#62;'</SAMP>, and the <CODE>noclobber</CODE>
2818 option to the <CODE>set</CODE> builtin has been enabled, the redirection
2819 will fail if the file whose name results from the expansion of
2820 <VAR>word</VAR> exists and is a regular file.
2821 If the redirection operator is <SAMP>`&#62;|'</SAMP>, or the redirection operator is
2822 <SAMP>`&#62;'</SAMP> and the <CODE>noclobber</CODE> option is not enabled, the redirection
2823 is attempted even if the file named by <VAR>word</VAR> exists.
2824 </P><P>
2825
2826 <HR SIZE="6">
2827 <A NAME="SEC41"></A>
2828 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2829 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC40"> &lt; </A>]</TD>
2830 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC42"> &gt; </A>]</TD>
2831 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC42"> &lt;&lt; </A>]</TD>
2832 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC38"> Up </A>]</TD>
2833 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC48"> &gt;&gt; </A>]</TD>
2834 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
2835 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
2836 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
2837 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
2838 </TR></TABLE>
2839 <H3> 3.6.3 Appending Redirected Output </H3>
2840 <!--docid::SEC41::-->
2841 Redirection of output in this fashion
2842 causes the file whose name results from
2843 the expansion of <VAR>word</VAR>
2844 to be opened for appending on file descriptor <VAR>n</VAR>,
2845 or the standard output (file descriptor 1) if <VAR>n</VAR>
2846 is not specified. If the file does not exist it is created.
2847 <P>
2848
2849 The general format for appending output is:
2850 <TABLE><tr><td>&nbsp;</td><td class=example><pre>[<VAR>n</VAR>]&#62;&#62;<VAR>word</VAR>
2851 </pre></td></tr></table></P><P>
2852
2853 <HR SIZE="6">
2854 <A NAME="SEC42"></A>
2855 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2856 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC41"> &lt; </A>]</TD>
2857 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC43"> &gt; </A>]</TD>
2858 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC43"> &lt;&lt; </A>]</TD>
2859 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC38"> Up </A>]</TD>
2860 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC48"> &gt;&gt; </A>]</TD>
2861 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
2862 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
2863 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
2864 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
2865 </TR></TABLE>
2866 <H3> 3.6.4 Redirecting Standard Output and Standard Error </H3>
2867 <!--docid::SEC42::-->
2868 Bash allows both the
2869 standard output (file descriptor 1) and
2870 the standard error output (file descriptor 2)
2871 to be redirected to the file whose name is the
2872 expansion of <VAR>word</VAR> with this construct.
2873 <P>
2874
2875 There are two formats for redirecting standard output and
2876 standard error:
2877 <TABLE><tr><td>&nbsp;</td><td class=example><pre>&#38;&#62;<VAR>word</VAR>
2878 </pre></td></tr></table>and
2879 <TABLE><tr><td>&nbsp;</td><td class=example><pre>&#62;&#38;<VAR>word</VAR>
2880 </pre></td></tr></table>Of the two forms, the first is preferred.
2881 This is semantically equivalent to
2882 <TABLE><tr><td>&nbsp;</td><td class=example><pre>&#62;<VAR>word</VAR> 2&#62;&#38;1
2883 </pre></td></tr></table></P><P>
2884
2885 <HR SIZE="6">
2886 <A NAME="SEC43"></A>
2887 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2888 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC42"> &lt; </A>]</TD>
2889 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC44"> &gt; </A>]</TD>
2890 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC44"> &lt;&lt; </A>]</TD>
2891 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC38"> Up </A>]</TD>
2892 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC48"> &gt;&gt; </A>]</TD>
2893 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
2894 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
2895 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
2896 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
2897 </TR></TABLE>
2898 <H3> 3.6.5 Here Documents </H3>
2899 <!--docid::SEC43::-->
2900 This type of redirection instructs the shell to read input from the
2901 current source until a line containing only <VAR>word</VAR>
2902 (with no trailing blanks) is seen. All of
2903 the lines read up to that point are then used as the standard
2904 input for a command.
2905 <P>
2906
2907 The format of here-documents is:
2908 <TABLE><tr><td>&nbsp;</td><td class=example><pre>&#60;&#60;[-]<VAR>word</VAR>
2909 <VAR>here-document</VAR>
2910 <VAR>delimiter</VAR>
2911 </pre></td></tr></table></P><P>
2912
2913 No parameter expansion, command substitution, arithmetic expansion,
2914 or filename expansion is performed on
2915 <VAR>word</VAR>. If any characters in <VAR>word</VAR> are quoted, the
2916 <VAR>delimiter</VAR> is the result of quote removal on <VAR>word</VAR>,
2917 and the lines in the here-document are not expanded.
2918 If <VAR>word</VAR> is unquoted,
2919 all lines of the here-document are subjected to parameter expansion,
2920 command substitution, and arithmetic expansion. In the latter
2921 case, the character sequence <CODE>\newline</CODE> is ignored, and <SAMP>`\'</SAMP>
2922 must be used to quote the characters
2923 <SAMP>`\'</SAMP>, <SAMP>`$'</SAMP>, and <SAMP>``'</SAMP>.
2924 </P><P>
2925
2926 If the redirection operator is <SAMP>`&#60;&#60;-'</SAMP>,
2927 then all leading tab characters are stripped from input lines and the
2928 line containing <VAR>delimiter</VAR>.
2929 This allows here-documents within shell scripts to be indented in a
2930 natural fashion.
2931 </P><P>
2932
2933 <HR SIZE="6">
2934 <A NAME="SEC44"></A>
2935 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2936 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC43"> &lt; </A>]</TD>
2937 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC45"> &gt; </A>]</TD>
2938 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC45"> &lt;&lt; </A>]</TD>
2939 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC38"> Up </A>]</TD>
2940 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC48"> &gt;&gt; </A>]</TD>
2941 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
2942 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
2943 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
2944 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
2945 </TR></TABLE>
2946 <H3> 3.6.6 Here Strings </H3>
2947 <!--docid::SEC44::-->
2948 A variant of here documents, the format is:
2949 <TABLE><tr><td>&nbsp;</td><td class=example><pre>&#60;&#60;&#60; <VAR>word</VAR>
2950 </pre></td></tr></table><P>
2951
2952 The <VAR>word</VAR> is expanded and supplied to the command on its standard
2953 input.
2954 </P><P>
2955
2956 <HR SIZE="6">
2957 <A NAME="SEC45"></A>
2958 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2959 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC44"> &lt; </A>]</TD>
2960 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC46"> &gt; </A>]</TD>
2961 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC46"> &lt;&lt; </A>]</TD>
2962 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC38"> Up </A>]</TD>
2963 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC48"> &gt;&gt; </A>]</TD>
2964 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
2965 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
2966 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
2967 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
2968 </TR></TABLE>
2969 <H3> 3.6.7 Duplicating File Descriptors </H3>
2970 <!--docid::SEC45::-->
2971 The redirection operator
2972 <TABLE><tr><td>&nbsp;</td><td class=example><pre>[<VAR>n</VAR>]&#60;&#38;<VAR>word</VAR>
2973 </pre></td></tr></table>is used to duplicate input file descriptors.
2974 If <VAR>word</VAR>
2975 expands to one or more digits, the file descriptor denoted by <VAR>n</VAR>
2976 is made to be a copy of that file descriptor.
2977 If the digits in <VAR>word</VAR> do not specify a file descriptor open for
2978 input, a redirection error occurs.
2979 If <VAR>word</VAR>
2980 evaluates to <SAMP>`-'</SAMP>, file descriptor <VAR>n</VAR> is closed. If
2981 <VAR>n</VAR> is not specified, the standard input (file descriptor 0) is used.
2982 <P>
2983
2984 The operator
2985 <TABLE><tr><td>&nbsp;</td><td class=example><pre>[<VAR>n</VAR>]&#62;&#38;<VAR>word</VAR>
2986 </pre></td></tr></table>is used similarly to duplicate output file descriptors. If
2987 <VAR>n</VAR> is not specified, the standard output (file descriptor 1) is used.
2988 If the digits in <VAR>word</VAR> do not specify a file descriptor open for
2989 output, a redirection error occurs.
2990 As a special case, if <VAR>n</VAR> is omitted, and <VAR>word</VAR> does not
2991 expand to one or more digits, the standard output and standard
2992 error are redirected as described previously.
2993 </P><P>
2994
2995 <HR SIZE="6">
2996 <A NAME="SEC46"></A>
2997 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
2998 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC45"> &lt; </A>]</TD>
2999 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC47"> &gt; </A>]</TD>
3000 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC47"> &lt;&lt; </A>]</TD>
3001 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC38"> Up </A>]</TD>
3002 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC48"> &gt;&gt; </A>]</TD>
3003 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
3004 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
3005 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
3006 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
3007 </TR></TABLE>
3008 <H3> 3.6.8 Moving File Descriptors </H3>
3009 <!--docid::SEC46::-->
3010 The redirection operator
3011 <TABLE><tr><td>&nbsp;</td><td class=example><pre>[<VAR>n</VAR>]&#60;&#38;<VAR>digit</VAR>-
3012 </pre></td></tr></table>moves the file descriptor <VAR>digit</VAR> to file descriptor <VAR>n</VAR>,
3013 or the standard input (file descriptor 0) if <VAR>n</VAR> is not specified.
3014 <VAR>digit</VAR> is closed after being duplicated to <VAR>n</VAR>.
3015 <P>
3016
3017 Similarly, the redirection operator
3018 <TABLE><tr><td>&nbsp;</td><td class=example><pre>[<VAR>n</VAR>]&#62;&#38;<VAR>digit</VAR>-
3019 </pre></td></tr></table>moves the file descriptor <VAR>digit</VAR> to file descriptor <VAR>n</VAR>,
3020 or the standard output (file descriptor 1) if <VAR>n</VAR> is not specified.
3021 </P><P>
3022
3023 <HR SIZE="6">
3024 <A NAME="SEC47"></A>
3025 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3026 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC46"> &lt; </A>]</TD>
3027 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC48"> &gt; </A>]</TD>
3028 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC48"> &lt;&lt; </A>]</TD>
3029 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC38"> Up </A>]</TD>
3030 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC48"> &gt;&gt; </A>]</TD>
3031 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
3032 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
3033 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
3034 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
3035 </TR></TABLE>
3036 <H3> 3.6.9 Opening File Descriptors for Reading and Writing </H3>
3037 <!--docid::SEC47::-->
3038 The redirection operator
3039 <TABLE><tr><td>&nbsp;</td><td class=example><pre>[<VAR>n</VAR>]&#60;&#62;<VAR>word</VAR>
3040 </pre></td></tr></table>causes the file whose name is the expansion of <VAR>word</VAR>
3041 to be opened for both reading and writing on file descriptor
3042 <VAR>n</VAR>, or on file descriptor 0 if <VAR>n</VAR>
3043 is not specified. If the file does not exist, it is created.
3044 <P>
3045
3046 <A NAME="Executing Commands"></A>
3047 <HR SIZE="6">
3048 <A NAME="SEC48"></A>
3049 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3050 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC47"> &lt; </A>]</TD>
3051 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC49"> &gt; </A>]</TD>
3052 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC55"> &lt;&lt; </A>]</TD>
3053 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC5"> Up </A>]</TD>
3054 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC55"> &gt;&gt; </A>]</TD>
3055 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
3056 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
3057 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
3058 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
3059 </TR></TABLE>
3060 <H2> 3.7 Executing Commands </H2>
3061 <!--docid::SEC48::-->
3062 <P>
3063
3064 <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
3065 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC49">3.7.1 Simple Command Expansion</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How Bash expands simple commands before
3066 executing them.</TD></TR>
3067 </TABLE>
3068
3069 <br>
3070 <TABLE BORDER=0 CELLSPACING=0>
3071 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC50">3.7.2 Command Search and Execution</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How Bash finds commands and runs them.</TD></TR>
3072 </TABLE>
3073
3074 <br>
3075 <TABLE BORDER=0 CELLSPACING=0>
3076 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC51">3.7.3 Command Execution Environment</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">The environment in which Bash
3077 executes commands that are not
3078 shell builtins.</TD></TR>
3079 </TABLE>
3080
3081 <br>
3082 <TABLE BORDER=0 CELLSPACING=0>
3083 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC52">3.7.4 Environment</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">The environment given to a command.</TD></TR>
3084 </TABLE>
3085
3086 <br>
3087 <TABLE BORDER=0 CELLSPACING=0>
3088 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC53">3.7.5 Exit Status</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">The status returned by commands and how Bash
3089 interprets it.</TD></TR>
3090 </TABLE>
3091
3092 <br>
3093 <TABLE BORDER=0 CELLSPACING=0>
3094 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC54">3.7.6 Signals</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">What happens when Bash or a command it runs
3095 receives a signal.</TD></TR>
3096 </TABLE>
3097
3098 <br>
3099 </BLOCKQUOTE>
3100 <P>
3101
3102 <A NAME="Simple Command Expansion"></A>
3103 <HR SIZE="6">
3104 <A NAME="SEC49"></A>
3105 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3106 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC48"> &lt; </A>]</TD>
3107 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC50"> &gt; </A>]</TD>
3108 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC55"> &lt;&lt; </A>]</TD>
3109 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC48"> Up </A>]</TD>
3110 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC55"> &gt;&gt; </A>]</TD>
3111 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
3112 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
3113 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
3114 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
3115 </TR></TABLE>
3116 <H3> 3.7.1 Simple Command Expansion </H3>
3117 <!--docid::SEC49::-->
3118 <P>
3119
3120 When a simple command is executed, the shell performs the following
3121 expansions, assignments, and redirections, from left to right.
3122 </P><P>
3123
3124 <OL>
3125 <LI>
3126 The words that the parser has marked as variable assignments (those
3127 preceding the command name) and redirections are saved for later
3128 processing.
3129 <P>
3130
3131 <LI>
3132 The words that are not variable assignments or redirections are
3133 expanded (see section <A HREF="bashref.html#SEC27">3.5 Shell Expansions</A>).
3134 If any words remain after expansion, the first word
3135 is taken to be the name of the command and the remaining words are
3136 the arguments.
3137 <P>
3138
3139 <LI>
3140 Redirections are performed as described above (see section <A HREF="bashref.html#SEC38">3.6 Redirections</A>).
3141 <P>
3142
3143 <LI>
3144 The text after the <SAMP>`='</SAMP> in each variable assignment undergoes tilde
3145 expansion, parameter expansion, command substitution, arithmetic expansion,
3146 and quote removal before being assigned to the variable.
3147 </OL>
3148 <P>
3149
3150 If no command name results, the variable assignments affect the current
3151 shell environment. Otherwise, the variables are added to the environment
3152 of the executed command and do not affect the current shell environment.
3153 If any of the assignments attempts to assign a value to a readonly variable,
3154 an error occurs, and the command exits with a non-zero status.
3155 </P><P>
3156
3157 If no command name results, redirections are performed, but do not
3158 affect the current shell environment. A redirection error causes the
3159 command to exit with a non-zero status.
3160 </P><P>
3161
3162 If there is a command name left after expansion, execution proceeds as
3163 described below. Otherwise, the command exits. If one of the expansions
3164 contained a command substitution, the exit status of the command is
3165 the exit status of the last command substitution performed. If there
3166 were no command substitutions, the command exits with a status of zero.
3167 </P><P>
3168
3169 <A NAME="Command Search and Execution"></A>
3170 <HR SIZE="6">
3171 <A NAME="SEC50"></A>
3172 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3173 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC49"> &lt; </A>]</TD>
3174 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC51"> &gt; </A>]</TD>
3175 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC51"> &lt;&lt; </A>]</TD>
3176 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC48"> Up </A>]</TD>
3177 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC55"> &gt;&gt; </A>]</TD>
3178 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
3179 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
3180 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
3181 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
3182 </TR></TABLE>
3183 <H3> 3.7.2 Command Search and Execution </H3>
3184 <!--docid::SEC50::-->
3185 <P>
3186
3187 After a command has been split into words, if it results in a
3188 simple command and an optional list of arguments, the following
3189 actions are taken.
3190 </P><P>
3191
3192 <OL>
3193 <LI>
3194 If the command name contains no slashes, the shell attempts to
3195 locate it. If there exists a shell function by that name, that
3196 function is invoked as described in <A HREF="bashref.html#SEC23">3.3 Shell Functions</A>.
3197 <P>
3198
3199 <LI>
3200 If the name does not match a function, the shell searches for
3201 it in the list of shell builtins. If a match is found, that
3202 builtin is invoked.
3203 <P>
3204
3205 <LI>
3206 If the name is neither a shell function nor a builtin,
3207 and contains no slashes, Bash searches each element of
3208 <CODE>$PATH</CODE> for a directory containing an executable file
3209 by that name. Bash uses a hash table to remember the full
3210 pathnames of executable files to avoid multiple <CODE>PATH</CODE> searches
3211 (see the description of <CODE>hash</CODE> in <A HREF="bashref.html#SEC57">4.1 Bourne Shell Builtins</A>).
3212 A full search of the directories in <CODE>$PATH</CODE>
3213 is performed only if the command is not found in the hash table.
3214 If the search is unsuccessful, the shell prints an error
3215 message and returns an exit status of 127.
3216 <P>
3217
3218 <LI>
3219 If the search is successful, or if the command name contains
3220 one or more slashes, the shell executes the named program in
3221 a separate execution environment.
3222 Argument 0 is set to the name given, and the remaining arguments
3223 to the command are set to the arguments supplied, if any.
3224 <P>
3225
3226 <LI>
3227 If this execution fails because the file is not in executable
3228 format, and the file is not a directory, it is assumed to be a
3229 <VAR>shell script</VAR> and the shell executes it as described in
3230 <A HREF="bashref.html#SEC55">3.8 Shell Scripts</A>.
3231 <P>
3232
3233 <LI>
3234 If the command was not begun asynchronously, the shell waits for
3235 the command to complete and collects its exit status.
3236 <P>
3237
3238 </OL>
3239 <P>
3240
3241 <A NAME="Command Execution Environment"></A>
3242 <HR SIZE="6">
3243 <A NAME="SEC51"></A>
3244 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3245 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC50"> &lt; </A>]</TD>
3246 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC52"> &gt; </A>]</TD>
3247 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC52"> &lt;&lt; </A>]</TD>
3248 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC48"> Up </A>]</TD>
3249 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC55"> &gt;&gt; </A>]</TD>
3250 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
3251 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
3252 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
3253 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
3254 </TR></TABLE>
3255 <H3> 3.7.3 Command Execution Environment </H3>
3256 <!--docid::SEC51::-->
3257 <P>
3258
3259 The shell has an <VAR>execution environment</VAR>, which consists of the
3260 following:
3261 </P><P>
3262
3263 <UL>
3264 <LI>
3265 open files inherited by the shell at invocation, as modified by
3266 redirections supplied to the <CODE>exec</CODE> builtin
3267 <P>
3268
3269 <LI>
3270 the current working directory as set by <CODE>cd</CODE>, <CODE>pushd</CODE>, or
3271 <CODE>popd</CODE>, or inherited by the shell at invocation
3272 <P>
3273
3274 <LI>
3275 the file creation mode mask as set by <CODE>umask</CODE> or inherited from
3276 the shell's parent
3277 <P>
3278
3279 <LI>
3280 current traps set by <CODE>trap</CODE>
3281 <P>
3282
3283 <LI>
3284 shell parameters that are set by variable assignment or with <CODE>set</CODE>
3285 or inherited from the shell's parent in the environment
3286 <P>
3287
3288 <LI>
3289 shell functions defined during execution or inherited from the shell's
3290 parent in the environment
3291 <P>
3292
3293 <LI>
3294 options enabled at invocation (either by default or with command-line
3295 arguments) or by <CODE>set</CODE>
3296 <P>
3297
3298 <LI>
3299 options enabled by <CODE>shopt</CODE>
3300 <P>
3301
3302 <LI>
3303 shell aliases defined with <CODE>alias</CODE> (see section <A HREF="bashref.html#SEC80">6.6 Aliases</A>)
3304 <P>
3305
3306 <LI>
3307 various process IDs, including those of background jobs
3308 (see section <A HREF="bashref.html#SEC18">3.2.3 Lists of Commands</A>), the value of <CODE>$$</CODE>, and the value of
3309 <CODE>$PPID</CODE>
3310 <P>
3311
3312 </UL>
3313 <P>
3314
3315 When a simple command other than a builtin or shell function
3316 is to be executed, it
3317 is invoked in a separate execution environment that consists of
3318 the following. Unless otherwise noted, the values are inherited
3319 from the shell.
3320 </P><P>
3321
3322 <UL>
3323 <LI>
3324 the shell's open files, plus any modifications and additions specified
3325 by redirections to the command
3326 <P>
3327
3328 <LI>
3329 the current working directory
3330 <P>
3331
3332 <LI>
3333 the file creation mode mask
3334 <P>
3335
3336 <LI>
3337 shell variables and functions marked for export, along with variables
3338 exported for the command, passed in the environment (see section <A HREF="bashref.html#SEC52">3.7.4 Environment</A>)
3339 <P>
3340
3341 <LI>
3342 traps caught by the shell are reset to the values inherited from the
3343 shell's parent, and traps ignored by the shell are ignored
3344 <P>
3345
3346 </UL>
3347 <P>
3348
3349 A command invoked in this separate environment cannot affect the
3350 shell's execution environment.
3351 </P><P>
3352
3353 Command substitution, commands grouped with parentheses,
3354 and asynchronous commands are invoked in a
3355 subshell environment that is a duplicate of the shell environment,
3356 except that traps caught by the shell are reset to the values
3357 that the shell inherited from its parent at invocation. Builtin
3358 commands that are invoked as part of a pipeline are also executed
3359 in a subshell environment. Changes made to the subshell environment
3360 cannot affect the shell's execution environment.
3361 </P><P>
3362
3363 If a command is followed by a <SAMP>`&#38;'</SAMP> and job control is not active, the
3364 default standard input for the command is the empty file <TT>`/dev/null'</TT>.
3365 Otherwise, the invoked command inherits the file descriptors of the calling
3366 shell as modified by redirections.
3367 </P><P>
3368
3369 <A NAME="Environment"></A>
3370 <HR SIZE="6">
3371 <A NAME="SEC52"></A>
3372 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3373 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC51"> &lt; </A>]</TD>
3374 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC53"> &gt; </A>]</TD>
3375 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC53"> &lt;&lt; </A>]</TD>
3376 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC48"> Up </A>]</TD>
3377 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC55"> &gt;&gt; </A>]</TD>
3378 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
3379 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
3380 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
3381 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
3382 </TR></TABLE>
3383 <H3> 3.7.4 Environment </H3>
3384 <!--docid::SEC52::-->
3385 <P>
3386
3387 When a program is invoked it is given an array of strings
3388 called the <VAR>environment</VAR>.
3389 This is a list of name-value pairs, of the form <CODE>name=value</CODE>.
3390 </P><P>
3391
3392 Bash provides several ways to manipulate the environment.
3393 On invocation, the shell scans its own environment and
3394 creates a parameter for each name found, automatically marking
3395 it for <VAR>export</VAR>
3396 to child processes. Executed commands inherit the environment.
3397 The <CODE>export</CODE> and <SAMP>`declare -x'</SAMP>
3398 commands allow parameters and functions to be added to and
3399 deleted from the environment. If the value of a parameter
3400 in the environment is modified, the new value becomes part
3401 of the environment, replacing the old. The environment
3402 inherited by any executed command consists of the shell's
3403 initial environment, whose values may be modified in the shell,
3404 less any pairs removed by the <CODE>unset</CODE> and <SAMP>`export -n'</SAMP>
3405 commands, plus any additions via the <CODE>export</CODE> and
3406 <SAMP>`declare -x'</SAMP> commands.
3407 </P><P>
3408
3409 The environment for any simple command
3410 or function may be augmented temporarily by prefixing it with
3411 parameter assignments, as described in <A HREF="bashref.html#SEC24">3.4 Shell Parameters</A>.
3412 These assignment statements affect only the environment seen
3413 by that command.
3414 </P><P>
3415
3416 If the <SAMP>`-k'</SAMP> option is set (see section <A HREF="bashref.html#SEC59">4.3 The Set Builtin</A>), then all
3417 parameter assignments are placed in the environment for a command,
3418 not just those that precede the command name.
3419 </P><P>
3420
3421 When Bash invokes an external command, the variable <SAMP>`$_'</SAMP>
3422 is set to the full path name of the command and passed to that
3423 command in its environment.
3424 </P><P>
3425
3426 <A NAME="Exit Status"></A>
3427 <HR SIZE="6">
3428 <A NAME="SEC53"></A>
3429 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3430 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC52"> &lt; </A>]</TD>
3431 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC54"> &gt; </A>]</TD>
3432 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC54"> &lt;&lt; </A>]</TD>
3433 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC48"> Up </A>]</TD>
3434 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC55"> &gt;&gt; </A>]</TD>
3435 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
3436 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
3437 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
3438 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
3439 </TR></TABLE>
3440 <H3> 3.7.5 Exit Status </H3>
3441 <!--docid::SEC53::-->
3442 <P>
3443
3444 For the shell's purposes, a command which exits with a
3445 zero exit status has succeeded.
3446 A non-zero exit status indicates failure.
3447 This seemingly counter-intuitive scheme is used so there
3448 is one well-defined way to indicate success and a variety of
3449 ways to indicate various failure modes.
3450 When a command terminates on a fatal signal whose number is <VAR>N</VAR>,
3451 Bash uses the value 128+<VAR>N</VAR> as the exit status.
3452 </P><P>
3453
3454 If a command is not found, the child process created to
3455 execute it returns a status of 127. If a command is found
3456 but is not executable, the return status is 126.
3457 </P><P>
3458
3459 If a command fails because of an error during expansion or redirection,
3460 the exit status is greater than zero.
3461 </P><P>
3462
3463 The exit status is used by the Bash conditional commands
3464 (see section <A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A>) and some of the list
3465 constructs (see section <A HREF="bashref.html#SEC18">3.2.3 Lists of Commands</A>).
3466 </P><P>
3467
3468 All of the Bash builtins return an exit status of zero if they succeed
3469 and a non-zero status on failure, so they may be used by the
3470 conditional and list constructs.
3471 All builtins return an exit status of 2 to indicate incorrect usage.
3472 </P><P>
3473
3474 <A NAME="Signals"></A>
3475 <HR SIZE="6">
3476 <A NAME="SEC54"></A>
3477 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3478 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC53"> &lt; </A>]</TD>
3479 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC55"> &gt; </A>]</TD>
3480 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC55"> &lt;&lt; </A>]</TD>
3481 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC48"> Up </A>]</TD>
3482 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC55"> &gt;&gt; </A>]</TD>
3483 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
3484 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
3485 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
3486 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
3487 </TR></TABLE>
3488 <H3> 3.7.6 Signals </H3>
3489 <!--docid::SEC54::-->
3490 <P>
3491
3492 When Bash is interactive, in the absence of any traps, it ignores
3493 <CODE>SIGTERM</CODE> (so that <SAMP>`kill 0'</SAMP> does not kill an interactive shell),
3494 and <CODE>SIGINT</CODE>
3495 is caught and handled (so that the <CODE>wait</CODE> builtin is interruptible).
3496 When Bash receives a <CODE>SIGINT</CODE>, it breaks out of any executing loops.
3497 In all cases, Bash ignores <CODE>SIGQUIT</CODE>.
3498 If job control is in effect (see section <A HREF="bashref.html#SEC87">7. Job Control</A>), Bash
3499 ignores <CODE>SIGTTIN</CODE>, <CODE>SIGTTOU</CODE>, and <CODE>SIGTSTP</CODE>.
3500 </P><P>
3501
3502 Non-builtin commands started by Bash have signal handlers set to the
3503 values inherited by the shell from its parent.
3504 When job control is not in effect, asynchronous commands
3505 ignore <CODE>SIGINT</CODE> and <CODE>SIGQUIT</CODE> in addition to these inherited
3506 handlers.
3507 Commands run as a result of
3508 command substitution ignore the keyboard-generated job control signals
3509 <CODE>SIGTTIN</CODE>, <CODE>SIGTTOU</CODE>, and <CODE>SIGTSTP</CODE>.
3510 </P><P>
3511
3512 The shell exits by default upon receipt of a <CODE>SIGHUP</CODE>.
3513 Before exiting, an interactive shell resends the <CODE>SIGHUP</CODE> to
3514 all jobs, running or stopped.
3515 Stopped jobs are sent <CODE>SIGCONT</CODE> to ensure that they receive
3516 the <CODE>SIGHUP</CODE>.
3517 To prevent the shell from sending the <CODE>SIGHUP</CODE> signal to a
3518 particular job, it should be removed
3519 from the jobs table with the <CODE>disown</CODE>
3520 builtin (see section <A HREF="bashref.html#SEC89">7.2 Job Control Builtins</A>) or marked
3521 to not receive <CODE>SIGHUP</CODE> using <CODE>disown -h</CODE>.
3522 </P><P>
3523
3524 If the <CODE>huponexit</CODE> shell option has been set with <CODE>shopt</CODE>
3525 (see section <A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A>), Bash sends a <CODE>SIGHUP</CODE> to all jobs when
3526 an interactive login shell exits.
3527 </P><P>
3528
3529 If Bash is waiting for a command to complete and receives a signal
3530 for which a trap has been set, the trap will not be executed until
3531 the command completes.
3532 When Bash is waiting for an asynchronous
3533 command via the <CODE>wait</CODE> builtin, the reception of a signal for
3534 which a trap has been set will cause the <CODE>wait</CODE> builtin to return
3535 immediately with an exit status greater than 128, immediately after
3536 which the trap is executed.
3537 </P><P>
3538
3539 <A NAME="Shell Scripts"></A>
3540 <HR SIZE="6">
3541 <A NAME="SEC55"></A>
3542 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3543 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC54"> &lt; </A>]</TD>
3544 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC56"> &gt; </A>]</TD>
3545 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC5"> &lt;&lt; </A>]</TD>
3546 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC5"> Up </A>]</TD>
3547 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC56"> &gt;&gt; </A>]</TD>
3548 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
3549 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
3550 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
3551 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
3552 </TR></TABLE>
3553 <H2> 3.8 Shell Scripts </H2>
3554 <!--docid::SEC55::-->
3555 <P>
3556
3557 A shell script is a text file containing shell commands. When such
3558 a file is used as the first non-option argument when invoking Bash,
3559 and neither the <SAMP>`-c'</SAMP> nor <SAMP>`-s'</SAMP> option is supplied
3560 (see section <A HREF="bashref.html#SEC65">6.1 Invoking Bash</A>),
3561 Bash reads and executes commands from the file, then exits. This
3562 mode of operation creates a non-interactive shell. The shell first
3563 searches for the file in the current directory, and looks in the
3564 directories in <CODE>$PATH</CODE> if not found there.
3565 </P><P>
3566
3567 When Bash runs
3568 a shell script, it sets the special parameter <CODE>0</CODE> to the name
3569 of the file, rather than the name of the shell, and the positional
3570 parameters are set to the remaining arguments, if any are given.
3571 If no additional arguments are supplied, the positional parameters
3572 are unset.
3573 </P><P>
3574
3575 A shell script may be made executable by using the <CODE>chmod</CODE> command
3576 to turn on the execute bit. When Bash finds such a file while
3577 searching the <CODE>$PATH</CODE> for a command, it spawns a subshell to
3578 execute it. In other words, executing
3579 <TABLE><tr><td>&nbsp;</td><td class=example><pre>filename <VAR>arguments</VAR>
3580 </pre></td></tr></table>is equivalent to executing
3581 <TABLE><tr><td>&nbsp;</td><td class=example><pre>bash filename <VAR>arguments</VAR>
3582 </pre></td></tr></table></P><P>
3583
3584 if <CODE>filename</CODE> is an executable shell script.
3585 This subshell reinitializes itself, so that the effect is as if a
3586 new shell had been invoked to interpret the script, with the
3587 exception that the locations of commands remembered by the parent
3588 (see the description of <CODE>hash</CODE> in <A HREF="bashref.html#SEC57">4.1 Bourne Shell Builtins</A>)
3589 are retained by the child.
3590 </P><P>
3591
3592 Most versions of Unix make this a part of the operating system's command
3593 execution mechanism. If the first line of a script begins with
3594 the two characters <SAMP>`#!'</SAMP>, the remainder of the line specifies
3595 an interpreter for the program.
3596 Thus, you can specify Bash, <CODE>awk</CODE>, Perl, or some other
3597 interpreter and write the rest of the script file in that language.
3598 </P><P>
3599
3600 The arguments to the interpreter
3601 consist of a single optional argument following the interpreter
3602 name on the first line of the script file, followed by the name of
3603 the script file, followed by the rest of the arguments. Bash
3604 will perform this action on operating systems that do not handle it
3605 themselves. Note that some older versions of Unix limit the interpreter
3606 name and argument to a maximum of 32 characters.
3607 </P><P>
3608
3609 Bash scripts often begin with <CODE>#! /bin/bash</CODE> (assuming that
3610 Bash has been installed in <TT>`/bin'</TT>), since this ensures that
3611 Bash will be used to interpret the script, even if it is executed
3612 under another shell.
3613 </P><P>
3614
3615 <A NAME="Shell Builtin Commands"></A>
3616 <HR SIZE="6">
3617 <A NAME="SEC56"></A>
3618 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3619 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC55"> &lt; </A>]</TD>
3620 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC57"> &gt; </A>]</TD>
3621 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC61"> &lt;&lt; </A>]</TD>
3622 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top"> Up </A>]</TD>
3623 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC61"> &gt;&gt; </A>]</TD>
3624 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
3625 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
3626 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
3627 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
3628 </TR></TABLE>
3629 <H1> 4. Shell Builtin Commands </H1>
3630 <!--docid::SEC56::-->
3631 <P>
3632
3633 <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
3634 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC57">4.1 Bourne Shell Builtins</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Builtin commands inherited from the Bourne
3635 Shell.</TD></TR>
3636 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Table of builtins specific to Bash.</TD></TR>
3637 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC59">4.3 The Set Builtin</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">This builtin is so overloaded it
3638 deserves its own section.</TD></TR>
3639 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC60">4.4 Special Builtins</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Builtin commands classified specially by
3640 POSIX.2.</TD></TR>
3641 </TABLE></BLOCKQUOTE>
3642 <P>
3643
3644 Builtin commands are contained within the shell itself.
3645 When the name of a builtin command is used as the first word of
3646 a simple command (see section <A HREF="bashref.html#SEC16">3.2.1 Simple Commands</A>), the shell executes
3647 the command directly, without invoking another program.
3648 Builtin commands are necessary to implement functionality impossible
3649 or inconvenient to obtain with separate utilities.
3650 </P><P>
3651
3652 This section briefly the builtins which Bash inherits from
3653 the Bourne Shell, as well as the builtin commands which are unique
3654 to or have been extended in Bash.
3655 </P><P>
3656
3657 Several builtin commands are described in other chapters: builtin
3658 commands which provide the Bash interface to the job control
3659 facilities (see section <A HREF="bashref.html#SEC89">7.2 Job Control Builtins</A>), the directory stack
3660 (see section <A HREF="bashref.html#SEC83">6.8.1 Directory Stack Builtins</A>), the command history
3661 (see section <A HREF="bashref.html#SEC117">9.2 Bash History Builtins</A>), and the programmable completion
3662 facilities (see section <A HREF="bashref.html#SEC114">8.7 Programmable Completion Builtins</A>).
3663 </P><P>
3664
3665 Many of the builtins have been extended by POSIX or Bash.
3666 </P><P>
3667
3668 Unless otherwise noted, each builtin command documented as accepting
3669 options preceded by <SAMP>`-'</SAMP> accepts <SAMP>`--'</SAMP>
3670 to signify the end of the options.
3671 </P><P>
3672
3673 <A NAME="Bourne Shell Builtins"></A>
3674 <HR SIZE="6">
3675 <A NAME="SEC57"></A>
3676 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
3677 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC56"> &lt; </A>]</TD>
3678 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC58"> &gt; </A>]</TD>
3679 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC56"> &lt;&lt; </A>]</TD>
3680 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC56"> Up </A>]</TD>
3681 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC61"> &gt;&gt; </A>]</TD>
3682 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
3683 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
3684 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
3685 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
3686 </TR></TABLE>
3687 <H2> 4.1 Bourne Shell Builtins </H2>
3688 <!--docid::SEC57::-->
3689 <P>
3690
3691 The following shell builtin commands are inherited from the Bourne Shell.
3692 These commands are implemented as specified by the POSIX 1003.2 standard.
3693 </P><P>
3694
3695 <DL COMPACT>
3696 <DT><CODE>: (a colon)</CODE>
3697 <DD><A NAME="IDX68"></A>
3698 <TABLE><tr><td>&nbsp;</td><td class=example><pre>: [<VAR>arguments</VAR>]
3699 </pre></td></tr></table>Do nothing beyond expanding <VAR>arguments</VAR> and performing redirections.
3700 The return status is zero.
3701 <P>
3702
3703 <DT><CODE>. (a period)</CODE>
3704 <DD><A NAME="IDX69"></A>
3705 <TABLE><tr><td>&nbsp;</td><td class=example><pre>. <VAR>filename</VAR> [<VAR>arguments</VAR>]
3706 </pre></td></tr></table>Read and execute commands from the <VAR>filename</VAR> argument in the
3707 current shell context. If <VAR>filename</VAR> does not contain a slash,
3708 the <CODE>PATH</CODE> variable is used to find <VAR>filename</VAR>.
3709 When Bash is not in POSIX mode, the current directory is searched
3710 if <VAR>filename</VAR> is not found in <CODE>$PATH</CODE>.
3711 If any <VAR>arguments</VAR> are supplied, they become the positional
3712 parameters when <VAR>filename</VAR> is executed. Otherwise the positional
3713 parameters are unchanged.
3714 The return status is the exit status of the last command executed, or
3715 zero if no commands are executed. If <VAR>filename</VAR> is not found, or
3716 cannot be read, the return status is non-zero.
3717 This builtin is equivalent to <CODE>source</CODE>.
3718 <P>
3719
3720 <DT><CODE>break</CODE>
3721 <DD><A NAME="IDX70"></A>
3722 <TABLE><tr><td>&nbsp;</td><td class=example><pre>break [<VAR>n</VAR>]
3723 </pre></td></tr></table>Exit from a <CODE>for</CODE>, <CODE>while</CODE>, <CODE>until</CODE>, or <CODE>select</CODE> loop.
3724 If <VAR>n</VAR> is supplied, the <VAR>n</VAR>th enclosing loop is exited.
3725 <VAR>n</VAR> must be greater than or equal to 1.
3726 The return status is zero unless <VAR>n</VAR> is not greater than or equal to 1.
3727 <P>
3728
3729 <DT><CODE>cd</CODE>
3730 <DD><A NAME="IDX71"></A>
3731 <TABLE><tr><td>&nbsp;</td><td class=example><pre>cd [-L|-P] [<VAR>directory</VAR>]
3732 </pre></td></tr></table>Change the current working directory to <VAR>directory</VAR>.
3733 If <VAR>directory</VAR> is not given, the value of the <CODE>HOME</CODE> shell
3734 variable is used.
3735 If the shell variable <CODE>CDPATH</CODE> exists, it is used as a search path.
3736 If <VAR>directory</VAR> begins with a slash, <CODE>CDPATH</CODE> is not used.
3737 <P>
3738
3739 The <SAMP>`-P'</SAMP> option means to not follow symbolic links; symbolic
3740 links are followed by default or with the <SAMP>`-L'</SAMP> option.
3741 If <VAR>directory</VAR> is <SAMP>`-'</SAMP>, it is equivalent to <CODE>$OLDPWD</CODE>.
3742 </P><P>
3743
3744 If a non-empty directory name from <CODE>CDPATH</CODE> is used, or if
3745 <SAMP>`-'</SAMP> is the first argument, and the directory change is
3746 successful, the absolute pathname of the new working directory is
3747 written to the standard output.
3748 </P><P>
3749
3750 The return status is zero if the directory is successfully changed,
3751 non-zero otherwise.
3752 </P><P>
3753
3754 <DT><CODE>continue</CODE>
3755 <DD><A NAME="IDX72"></A>
3756 <TABLE><tr><td>&nbsp;</td><td class=example><pre>continue [<VAR>n</VAR>]
3757 </pre></td></tr></table>Resume the next iteration of an enclosing <CODE>for</CODE>, <CODE>while</CODE>,
3758 <CODE>until</CODE>, or <CODE>select</CODE> loop.
3759 If <VAR>n</VAR> is supplied, the execution of the <VAR>n</VAR>th enclosing loop
3760 is resumed.
3761 <VAR>n</VAR> must be greater than or equal to 1.
3762 The return status is zero unless <VAR>n</VAR> is not greater than or equal to 1.
3763 <P>
3764
3765 <DT><CODE>eval</CODE>
3766 <DD><A NAME="IDX73"></A>
3767 <TABLE><tr><td>&nbsp;</td><td class=example><pre>eval [<VAR>arguments</VAR>]
3768 </pre></td></tr></table>The arguments are concatenated together into a single command, which is
3769 then read and executed, and its exit status returned as the exit status
3770 of <CODE>eval</CODE>.
3771 If there are no arguments or only empty arguments, the return status is
3772 zero.
3773 <P>
3774
3775 <DT><CODE>exec</CODE>
3776 <DD><A NAME="IDX74"></A>
3777 <TABLE><tr><td>&nbsp;</td><td class=example><pre>exec [-cl] [-a <VAR>name</VAR>] [<VAR>command</VAR> [<VAR>arguments</VAR>]]
3778 </pre></td></tr></table>If <VAR>command</VAR>
3779 is supplied, it replaces the shell without creating a new process.
3780 If the <SAMP>`-l'</SAMP> option is supplied, the shell places a dash at the
3781 beginning of the zeroth arg passed to <VAR>command</VAR>.
3782 This is what the <CODE>login</CODE> program does.
3783 The <SAMP>`-c'</SAMP> option causes <VAR>command</VAR> to be executed with an empty
3784 environment.
3785 If <SAMP>`-a'</SAMP> is supplied, the shell passes <VAR>name</VAR> as the zeroth
3786 argument to <VAR>command</VAR>.
3787 If no <VAR>command</VAR> is specified, redirections may be used to affect
3788 the current shell environment. If there are no redirection errors, the
3789 return status is zero; otherwise the return status is non-zero.
3790 <P>
3791
3792 <DT><CODE>exit</CODE>
3793 <DD><A NAME="IDX75"></A>
3794 <TABLE><tr><td>&nbsp;</td><td class=example><pre>exit [<VAR>n</VAR>]
3795 </pre></td></tr></table>Exit the shell, returning a status of <VAR>n</VAR> to the shell's parent.
3796 If <VAR>n</VAR> is omitted, the exit status is that of the last command executed.
3797 Any trap on <CODE>EXIT</CODE> is executed before the shell terminates.
3798 <P>
3799
3800 <DT><CODE>export</CODE>
3801 <DD><A NAME="IDX76"></A>
3802 <TABLE><tr><td>&nbsp;</td><td class=example><pre>export [-fn] [-p] [<VAR>name</VAR>[=<VAR>value</VAR>]]
3803 </pre></td></tr></table>Mark each <VAR>name</VAR> to be passed to child processes
3804 in the environment. If the <SAMP>`-f'</SAMP> option is supplied, the <VAR>name</VAR>s
3805 refer to shell functions; otherwise the names refer to shell variables.
3806 The <SAMP>`-n'</SAMP> option means to no longer mark each <VAR>name</VAR> for export.
3807 If no <VAR>names</VAR> are supplied, or if the <SAMP>`-p'</SAMP> option is given, a
3808 list of exported names is displayed.
3809 The <SAMP>`-p'</SAMP> option displays output in a form that may be reused as input.
3810 If a variable name is followed by =<VAR>value</VAR>, the value of
3811 the variable is set to <VAR>value</VAR>.
3812 <P>
3813
3814 The return status is zero unless an invalid option is supplied, one of
3815 the names is not a valid shell variable name, or <SAMP>`-f'</SAMP> is supplied
3816 with a name that is not a shell function.
3817 </P><P>
3818
3819 <DT><CODE>getopts</CODE>
3820 <DD><A NAME="IDX77"></A>
3821 <TABLE><tr><td>&nbsp;</td><td class=example><pre>getopts <VAR>optstring</VAR> <VAR>name</VAR> [<VAR>args</VAR>]
3822 </pre></td></tr></table><CODE>getopts</CODE> is used by shell scripts to parse positional parameters.
3823 <VAR>optstring</VAR> contains the option characters to be recognized; if a
3824 character is followed by a colon, the option is expected to have an
3825 argument, which should be separated from it by white space.
3826 The colon (<SAMP>`:'</SAMP>) and question mark (<SAMP>`?'</SAMP>) may not be
3827 used as option characters.
3828 Each time it is invoked, <CODE>getopts</CODE>
3829 places the next option in the shell variable <VAR>name</VAR>, initializing
3830 <VAR>name</VAR> if it does not exist,
3831 and the index of the next argument to be processed into the
3832 variable <CODE>OPTIND</CODE>.
3833 <CODE>OPTIND</CODE> is initialized to 1 each time the shell or a shell script
3834 is invoked.
3835 When an option requires an argument,
3836 <CODE>getopts</CODE> places that argument into the variable <CODE>OPTARG</CODE>.
3837 The shell does not reset <CODE>OPTIND</CODE> automatically; it must be manually
3838 reset between multiple calls to <CODE>getopts</CODE> within the same shell
3839 invocation if a new set of parameters is to be used.
3840 <P>
3841
3842 When the end of options is encountered, <CODE>getopts</CODE> exits with a
3843 return value greater than zero.
3844 <CODE>OPTIND</CODE> is set to the index of the first non-option argument,
3845 and <CODE>name</CODE> is set to <SAMP>`?'</SAMP>.
3846 </P><P>
3847
3848 <CODE>getopts</CODE>
3849 normally parses the positional parameters, but if more arguments are
3850 given in <VAR>args</VAR>, <CODE>getopts</CODE> parses those instead.
3851 </P><P>
3852
3853 <CODE>getopts</CODE> can report errors in two ways. If the first character of
3854 <VAR>optstring</VAR> is a colon, <VAR>silent</VAR>
3855 error reporting is used. In normal operation diagnostic messages
3856 are printed when invalid options or missing option arguments are
3857 encountered.
3858 If the variable <CODE>OPTERR</CODE>
3859 is set to 0, no error messages will be displayed, even if the first
3860 character of <CODE>optstring</CODE> is not a colon.
3861 </P><P>
3862
3863 If an invalid option is seen,
3864 <CODE>getopts</CODE> places <SAMP>`?'</SAMP> into <VAR>name</VAR> and, if not silent,
3865 prints an error message and unsets <CODE>OPTARG</CODE>.
3866 If <CODE>getopts</CODE> is silent, the option character found is placed in
3867 <CODE>OPTARG</CODE> and no diagnostic message is printed.
3868 </P><P>
3869
3870 If a required argument is not found, and <CODE>getopts</CODE>
3871 is not silent, a question mark (<SAMP>`?'</SAMP>) is placed in <VAR>name</VAR>,
3872 <CODE>OPTARG</CODE> is unset, and a diagnostic message is printed.
3873 If <CODE>getopts</CODE> is silent, then a colon (<SAMP>`:'</SAMP>) is placed in
3874 <VAR>name</VAR> and <CODE>OPTARG</CODE> is set to the option character found.
3875 </P><P>
3876
3877 <DT><CODE>hash</CODE>
3878 <DD><A NAME="IDX78"></A>
3879 <TABLE><tr><td>&nbsp;</td><td class=example><pre>hash [-'r] [-p <VAR>filename</VAR>] [-dt] [<VAR>name</VAR>]
3880 </pre></td></tr></table>Remember the full pathnames of commands specified as <VAR>name</VAR> arguments,
3881 so they need not be searched for on subsequent invocations.
3882 The commands are found by searching through the directories listed in
3883 <CODE>$PATH</CODE>.
3884 The <SAMP>`-p'</SAMP> option inhibits the path search, and <VAR>filename</VAR> is
3885 used as the location of <VAR>name</VAR>.
3886 The <SAMP>`-r'</SAMP> option causes the shell to forget all remembered locations.
3887 The <SAMP>`-d'</SAMP> option causes the shell to forget the remembered location
3888 of each <VAR>name</VAR>.
3889 If the <SAMP>`-t'</SAMP> option is supplied, the full pathname to which each
3890 <VAR>name</VAR> corresponds is printed. If multiple <VAR>name</VAR> arguments are
3891 supplied with <SAMP>`-t'</SAMP> the <VAR>name</VAR> is printed before the hashed
3892 full pathname.
3893 The <SAMP>`-l'</SAMP> option causes output to be displayed in a format
3894 that may be reused as input.
3895 If no arguments are given, or if only <SAMP>`-l'</SAMP> is supplied,
3896 information about remembered commands is printed.
3897 The return status is zero unless a <VAR>name</VAR> is not found or an invalid
3898 option is supplied.
3899 <P>
3900
3901 <DT><CODE>pwd</CODE>
3902 <DD><A NAME="IDX79"></A>
3903 <TABLE><tr><td>&nbsp;</td><td class=example><pre>pwd [-LP]
3904 </pre></td></tr></table>Print the absolute pathname of the current working directory.
3905 If the <SAMP>`-P'</SAMP> option is supplied, the pathname printed will not
3906 contain symbolic links.
3907 If the <SAMP>`-L'</SAMP> option is supplied, the pathname printed may contain
3908 symbolic links.
3909 The return status is zero unless an error is encountered while
3910 determining the name of the current directory or an invalid option
3911 is supplied.
3912 <P>
3913
3914 <DT><CODE>readonly</CODE>
3915 <DD><A NAME="IDX80"></A>
3916 <TABLE><tr><td>&nbsp;</td><td class=example><pre>readonly [-apf] [<VAR>name</VAR>[=<VAR>value</VAR>]] <small>...</small>
3917 </pre></td></tr></table>Mark each <VAR>name</VAR> as readonly.
3918 The values of these names may not be changed by subsequent assignment.
3919 If the <SAMP>`-f'</SAMP> option is supplied, each <VAR>name</VAR> refers to a shell
3920 function.
3921 The <SAMP>`-a'</SAMP> option means each <VAR>name</VAR> refers to an array variable.
3922 If no <VAR>name</VAR> arguments are given, or if the <SAMP>`-p'</SAMP>
3923 option is supplied, a list of all readonly names is printed.
3924 The <SAMP>`-p'</SAMP> option causes output to be displayed in a format that
3925 may be reused as input.
3926 If a variable name is followed by =<VAR>value</VAR>, the value of
3927 the variable is set to <VAR>value</VAR>.
3928 The return status is zero unless an invalid option is supplied, one of
3929 the <VAR>name</VAR> arguments is not a valid shell variable or function name,
3930 or the <SAMP>`-f'</SAMP> option is supplied with a name that is not a shell function.
3931 <P>
3932
3933 <DT><CODE>return</CODE>
3934 <DD><A NAME="IDX81"></A>
3935 <TABLE><tr><td>&nbsp;</td><td class=example><pre>return [<VAR>n</VAR>]
3936 </pre></td></tr></table>Cause a shell function to exit with the return value <VAR>n</VAR>.
3937 If <VAR>n</VAR> is not supplied, the return value is the exit status of the
3938 last command executed in the function.
3939 This may also be used to terminate execution of a script being executed
3940 with the <CODE>.</CODE> (or <CODE>source</CODE>) builtin, returning either <VAR>n</VAR> or
3941 the exit status of the last command executed within the script as the exit
3942 status of the script.
3943 Any command associated with the <CODE>RETURN</CODE> trap is executed
3944 before execution resumes after the function or script.
3945 The return status is non-zero if <CODE>return</CODE> is used outside a function
3946 and not during the execution of a script by <CODE>.</CODE> or <CODE>source</CODE>.
3947 <P>
3948
3949 <DT><CODE>shift</CODE>
3950 <DD><A NAME="IDX82"></A>
3951 <TABLE><tr><td>&nbsp;</td><td class=example><pre>shift [<VAR>n</VAR>]
3952 </pre></td></tr></table>Shift the positional parameters to the left by <VAR>n</VAR>.
3953 The positional parameters from <VAR>n</VAR>+1 <small>...</small> <CODE>$#</CODE> are
3954 renamed to <CODE>$1</CODE> <small>...</small> <CODE>$#</CODE>-<VAR>n</VAR>+1.
3955 Parameters represented by the numbers <CODE>$#</CODE> to <VAR>n</VAR>+1 are unset.
3956 <VAR>n</VAR> must be a non-negative number less than or equal to <CODE>$#</CODE>.
3957 If <VAR>n</VAR> is zero or greater than <CODE>$#</CODE>, the positional parameters
3958 are not changed.
3959 If <VAR>n</VAR> is not supplied, it is assumed to be 1.
3960 The return status is zero unless <VAR>n</VAR> is greater than <CODE>$#</CODE> or
3961 less than zero, non-zero otherwise.
3962 <P>
3963
3964 <DT><CODE>test</CODE>
3965 <DD><DT><CODE>[</CODE>
3966 <DD><A NAME="IDX83"></A>
3967 <A NAME="IDX84"></A>
3968 Evaluate a conditional expression <VAR>expr</VAR>.
3969 Each operator and operand must be a separate argument.
3970 Expressions are composed of the primaries described below in
3971 <A HREF="bashref.html#SEC78">6.4 Bash Conditional Expressions</A>.
3972 <P>
3973
3974 When the <CODE>[</CODE> form is used, the last argument to the command must
3975 be a <CODE>]</CODE>.
3976 </P><P>
3977
3978 Expressions may be combined using the following operators, listed in
3979 decreasing order of precedence.
3980 </P><P>
3981
3982 <DL COMPACT>
3983 <DT><CODE>! <VAR>expr</VAR></CODE>
3984 <DD>True if <VAR>expr</VAR> is false.
3985 <P>
3986
3987 <DT><CODE>( <VAR>expr</VAR> )</CODE>
3988 <DD>Returns the value of <VAR>expr</VAR>.
3989 This may be used to override the normal precedence of operators.
3990 <P>
3991
3992 <DT><CODE><VAR>expr1</VAR> -a <VAR>expr2</VAR></CODE>
3993 <DD>True if both <VAR>expr1</VAR> and <VAR>expr2</VAR> are true.
3994 <P>
3995
3996 <DT><CODE><VAR>expr1</VAR> -o <VAR>expr2</VAR></CODE>
3997 <DD>True if either <VAR>expr1</VAR> or <VAR>expr2</VAR> is true.
3998 </DL>
3999 <P>
4000
4001 The <CODE>test</CODE> and <CODE>[</CODE> builtins evaluate conditional
4002 expressions using a set of rules based on the number of arguments.
4003 </P><P>
4004
4005 <DL COMPACT>
4006 <DT>0 arguments
4007 <DD>The expression is false.
4008 <P>
4009
4010 <DT>1 argument
4011 <DD>The expression is true if and only if the argument is not null.
4012 <P>
4013
4014 <DT>2 arguments
4015 <DD>If the first argument is <SAMP>`!'</SAMP>, the expression is true if and
4016 only if the second argument is null.
4017 If the first argument is one of the unary conditional operators
4018 (see section <A HREF="bashref.html#SEC78">6.4 Bash Conditional Expressions</A>), the expression
4019 is true if the unary test is true.
4020 If the first argument is not a valid unary operator, the expression is
4021 false.
4022 <P>
4023
4024 <DT>3 arguments
4025 <DD>If the second argument is one of the binary conditional
4026 operators (see section <A HREF="bashref.html#SEC78">6.4 Bash Conditional Expressions</A>), the
4027 result of the expression is the result of the binary test using the
4028 first and third arguments as operands.
4029 If the first argument is <SAMP>`!'</SAMP>, the value is the negation of
4030 the two-argument test using the second and third arguments.
4031 If the first argument is exactly <SAMP>`('</SAMP> and the third argument is
4032 exactly <SAMP>`)'</SAMP>, the result is the one-argument test of the second
4033 argument.
4034 Otherwise, the expression is false.
4035 The <SAMP>`-a'</SAMP> and <SAMP>`-o'</SAMP> operators are considered binary operators
4036 in this case.
4037 <P>
4038
4039 <DT>4 arguments
4040 <DD>If the first argument is <SAMP>`!'</SAMP>, the result is the negation of
4041 the three-argument expression composed of the remaining arguments.
4042 Otherwise, the expression is parsed and evaluated according to
4043 precedence using the rules listed above.
4044 <P>
4045
4046 <DT>5 or more arguments
4047 <DD>The expression is parsed and evaluated according to precedence
4048 using the rules listed above.
4049 </DL>
4050 <P>
4051
4052 <DT><CODE>times</CODE>
4053 <DD><A NAME="IDX85"></A>
4054 <TABLE><tr><td>&nbsp;</td><td class=example><pre>times
4055 </pre></td></tr></table>Print out the user and system times used by the shell and its children.
4056 The return status is zero.
4057 <P>
4058
4059 <DT><CODE>trap</CODE>
4060 <DD><A NAME="IDX86"></A>
4061 <TABLE><tr><td>&nbsp;</td><td class=example><pre>trap [-lp] [<VAR>arg</VAR>] [<VAR>sigspec</VAR> <small>...</small>]
4062 </pre></td></tr></table>The commands in <VAR>arg</VAR> are to be read and executed when the
4063 shell receives signal <VAR>sigspec</VAR>. If <VAR>arg</VAR> is absent (and
4064 there is a single <VAR>sigspec</VAR>) or
4065 equal to <SAMP>`-'</SAMP>, each specified signal's disposition is reset
4066 to the value it had when the shell was started.
4067 If <VAR>arg</VAR> is the null string, then the signal specified by
4068 each <VAR>sigspec</VAR> is ignored by the shell and commands it invokes.
4069 If <VAR>arg</VAR> is not present and <SAMP>`-p'</SAMP> has been supplied,
4070 the shell displays the trap commands associated with each <VAR>sigspec</VAR>.
4071 If no arguments are supplied, or
4072 only <SAMP>`-p'</SAMP> is given, <CODE>trap</CODE> prints the list of commands
4073 associated with each signal number in a form that may be reused as
4074 shell input.
4075 The <SAMP>`-l'</SAMP> option causes the shell to print a list of signal names
4076 and their corresponding numbers.
4077 Each <VAR>sigspec</VAR> is either a signal name or a signal number.
4078 Signal names are case insensitive and the <CODE>SIG</CODE> prefix is optional.
4079 If a <VAR>sigspec</VAR>
4080 is <CODE>0</CODE> or <CODE>EXIT</CODE>, <VAR>arg</VAR> is executed when the shell exits.
4081 If a <VAR>sigspec</VAR> is <CODE>DEBUG</CODE>, the command <VAR>arg</VAR> is executed
4082 before every simple command, <CODE>for</CODE> command, <CODE>case</CODE> command,
4083 <CODE>select</CODE> command, every arithmetic <CODE>for</CODE> command, and before
4084 the first command executes in a shell function.
4085 Refer to the description of the <CODE>extglob</CODE> option to the
4086 <CODE>shopt</CODE> builtin (see section <A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A>) for details of its
4087 effect on the <CODE>DEBUG</CODE> trap.
4088 If a <VAR>sigspec</VAR> is <CODE>ERR</CODE>, the command <VAR>arg</VAR>
4089 is executed whenever a simple command has a non-zero exit status,
4090 subject to the following conditions.
4091 The <CODE>ERR</CODE> trap is not executed if the failed command is part of the
4092 command list immediately following an <CODE>until</CODE> or <CODE>while</CODE> keyword,
4093 part of the test in an <CODE>if</CODE> statement,
4094 part of a <CODE>&#38;&#38;</CODE> or <CODE>||</CODE> list, or if the command's return
4095 status is being inverted using <CODE>!</CODE>.
4096 These are the same conditions obeyed by the <CODE>errexit</CODE> option.
4097 If a <VAR>sigspec</VAR> is <CODE>RETURN</CODE>, the command <VAR>arg</VAR> is executed
4098 each time a shell function or a script executed with the <CODE>.</CODE> or
4099 <CODE>source</CODE> builtins finishes executing.
4100 <P>
4101
4102 Signals ignored upon entry to the shell cannot be trapped or reset.
4103 Trapped signals are reset to their original values in a child
4104 process when it is created.
4105 </P><P>
4106
4107 The return status is zero unless a <VAR>sigspec</VAR> does not specify a
4108 valid signal.
4109 </P><P>
4110
4111 <DT><CODE>umask</CODE>
4112 <DD><A NAME="IDX87"></A>
4113 <TABLE><tr><td>&nbsp;</td><td class=example><pre>umask [-p] [-S] [<VAR>mode</VAR>]
4114 </pre></td></tr></table>Set the shell process's file creation mask to <VAR>mode</VAR>. If
4115 <VAR>mode</VAR> begins with a digit, it is interpreted as an octal number;
4116 if not, it is interpreted as a symbolic mode mask similar
4117 to that accepted by the <CODE>chmod</CODE> command. If <VAR>mode</VAR> is
4118 omitted, the current value of the mask is printed. If the <SAMP>`-S'</SAMP>
4119 option is supplied without a <VAR>mode</VAR> argument, the mask is printed
4120 in a symbolic format.
4121 If the <SAMP>`-p'</SAMP> option is supplied, and <VAR>mode</VAR>
4122 is omitted, the output is in a form that may be reused as input.
4123 The return status is zero if the mode is successfully changed or if
4124 no <VAR>mode</VAR> argument is supplied, and non-zero otherwise.
4125 <P>
4126
4127 Note that when the mode is interpreted as an octal number, each number
4128 of the umask is subtracted from <CODE>7</CODE>. Thus, a umask of <CODE>022</CODE>
4129 results in permissions of <CODE>755</CODE>.
4130 </P><P>
4131
4132 <DT><CODE>unset</CODE>
4133 <DD><A NAME="IDX88"></A>
4134 <TABLE><tr><td>&nbsp;</td><td class=example><pre>unset [-fv] [<VAR>name</VAR>]
4135 </pre></td></tr></table>Each variable or function <VAR>name</VAR> is removed.
4136 If no options are supplied, or the <SAMP>`-v'</SAMP> option is given, each
4137 <VAR>name</VAR> refers to a shell variable.
4138 If the <SAMP>`-f'</SAMP> option is given, the <VAR>name</VAR>s refer to shell
4139 functions, and the function definition is removed.
4140 Readonly variables and functions may not be unset.
4141 The return status is zero unless a <VAR>name</VAR> is readonly.
4142 </DL>
4143 <P>
4144
4145 <A NAME="Bash Builtins"></A>
4146 <HR SIZE="6">
4147 <A NAME="SEC58"></A>
4148 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
4149 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC57"> &lt; </A>]</TD>
4150 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC59"> &gt; </A>]</TD>
4151 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC59"> &lt;&lt; </A>]</TD>
4152 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC56"> Up </A>]</TD>
4153 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC61"> &gt;&gt; </A>]</TD>
4154 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
4155 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
4156 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
4157 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
4158 </TR></TABLE>
4159 <H2> 4.2 Bash Builtin Commands </H2>
4160 <!--docid::SEC58::-->
4161 <P>
4162
4163 This section describes builtin commands which are unique to
4164 or have been extended in Bash.
4165 Some of these commands are specified in the POSIX 1003.2 standard.
4166 </P><P>
4167
4168 <DL COMPACT>
4169
4170 <DT><CODE>alias</CODE>
4171 <DD><A NAME="IDX89"></A>
4172 <TABLE><tr><td>&nbsp;</td><td class=example><pre>alias [<CODE>-p</CODE>] [<VAR>name</VAR>[=<VAR>value</VAR>] <small>...</small>]
4173 </pre></td></tr></table><P>
4174
4175 Without arguments or with the <SAMP>`-p'</SAMP> option, <CODE>alias</CODE> prints
4176 the list of aliases on the standard output in a form that allows
4177 them to be reused as input.
4178 If arguments are supplied, an alias is defined for each <VAR>name</VAR>
4179 whose <VAR>value</VAR> is given. If no <VAR>value</VAR> is given, the name
4180 and value of the alias is printed.
4181 Aliases are described in <A HREF="bashref.html#SEC80">6.6 Aliases</A>.
4182 </P><P>
4183
4184 <DT><CODE>bind</CODE>
4185 <DD><A NAME="IDX90"></A>
4186 <TABLE><tr><td>&nbsp;</td><td class=example><pre>bind [-m <VAR>keymap</VAR>] [-lpsvPSV]
4187 bind [-m <VAR>keymap</VAR>] [-q <VAR>function</VAR>] [-u <VAR>function</VAR>] [-r <VAR>keyseq</VAR>]
4188 bind [-m <VAR>keymap</VAR>] -f <VAR>filename</VAR>
4189 bind [-m <VAR>keymap</VAR>] -x <VAR>keyseq:shell-command</VAR>
4190 bind [-m <VAR>keymap</VAR>] <VAR>keyseq:function-name</VAR>
4191 bind <VAR>readline-command</VAR>
4192 </pre></td></tr></table><P>
4193
4194 Display current Readline (see section <A HREF="bashref.html#SEC91">8. Command Line Editing</A>)
4195 key and function bindings,
4196 bind a key sequence to a Readline function or macro,
4197 or set a Readline variable.
4198 Each non-option argument is a command as it would appear in a
4199 a Readline initialization file (see section <A HREF="bashref.html#SEC99">8.3 Readline Init File</A>),
4200 but each binding or command must be passed as a separate argument; e.g.,
4201 <SAMP>`"\C-x\C-r":re-read-init-file'</SAMP>.
4202 Options, if supplied, have the following meanings:
4203 </P><P>
4204
4205 <DL COMPACT>
4206 <DT><CODE>-m <VAR>keymap</VAR></CODE>
4207 <DD>Use <VAR>keymap</VAR> as the keymap to be affected by
4208 the subsequent bindings. Acceptable <VAR>keymap</VAR>
4209 names are
4210 <CODE>emacs</CODE>,
4211 <CODE>emacs-standard</CODE>,
4212 <CODE>emacs-meta</CODE>,
4213 <CODE>emacs-ctlx</CODE>,
4214 <CODE>vi</CODE>,
4215 <CODE>vi-move</CODE>,
4216 <CODE>vi-command</CODE>, and
4217 <CODE>vi-insert</CODE>.
4218 <CODE>vi</CODE> is equivalent to <CODE>vi-command</CODE>;
4219 <CODE>emacs</CODE> is equivalent to <CODE>emacs-standard</CODE>.
4220 <P>
4221
4222 <DT><CODE>-l</CODE>
4223 <DD>List the names of all Readline functions.
4224 <P>
4225
4226 <DT><CODE>-p</CODE>
4227 <DD>Display Readline function names and bindings in such a way that they
4228 can be used as input or in a Readline initialization file.
4229 <P>
4230
4231 <DT><CODE>-P</CODE>
4232 <DD>List current Readline function names and bindings.
4233 <P>
4234
4235 <DT><CODE>-v</CODE>
4236 <DD>Display Readline variable names and values in such a way that they
4237 can be used as input or in a Readline initialization file.
4238 <P>
4239
4240 <DT><CODE>-V</CODE>
4241 <DD>List current Readline variable names and values.
4242 <P>
4243
4244 <DT><CODE>-s</CODE>
4245 <DD>Display Readline key sequences bound to macros and the strings they output
4246 in such a way that they can be used as input or in a Readline
4247 initialization file.
4248 <P>
4249
4250 <DT><CODE>-S</CODE>
4251 <DD>Display Readline key sequences bound to macros and the strings they output.
4252 <P>
4253
4254 <DT><CODE>-f <VAR>filename</VAR></CODE>
4255 <DD>Read key bindings from <VAR>filename</VAR>.
4256 <P>
4257
4258 <DT><CODE>-q <VAR>function</VAR></CODE>
4259 <DD>Query about which keys invoke the named <VAR>function</VAR>.
4260 <P>
4261
4262 <DT><CODE>-u <VAR>function</VAR></CODE>
4263 <DD>Unbind all keys bound to the named <VAR>function</VAR>.
4264 <P>
4265
4266 <DT><CODE>-r <VAR>keyseq</VAR></CODE>
4267 <DD>Remove any current binding for <VAR>keyseq</VAR>.
4268 <P>
4269
4270 <DT><CODE>-x <VAR>keyseq:shell-command</VAR></CODE>
4271 <DD>Cause <VAR>shell-command</VAR> to be executed whenever <VAR>keyseq</VAR> is
4272 entered.
4273 <P>
4274
4275 </DL>
4276 <P>
4277
4278 The return status is zero unless an invalid option is supplied or an
4279 error occurs.
4280 </P><P>
4281
4282 <DT><CODE>builtin</CODE>
4283 <DD><A NAME="IDX91"></A>
4284 <TABLE><tr><td>&nbsp;</td><td class=example><pre>builtin [<VAR>shell-builtin</VAR> [<VAR>args</VAR>]]
4285 </pre></td></tr></table>Run a shell builtin, passing it <VAR>args</VAR>, and return its exit status.
4286 This is useful when defining a shell function with the same
4287 name as a shell builtin, retaining the functionality of the builtin within
4288 the function.
4289 The return status is non-zero if <VAR>shell-builtin</VAR> is not a shell
4290 builtin command.
4291 <P>
4292
4293 <DT><CODE>caller</CODE>
4294 <DD><A NAME="IDX92"></A>
4295 <TABLE><tr><td>&nbsp;</td><td class=example><pre>caller [<VAR>expr</VAR>]
4296 </pre></td></tr></table>Returns the context of any active subroutine call (a shell function or
4297 a script executed with the <CODE>.</CODE> or <CODE>source</CODE> builtins).
4298 <P>
4299
4300 Without <VAR>expr</VAR>, <CODE>caller</CODE> displays the line number and source
4301 filename of the current subroutine call.
4302 If a non-negative integer is supplied as <VAR>expr</VAR>, <CODE>caller</CODE>
4303 displays the line number, subroutine name, and source file corresponding
4304 to that position in the current execution call stack. This extra
4305 information may be used, for example, to print a stack trace. The
4306 current frame is frame 0.
4307 </P><P>
4308
4309 The return value is 0 unless the shell is not executing a subroutine
4310 call or <VAR>expr</VAR> does not correspond to a valid position in the
4311 call stack.
4312 </P><P>
4313
4314 <DT><CODE>command</CODE>
4315 <DD><A NAME="IDX93"></A>
4316 <TABLE><tr><td>&nbsp;</td><td class=example><pre>command [-pVv] <VAR>command</VAR> [<VAR>arguments</VAR> <small>...</small>]
4317 </pre></td></tr></table>Runs <VAR>command</VAR> with <VAR>arguments</VAR> ignoring any shell function
4318 named <VAR>command</VAR>.
4319 Only shell builtin commands or commands found by searching the
4320 <CODE>PATH</CODE> are executed.
4321 If there is a shell function named <CODE>ls</CODE>, running <SAMP>`command ls'</SAMP>
4322 within the function will execute the external command <CODE>ls</CODE>
4323 instead of calling the function recursively.
4324 The <SAMP>`-p'</SAMP> option means to use a default value for <CODE>PATH</CODE>
4325 that is guaranteed to find all of the standard utilities.
4326 The return status in this case is 127 if <VAR>command</VAR> cannot be
4327 found or an error occurred, and the exit status of <VAR>command</VAR>
4328 otherwise.
4329 <P>
4330
4331 If either the <SAMP>`-V'</SAMP> or <SAMP>`-v'</SAMP> option is supplied, a
4332 description of <VAR>command</VAR> is printed. The <SAMP>`-v'</SAMP> option
4333 causes a single word indicating the command or file name used to
4334 invoke <VAR>command</VAR> to be displayed; the <SAMP>`-V'</SAMP> option produces
4335 a more verbose description. In this case, the return status is
4336 zero if <VAR>command</VAR> is found, and non-zero if not.
4337 </P><P>
4338
4339 <DT><CODE>declare</CODE>
4340 <DD><A NAME="IDX94"></A>
4341 <TABLE><tr><td>&nbsp;</td><td class=example><pre>declare [-afFirtx] [-p] [<VAR>name</VAR>[=<VAR>value</VAR>] <small>...</small>]
4342 </pre></td></tr></table><P>
4343
4344 Declare variables and give them attributes. If no <VAR>name</VAR>s
4345 are given, then display the values of variables instead.
4346 </P><P>
4347
4348 The <SAMP>`-p'</SAMP> option will display the attributes and values of each
4349 <VAR>name</VAR>.
4350 When <SAMP>`-p'</SAMP> is used, additional options are ignored.
4351 The <SAMP>`-F'</SAMP> option inhibits the display of function definitions;
4352 only the function name and attributes are printed.
4353 If the <CODE>extdebug</CODE> shell option is enabled using <CODE>shopt</CODE>
4354 (see section <A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A>), the source file name and line number where
4355 the function is defined are displayed as well.
4356 <SAMP>`-F'</SAMP> implies <SAMP>`-f'</SAMP>.
4357 The following options can be used to restrict output to variables with
4358 the specified attributes or to give variables attributes:
4359 </P><P>
4360
4361 <DL COMPACT>
4362 <DT><CODE>-a</CODE>
4363 <DD>Each <VAR>name</VAR> is an array variable (see section <A HREF="bashref.html#SEC81">6.7 Arrays</A>).
4364 <P>
4365
4366 <DT><CODE>-f</CODE>
4367 <DD>Use function names only.
4368 <P>
4369
4370 <DT><CODE>-i</CODE>
4371 <DD>The variable is to be treated as
4372 an integer; arithmetic evaluation (see section <A HREF="bashref.html#SEC79">6.5 Shell Arithmetic</A>) is
4373 performed when the variable is assigned a value.
4374 <P>
4375
4376 <DT><CODE>-r</CODE>
4377 <DD>Make <VAR>name</VAR>s readonly. These names cannot then be assigned values
4378 by subsequent assignment statements or unset.
4379 <P>
4380
4381 <DT><CODE>-t</CODE>
4382 <DD>Give each <VAR>name</VAR> the <CODE>trace</CODE> attribute.
4383 Traced functions inherit the <CODE>DEBUG</CODE> trap from the calling shell.
4384 The trace attribute has no special meaning for variables.
4385 <P>
4386
4387 <DT><CODE>-x</CODE>
4388 <DD>Mark each <VAR>name</VAR> for export to subsequent commands via
4389 the environment.
4390 </DL>
4391 <P>
4392
4393 Using <SAMP>`+'</SAMP> instead of <SAMP>`-'</SAMP> turns off the attribute instead.
4394 When used in a function, <CODE>declare</CODE> makes each <VAR>name</VAR> local,
4395 as with the <CODE>local</CODE> command. If a variable name is followed by
4396 =<VAR>value</VAR>, the value of the variable is set to <VAR>value</VAR>.
4397 </P><P>
4398
4399 The return status is zero unless an invalid option is encountered,
4400 an attempt is made to define a function using <SAMP>`-f foo=bar'</SAMP>,
4401 an attempt is made to assign a value to a readonly variable,
4402 an attempt is made to assign a value to an array variable without
4403 using the compound assignment syntax (see section <A HREF="bashref.html#SEC81">6.7 Arrays</A>),
4404 one of the <VAR>names</VAR> is not a valid shell variable name,
4405 an attempt is made to turn off readonly status for a readonly variable,
4406 an attempt is made to turn off array status for an array variable,
4407 or an attempt is made to display a non-existent function with <SAMP>`-f'</SAMP>.
4408 </P><P>
4409
4410 <DT><CODE>echo</CODE>
4411 <DD><A NAME="IDX95"></A>
4412 <TABLE><tr><td>&nbsp;</td><td class=example><pre>echo [-neE] [<VAR>arg</VAR> <small>...</small>]
4413 </pre></td></tr></table>Output the <VAR>arg</VAR>s, separated by spaces, terminated with a
4414 newline.
4415 The return status is always 0.
4416 If <SAMP>`-n'</SAMP> is specified, the trailing newline is suppressed.
4417 If the <SAMP>`-e'</SAMP> option is given, interpretation of the following
4418 backslash-escaped characters is enabled.
4419 The <SAMP>`-E'</SAMP> option disables the interpretation of these escape characters,
4420 even on systems where they are interpreted by default.
4421 The <CODE>xpg_echo</CODE> shell option may be used to
4422 dynamically determine whether or not <CODE>echo</CODE> expands these
4423 escape characters by default.
4424 <CODE>echo</CODE> interprets the following escape sequences:
4425 <DL COMPACT>
4426 <DT><CODE>\a</CODE>
4427 <DD>alert (bell)
4428 <DT><CODE>\b</CODE>
4429 <DD>backspace
4430 <DT><CODE>\c</CODE>
4431 <DD>suppress trailing newline
4432 <DT><CODE>\e</CODE>
4433 <DD>escape
4434 <DT><CODE>\f</CODE>
4435 <DD>form feed
4436 <DT><CODE>\n</CODE>
4437 <DD>new line
4438 <DT><CODE>\r</CODE>
4439 <DD>carriage return
4440 <DT><CODE>\t</CODE>
4441 <DD>horizontal tab
4442 <DT><CODE>\v</CODE>
4443 <DD>vertical tab
4444 <DT><CODE>\\</CODE>
4445 <DD>backslash
4446 <DT><CODE>\0<VAR>nnn</VAR></CODE>
4447 <DD>the eight-bit character whose value is the octal value <VAR>nnn</VAR>
4448 (zero to three octal digits)
4449 <DT><CODE>\<VAR>nnn</VAR></CODE>
4450 <DD>the eight-bit character whose value is the octal value <VAR>nnn</VAR>
4451 (one to three octal digits)
4452 <DT><CODE>\x<VAR>HH</VAR></CODE>
4453 <DD>the eight-bit character whose value is the hexadecimal value <VAR>HH</VAR>
4454 (one or two hex digits)
4455 </DL>
4456 <P>
4457
4458 <DT><CODE>enable</CODE>
4459 <DD><A NAME="IDX96"></A>
4460 <TABLE><tr><td>&nbsp;</td><td class=example><pre>enable [-n] [-p] [-f <VAR>filename</VAR>] [-ads] [<VAR>name</VAR> <small>...</small>]
4461 </pre></td></tr></table>Enable and disable builtin shell commands.
4462 Disabling a builtin allows a disk command which has the same name
4463 as a shell builtin to be executed without specifying a full pathname,
4464 even though the shell normally searches for builtins before disk commands.
4465 If <SAMP>`-n'</SAMP> is used, the <VAR>name</VAR>s become disabled. Otherwise
4466 <VAR>name</VAR>s are enabled. For example, to use the <CODE>test</CODE> binary
4467 found via <CODE>$PATH</CODE> instead of the shell builtin version, type
4468 <SAMP>`enable -n test'</SAMP>.
4469 <P>
4470
4471 If the <SAMP>`-p'</SAMP> option is supplied, or no <VAR>name</VAR> arguments appear,
4472 a list of shell builtins is printed. With no other arguments, the list
4473 consists of all enabled shell builtins.
4474 The <SAMP>`-a'</SAMP> option means to list
4475 each builtin with an indication of whether or not it is enabled.
4476 </P><P>
4477
4478 The <SAMP>`-f'</SAMP> option means to load the new builtin command <VAR>name</VAR>
4479 from shared object <VAR>filename</VAR>, on systems that support dynamic loading.
4480 The <SAMP>`-d'</SAMP> option will delete a builtin loaded with <SAMP>`-f'</SAMP>.
4481 </P><P>
4482
4483 If there are no options, a list of the shell builtins is displayed.
4484 The <SAMP>`-s'</SAMP> option restricts <CODE>enable</CODE> to the POSIX special
4485 builtins. If <SAMP>`-s'</SAMP> is used with <SAMP>`-f'</SAMP>, the new builtin becomes
4486 a special builtin (see section <A HREF="bashref.html#SEC60">4.4 Special Builtins</A>).
4487 </P><P>
4488
4489 The return status is zero unless a <VAR>name</VAR> is not a shell builtin
4490 or there is an error loading a new builtin from a shared object.
4491 </P><P>
4492
4493 <DT><CODE>help</CODE>
4494 <DD><A NAME="IDX97"></A>
4495 <TABLE><tr><td>&nbsp;</td><td class=example><pre>help [-s] [<VAR>pattern</VAR>]
4496 </pre></td></tr></table>Display helpful information about builtin commands.
4497 If <VAR>pattern</VAR> is specified, <CODE>help</CODE> gives detailed help
4498 on all commands matching <VAR>pattern</VAR>, otherwise a list of
4499 the builtins is printed.
4500 The <SAMP>`-s'</SAMP> option restricts the information displayed to a short
4501 usage synopsis.
4502 The return status is zero unless no command matches <VAR>pattern</VAR>.
4503 <P>
4504
4505 <DT><CODE>let</CODE>
4506 <DD><A NAME="IDX98"></A>
4507 <TABLE><tr><td>&nbsp;</td><td class=example><pre>let <VAR>expression</VAR> [<VAR>expression</VAR>]
4508 </pre></td></tr></table>The <CODE>let</CODE> builtin allows arithmetic to be performed on shell
4509 variables. Each <VAR>expression</VAR> is evaluated according to the
4510 rules given below in <A HREF="bashref.html#SEC79">6.5 Shell Arithmetic</A>. If the
4511 last <VAR>expression</VAR> evaluates to 0, <CODE>let</CODE> returns 1;
4512 otherwise 0 is returned.
4513 <P>
4514
4515 <DT><CODE>local</CODE>
4516 <DD><A NAME="IDX99"></A>
4517 <TABLE><tr><td>&nbsp;</td><td class=example><pre>local [<VAR>option</VAR>] <VAR>name</VAR>[=<VAR>value</VAR>] <small>...</small>
4518 </pre></td></tr></table>For each argument, a local variable named <VAR>name</VAR> is created,
4519 and assigned <VAR>value</VAR>.
4520 The <VAR>option</VAR> can be any of the options accepted by <CODE>declare</CODE>.
4521 <CODE>local</CODE> can only be used within a function; it makes the variable
4522 <VAR>name</VAR> have a visible scope restricted to that function and its
4523 children. The return status is zero unless <CODE>local</CODE> is used outside
4524 a function, an invalid <VAR>name</VAR> is supplied, or <VAR>name</VAR> is a
4525 readonly variable.
4526 <P>
4527
4528 <DT><CODE>logout</CODE>
4529 <DD><A NAME="IDX100"></A>
4530 <TABLE><tr><td>&nbsp;</td><td class=example><pre>logout [<VAR>n</VAR>]
4531 </pre></td></tr></table>Exit a login shell, returning a status of <VAR>n</VAR> to the shell's
4532 parent.
4533 <P>
4534
4535 <DT><CODE>printf</CODE>
4536 <DD><A NAME="IDX101"></A>
4537 <TABLE><tr><td>&nbsp;</td><td class=example><pre><CODE>printf</CODE> <VAR>format</VAR> [<VAR>arguments</VAR>]
4538 </pre></td></tr></table>Write the formatted <VAR>arguments</VAR> to the standard output under the
4539 control of the <VAR>format</VAR>.
4540 The <VAR>format</VAR> is a character string which contains three types of objects:
4541 plain characters, which are simply copied to standard output, character
4542 escape sequences, which are converted and copied to the standard output, and
4543 format specifications, each of which causes printing of the next successive
4544 <VAR>argument</VAR>.
4545 In addition to the standard <CODE>printf(1)</CODE> formats, <SAMP>`%b'</SAMP> causes
4546 <CODE>printf</CODE> to expand backslash escape sequences in the corresponding
4547 <VAR>argument</VAR>,
4548 (except that <SAMP>`\c'</SAMP> terminates output, backslashes in
4549 <SAMP>`\''</SAMP>, <SAMP>`\"'</SAMP>, and <SAMP>`\?'</SAMP> are not removed, and octal escapes
4550 beginning with <SAMP>`\0'</SAMP> may contain up to four digits),
4551 and <SAMP>`%q'</SAMP> causes <CODE>printf</CODE> to output the
4552 corresponding <VAR>argument</VAR> in a format that can be reused as shell input.
4553 <P>
4554
4555 The <VAR>format</VAR> is reused as necessary to consume all of the <VAR>arguments</VAR>.
4556 If the <VAR>format</VAR> requires more <VAR>arguments</VAR> than are supplied, the
4557 extra format specifications behave as if a zero value or null string, as
4558 appropriate, had been supplied. The return value is zero on success,
4559 non-zero on failure.
4560 </P><P>
4561
4562 <DT><CODE>read</CODE>
4563 <DD><A NAME="IDX102"></A>
4564 <TABLE><tr><td>&nbsp;</td><td class=example><pre>read [-ers] [-a <VAR>aname</VAR>] [-d <VAR>delim</VAR>] [-n <VAR>nchars</VAR>] [-p <VAR>prompt</VAR>] [-t <VAR>timeout</VAR>] [-u <VAR>fd</VAR>] [<VAR>name</VAR> <small>...</small>]
4565 </pre></td></tr></table>One line is read from the standard input, or from the file descriptor
4566 <VAR>fd</VAR> supplied as an argument to the <SAMP>`-u'</SAMP> option, and the first word
4567 is assigned to the first <VAR>name</VAR>, the second word to the second <VAR>name</VAR>,
4568 and so on, with leftover words and their intervening separators assigned
4569 to the last <VAR>name</VAR>.
4570 If there are fewer words read from the input stream than names,
4571 the remaining names are assigned empty values.
4572 The characters in the value of the <CODE>IFS</CODE> variable
4573 are used to split the line into words.
4574 The backslash character <SAMP>`\'</SAMP> may be used to remove any special
4575 meaning for the next character read and for line continuation.
4576 If no names are supplied, the line read is assigned to the
4577 variable <CODE>REPLY</CODE>.
4578 The return code is zero, unless end-of-file is encountered, <CODE>read</CODE>
4579 times out, or an invalid file descriptor is supplied as the argument to
4580 <SAMP>`-u'</SAMP>.
4581 Options, if supplied, have the following meanings:
4582 <P>
4583
4584 <DL COMPACT>
4585 <DT><CODE>-a <VAR>aname</VAR></CODE>
4586 <DD>The words are assigned to sequential indices of the array variable
4587 <VAR>aname</VAR>, starting at 0.
4588 All elements are removed from <VAR>aname</VAR> before the assignment.
4589 Other <VAR>name</VAR> arguments are ignored.
4590 <P>
4591
4592 <DT><CODE>-d <VAR>delim</VAR></CODE>
4593 <DD>The first character of <VAR>delim</VAR> is used to terminate the input line,
4594 rather than newline.
4595 <P>
4596
4597 <DT><CODE>-e</CODE>
4598 <DD>Readline (see section <A HREF="bashref.html#SEC91">8. Command Line Editing</A>) is used to obtain the line.
4599 <P>
4600
4601 <DT><CODE>-n <VAR>nchars</VAR></CODE>
4602 <DD><CODE>read</CODE> returns after reading <VAR>nchars</VAR> characters rather than
4603 waiting for a complete line of input.
4604 <P>
4605
4606 <DT><CODE>-p <VAR>prompt</VAR></CODE>
4607 <DD>Display <VAR>prompt</VAR>, without a trailing newline, before attempting
4608 to read any input.
4609 The prompt is displayed only if input is coming from a terminal.
4610 <P>
4611
4612 <DT><CODE>-r</CODE>
4613 <DD>If this option is given, backslash does not act as an escape character.
4614 The backslash is considered to be part of the line.
4615 In particular, a backslash-newline pair may not be used as a line
4616 continuation.
4617 <P>
4618
4619 <DT><CODE>-s</CODE>
4620 <DD>Silent mode. If input is coming from a terminal, characters are
4621 not echoed.
4622 <P>
4623
4624 <DT><CODE>-t <VAR>timeout</VAR></CODE>
4625 <DD>Cause <CODE>read</CODE> to time out and return failure if a complete line of
4626 input is not read within <VAR>timeout</VAR> seconds.
4627 This option has no effect if <CODE>read</CODE> is not reading input from the
4628 terminal or a pipe.
4629 <P>
4630
4631 <DT><CODE>-u <VAR>fd</VAR></CODE>
4632 <DD>Read input from file descriptor <VAR>fd</VAR>.
4633 <P>
4634
4635 </DL>
4636 <P>
4637
4638 <DT><CODE>shopt</CODE>
4639 <DD><A NAME="IDX103"></A>
4640 <TABLE><tr><td>&nbsp;</td><td class=example><pre>shopt [-pqsu] [-o] [<VAR>optname</VAR> <small>...</small>]
4641 </pre></td></tr></table>Toggle the values of variables controlling optional shell behavior.
4642 With no options, or with the <SAMP>`-p'</SAMP> option, a list of all settable
4643 options is displayed, with an indication of whether or not each is set.
4644 The <SAMP>`-p'</SAMP> option causes output to be displayed in a form that
4645 may be reused as input.
4646 Other options have the following meanings:
4647 <P>
4648
4649 <DL COMPACT>
4650 <DT><CODE>-s</CODE>
4651 <DD>Enable (set) each <VAR>optname</VAR>.
4652 <P>
4653
4654 <DT><CODE>-u</CODE>
4655 <DD>Disable (unset) each <VAR>optname</VAR>.
4656 <P>
4657
4658 <DT><CODE>-q</CODE>
4659 <DD>Suppresses normal output; the return status
4660 indicates whether the <VAR>optname</VAR> is set or unset.
4661 If multiple <VAR>optname</VAR> arguments are given with <SAMP>`-q'</SAMP>,
4662 the return status is zero if all <VAR>optnames</VAR> are enabled;
4663 non-zero otherwise.
4664 <P>
4665
4666 <DT><CODE>-o</CODE>
4667 <DD>Restricts the values of
4668 <VAR>optname</VAR> to be those defined for the <SAMP>`-o'</SAMP> option to the
4669 <CODE>set</CODE> builtin (see section <A HREF="bashref.html#SEC59">4.3 The Set Builtin</A>).
4670 </DL>
4671 <P>
4672
4673 If either <SAMP>`-s'</SAMP> or <SAMP>`-u'</SAMP>
4674 is used with no <VAR>optname</VAR> arguments, the display is limited to
4675 those options which are set or unset, respectively.
4676 </P><P>
4677
4678 Unless otherwise noted, the <CODE>shopt</CODE> options are disabled (off)
4679 by default.
4680 </P><P>
4681
4682 The return status when listing options is zero if all <VAR>optnames</VAR>
4683 are enabled, non-zero otherwise. When setting or unsetting options,
4684 the return status is zero unless an <VAR>optname</VAR> is not a valid shell
4685 option.
4686 </P><P>
4687
4688 The list of <CODE>shopt</CODE> options is:
4689 <DL COMPACT>
4690 <DT><CODE>cdable_vars</CODE>
4691 <DD>If this is set, an argument to the <CODE>cd</CODE>
4692 builtin command that
4693 is not a directory is assumed to be the name of a variable whose
4694 value is the directory to change to.
4695 <P>
4696
4697 <DT><CODE>cdspell</CODE>
4698 <DD>If set, minor errors in the spelling of a directory component in a
4699 <CODE>cd</CODE> command will be corrected.
4700 The errors checked for are transposed characters,
4701 a missing character, and a character too many.
4702 If a correction is found, the corrected path is printed,
4703 and the command proceeds.
4704 This option is only used by interactive shells.
4705 <P>
4706
4707 <DT><CODE>checkhash</CODE>
4708 <DD>If this is set, Bash checks that a command found in the hash
4709 table exists before trying to execute it. If a hashed command no
4710 longer exists, a normal path search is performed.
4711 <P>
4712
4713 <DT><CODE>checkwinsize</CODE>
4714 <DD>If set, Bash checks the window size after each command
4715 and, if necessary, updates the values of
4716 <CODE>LINES</CODE> and <CODE>COLUMNS</CODE>.
4717 <P>
4718
4719 <DT><CODE>cmdhist</CODE>
4720 <DD>If set, Bash
4721 attempts to save all lines of a multiple-line
4722 command in the same history entry. This allows
4723 easy re-editing of multi-line commands.
4724 <P>
4725
4726 <DT><CODE>dotglob</CODE>
4727 <DD>If set, Bash includes filenames beginning with a `.' in
4728 the results of filename expansion.
4729 <P>
4730
4731 <DT><CODE>execfail</CODE>
4732 <DD>If this is set, a non-interactive shell will not exit if
4733 it cannot execute the file specified as an argument to the <CODE>exec</CODE>
4734 builtin command. An interactive shell does not exit if <CODE>exec</CODE>
4735 fails.
4736 <P>
4737
4738 <DT><CODE>expand_aliases</CODE>
4739 <DD>If set, aliases are expanded as described below under Aliases,
4740 <A HREF="bashref.html#SEC80">6.6 Aliases</A>.
4741 This option is enabled by default for interactive shells.
4742 <P>
4743
4744 <DT><CODE>extdebug</CODE>
4745 <DD>If set, behavior intended for use by debuggers is enabled:
4746 <P>
4747
4748 <OL>
4749 <LI>
4750 The <SAMP>`-F'</SAMP> option to the <CODE>declare</CODE> builtin (see section <A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A>)
4751 displays the source file name and line number corresponding to each function
4752 name supplied as an argument.
4753 <P>
4754
4755 <LI>
4756 If the command run by the <CODE>DEBUG</CODE> trap returns a non-zero value, the
4757 next command is skipped and not executed.
4758 <P>
4759
4760 <LI>
4761 If the command run by the <CODE>DEBUG</CODE> trap returns a value of 2, and the
4762 shell is executing in a subroutine (a shell function or a shell script
4763 executed by the <CODE>.</CODE> or <CODE>source</CODE> builtins), a call to
4764 <CODE>return</CODE> is simulated.
4765 </OL>
4766 <P>
4767
4768 <DT><CODE>extglob</CODE>
4769 <DD>If set, the extended pattern matching features described above
4770 (see section <A HREF="bashref.html#SEC36">3.5.8.1 Pattern Matching</A>) are enabled.
4771 <P>
4772
4773 <DT><CODE>extquote</CODE>
4774 <DD>If set, <CODE>$'<VAR>string</VAR>'</CODE> and <CODE>$"<VAR>string</VAR>"</CODE> quoting is
4775 performed within <CODE>${<VAR>parameter</VAR>}</CODE> expansions
4776 enclosed in double quotes. This option is enabled by default.
4777 <P>
4778
4779 <DT><CODE>failglob</CODE>
4780 <DD>If set, patterns which fail to match filenames during pathname expansion
4781 result in an expansion error.
4782 <P>
4783
4784 <DT><CODE>force_fignore</CODE>
4785 <DD>If set, the suffixes specified by the <CODE>FIGNORE</CODE> shell variable
4786 cause words to be ignored when performing word completion even if
4787 the ignored words are the only possible completions.
4788 See section <A HREF="bashref.html#SEC63">5.2 Bash Variables</A>, for a description of <CODE>FIGNORE</CODE>.
4789 This option is enabled by default.
4790 <P>
4791
4792 <DT><CODE>gnu_errfmt</CODE>
4793 <DD>If set, shell error messages are written in the standard GNU error
4794 message format.
4795 <P>
4796
4797 <DT><CODE>histappend</CODE>
4798 <DD>If set, the history list is appended to the file named by the value
4799 of the <CODE>HISTFILE</CODE>
4800 variable when the shell exits, rather than overwriting the file.
4801 <P>
4802
4803 <DT><CODE>histreedit</CODE>
4804 <DD>If set, and Readline
4805 is being used, a user is given the opportunity to re-edit a
4806 failed history substitution.
4807 <P>
4808
4809 <DT><CODE>histverify</CODE>
4810 <DD>If set, and Readline
4811 is being used, the results of history substitution are not immediately
4812 passed to the shell parser. Instead, the resulting line is loaded into
4813 the Readline editing buffer, allowing further modification.
4814 <P>
4815
4816 <DT><CODE>hostcomplete</CODE>
4817 <DD>If set, and Readline is being used, Bash will attempt to perform
4818 hostname completion when a word containing a <SAMP>`@'</SAMP> is being
4819 completed (see section <A HREF="bashref.html#SEC109">8.4.6 Letting Readline Type For You</A>). This option is enabled
4820 by default.
4821 <P>
4822
4823 <DT><CODE>huponexit</CODE>
4824 <DD>If set, Bash will send <CODE>SIGHUP</CODE> to all jobs when an interactive
4825 login shell exits (see section <A HREF="bashref.html#SEC54">3.7.6 Signals</A>).
4826 <P>
4827
4828 <DT><CODE>interactive_comments</CODE>
4829 <DD>Allow a word beginning with <SAMP>`#'</SAMP>
4830 to cause that word and all remaining characters on that
4831 line to be ignored in an interactive shell.
4832 This option is enabled by default.
4833 <P>
4834
4835 <DT><CODE>lithist</CODE>
4836 <DD>If enabled, and the <CODE>cmdhist</CODE>
4837 option is enabled, multi-line commands are saved to the history with
4838 embedded newlines rather than using semicolon separators where possible.
4839 <P>
4840
4841 <DT><CODE>login_shell</CODE>
4842 <DD>The shell sets this option if it is started as a login shell
4843 (see section <A HREF="bashref.html#SEC65">6.1 Invoking Bash</A>).
4844 The value may not be changed.
4845 <P>
4846
4847 <DT><CODE>mailwarn</CODE>
4848 <DD>If set, and a file that Bash is checking for mail has been
4849 accessed since the last time it was checked, the message
4850 <CODE>"The mail in <VAR>mailfile</VAR> has been read"</CODE> is displayed.
4851 <P>
4852
4853 <DT><CODE>no_empty_cmd_completion</CODE>
4854 <DD>If set, and Readline is being used, Bash will not attempt to search
4855 the <CODE>PATH</CODE> for possible completions when completion is attempted
4856 on an empty line.
4857 <P>
4858
4859 <DT><CODE>nocaseglob</CODE>
4860 <DD>If set, Bash matches filenames in a case-insensitive fashion when
4861 performing filename expansion.
4862 <P>
4863
4864 <DT><CODE>nullglob</CODE>
4865 <DD>If set, Bash allows filename patterns which match no
4866 files to expand to a null string, rather than themselves.
4867 <P>
4868
4869 <DT><CODE>progcomp</CODE>
4870 <DD>If set, the programmable completion facilities
4871 (see section <A HREF="bashref.html#SEC113">8.6 Programmable Completion</A>) are enabled.
4872 This option is enabled by default.
4873 <P>
4874
4875 <DT><CODE>promptvars</CODE>
4876 <DD>If set, prompt strings undergo
4877 parameter expansion, command substitution, arithmetic
4878 expansion, and quote removal after being expanded
4879 as described below (see section <A HREF="bashref.html#SEC84">6.9 Controlling the Prompt</A>).
4880 This option is enabled by default.
4881 <P>
4882
4883 <DT><CODE>restricted_shell</CODE>
4884 <DD>The shell sets this option if it is started in restricted mode
4885 (see section <A HREF="bashref.html#SEC85">6.10 The Restricted Shell</A>).
4886 The value may not be changed.
4887 This is not reset when the startup files are executed, allowing
4888 the startup files to discover whether or not a shell is restricted.
4889 <P>
4890
4891 <DT><CODE>shift_verbose</CODE>
4892 <DD>If this is set, the <CODE>shift</CODE>
4893 builtin prints an error message when the shift count exceeds the
4894 number of positional parameters.
4895 <P>
4896
4897 <DT><CODE>sourcepath</CODE>
4898 <DD>If set, the <CODE>source</CODE> builtin uses the value of <CODE>PATH</CODE>
4899 to find the directory containing the file supplied as an argument.
4900 This option is enabled by default.
4901 <P>
4902
4903 <DT><CODE>xpg_echo</CODE>
4904 <DD>If set, the <CODE>echo</CODE> builtin expands backslash-escape sequences
4905 by default.
4906 <P>
4907
4908 </DL>
4909 <P>
4910
4911 The return status when listing options is zero if all <VAR>optnames</VAR>
4912 are enabled, non-zero otherwise.
4913 When setting or unsetting options, the return status is zero unless an
4914 <VAR>optname</VAR> is not a valid shell option.
4915 </P><P>
4916
4917 <DT><CODE>source</CODE>
4918 <DD><A NAME="IDX104"></A>
4919 <TABLE><tr><td>&nbsp;</td><td class=example><pre>source <VAR>filename</VAR>
4920 </pre></td></tr></table>A synonym for <CODE>.</CODE> (see section <A HREF="bashref.html#SEC57">4.1 Bourne Shell Builtins</A>).
4921 <P>
4922
4923 <DT><CODE>type</CODE>
4924 <DD><A NAME="IDX105"></A>
4925 <TABLE><tr><td>&nbsp;</td><td class=example><pre>type [-afptP] [<VAR>name</VAR> <small>...</small>]
4926 </pre></td></tr></table>For each <VAR>name</VAR>, indicate how it would be interpreted if used as a
4927 command name.
4928 <P>
4929
4930 If the <SAMP>`-t'</SAMP> option is used, <CODE>type</CODE> prints a single word
4931 which is one of <SAMP>`alias'</SAMP>, <SAMP>`function'</SAMP>, <SAMP>`builtin'</SAMP>,
4932 <SAMP>`file'</SAMP> or <SAMP>`keyword'</SAMP>,
4933 if <VAR>name</VAR> is an alias, shell function, shell builtin,
4934 disk file, or shell reserved word, respectively.
4935 If the <VAR>name</VAR> is not found, then nothing is printed, and
4936 <CODE>type</CODE> returns a failure status.
4937 </P><P>
4938
4939 If the <SAMP>`-p'</SAMP> option is used, <CODE>type</CODE> either returns the name
4940 of the disk file that would be executed, or nothing if <SAMP>`-t'</SAMP>
4941 would not return <SAMP>`file'</SAMP>.
4942 </P><P>
4943
4944 The <SAMP>`-P'</SAMP> option forces a path search for each <VAR>name</VAR>, even if
4945 <SAMP>`-t'</SAMP> would not return <SAMP>`file'</SAMP>.
4946 </P><P>
4947
4948 If a command is hashed, <SAMP>`-p'</SAMP> and <SAMP>`-P'</SAMP> print the hashed value,
4949 not necessarily the file that appears first in <CODE>$PATH</CODE>.
4950 </P><P>
4951
4952 If the <SAMP>`-a'</SAMP> option is used, <CODE>type</CODE> returns all of the places
4953 that contain an executable named <VAR>file</VAR>.
4954 This includes aliases and functions, if and only if the <SAMP>`-p'</SAMP> option
4955 is not also used.
4956 </P><P>
4957
4958 If the <SAMP>`-f'</SAMP> option is used, <CODE>type</CODE> does not attempt to find
4959 shell functions, as with the <CODE>command</CODE> builtin.
4960 </P><P>
4961
4962 The return status is zero if any of the <VAR>names</VAR> are found, non-zero
4963 if none are found.
4964 </P><P>
4965
4966 <DT><CODE>typeset</CODE>
4967 <DD><A NAME="IDX106"></A>
4968 <TABLE><tr><td>&nbsp;</td><td class=example><pre>typeset [-afFrxi] [-p] [<VAR>name</VAR>[=<VAR>value</VAR>] <small>...</small>]
4969 </pre></td></tr></table>The <CODE>typeset</CODE> command is supplied for compatibility with the Korn
4970 shell; however, it has been deprecated in favor of the <CODE>declare</CODE>
4971 builtin command.
4972 <P>
4973
4974 <DT><CODE>ulimit</CODE>
4975 <DD><A NAME="IDX107"></A>
4976 <TABLE><tr><td>&nbsp;</td><td class=example><pre>ulimit [-acdflmnpstuvSH] [<VAR>limit</VAR>]
4977 </pre></td></tr></table><CODE>ulimit</CODE> provides control over the resources available to processes
4978 started by the shell, on systems that allow such control. If an
4979 option is given, it is interpreted as follows:
4980 <DL COMPACT>
4981 <DT><CODE>-S</CODE>
4982 <DD>Change and report the soft limit associated with a resource.
4983 <P>
4984
4985 <DT><CODE>-H</CODE>
4986 <DD>Change and report the hard limit associated with a resource.
4987 <P>
4988
4989 <DT><CODE>-a</CODE>
4990 <DD>All current limits are reported.
4991 <P>
4992
4993 <DT><CODE>-c</CODE>
4994 <DD>The maximum size of core files created.
4995 <P>
4996
4997 <DT><CODE>-d</CODE>
4998 <DD>The maximum size of a process's data segment.
4999 <P>
5000
5001 <DT><CODE>-f</CODE>
5002 <DD>The maximum size of files created by the shell.
5003 <P>
5004
5005 <DT><CODE>-l</CODE>
5006 <DD>The maximum size that may be locked into memory.
5007 <P>
5008
5009 <DT><CODE>-m</CODE>
5010 <DD>The maximum resident set size.
5011 <P>
5012
5013 <DT><CODE>-n</CODE>
5014 <DD>The maximum number of open file descriptors.
5015 <P>
5016
5017 <DT><CODE>-p</CODE>
5018 <DD>The pipe buffer size.
5019 <P>
5020
5021 <DT><CODE>-s</CODE>
5022 <DD>The maximum stack size.
5023 <P>
5024
5025 <DT><CODE>-t</CODE>
5026 <DD>The maximum amount of cpu time in seconds.
5027 <P>
5028
5029 <DT><CODE>-u</CODE>
5030 <DD>The maximum number of processes available to a single user.
5031 <P>
5032
5033 <DT><CODE>-v</CODE>
5034 <DD>The maximum amount of virtual memory available to the process.
5035 <P>
5036
5037 </DL>
5038 <P>
5039
5040 If <VAR>limit</VAR> is given, it is the new value of the specified resource;
5041 the special <VAR>limit</VAR> values <CODE>hard</CODE>, <CODE>soft</CODE>, and
5042 <CODE>unlimited</CODE> stand for the current hard limit, the current soft limit,
5043 and no limit, respectively.
5044 Otherwise, the current value of the soft limit for the specified resource
5045 is printed, unless the <SAMP>`-H'</SAMP> option is supplied.
5046 When setting new limits, if neither <SAMP>`-H'</SAMP> nor <SAMP>`-S'</SAMP> is supplied,
5047 both the hard and soft limits are set.
5048 If no option is given, then <SAMP>`-f'</SAMP> is assumed. Values are in 1024-byte
5049 increments, except for <SAMP>`-t'</SAMP>, which is in seconds, <SAMP>`-p'</SAMP>,
5050 which is in units of 512-byte blocks, and <SAMP>`-n'</SAMP> and <SAMP>`-u'</SAMP>, which
5051 are unscaled values.
5052 </P><P>
5053
5054 The return status is zero unless an invalid option or argument is supplied,
5055 or an error occurs while setting a new limit.
5056 </P><P>
5057
5058 <DT><CODE>unalias</CODE>
5059 <DD><A NAME="IDX108"></A>
5060 <TABLE><tr><td>&nbsp;</td><td class=example><pre>unalias [-a] [<VAR>name</VAR> <small>...</small> ]
5061 </pre></td></tr></table><P>
5062
5063 Remove each <VAR>name</VAR> from the list of aliases. If <SAMP>`-a'</SAMP> is
5064 supplied, all aliases are removed.
5065 Aliases are described in <A HREF="bashref.html#SEC80">6.6 Aliases</A>.
5066 </P><P>
5067
5068 </DL>
5069 <P>
5070
5071 <A NAME="The Set Builtin"></A>
5072 <HR SIZE="6">
5073 <A NAME="SEC59"></A>
5074 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
5075 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC58"> &lt; </A>]</TD>
5076 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC60"> &gt; </A>]</TD>
5077 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC60"> &lt;&lt; </A>]</TD>
5078 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC56"> Up </A>]</TD>
5079 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC61"> &gt;&gt; </A>]</TD>
5080 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
5081 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
5082 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
5083 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
5084 </TR></TABLE>
5085 <H2> 4.3 The Set Builtin </H2>
5086 <!--docid::SEC59::-->
5087 <P>
5088
5089 This builtin is so complicated that it deserves its own section.
5090 </P><P>
5091
5092 <DL COMPACT>
5093 <DT><CODE>set</CODE>
5094 <DD><A NAME="IDX109"></A>
5095 <TABLE><tr><td>&nbsp;</td><td class=example><pre>set [--abefhkmnptuvxBCHP] [-o <VAR>option</VAR>] [<VAR>argument</VAR> <small>...</small>]
5096 </pre></td></tr></table><P>
5097
5098 If no options or arguments are supplied, <CODE>set</CODE> displays the names
5099 and values of all shell variables and functions, sorted according to the
5100 current locale, in a format that may be reused as input.
5101 </P><P>
5102
5103 When options are supplied, they set or unset shell attributes.
5104 Options, if specified, have the following meanings:
5105 </P><P>
5106
5107 <DL COMPACT>
5108 <DT><CODE>-a</CODE>
5109 <DD>Mark variables and function which are modified or created for export
5110 to the environment of subsequent commands.
5111 <P>
5112
5113 <DT><CODE>-b</CODE>
5114 <DD>Cause the status of terminated background jobs to be reported
5115 immediately, rather than before printing the next primary prompt.
5116 <P>
5117
5118 <DT><CODE>-e</CODE>
5119 <DD>Exit immediately if a simple command (see section <A HREF="bashref.html#SEC16">3.2.1 Simple Commands</A>) exits
5120 with a non-zero status, unless the command that fails is part of the
5121 command list immediately following a <CODE>while</CODE> or <CODE>until</CODE>
5122 keyword, part of the test in an <CODE>if</CODE> statement,
5123 part of a <CODE>&#38;&#38;</CODE> or <CODE>||</CODE> list, or if the command's return
5124 status is being inverted using <CODE>!</CODE>.
5125 A trap on <CODE>ERR</CODE>, if set, is executed before the shell exits.
5126 <P>
5127
5128 <DT><CODE>-f</CODE>
5129 <DD>Disable file name generation (globbing).
5130 <P>
5131
5132 <DT><CODE>-h</CODE>
5133 <DD>Locate and remember (hash) commands as they are looked up for execution.
5134 This option is enabled by default.
5135 <P>
5136
5137 <DT><CODE>-k</CODE>
5138 <DD>All arguments in the form of assignment statements are placed
5139 in the environment for a command, not just those that precede
5140 the command name.
5141 <P>
5142
5143 <DT><CODE>-m</CODE>
5144 <DD>Job control is enabled (see section <A HREF="bashref.html#SEC87">7. Job Control</A>).
5145 <P>
5146
5147 <DT><CODE>-n</CODE>
5148 <DD>Read commands but do not execute them; this may be used to check a
5149 script for syntax errors.
5150 This option is ignored by interactive shells.
5151 <P>
5152
5153 <DT><CODE>-o <VAR>option-name</VAR></CODE>
5154 <DD><P>
5155
5156 Set the option corresponding to <VAR>option-name</VAR>:
5157 </P><P>
5158
5159 <DL COMPACT>
5160 <DT><CODE>allexport</CODE>
5161 <DD>Same as <CODE>-a</CODE>.
5162 <P>
5163
5164 <DT><CODE>braceexpand</CODE>
5165 <DD>Same as <CODE>-B</CODE>.
5166 <P>
5167
5168 <DT><CODE>emacs</CODE>
5169 <DD>Use an <CODE>emacs</CODE>-style line editing interface (see section <A HREF="bashref.html#SEC91">8. Command Line Editing</A>).
5170 <P>
5171
5172 <DT><CODE>errexit</CODE>
5173 <DD>Same as <CODE>-e</CODE>.
5174 <P>
5175
5176 <DT><CODE>errtrace</CODE>
5177 <DD>Same as <CODE>-E</CODE>.
5178 <P>
5179
5180 <DT><CODE>functrace</CODE>
5181 <DD>Same as <CODE>-T</CODE>.
5182 <P>
5183
5184 <DT><CODE>hashall</CODE>
5185 <DD>Same as <CODE>-h</CODE>.
5186 <P>
5187
5188 <DT><CODE>histexpand</CODE>
5189 <DD>Same as <CODE>-H</CODE>.
5190 <P>
5191
5192 <DT><CODE>history</CODE>
5193 <DD>Enable command history, as described in <A HREF="bashref.html#SEC116">9.1 Bash History Facilities</A>.
5194 This option is on by default in interactive shells.
5195 <P>
5196
5197 <DT><CODE>ignoreeof</CODE>
5198 <DD>An interactive shell will not exit upon reading EOF.
5199 <P>
5200
5201 <DT><CODE>keyword</CODE>
5202 <DD>Same as <CODE>-k</CODE>.
5203 <P>
5204
5205 <DT><CODE>monitor</CODE>
5206 <DD>Same as <CODE>-m</CODE>.
5207 <P>
5208
5209 <DT><CODE>noclobber</CODE>
5210 <DD>Same as <CODE>-C</CODE>.
5211 <P>
5212
5213 <DT><CODE>noexec</CODE>
5214 <DD>Same as <CODE>-n</CODE>.
5215 <P>
5216
5217 <DT><CODE>noglob</CODE>
5218 <DD>Same as <CODE>-f</CODE>.
5219 <P>
5220
5221 <DT><CODE>nolog</CODE>
5222 <DD>Currently ignored.
5223 <P>
5224
5225 <DT><CODE>notify</CODE>
5226 <DD>Same as <CODE>-b</CODE>.
5227 <P>
5228
5229 <DT><CODE>nounset</CODE>
5230 <DD>Same as <CODE>-u</CODE>.
5231 <P>
5232
5233 <DT><CODE>onecmd</CODE>
5234 <DD>Same as <CODE>-t</CODE>.
5235 <P>
5236
5237 <DT><CODE>physical</CODE>
5238 <DD>Same as <CODE>-P</CODE>.
5239 <P>
5240
5241 <DT><CODE>pipefail</CODE>
5242 <DD>If set, the return value of a pipeline is the value of the last
5243 (rightmost) command to exit with a non-zero status, or zero if all
5244 commands in the pipeline exit successfully.
5245 This option is disabled by default.
5246 <P>
5247
5248 <DT><CODE>posix</CODE>
5249 <DD>Change the behavior of Bash where the default operation differs
5250 from the POSIX 1003.2 standard to match the standard
5251 (see section <A HREF="bashref.html#SEC86">6.11 Bash POSIX Mode</A>).
5252 This is intended to make Bash behave as a strict superset of that
5253 standard.
5254 <P>
5255
5256 <DT><CODE>privileged</CODE>
5257 <DD>Same as <CODE>-p</CODE>.
5258 <P>
5259
5260 <DT><CODE>verbose</CODE>
5261 <DD>Same as <CODE>-v</CODE>.
5262 <P>
5263
5264 <DT><CODE>vi</CODE>
5265 <DD>Use a <CODE>vi</CODE>-style line editing interface.
5266 <P>
5267
5268 <DT><CODE>xtrace</CODE>
5269 <DD>Same as <CODE>-x</CODE>.
5270 </DL>
5271 <P>
5272
5273 <DT><CODE>-p</CODE>
5274 <DD>Turn on privileged mode.
5275 In this mode, the <CODE>$BASH_ENV</CODE> and <CODE>$ENV</CODE> files are not
5276 processed, shell functions are not inherited from the environment,
5277 and the <CODE>SHELLOPTS</CODE> variable, if it appears in the environment,
5278 is ignored.
5279 If the shell is started with the effective user (group) id not equal to the
5280 real user (group) id, and the <CODE>-p</CODE> option is not supplied, these actions
5281 are taken and the effective user id is set to the real user id.
5282 If the <CODE>-p</CODE> option is supplied at startup, the effective user id is
5283 not reset.
5284 Turning this option off causes the effective user
5285 and group ids to be set to the real user and group ids.
5286 <P>
5287
5288 <DT><CODE>-t</CODE>
5289 <DD>Exit after reading and executing one command.
5290 <P>
5291
5292 <DT><CODE>-u</CODE>
5293 <DD>Treat unset variables as an error when performing parameter expansion.
5294 An error message will be written to the standard error, and a non-interactive
5295 shell will exit.
5296 <P>
5297
5298 <DT><CODE>-v</CODE>
5299 <DD>Print shell input lines as they are read.
5300 <P>
5301
5302 <DT><CODE>-x</CODE>
5303 <DD>Print a trace of simple commands, \fBfor\fP commands, \fBcase\fP
5304 commands, \fBselect\fP commands, and arithmetic \fBfor\fP commands
5305 and their arguments or associated word lists after they are
5306 expanded and before they are executed. The value of the <CODE>PS4</CODE>
5307 variable is expanded and the resultant value is printed before
5308 the command and its expanded arguments.
5309 <P>
5310
5311 <DT><CODE>-B</CODE>
5312 <DD>The shell will perform brace expansion (see section <A HREF="bashref.html#SEC28">3.5.1 Brace Expansion</A>).
5313 This option is on by default.
5314 <P>
5315
5316 <DT><CODE>-C</CODE>
5317 <DD>Prevent output redirection using <SAMP>`&#62;'</SAMP>, <SAMP>`&#62;&#38;'</SAMP>, and <SAMP>`&#60;&#62;'</SAMP>
5318 from overwriting existing files.
5319 <P>
5320
5321 <DT><CODE>-E</CODE>
5322 <DD>If set, any trap on <CODE>ERR</CODE> is inherited by shell functions, command
5323 substitutions, and commands executed in a subshell environment.
5324 The <CODE>ERR</CODE> trap is normally not inherited in such cases.
5325 <P>
5326
5327 <DT><CODE>-H</CODE>
5328 <DD>Enable <SAMP>`!'</SAMP> style history substitution (see section <A HREF="bashref.html#SEC118">9.3 History Expansion</A>).
5329 This option is on by default for interactive shells.
5330 <P>
5331
5332 <DT><CODE>-P</CODE>
5333 <DD>If set, do not follow symbolic links when performing commands such as
5334 <CODE>cd</CODE> which change the current directory. The physical directory
5335 is used instead. By default, Bash follows
5336 the logical chain of directories when performing commands
5337 which change the current directory.
5338 <P>
5339
5340 For example, if <TT>`/usr/sys'</TT> is a symbolic link to <TT>`/usr/local/sys'</TT>
5341 then:
5342 <TABLE><tr><td>&nbsp;</td><td class=example><pre>$ cd /usr/sys; echo $PWD
5343 /usr/sys
5344 $ cd ..; pwd
5345 /usr
5346 </pre></td></tr></table></P><P>
5347
5348 If <CODE>set -P</CODE> is on, then:
5349 <TABLE><tr><td>&nbsp;</td><td class=example><pre>$ cd /usr/sys; echo $PWD
5350 /usr/local/sys
5351 $ cd ..; pwd
5352 /usr/local
5353 </pre></td></tr></table></P><P>
5354
5355 <DT><CODE>-T</CODE>
5356 <DD>If set, any trap on <CODE>DEBUG</CODE> is inherited by shell functions, command
5357 substitutions, and commands executed in a subshell environment.
5358 The <CODE>DEBUG</CODE> trap is normally not inherited in such cases.
5359 <P>
5360
5361 <DT><CODE>--</CODE>
5362 <DD>If no arguments follow this option, then the positional parameters are
5363 unset. Otherwise, the positional parameters are set to the
5364 <VAR>arguments</VAR>, even if some of them begin with a <SAMP>`-'</SAMP>.
5365 <P>
5366
5367 <DT><CODE>-</CODE>
5368 <DD>Signal the end of options, cause all remaining <VAR>arguments</VAR>
5369 to be assigned to the positional parameters. The <SAMP>`-x'</SAMP>
5370 and <SAMP>`-v'</SAMP> options are turned off.
5371 If there are no arguments, the positional parameters remain unchanged.
5372 </DL>
5373 <P>
5374
5375 Using <SAMP>`+'</SAMP> rather than <SAMP>`-'</SAMP> causes these options to be
5376 turned off. The options can also be used upon invocation of the
5377 shell. The current set of options may be found in <CODE>$-</CODE>.
5378 </P><P>
5379
5380 The remaining N <VAR>arguments</VAR> are positional parameters and are
5381 assigned, in order, to <CODE>$1</CODE>, <CODE>$2</CODE>, <small>...</small> <CODE>$N</CODE>.
5382 The special parameter <CODE>#</CODE> is set to N.
5383 </P><P>
5384
5385 The return status is always zero unless an invalid option is supplied.
5386 </DL>
5387 <P>
5388
5389 <A NAME="Special Builtins"></A>
5390 <HR SIZE="6">
5391 <A NAME="SEC60"></A>
5392 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
5393 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC59"> &lt; </A>]</TD>
5394 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC61"> &gt; </A>]</TD>
5395 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC56"> &lt;&lt; </A>]</TD>
5396 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC56"> Up </A>]</TD>
5397 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC61"> &gt;&gt; </A>]</TD>
5398 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
5399 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
5400 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
5401 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
5402 </TR></TABLE>
5403 <H2> 4.4 Special Builtins </H2>
5404 <!--docid::SEC60::-->
5405 <P>
5406
5407 For historical reasons, the POSIX 1003.2 standard has classified
5408 several builtin commands as <EM>special</EM>.
5409 When Bash is executing in POSIX mode, the special builtins
5410 differ from other builtin commands in three respects:
5411 </P><P>
5412
5413 <OL>
5414 <LI>
5415 Special builtins are found before shell functions during command lookup.
5416 <P>
5417
5418 <LI>
5419 If a special builtin returns an error status, a non-interactive shell exits.
5420 <P>
5421
5422 <LI>
5423 Assignment statements preceding the command stay in effect in the shell
5424 environment after the command completes.
5425 </OL>
5426 <P>
5427
5428 When Bash is not executing in POSIX mode, these builtins behave no
5429 differently than the rest of the Bash builtin commands.
5430 The Bash POSIX mode is described in <A HREF="bashref.html#SEC86">6.11 Bash POSIX Mode</A>.
5431 </P><P>
5432
5433 These are the POSIX special builtins:
5434 <TABLE><tr><td>&nbsp;</td><td class=example><pre>break : . continue eval exec exit export readonly return set
5435 shift trap unset
5436 </pre></td></tr></table></P><P>
5437
5438 <A NAME="Shell Variables"></A>
5439 <HR SIZE="6">
5440 <A NAME="SEC61"></A>
5441 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
5442 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC60"> &lt; </A>]</TD>
5443 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC62"> &gt; </A>]</TD>
5444 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC64"> &lt;&lt; </A>]</TD>
5445 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top"> Up </A>]</TD>
5446 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC64"> &gt;&gt; </A>]</TD>
5447 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
5448 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
5449 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
5450 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
5451 </TR></TABLE>
5452 <H1> 5. Shell Variables </H1>
5453 <!--docid::SEC61::-->
5454 <P>
5455
5456 <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
5457 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC62">5.1 Bourne Shell Variables</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Variables which Bash uses in the same way
5458 as the Bourne Shell.</TD></TR>
5459 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">List of variables that exist in Bash.</TD></TR>
5460 </TABLE></BLOCKQUOTE>
5461 <P>
5462
5463 This chapter describes the shell variables that Bash uses.
5464 Bash automatically assigns default values to a number of variables.
5465 </P><P>
5466
5467 <A NAME="Bourne Shell Variables"></A>
5468 <HR SIZE="6">
5469 <A NAME="SEC62"></A>
5470 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
5471 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC61"> &lt; </A>]</TD>
5472 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC63"> &gt; </A>]</TD>
5473 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC61"> &lt;&lt; </A>]</TD>
5474 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC61"> Up </A>]</TD>
5475 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC64"> &gt;&gt; </A>]</TD>
5476 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
5477 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
5478 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
5479 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
5480 </TR></TABLE>
5481 <H2> 5.1 Bourne Shell Variables </H2>
5482 <!--docid::SEC62::-->
5483 <P>
5484
5485 Bash uses certain shell variables in the same way as the Bourne shell.
5486 In some cases, Bash assigns a default value to the variable.
5487 </P><P>
5488
5489 <DL COMPACT>
5490
5491 <A NAME="IDX110"></A>
5492 <DT><CODE>CDPATH</CODE>
5493 <DD><A NAME="IDX111"></A>
5494 A colon-separated list of directories used as a search path for
5495 the <CODE>cd</CODE> builtin command.
5496 <P>
5497
5498 <A NAME="IDX112"></A>
5499 <DT><CODE>HOME</CODE>
5500 <DD><A NAME="IDX113"></A>
5501 The current user's home directory; the default for the <CODE>cd</CODE> builtin
5502 command.
5503 The value of this variable is also used by tilde expansion
5504 (see section <A HREF="bashref.html#SEC29">3.5.2 Tilde Expansion</A>).
5505 <P>
5506
5507 <A NAME="IDX114"></A>
5508 <DT><CODE>IFS</CODE>
5509 <DD><A NAME="IDX115"></A>
5510 A list of characters that separate fields; used when the shell splits
5511 words as part of expansion.
5512 <P>
5513
5514 <A NAME="IDX116"></A>
5515 <DT><CODE>MAIL</CODE>
5516 <DD><A NAME="IDX117"></A>
5517 If this parameter is set to a filename and the <CODE>MAILPATH</CODE> variable
5518 is not set, Bash informs the user of the arrival of mail in
5519 the specified file.
5520 <P>
5521
5522 <A NAME="IDX118"></A>
5523 <DT><CODE>MAILPATH</CODE>
5524 <DD><A NAME="IDX119"></A>
5525 A colon-separated list of filenames which the shell periodically checks
5526 for new mail.
5527 Each list entry can specify the message that is printed when new mail
5528 arrives in the mail file by separating the file name from the message with
5529 a <SAMP>`?'</SAMP>.
5530 When used in the text of the message, <CODE>$_</CODE> expands to the name of
5531 the current mail file.
5532 <P>
5533
5534 <A NAME="IDX120"></A>
5535 <DT><CODE>OPTARG</CODE>
5536 <DD><A NAME="IDX121"></A>
5537 The value of the last option argument processed by the <CODE>getopts</CODE> builtin.
5538 <P>
5539
5540 <A NAME="IDX122"></A>
5541 <DT><CODE>OPTIND</CODE>
5542 <DD><A NAME="IDX123"></A>
5543 The index of the last option argument processed by the <CODE>getopts</CODE> builtin.
5544 <P>
5545
5546 <A NAME="IDX124"></A>
5547 <DT><CODE>PATH</CODE>
5548 <DD><A NAME="IDX125"></A>
5549 A colon-separated list of directories in which the shell looks for
5550 commands.
5551 A zero-length (null) directory name in the value of <CODE>PATH</CODE> indicates the
5552 current directory.
5553 A null directory name may appear as two adjacent colons, or as an initial
5554 or trailing colon.
5555 <P>
5556
5557 <A NAME="IDX126"></A>
5558 <DT><CODE>PS1</CODE>
5559 <DD><A NAME="IDX127"></A>
5560 The primary prompt string. The default value is <SAMP>`\s-\v\$ '</SAMP>.
5561 See section <A HREF="bashref.html#SEC84">6.9 Controlling the Prompt</A>, for the complete list of escape
5562 sequences that are expanded before <CODE>PS1</CODE> is displayed.
5563 <P>
5564
5565 <A NAME="IDX128"></A>
5566 <DT><CODE>PS2</CODE>
5567 <DD><A NAME="IDX129"></A>
5568 The secondary prompt string. The default value is <SAMP>`&#62; '</SAMP>.
5569 <P>
5570
5571 </DL>
5572 <P>
5573
5574 <A NAME="Bash Variables"></A>
5575 <HR SIZE="6">
5576 <A NAME="SEC63"></A>
5577 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
5578 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC62"> &lt; </A>]</TD>
5579 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC64"> &gt; </A>]</TD>
5580 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC61"> &lt;&lt; </A>]</TD>
5581 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC61"> Up </A>]</TD>
5582 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC64"> &gt;&gt; </A>]</TD>
5583 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
5584 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
5585 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
5586 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
5587 </TR></TABLE>
5588 <H2> 5.2 Bash Variables </H2>
5589 <!--docid::SEC63::-->
5590 <P>
5591
5592 These variables are set or used by Bash, but other shells
5593 do not normally treat them specially.
5594 </P><P>
5595
5596 A few variables used by Bash are described in different chapters:
5597 variables for controlling the job control facilities
5598 (see section <A HREF="bashref.html#SEC90">7.3 Job Control Variables</A>).
5599 </P><P>
5600
5601 <DL COMPACT>
5602
5603 <A NAME="IDX130"></A>
5604 <DT><CODE>BASH</CODE>
5605 <DD><A NAME="IDX131"></A>
5606 The full pathname used to execute the current instance of Bash.
5607 <P>
5608
5609 <A NAME="IDX132"></A>
5610 <DT><CODE>BASH_ARGC</CODE>
5611 <DD><A NAME="IDX133"></A>
5612 An array variable whose values are the number of parameters in each
5613 frame of the current bash execution call stack. The number of
5614 parameters to the current subroutine (shell function or script executed
5615 with <CODE>.</CODE> or <CODE>source</CODE>) is at the top of the stack. When a
5616 subroutine is executed, the number of parameters passed is pushed onto
5617 <CODE>BASH_ARGC</CODE>.
5618 <P>
5619
5620 <A NAME="IDX134"></A>
5621 <DT><CODE>BASH_ARGV</CODE>
5622 <DD><A NAME="IDX135"></A>
5623 An array variable containing all of the parameters in the current bash
5624 execution call stack. The final parameter of the last subroutine call
5625 is at the top of the stack; the first parameter of the initial call is
5626 at the bottom. When a subroutine is executed, the parameters supplied
5627 are pushed onto <CODE>BASH_ARGV</CODE>.
5628 <P>
5629
5630 <A NAME="IDX136"></A>
5631 <DT><CODE>BASH_COMMAND</CODE>
5632 <DD><A NAME="IDX137"></A>
5633 The command currently being executed or about to be executed, unless the
5634 shell is executing a command as the result of a trap,
5635 in which case it is the command executing at the time of the trap.
5636 <P>
5637
5638 <A NAME="IDX138"></A>
5639 <DT><CODE>BASH_ENV</CODE>
5640 <DD><A NAME="IDX139"></A>
5641 If this variable is set when Bash is invoked to execute a shell
5642 script, its value is expanded and used as the name of a startup file
5643 to read before executing the script. See section <A HREF="bashref.html#SEC66">6.2 Bash Startup Files</A>.
5644 <P>
5645
5646 <A NAME="IDX140"></A>
5647 <DT><CODE>BASH_EXECUTION_STRING</CODE>
5648 <DD><A NAME="IDX141"></A>
5649 The command argument to the <SAMP>`-c'</SAMP> invocation option.
5650 <P>
5651
5652 <A NAME="IDX142"></A>
5653 <DT><CODE>BASH_LINENO</CODE>
5654 <DD><A NAME="IDX143"></A>
5655 An array variable whose members are the line numbers in source files
5656 corresponding to each member of <VAR>FUNCNAME</VAR>.
5657 <CODE>${BASH_LINENO[$i]}</CODE> is the line number in the source file where
5658 <CODE>${FUNCNAME[$i + 1]}</CODE> was called.
5659 The corresponding source file name is <CODE>${BASH_SOURCE[$i + 1]}</CODE>.
5660 Use <CODE>LINENO</CODE> to obtain the current line number.
5661 <P>
5662
5663 <A NAME="IDX144"></A>
5664 <DT><CODE>BASH_REMATCH</CODE>
5665 <DD><A NAME="IDX145"></A>
5666 An array variable whose members are assigned by the <SAMP>`=~'</SAMP> binary
5667 operator to the <CODE>[[</CODE> conditional command
5668 (see section <A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A>).
5669 The element with index 0 is the portion of the string
5670 matching the entire regular expression.
5671 The element with index <VAR>n</VAR> is the portion of the
5672 string matching the <VAR>n</VAR>th parenthesized subexpression.
5673 This variable is read-only.
5674 <P>
5675
5676 <A NAME="IDX146"></A>
5677 <DT><CODE>BASH_SOURCE</CODE>
5678 <DD><A NAME="IDX147"></A>
5679 An array variable whose members are the source filenames corresponding
5680 to the elements in the <CODE>FUNCNAME</CODE> array variable.
5681 <P>
5682
5683 <A NAME="IDX148"></A>
5684 <DT><CODE>BASH_SUBSHELL</CODE>
5685 <DD><A NAME="IDX149"></A>
5686 Incremented by one each time a subshell or subshell environment is spawned.
5687 The initial value is 0.
5688 <P>
5689
5690 <A NAME="IDX150"></A>
5691 <DT><CODE>BASH_VERSINFO</CODE>
5692 <DD><A NAME="IDX151"></A>
5693 A readonly array variable (see section <A HREF="bashref.html#SEC81">6.7 Arrays</A>)
5694 whose members hold version information for this instance of Bash.
5695 The values assigned to the array members are as follows:
5696 <P>
5697
5698 <DL COMPACT>
5699
5700 <DT><CODE>BASH_VERSINFO[0]</CODE>
5701 <DD>The major version number (the <VAR>release</VAR>).
5702 <P>
5703
5704 <DT><CODE>BASH_VERSINFO[1]</CODE>
5705 <DD>The minor version number (the <VAR>version</VAR>).
5706 <P>
5707
5708 <DT><CODE>BASH_VERSINFO[2]</CODE>
5709 <DD>The patch level.
5710 <P>
5711
5712 <DT><CODE>BASH_VERSINFO[3]</CODE>
5713 <DD>The build version.
5714 <P>
5715
5716 <DT><CODE>BASH_VERSINFO[4]</CODE>
5717 <DD>The release status (e.g., <VAR>beta1</VAR>).
5718 <P>
5719
5720 <DT><CODE>BASH_VERSINFO[5]</CODE>
5721 <DD>The value of <CODE>MACHTYPE</CODE>.
5722 <P>
5723
5724 </DL>
5725 <P>
5726
5727 <A NAME="IDX152"></A>
5728 <DT><CODE>BASH_VERSION</CODE>
5729 <DD><A NAME="IDX153"></A>
5730 The version number of the current instance of Bash.
5731 <P>
5732
5733 <A NAME="IDX154"></A>
5734 <DT><CODE>COLUMNS</CODE>
5735 <DD><A NAME="IDX155"></A>
5736 Used by the <CODE>select</CODE> builtin command to determine the terminal width
5737 when printing selection lists. Automatically set upon receipt of a
5738 <CODE>SIGWINCH</CODE>.
5739 <P>
5740
5741 <A NAME="IDX156"></A>
5742 <DT><CODE>COMP_CWORD</CODE>
5743 <DD><A NAME="IDX157"></A>
5744 An index into <CODE>${COMP_WORDS}</CODE> of the word containing the current
5745 cursor position.
5746 This variable is available only in shell functions invoked by the
5747 programmable completion facilities (see section <A HREF="bashref.html#SEC113">8.6 Programmable Completion</A>).
5748 <P>
5749
5750 <A NAME="IDX158"></A>
5751 <DT><CODE>COMP_LINE</CODE>
5752 <DD><A NAME="IDX159"></A>
5753 The current command line.
5754 This variable is available only in shell functions and external
5755 commands invoked by the
5756 programmable completion facilities (see section <A HREF="bashref.html#SEC113">8.6 Programmable Completion</A>).
5757 <P>
5758
5759 <A NAME="IDX160"></A>
5760 <DT><CODE>COMP_POINT</CODE>
5761 <DD><A NAME="IDX161"></A>
5762 The index of the current cursor position relative to the beginning of
5763 the current command.
5764 If the current cursor position is at the end of the current command,
5765 the value of this variable is equal to <CODE>${#COMP_LINE}</CODE>.
5766 This variable is available only in shell functions and external
5767 commands invoked by the
5768 programmable completion facilities (see section <A HREF="bashref.html#SEC113">8.6 Programmable Completion</A>).
5769 <P>
5770
5771 <A NAME="IDX162"></A>
5772 <DT><CODE>COMP_WORDBREAKS</CODE>
5773 <DD><A NAME="IDX163"></A>
5774 The set of characters that the Readline library treats as word
5775 separators when performing word completion.
5776 If <CODE>COMP_WORDBREAKS</CODE> is unset, it loses its special properties,
5777 even if it is subsequently reset.
5778 <P>
5779
5780 <A NAME="IDX164"></A>
5781 <DT><CODE>COMP_WORDS</CODE>
5782 <DD><A NAME="IDX165"></A>
5783 An array variable consisting of the individual
5784 words in the current command line.
5785 This variable is available only in shell functions invoked by the
5786 programmable completion facilities (see section <A HREF="bashref.html#SEC113">8.6 Programmable Completion</A>).
5787 <P>
5788
5789 <A NAME="IDX166"></A>
5790 <DT><CODE>COMPREPLY</CODE>
5791 <DD><A NAME="IDX167"></A>
5792 An array variable from which Bash reads the possible completions
5793 generated by a shell function invoked by the programmable completion
5794 facility (see section <A HREF="bashref.html#SEC113">8.6 Programmable Completion</A>).
5795 <P>
5796
5797 <A NAME="IDX168"></A>
5798 <DT><CODE>DIRSTACK</CODE>
5799 <DD><A NAME="IDX169"></A>
5800 An array variable containing the current contents of the directory stack.
5801 Directories appear in the stack in the order they are displayed by the
5802 <CODE>dirs</CODE> builtin.
5803 Assigning to members of this array variable may be used to modify
5804 directories already in the stack, but the <CODE>pushd</CODE> and <CODE>popd</CODE>
5805 builtins must be used to add and remove directories.
5806 Assignment to this variable will not change the current directory.
5807 If <CODE>DIRSTACK</CODE> is unset, it loses its special properties, even if
5808 it is subsequently reset.
5809 <P>
5810
5811 <A NAME="IDX170"></A>
5812 <DT><CODE>EMACS</CODE>
5813 <DD><A NAME="IDX171"></A>
5814 If Bash finds this variable in the environment when the shell
5815 starts with value <SAMP>`t'</SAMP>, it assumes that the shell is running in an
5816 emacs shell buffer and disables line editing.
5817 <P>
5818
5819 <A NAME="IDX172"></A>
5820 <DT><CODE>EUID</CODE>
5821 <DD><A NAME="IDX173"></A>
5822 The numeric effective user id of the current user. This variable
5823 is readonly.
5824 <P>
5825
5826 <A NAME="IDX174"></A>
5827 <DT><CODE>FCEDIT</CODE>
5828 <DD><A NAME="IDX175"></A>
5829 The editor used as a default by the <SAMP>`-e'</SAMP> option to the <CODE>fc</CODE>
5830 builtin command.
5831 <P>
5832
5833 <A NAME="IDX176"></A>
5834 <DT><CODE>FIGNORE</CODE>
5835 <DD><A NAME="IDX177"></A>
5836 A colon-separated list of suffixes to ignore when performing
5837 filename completion.
5838 A file name whose suffix matches one of the entries in
5839 <CODE>FIGNORE</CODE>
5840 is excluded from the list of matched file names. A sample
5841 value is <SAMP>`.o:~'</SAMP>
5842 <P>
5843
5844 <A NAME="IDX178"></A>
5845 <DT><CODE>FUNCNAME</CODE>
5846 <DD><A NAME="IDX179"></A>
5847 An array variable containing the names of all shell functions
5848 currently in the execution call stack.
5849 The element with index 0 is the name of any currently-executing
5850 shell function.
5851 The bottom-most element is "main".
5852 This variable exists only when a shell function is executing.
5853 Assignments to <CODE>FUNCNAME</CODE> have no effect and return an error status.
5854 If <CODE>FUNCNAME</CODE> is unset, it loses its special properties, even if
5855 it is subsequently reset.
5856 <P>
5857
5858 <A NAME="IDX180"></A>
5859 <DT><CODE>GLOBIGNORE</CODE>
5860 <DD><A NAME="IDX181"></A>
5861 A colon-separated list of patterns defining the set of filenames to
5862 be ignored by filename expansion.
5863 If a filename matched by a filename expansion pattern also matches one
5864 of the patterns in <CODE>GLOBIGNORE</CODE>, it is removed from the list
5865 of matches.
5866 <P>
5867
5868 <A NAME="IDX182"></A>
5869 <DT><CODE>GROUPS</CODE>
5870 <DD><A NAME="IDX183"></A>
5871 An array variable containing the list of groups of which the current
5872 user is a member.
5873 Assignments to <CODE>GROUPS</CODE> have no effect and return an error status.
5874 If <CODE>GROUPS</CODE> is unset, it loses its special properties, even if it is
5875 subsequently reset.
5876 <P>
5877
5878 <A NAME="IDX184"></A>
5879 <DT><CODE>histchars</CODE>
5880 <DD><A NAME="IDX185"></A>
5881 Up to three characters which control history expansion, quick
5882 substitution, and tokenization (see section <A HREF="bashref.html#SEC118">9.3 History Expansion</A>).
5883 The first character is the
5884 <VAR>history expansion</VAR> character, that is, the character which signifies the
5885 start of a history expansion, normally <SAMP>`!'</SAMP>. The second character is the
5886 character which signifies `quick substitution' when seen as the first
5887 character on a line, normally <SAMP>`^'</SAMP>. The optional third character is the
5888 character which indicates that the remainder of the line is a comment when
5889 found as the first character of a word, usually <SAMP>`#'</SAMP>. The history
5890 comment character causes history substitution to be skipped for the
5891 remaining words on the line. It does not necessarily cause the shell
5892 parser to treat the rest of the line as a comment.
5893 <P>
5894
5895 <A NAME="IDX186"></A>
5896 <DT><CODE>HISTCMD</CODE>
5897 <DD><A NAME="IDX187"></A>
5898 The history number, or index in the history list, of the current
5899 command. If <CODE>HISTCMD</CODE> is unset, it loses its special properties,
5900 even if it is subsequently reset.
5901 <P>
5902
5903 <A NAME="IDX188"></A>
5904 <DT><CODE>HISTCONTROL</CODE>
5905 <DD><A NAME="IDX189"></A>
5906 A colon-separated list of values controlling how commands are saved on
5907 the history list.
5908 If the list of values includes <SAMP>`ignorespace'</SAMP>, lines which begin
5909 with a space character are not saved in the history list.
5910 A value of <SAMP>`ignoredups'</SAMP> causes lines which match the previous
5911 history entry to not be saved.
5912 A value of <SAMP>`ignoreboth'</SAMP> is shorthand for
5913 <SAMP>`ignorespace'</SAMP> and <SAMP>`ignoredups'</SAMP>.
5914 A value of <SAMP>`erasedups'</SAMP> causes all previous lines matching the
5915 current line to be removed from the history list before that line
5916 is saved.
5917 Any value not in the above list is ignored.
5918 If <CODE>HISTCONTROL</CODE> is unset, or does not include a valid value,
5919 all lines read by the shell parser are saved on the history list,
5920 subject to the value of <CODE>HISTIGNORE</CODE>.
5921 The second and subsequent lines of a multi-line compound command are
5922 not tested, and are added to the history regardless of the value of
5923 <CODE>HISTCONTROL</CODE>.
5924 <P>
5925
5926 <A NAME="IDX190"></A>
5927 <DT><CODE>HISTFILE</CODE>
5928 <DD><A NAME="IDX191"></A>
5929 The name of the file to which the command history is saved. The
5930 default value is <TT>`~/.bash_history'</TT>.
5931 <P>
5932
5933 <A NAME="IDX192"></A>
5934 <DT><CODE>HISTFILESIZE</CODE>
5935 <DD><A NAME="IDX193"></A>
5936 The maximum number of lines contained in the history file. When this
5937 variable is assigned a value, the history file is truncated, if
5938 necessary, to contain no more than that number of lines.
5939 The history file is also truncated to this size after
5940 writing it when an interactive shell exits.
5941 The default value is 500.
5942 <P>
5943
5944 <A NAME="IDX194"></A>
5945 <DT><CODE>HISTIGNORE</CODE>
5946 <DD><A NAME="IDX195"></A>
5947 A colon-separated list of patterns used to decide which command
5948 lines should be saved on the history list. Each pattern is
5949 anchored at the beginning of the line and must match the complete
5950 line (no implicit <SAMP>`*'</SAMP> is appended). Each pattern is tested
5951 against the line after the checks specified by <CODE>HISTCONTROL</CODE>
5952 are applied. In addition to the normal shell pattern matching
5953 characters, <SAMP>`&#38;'</SAMP> matches the previous history line. <SAMP>`&#38;'</SAMP>
5954 may be escaped using a backslash; the backslash is removed
5955 before attempting a match.
5956 The second and subsequent lines of a multi-line compound command are
5957 not tested, and are added to the history regardless of the value of
5958 <CODE>HISTIGNORE</CODE>.
5959 <P>
5960
5961 <CODE>HISTIGNORE</CODE> subsumes the function of <CODE>HISTCONTROL</CODE>. A
5962 pattern of <SAMP>`&#38;'</SAMP> is identical to <CODE>ignoredups</CODE>, and a
5963 pattern of <SAMP>`[ ]*'</SAMP> is identical to <CODE>ignorespace</CODE>.
5964 Combining these two patterns, separating them with a colon,
5965 provides the functionality of <CODE>ignoreboth</CODE>.
5966 </P><P>
5967
5968 <A NAME="IDX196"></A>
5969 <DT><CODE>HISTSIZE</CODE>
5970 <DD><A NAME="IDX197"></A>
5971 The maximum number of commands to remember on the history list.
5972 The default value is 500.
5973 <P>
5974
5975 <A NAME="IDX198"></A>
5976 <DT><CODE>HISTTIMEFORMAT</CODE>
5977 <DD><A NAME="IDX199"></A>
5978 If this variable is set and not null, its value is used as a format string
5979 for <VAR>strftime</VAR> to print the time stamp associated with each history
5980 entry displayed by the <CODE>history</CODE> builtin.
5981 If this variable is set, time stamps are written to the history file so
5982 they may be preserved across shell sessions.
5983 <P>
5984
5985 <A NAME="IDX200"></A>
5986 <DT><CODE>HOSTFILE</CODE>
5987 <DD><A NAME="IDX201"></A>
5988 Contains the name of a file in the same format as <TT>`/etc/hosts'</TT> that
5989 should be read when the shell needs to complete a hostname.
5990 The list of possible hostname completions may be changed while the shell
5991 is running;
5992 the next time hostname completion is attempted after the
5993 value is changed, Bash adds the contents of the new file to the
5994 existing list.
5995 If <CODE>HOSTFILE</CODE> is set, but has no value, Bash attempts to read
5996 <TT>`/etc/hosts'</TT> to obtain the list of possible hostname completions.
5997 When <CODE>HOSTFILE</CODE> is unset, the hostname list is cleared.
5998 <P>
5999
6000 <A NAME="IDX202"></A>
6001 <DT><CODE>HOSTNAME</CODE>
6002 <DD><A NAME="IDX203"></A>
6003 The name of the current host.
6004 <P>
6005
6006 <A NAME="IDX204"></A>
6007 <DT><CODE>HOSTTYPE</CODE>
6008 <DD><A NAME="IDX205"></A>
6009 A string describing the machine Bash is running on.
6010 <P>
6011
6012 <A NAME="IDX206"></A>
6013 <DT><CODE>IGNOREEOF</CODE>
6014 <DD><A NAME="IDX207"></A>
6015 Controls the action of the shell on receipt of an <CODE>EOF</CODE> character
6016 as the sole input. If set, the value denotes the number
6017 of consecutive <CODE>EOF</CODE> characters that can be read as the
6018 first character on an input line
6019 before the shell will exit. If the variable exists but does not
6020 have a numeric value (or has no value) then the default is 10.
6021 If the variable does not exist, then <CODE>EOF</CODE> signifies the end of
6022 input to the shell. This is only in effect for interactive shells.
6023 <P>
6024
6025 <A NAME="IDX208"></A>
6026 <DT><CODE>INPUTRC</CODE>
6027 <DD><A NAME="IDX209"></A>
6028 The name of the Readline initialization file, overriding the default
6029 of <TT>`~/.inputrc'</TT>.
6030 <P>
6031
6032 <A NAME="IDX210"></A>
6033 <DT><CODE>LANG</CODE>
6034 <DD><A NAME="IDX211"></A>
6035 Used to determine the locale category for any category not specifically
6036 selected with a variable starting with <CODE>LC_</CODE>.
6037 <P>
6038
6039 <A NAME="IDX212"></A>
6040 <DT><CODE>LC_ALL</CODE>
6041 <DD><A NAME="IDX213"></A>
6042 This variable overrides the value of <CODE>LANG</CODE> and any other
6043 <CODE>LC_</CODE> variable specifying a locale category.
6044 <P>
6045
6046 <A NAME="IDX214"></A>
6047 <DT><CODE>LC_COLLATE</CODE>
6048 <DD><A NAME="IDX215"></A>
6049 This variable determines the collation order used when sorting the
6050 results of filename expansion, and
6051 determines the behavior of range expressions, equivalence classes,
6052 and collating sequences within filename expansion and pattern matching
6053 (see section <A HREF="bashref.html#SEC35">3.5.8 Filename Expansion</A>).
6054 <P>
6055
6056 <A NAME="IDX216"></A>
6057 <DT><CODE>LC_CTYPE</CODE>
6058 <DD><A NAME="IDX217"></A>
6059 This variable determines the interpretation of characters and the
6060 behavior of character classes within filename expansion and pattern
6061 matching (see section <A HREF="bashref.html#SEC35">3.5.8 Filename Expansion</A>).
6062 <P>
6063
6064 <A NAME="IDX218"></A>
6065 <DT><CODE>LC_MESSAGES</CODE>
6066 <DD><A NAME="IDX219"></A>
6067 This variable determines the locale used to translate double-quoted
6068 strings preceded by a <SAMP>`$'</SAMP> (see section <A HREF="bashref.html#SEC13">3.1.2.5 Locale-Specific Translation</A>).
6069 <P>
6070
6071 <A NAME="IDX220"></A>
6072 <DT><CODE>LC_NUMERIC</CODE>
6073 <DD><A NAME="IDX221"></A>
6074 This variable determines the locale category used for number formatting.
6075 <P>
6076
6077 <A NAME="IDX222"></A>
6078 <DT><CODE>LINENO</CODE>
6079 <DD><A NAME="IDX223"></A>
6080 The line number in the script or shell function currently executing.
6081 <P>
6082
6083 <A NAME="IDX224"></A>
6084 <DT><CODE>LINES</CODE>
6085 <DD><A NAME="IDX225"></A>
6086 Used by the <CODE>select</CODE> builtin command to determine the column length
6087 for printing selection lists. Automatically set upon receipt of a
6088 <CODE>SIGWINCH</CODE>.
6089 <P>
6090
6091 <A NAME="IDX226"></A>
6092 <DT><CODE>MACHTYPE</CODE>
6093 <DD><A NAME="IDX227"></A>
6094 A string that fully describes the system type on which Bash
6095 is executing, in the standard GNU <VAR>cpu-company-system</VAR> format.
6096 <P>
6097
6098 <A NAME="IDX228"></A>
6099 <DT><CODE>MAILCHECK</CODE>
6100 <DD><A NAME="IDX229"></A>
6101 How often (in seconds) that the shell should check for mail in the
6102 files specified in the <CODE>MAILPATH</CODE> or <CODE>MAIL</CODE> variables.
6103 The default is 60 seconds. When it is time to check
6104 for mail, the shell does so before displaying the primary prompt.
6105 If this variable is unset, or set to a value that is not a number
6106 greater than or equal to zero, the shell disables mail checking.
6107 <P>
6108
6109 <A NAME="IDX230"></A>
6110 <DT><CODE>OLDPWD</CODE>
6111 <DD><A NAME="IDX231"></A>
6112 The previous working directory as set by the <CODE>cd</CODE> builtin.
6113 <P>
6114
6115 <A NAME="IDX232"></A>
6116 <DT><CODE>OPTERR</CODE>
6117 <DD><A NAME="IDX233"></A>
6118 If set to the value 1, Bash displays error messages
6119 generated by the <CODE>getopts</CODE> builtin command.
6120 <P>
6121
6122 <A NAME="IDX234"></A>
6123 <DT><CODE>OSTYPE</CODE>
6124 <DD><A NAME="IDX235"></A>
6125 A string describing the operating system Bash is running on.
6126 <P>
6127
6128 <A NAME="IDX236"></A>
6129 <DT><CODE>PIPESTATUS</CODE>
6130 <DD><A NAME="IDX237"></A>
6131 An array variable (see section <A HREF="bashref.html#SEC81">6.7 Arrays</A>)
6132 containing a list of exit status values from the processes
6133 in the most-recently-executed foreground pipeline (which may
6134 contain only a single command).
6135 <P>
6136
6137 <A NAME="IDX238"></A>
6138 <DT><CODE>POSIXLY_CORRECT</CODE>
6139 <DD><A NAME="IDX239"></A>
6140 If this variable is in the environment when <CODE>bash</CODE> starts, the shell
6141 enters POSIX mode (see section <A HREF="bashref.html#SEC86">6.11 Bash POSIX Mode</A>) before reading the
6142 startup files, as if the <SAMP>`--posix'</SAMP> invocation option had been supplied.
6143 If it is set while the shell is running, <CODE>bash</CODE> enables POSIX mode,
6144 as if the command
6145 <TABLE><tr><td>&nbsp;</td><td class=example><pre><CODE>set -o posix</CODE>
6146 </pre></td></tr></table>had been executed.
6147 <P>
6148
6149 <A NAME="IDX240"></A>
6150 <DT><CODE>PPID</CODE>
6151 <DD><A NAME="IDX241"></A>
6152 The process ID of the shell's parent process. This variable
6153 is readonly.
6154 <P>
6155
6156 <A NAME="IDX242"></A>
6157 <DT><CODE>PROMPT_COMMAND</CODE>
6158 <DD><A NAME="IDX243"></A>
6159 If set, the value is interpreted as a command to execute
6160 before the printing of each primary prompt (<CODE>$PS1</CODE>).
6161 <P>
6162
6163 <A NAME="IDX244"></A>
6164 <DT><CODE>PS3</CODE>
6165 <DD><A NAME="IDX245"></A>
6166 The value of this variable is used as the prompt for the
6167 <CODE>select</CODE> command. If this variable is not set, the
6168 <CODE>select</CODE> command prompts with <SAMP>`#? '</SAMP>
6169 <P>
6170
6171 <A NAME="IDX246"></A>
6172 <DT><CODE>PS4</CODE>
6173 <DD><A NAME="IDX247"></A>
6174 The value is the prompt printed before the command line is echoed
6175 when the <SAMP>`-x'</SAMP> option is set (see section <A HREF="bashref.html#SEC59">4.3 The Set Builtin</A>).
6176 The first character of <CODE>PS4</CODE> is replicated multiple times, as
6177 necessary, to indicate multiple levels of indirection.
6178 The default is <SAMP>`+ '</SAMP>.
6179 <P>
6180
6181 <A NAME="IDX248"></A>
6182 <DT><CODE>PWD</CODE>
6183 <DD><A NAME="IDX249"></A>
6184 The current working directory as set by the <CODE>cd</CODE> builtin.
6185 <P>
6186
6187 <A NAME="IDX250"></A>
6188 <DT><CODE>RANDOM</CODE>
6189 <DD><A NAME="IDX251"></A>
6190 Each time this parameter is referenced, a random integer
6191 between 0 and 32767 is generated. Assigning a value to this
6192 variable seeds the random number generator.
6193 <P>
6194
6195 <A NAME="IDX252"></A>
6196 <DT><CODE>REPLY</CODE>
6197 <DD><A NAME="IDX253"></A>
6198 The default variable for the <CODE>read</CODE> builtin.
6199 <P>
6200
6201 <A NAME="IDX254"></A>
6202 <DT><CODE>SECONDS</CODE>
6203 <DD><A NAME="IDX255"></A>
6204 This variable expands to the number of seconds since the
6205 shell was started. Assignment to this variable resets
6206 the count to the value assigned, and the expanded value
6207 becomes the value assigned plus the number of seconds
6208 since the assignment.
6209 <P>
6210
6211 <A NAME="IDX256"></A>
6212 <DT><CODE>SHELL</CODE>
6213 <DD><A NAME="IDX257"></A>
6214 The full pathname to the shell is kept in this environment variable.
6215 If it is not set when the shell starts,
6216 Bash assigns to it the full pathname of the current user's login shell.
6217 <P>
6218
6219 <A NAME="IDX258"></A>
6220 <DT><CODE>SHELLOPTS</CODE>
6221 <DD><A NAME="IDX259"></A>
6222 A colon-separated list of enabled shell options. Each word in
6223 the list is a valid argument for the <SAMP>`-o'</SAMP> option to the
6224 <CODE>set</CODE> builtin command (see section <A HREF="bashref.html#SEC59">4.3 The Set Builtin</A>).
6225 The options appearing in <CODE>SHELLOPTS</CODE> are those reported
6226 as <SAMP>`on'</SAMP> by <SAMP>`set -o'</SAMP>.
6227 If this variable is in the environment when Bash
6228 starts up, each shell option in the list will be enabled before
6229 reading any startup files. This variable is readonly.
6230 <P>
6231
6232 <A NAME="IDX260"></A>
6233 <DT><CODE>SHLVL</CODE>
6234 <DD><A NAME="IDX261"></A>
6235 Incremented by one each time a new instance of Bash is started. This is
6236 intended to be a count of how deeply your Bash shells are nested.
6237 <P>
6238
6239 <A NAME="IDX262"></A>
6240 <DT><CODE>TIMEFORMAT</CODE>
6241 <DD><A NAME="IDX263"></A>
6242 The value of this parameter is used as a format string specifying
6243 how the timing information for pipelines prefixed with the <CODE>time</CODE>
6244 reserved word should be displayed.
6245 The <SAMP>`%'</SAMP> character introduces an
6246 escape sequence that is expanded to a time value or other
6247 information.
6248 The escape sequences and their meanings are as
6249 follows; the braces denote optional portions.
6250 <P>
6251
6252 <DL COMPACT>
6253
6254 <DT><CODE>%%</CODE>
6255 <DD>A literal <SAMP>`%'</SAMP>.
6256 <P>
6257
6258 <DT><CODE>%[<VAR>p</VAR>][l]R</CODE>
6259 <DD>The elapsed time in seconds.
6260 <P>
6261
6262 <DT><CODE>%[<VAR>p</VAR>][l]U</CODE>
6263 <DD>The number of CPU seconds spent in user mode.
6264 <P>
6265
6266 <DT><CODE>%[<VAR>p</VAR>][l]S</CODE>
6267 <DD>The number of CPU seconds spent in system mode.
6268 <P>
6269
6270 <DT><CODE>%P</CODE>
6271 <DD>The CPU percentage, computed as (%U + %S) / %R.
6272 </DL>
6273 <P>
6274
6275 The optional <VAR>p</VAR> is a digit specifying the precision, the number of
6276 fractional digits after a decimal point.
6277 A value of 0 causes no decimal point or fraction to be output.
6278 At most three places after the decimal point may be specified; values
6279 of <VAR>p</VAR> greater than 3 are changed to 3.
6280 If <VAR>p</VAR> is not specified, the value 3 is used.
6281 </P><P>
6282
6283 The optional <CODE>l</CODE> specifies a longer format, including minutes, of
6284 the form <VAR>MM</VAR>m<VAR>SS</VAR>.<VAR>FF</VAR>s.
6285 The value of <VAR>p</VAR> determines whether or not the fraction is included.
6286 </P><P>
6287
6288 If this variable is not set, Bash acts as if it had the value
6289 <TABLE><tr><td>&nbsp;</td><td class=example><pre><CODE>$'\nreal\t%3lR\nuser\t%3lU\nsys\t%3lS'</CODE>
6290 </pre></td></tr></table>If the value is null, no timing information is displayed.
6291 A trailing newline is added when the format string is displayed.
6292 </P><P>
6293
6294 <A NAME="IDX264"></A>
6295 <DT><CODE>TMOUT</CODE>
6296 <DD><A NAME="IDX265"></A>
6297 If set to a value greater than zero, <CODE>TMOUT</CODE> is treated as the
6298 default timeout for the <CODE>read</CODE> builtin (see section <A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A>).
6299 The <CODE>select</CODE> command (see section <A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A>) terminates
6300 if input does not arrive after <CODE>TMOUT</CODE> seconds when input is coming
6301 from a terminal.
6302 <P>
6303
6304 In an interative shell, the value is interpreted as
6305 the number of seconds to wait for input after issuing the primary
6306 prompt when the shell is interactive.
6307 Bash terminates after that number of seconds if input does
6308 not arrive.
6309 </P><P>
6310
6311 <A NAME="IDX266"></A>
6312 <DT><CODE>UID</CODE>
6313 <DD><A NAME="IDX267"></A>
6314 The numeric real user id of the current user. This variable is readonly.
6315 <P>
6316
6317 </DL>
6318 <P>
6319
6320 <A NAME="Bash Features"></A>
6321 <HR SIZE="6">
6322 <A NAME="SEC64"></A>
6323 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
6324 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC63"> &lt; </A>]</TD>
6325 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC65"> &gt; </A>]</TD>
6326 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC87"> &lt;&lt; </A>]</TD>
6327 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top"> Up </A>]</TD>
6328 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC87"> &gt;&gt; </A>]</TD>
6329 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
6330 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
6331 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
6332 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
6333 </TR></TABLE>
6334 <H1> 6. Bash Features </H1>
6335 <!--docid::SEC64::-->
6336 <P>
6337
6338 This section describes features unique to Bash.
6339 </P><P>
6340
6341 <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
6342 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC65">6.1 Invoking Bash</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Command line options that you can give
6343 to Bash.</TD></TR>
6344 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC66">6.2 Bash Startup Files</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">When and how Bash executes scripts.</TD></TR>
6345 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC74">6.3 Interactive Shells</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">What an interactive shell is.</TD></TR>
6346 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC78">6.4 Bash Conditional Expressions</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Primitives used in composing expressions for
6347 the <CODE>test</CODE> builtin.</TD></TR>
6348 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC79">6.5 Shell Arithmetic</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Arithmetic on shell variables.</TD></TR>
6349 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC80">6.6 Aliases</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Substituting one command for another.</TD></TR>
6350 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC81">6.7 Arrays</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Array Variables.</TD></TR>
6351 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC82">6.8 The Directory Stack</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">History of visited directories.</TD></TR>
6352 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC84">6.9 Controlling the Prompt</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Controlling the PS1 string.</TD></TR>
6353 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC85">6.10 The Restricted Shell</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">A more controlled mode of shell execution.</TD></TR>
6354 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC86">6.11 Bash POSIX Mode</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Making Bash behave more closely to what
6355 the POSIX standard specifies.</TD></TR>
6356 </TABLE></BLOCKQUOTE>
6357 <P>
6358
6359 <A NAME="Invoking Bash"></A>
6360 <HR SIZE="6">
6361 <A NAME="SEC65"></A>
6362 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
6363 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC64"> &lt; </A>]</TD>
6364 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC66"> &gt; </A>]</TD>
6365 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC64"> &lt;&lt; </A>]</TD>
6366 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC64"> Up </A>]</TD>
6367 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC87"> &gt;&gt; </A>]</TD>
6368 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
6369 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
6370 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
6371 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
6372 </TR></TABLE>
6373 <H2> 6.1 Invoking Bash </H2>
6374 <!--docid::SEC65::-->
6375 <P>
6376
6377 <TABLE><tr><td>&nbsp;</td><td class=example><pre>bash [long-opt] [-ir] [-abefhkmnptuvxdBCDHP] [-o <VAR>option</VAR>] [-O <VAR>shopt_option</VAR>] [<VAR>argument</VAR> <small>...</small>]
6378 bash [long-opt] [-abefhkmnptuvxdBCDHP] [-o <VAR>option</VAR>] [-O <VAR>shopt_option</VAR>] -c <VAR>string</VAR> [<VAR>argument</VAR> <small>...</small>]
6379 bash [long-opt] -s [-abefhkmnptuvxdBCDHP] [-o <VAR>option</VAR>] [-O <VAR>shopt_option</VAR>] [<VAR>argument</VAR> <small>...</small>]
6380 </pre></td></tr></table></P><P>
6381
6382 In addition to the single-character shell command-line options
6383 (see section <A HREF="bashref.html#SEC59">4.3 The Set Builtin</A>), there are several multi-character
6384 options that you can use. These options must appear on the command
6385 line before the single-character options to be recognized.
6386 </P><P>
6387
6388 <DL COMPACT>
6389 <DT><CODE>--debugger</CODE>
6390 <DD>Arrange for the debugger profile to be executed before the shell
6391 starts. Turns on extended debugging mode (see <A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A>
6392 for a description of the <CODE>extdebug</CODE> option to the <CODE>shopt</CODE>
6393 builtin) and shell function tracing
6394 (see <A HREF="bashref.html#SEC59">4.3 The Set Builtin</A> for a description of the <CODE>-o functrace</CODE>
6395 option).
6396 <P>
6397
6398 <DT><CODE>--dump-po-strings</CODE>
6399 <DD>A list of all double-quoted strings preceded by <SAMP>`$'</SAMP>
6400 is printed on the standard ouput
6401 in the GNU <CODE>gettext</CODE> PO (portable object) file format.
6402 Equivalent to <SAMP>`-D'</SAMP> except for the output format.
6403 <P>
6404
6405 <DT><CODE>--dump-strings</CODE>
6406 <DD>Equivalent to <SAMP>`-D'</SAMP>.
6407 <P>
6408
6409 <DT><CODE>--help</CODE>
6410 <DD>Display a usage message on standard output and exit sucessfully.
6411 <P>
6412
6413 <DT><CODE>--init-file <VAR>filename</VAR></CODE>
6414 <DD><DT><CODE>--rcfile <VAR>filename</VAR></CODE>
6415 <DD>Execute commands from <VAR>filename</VAR> (instead of <TT>`~/.bashrc'</TT>)
6416 in an interactive shell.
6417 <P>
6418
6419 <DT><CODE>--login</CODE>
6420 <DD>Equivalent to <SAMP>`-l'</SAMP>.
6421 <P>
6422
6423 <DT><CODE>--noediting</CODE>
6424 <DD>Do not use the GNU Readline library (see section <A HREF="bashref.html#SEC91">8. Command Line Editing</A>)
6425 to read command lines when the shell is interactive.
6426 <P>
6427
6428 <DT><CODE>--noprofile</CODE>
6429 <DD>Don't load the system-wide startup file <TT>`/etc/profile'</TT>
6430 or any of the personal initialization files
6431 <TT>`~/.bash_profile'</TT>, <TT>`~/.bash_login'</TT>, or <TT>`~/.profile'</TT>
6432 when Bash is invoked as a login shell.
6433 <P>
6434
6435 <DT><CODE>--norc</CODE>
6436 <DD>Don't read the <TT>`~/.bashrc'</TT> initialization file in an
6437 interactive shell. This is on by default if the shell is
6438 invoked as <CODE>sh</CODE>.
6439 <P>
6440
6441 <DT><CODE>--posix</CODE>
6442 <DD>Change the behavior of Bash where the default operation differs
6443 from the POSIX 1003.2 standard to match the standard. This
6444 is intended to make Bash behave as a strict superset of that
6445 standard. See section <A HREF="bashref.html#SEC86">6.11 Bash POSIX Mode</A>, for a description of the Bash
6446 POSIX mode.
6447 <P>
6448
6449 <DT><CODE>--restricted</CODE>
6450 <DD>Make the shell a restricted shell (see section <A HREF="bashref.html#SEC85">6.10 The Restricted Shell</A>).
6451 <P>
6452
6453 <DT><CODE>--verbose</CODE>
6454 <DD>Equivalent to <SAMP>`-v'</SAMP>. Print shell input lines as they're read.
6455 <P>
6456
6457 <DT><CODE>--version</CODE>
6458 <DD>Show version information for this instance of
6459 Bash on the standard output and exit successfully.
6460 <P>
6461
6462 </DL>
6463 <P>
6464
6465 There are several single-character options that may be supplied at
6466 invocation which are not available with the <CODE>set</CODE> builtin.
6467 </P><P>
6468
6469 <DL COMPACT>
6470 <DT><CODE>-c <VAR>string</VAR></CODE>
6471 <DD>Read and execute commands from <VAR>string</VAR> after processing the
6472 options, then exit. Any remaining arguments are assigned to the
6473 positional parameters, starting with <CODE>$0</CODE>.
6474 <P>
6475
6476 <DT><CODE>-i</CODE>
6477 <DD>Force the shell to run interactively. Interactive shells are
6478 described in <A HREF="bashref.html#SEC74">6.3 Interactive Shells</A>.
6479 <P>
6480
6481 <DT><CODE>-l</CODE>
6482 <DD>Make this shell act as if it had been directly invoked by login.
6483 When the shell is interactive, this is equivalent to starting a
6484 login shell with <SAMP>`exec -l bash'</SAMP>.
6485 When the shell is not interactive, the login shell startup files will
6486 be executed.
6487 <SAMP>`exec bash -l'</SAMP> or <SAMP>`exec bash --login'</SAMP>
6488 will replace the current shell with a Bash login shell.
6489 See section <A HREF="bashref.html#SEC66">6.2 Bash Startup Files</A>, for a description of the special behavior
6490 of a login shell.
6491 <P>
6492
6493 <DT><CODE>-r</CODE>
6494 <DD>Make the shell a restricted shell (see section <A HREF="bashref.html#SEC85">6.10 The Restricted Shell</A>).
6495 <P>
6496
6497 <DT><CODE>-s</CODE>
6498 <DD>If this option is present, or if no arguments remain after option
6499 processing, then commands are read from the standard input.
6500 This option allows the positional parameters to be set
6501 when invoking an interactive shell.
6502 <P>
6503
6504 <DT><CODE>-D</CODE>
6505 <DD>A list of all double-quoted strings preceded by <SAMP>`$'</SAMP>
6506 is printed on the standard ouput.
6507 These are the strings that
6508 are subject to language translation when the current locale
6509 is not <CODE>C</CODE> or <CODE>POSIX</CODE> (see section <A HREF="bashref.html#SEC13">3.1.2.5 Locale-Specific Translation</A>).
6510 This implies the <SAMP>`-n'</SAMP> option; no commands will be executed.
6511 <P>
6512
6513 <DT><CODE>[-+]O [<VAR>shopt_option</VAR>]</CODE>
6514 <DD><VAR>shopt_option</VAR> is one of the shell options accepted by the
6515 <CODE>shopt</CODE> builtin (see section <A HREF="bashref.html#SEC56">4. Shell Builtin Commands</A>).
6516 If <VAR>shopt_option</VAR> is present, <SAMP>`-O'</SAMP> sets the value of that option;
6517 <SAMP>`+O'</SAMP> unsets it.
6518 If <VAR>shopt_option</VAR> is not supplied, the names and values of the shell
6519 options accepted by <CODE>shopt</CODE> are printed on the standard output.
6520 If the invocation option is <SAMP>`+O'</SAMP>, the output is displayed in a format
6521 that may be reused as input.
6522 <P>
6523
6524 <DT><CODE>--</CODE>
6525 <DD>A <CODE>--</CODE> signals the end of options and disables further option
6526 processing.
6527 Any arguments after the <CODE>--</CODE> are treated as filenames and arguments.
6528 <P>
6529
6530 </DL>
6531 <P>
6532
6533 <A NAME="IDX268"></A>
6534 A <EM>login</EM> shell is one whose first character of argument zero is
6535 <SAMP>`-'</SAMP>, or one invoked with the <SAMP>`--login'</SAMP> option.
6536 </P><P>
6537
6538 <A NAME="IDX269"></A>
6539 An <EM>interactive</EM> shell is one started without non-option arguments,
6540 unless <SAMP>`-s'</SAMP> is specified,
6541 without specifying the <SAMP>`-c'</SAMP> option, and whose input and output are both
6542 connected to terminals (as determined by <CODE>isatty(3)</CODE>), or one
6543 started with the <SAMP>`-i'</SAMP> option. See section <A HREF="bashref.html#SEC74">6.3 Interactive Shells</A>, for more
6544 information.
6545 </P><P>
6546
6547 If arguments remain after option processing, and neither the
6548 <SAMP>`-c'</SAMP> nor the <SAMP>`-s'</SAMP>
6549 option has been supplied, the first argument is assumed to
6550 be the name of a file containing shell commands (see section <A HREF="bashref.html#SEC55">3.8 Shell Scripts</A>).
6551 When Bash is invoked in this fashion, <CODE>$0</CODE>
6552 is set to the name of the file, and the positional parameters
6553 are set to the remaining arguments.
6554 Bash reads and executes commands from this file, then exits.
6555 Bash's exit status is the exit status of the last command executed
6556 in the script. If no commands are executed, the exit status is 0.
6557 </P><P>
6558
6559 <A NAME="Bash Startup Files"></A>
6560 <HR SIZE="6">
6561 <A NAME="SEC66"></A>
6562 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
6563 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC65"> &lt; </A>]</TD>
6564 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC74"> &gt; </A>]</TD>
6565 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC74"> &lt;&lt; </A>]</TD>
6566 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC64"> Up </A>]</TD>
6567 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC87"> &gt;&gt; </A>]</TD>
6568 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
6569 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
6570 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
6571 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
6572 </TR></TABLE>
6573 <H2> 6.2 Bash Startup Files </H2>
6574 <!--docid::SEC66::-->
6575 <P>
6576
6577 This section describs how Bash executes its startup files.
6578 If any of the files exist but cannot be read, Bash reports an error.
6579 Tildes are expanded in file names as described above under
6580 Tilde Expansion (see section <A HREF="bashref.html#SEC29">3.5.2 Tilde Expansion</A>).
6581 </P><P>
6582
6583 Interactive shells are described in <A HREF="bashref.html#SEC74">6.3 Interactive Shells</A>.
6584 </P><P>
6585
6586 <A NAME="SEC67"></A>
6587 <H4> Invoked as an interactive login shell, or with <SAMP>`--login'</SAMP> </H4>
6588 <!--docid::SEC67::-->
6589 <P>
6590
6591 When Bash is invoked as an interactive login shell, or as a
6592 non-interactive shell with the <SAMP>`--login'</SAMP> option, it first reads and
6593 executes commands from the file <TT>`/etc/profile'</TT>, if that file exists.
6594 After reading that file, it looks for <TT>`~/.bash_profile'</TT>,
6595 <TT>`~/.bash_login'</TT>, and <TT>`~/.profile'</TT>, in that order, and reads
6596 and executes commands from the first one that exists and is readable.
6597 The <SAMP>`--noprofile'</SAMP> option may be used when the shell is started to
6598 inhibit this behavior.
6599 </P><P>
6600
6601 When a login shell exits, Bash reads and executes commands from
6602 the file <TT>`~/.bash_logout'</TT>, if it exists.
6603 </P><P>
6604
6605 <A NAME="SEC68"></A>
6606 <H4> Invoked as an interactive non-login shell </H4>
6607 <!--docid::SEC68::-->
6608 <P>
6609
6610 When an interactive shell that is not a login shell is started, Bash
6611 reads and executes commands from <TT>`~/.bashrc'</TT>, if that file exists.
6612 This may be inhibited by using the <SAMP>`--norc'</SAMP> option.
6613 The <SAMP>`--rcfile <VAR>file</VAR>'</SAMP> option will force Bash to read and
6614 execute commands from <VAR>file</VAR> instead of <TT>`~/.bashrc'</TT>.
6615 </P><P>
6616
6617 So, typically, your <TT>`~/.bash_profile'</TT> contains the line
6618 <TABLE><tr><td>&nbsp;</td><td class=example><pre><CODE>if [ -f ~/.bashrc ]; then . ~/.bashrc; fi</CODE>
6619 </pre></td></tr></table>after (or before) any login-specific initializations.
6620 </P><P>
6621
6622 <A NAME="SEC69"></A>
6623 <H4> Invoked non-interactively </H4>
6624 <!--docid::SEC69::-->
6625 <P>
6626
6627 When Bash is started non-interactively, to run a shell script,
6628 for example, it looks for the variable <CODE>BASH_ENV</CODE> in the environment,
6629 expands its value if it appears there, and uses the expanded value as
6630 the name of a file to read and execute. Bash behaves as if the
6631 following command were executed:
6632 <TABLE><tr><td>&nbsp;</td><td class=example><pre><CODE>if [ -n "$BASH_ENV" ]; then . "$BASH_ENV"; fi</CODE>
6633 </pre></td></tr></table>but the value of the <CODE>PATH</CODE> variable is not used to search for the
6634 file name.
6635 </P><P>
6636
6637 As noted above, if a non-interactive shell is invoked with the
6638 <SAMP>`--login'</SAMP> option, Bash attempts to read and execute commands from the
6639 login shell startup files.
6640 </P><P>
6641
6642 <A NAME="SEC70"></A>
6643 <H4> Invoked with name <CODE>sh</CODE> </H4>
6644 <!--docid::SEC70::-->
6645 <P>
6646
6647 If Bash is invoked with the name <CODE>sh</CODE>, it tries to mimic the
6648 startup behavior of historical versions of <CODE>sh</CODE> as closely as
6649 possible, while conforming to the POSIX standard as well.
6650 </P><P>
6651
6652 When invoked as an interactive login shell, or as a non-interactive
6653 shell with the <SAMP>`--login'</SAMP> option, it first attempts to read
6654 and execute commands from <TT>`/etc/profile'</TT> and <TT>`~/.profile'</TT>, in
6655 that order.
6656 The <SAMP>`--noprofile'</SAMP> option may be used to inhibit this behavior.
6657 When invoked as an interactive shell with the name <CODE>sh</CODE>, Bash
6658 looks for the variable <CODE>ENV</CODE>, expands its value if it is defined,
6659 and uses the expanded value as the name of a file to read and execute.
6660 Since a shell invoked as <CODE>sh</CODE> does not attempt to read and execute
6661 commands from any other startup files, the <SAMP>`--rcfile'</SAMP> option has
6662 no effect.
6663 A non-interactive shell invoked with the name <CODE>sh</CODE> does not attempt
6664 to read any other startup files.
6665 </P><P>
6666
6667 When invoked as <CODE>sh</CODE>, Bash enters POSIX mode after
6668 the startup files are read.
6669 </P><P>
6670
6671 <A NAME="SEC71"></A>
6672 <H4> Invoked in POSIX mode </H4>
6673 <!--docid::SEC71::-->
6674 <P>
6675
6676 When Bash is started in POSIX mode, as with the
6677 <SAMP>`--posix'</SAMP> command line option, it follows the POSIX standard
6678 for startup files.
6679 In this mode, interactive shells expand the <CODE>ENV</CODE> variable
6680 and commands are read and executed from the file whose name is the
6681 expanded value.
6682 No other startup files are read.
6683 </P><P>
6684
6685 <A NAME="SEC72"></A>
6686 <H4> Invoked by remote shell daemon </H4>
6687 <!--docid::SEC72::-->
6688 <P>
6689
6690 Bash attempts to determine when it is being run by the remote shell
6691 daemon, usually <CODE>rshd</CODE>. If Bash determines it is being run by
6692 rshd, it reads and executes commands from <TT>`~/.bashrc'</TT>, if that
6693 file exists and is readable.
6694 It will not do this if invoked as <CODE>sh</CODE>.
6695 The <SAMP>`--norc'</SAMP> option may be used to inhibit this behavior, and the
6696 <SAMP>`--rcfile'</SAMP> option may be used to force another file to be read, but
6697 <CODE>rshd</CODE> does not generally invoke the shell with those options or
6698 allow them to be specified.
6699 </P><P>
6700
6701 <A NAME="SEC73"></A>
6702 <H4> Invoked with unequal effective and real UID/GIDs </H4>
6703 <!--docid::SEC73::-->
6704 <P>
6705
6706 If Bash is started with the effective user (group) id not equal to the
6707 real user (group) id, and the <CODE>-p</CODE> option is not supplied, no startup
6708 files are read, shell functions are not inherited from the environment,
6709 the <CODE>SHELLOPTS</CODE> variable, if it appears in the environment, is ignored,
6710 and the effective user id is set to the real user id.
6711 If the <CODE>-p</CODE> option is supplied at invocation, the startup behavior is
6712 the same, but the effective user id is not reset.
6713 </P><P>
6714
6715 <A NAME="Interactive Shells"></A>
6716 <HR SIZE="6">
6717 <A NAME="SEC74"></A>
6718 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
6719 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC66"> &lt; </A>]</TD>
6720 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC75"> &gt; </A>]</TD>
6721 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC78"> &lt;&lt; </A>]</TD>
6722 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC64"> Up </A>]</TD>
6723 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC78"> &gt;&gt; </A>]</TD>
6724 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
6725 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
6726 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
6727 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
6728 </TR></TABLE>
6729 <H2> 6.3 Interactive Shells </H2>
6730 <!--docid::SEC74::-->
6731 <P>
6732
6733 <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
6734 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC75">6.3.1 What is an Interactive Shell?</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">What determines whether a shell is Interactive.</TD></TR>
6735 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC76">6.3.2 Is this Shell Interactive?</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to tell if a shell is interactive.</TD></TR>
6736 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC77">6.3.3 Interactive Shell Behavior</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">What changes in a interactive shell?</TD></TR>
6737 </TABLE></BLOCKQUOTE>
6738 <P>
6739
6740 <A NAME="What is an Interactive Shell?"></A>
6741 <HR SIZE="6">
6742 <A NAME="SEC75"></A>
6743 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
6744 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC74"> &lt; </A>]</TD>
6745 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC76"> &gt; </A>]</TD>
6746 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC78"> &lt;&lt; </A>]</TD>
6747 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC74"> Up </A>]</TD>
6748 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC78"> &gt;&gt; </A>]</TD>
6749 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
6750 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
6751 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
6752 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
6753 </TR></TABLE>
6754 <H3> 6.3.1 What is an Interactive Shell? </H3>
6755 <!--docid::SEC75::-->
6756 <P>
6757
6758 An interactive shell
6759 is one started without non-option arguments, unless <SAMP>`-s'</SAMP> is
6760 specified, without specifiying the <SAMP>`-c'</SAMP> option, and
6761 whose input and error output are both
6762 connected to terminals (as determined by <CODE>isatty(3)</CODE>),
6763 or one started with the <SAMP>`-i'</SAMP> option.
6764 </P><P>
6765
6766 An interactive shell generally reads from and writes to a user's
6767 terminal.
6768 </P><P>
6769
6770 The <SAMP>`-s'</SAMP> invocation option may be used to set the positional parameters
6771 when an interactive shell is started.
6772 </P><P>
6773
6774 <A NAME="Is this Shell Interactive?"></A>
6775 <HR SIZE="6">
6776 <A NAME="SEC76"></A>
6777 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
6778 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC75"> &lt; </A>]</TD>
6779 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC77"> &gt; </A>]</TD>
6780 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC77"> &lt;&lt; </A>]</TD>
6781 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC74"> Up </A>]</TD>
6782 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC78"> &gt;&gt; </A>]</TD>
6783 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
6784 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
6785 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
6786 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
6787 </TR></TABLE>
6788 <H3> 6.3.2 Is this Shell Interactive? </H3>
6789 <!--docid::SEC76::-->
6790 <P>
6791
6792 To determine within a startup script whether or not Bash is
6793 running interactively,
6794 test the value of the <SAMP>`-'</SAMP> special parameter.
6795 It contains <CODE>i</CODE> when the shell is interactive. For example:
6796 </P><P>
6797
6798 <TABLE><tr><td>&nbsp;</td><td class=example><pre>case "$-" in
6799 *i*) echo This shell is interactive ;;
6800 *) echo This shell is not interactive ;;
6801 esac
6802 </pre></td></tr></table></P><P>
6803
6804 Alternatively, startup scripts may examine the variable
6805 <CODE>PS1</CODE>; it is unset in non-interactive shells, and set in
6806 interactive shells. Thus:
6807 </P><P>
6808
6809 <TABLE><tr><td>&nbsp;</td><td class=example><pre>if [ -z "$PS1" ]; then
6810 echo This shell is not interactive
6811 else
6812 echo This shell is interactive
6813 fi
6814 </pre></td></tr></table></P><P>
6815
6816 <A NAME="Interactive Shell Behavior"></A>
6817 <HR SIZE="6">
6818 <A NAME="SEC77"></A>
6819 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
6820 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC76"> &lt; </A>]</TD>
6821 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC78"> &gt; </A>]</TD>
6822 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC78"> &lt;&lt; </A>]</TD>
6823 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC74"> Up </A>]</TD>
6824 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC78"> &gt;&gt; </A>]</TD>
6825 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
6826 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
6827 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
6828 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
6829 </TR></TABLE>
6830 <H3> 6.3.3 Interactive Shell Behavior </H3>
6831 <!--docid::SEC77::-->
6832 <P>
6833
6834 When the shell is running interactively, it changes its behavior in
6835 several ways.
6836 </P><P>
6837
6838 <OL>
6839 <LI>
6840 Startup files are read and executed as described in <A HREF="bashref.html#SEC66">6.2 Bash Startup Files</A>.
6841 <P>
6842
6843 <LI>
6844 Job Control (see section <A HREF="bashref.html#SEC87">7. Job Control</A>) is enabled by default. When job
6845 control is in effect, Bash ignores the keyboard-generated job control
6846 signals <CODE>SIGTTIN</CODE>, <CODE>SIGTTOU</CODE>, and <CODE>SIGTSTP</CODE>.
6847 <P>
6848
6849 <LI>
6850 Bash expands and displays <CODE>PS1</CODE> before reading the first line
6851 of a command, and expands and displays <CODE>PS2</CODE> before reading the
6852 second and subsequent lines of a multi-line command.
6853 <P>
6854
6855 <LI>
6856 Bash executes the value of the <CODE>PROMPT_COMMAND</CODE> variable as a command
6857 before printing the primary prompt, <CODE>$PS1</CODE>
6858 (see section <A HREF="bashref.html#SEC63">5.2 Bash Variables</A>).
6859 <P>
6860
6861 <LI>
6862 Readline (see section <A HREF="bashref.html#SEC91">8. Command Line Editing</A>) is used to read commands from
6863 the user's terminal.
6864 <P>
6865
6866 <LI>
6867 Bash inspects the value of the <CODE>ignoreeof</CODE> option to <CODE>set -o</CODE>
6868 instead of exiting immediately when it receives an <CODE>EOF</CODE> on its
6869 standard input when reading a command (see section <A HREF="bashref.html#SEC59">4.3 The Set Builtin</A>).
6870 <P>
6871
6872 <LI>
6873 Command history (see section <A HREF="bashref.html#SEC116">9.1 Bash History Facilities</A>)
6874 and history expansion (see section <A HREF="bashref.html#SEC118">9.3 History Expansion</A>)
6875 are enabled by default.
6876 Bash will save the command history to the file named by <CODE>$HISTFILE</CODE>
6877 when an interactive shell exits.
6878 <P>
6879
6880 <LI>
6881 Alias expansion (see section <A HREF="bashref.html#SEC80">6.6 Aliases</A>) is performed by default.
6882 <P>
6883
6884 <LI>
6885 In the absence of any traps, Bash ignores <CODE>SIGTERM</CODE>
6886 (see section <A HREF="bashref.html#SEC54">3.7.6 Signals</A>).
6887 <P>
6888
6889 <LI>
6890 In the absence of any traps, <CODE>SIGINT</CODE> is caught and handled
6891 ((see section <A HREF="bashref.html#SEC54">3.7.6 Signals</A>).
6892 <CODE>SIGINT</CODE> will interrupt some shell builtins.
6893 <P>
6894
6895 <LI>
6896 An interactive login shell sends a <CODE>SIGHUP</CODE> to all jobs on exit
6897 if the <CODE>hupoxexit</CODE> shell option has been enabled (see section <A HREF="bashref.html#SEC54">3.7.6 Signals</A>).
6898 <P>
6899
6900 <LI>
6901 The <SAMP>`-n'</SAMP> invocation option is ignored, and <SAMP>`set -n'</SAMP> has
6902 no effect (see section <A HREF="bashref.html#SEC59">4.3 The Set Builtin</A>).
6903 <P>
6904
6905 <LI>
6906 Bash will check for mail periodically, depending on the values of the
6907 <CODE>MAIL</CODE>, <CODE>MAILPATH</CODE>, and <CODE>MAILCHECK</CODE> shell variables
6908 (see section <A HREF="bashref.html#SEC63">5.2 Bash Variables</A>).
6909 <P>
6910
6911 <LI>
6912 Expansion errors due to references to unbound shell variables after
6913 <SAMP>`set -u'</SAMP> has been enabled will not cause the shell to exit
6914 (see section <A HREF="bashref.html#SEC59">4.3 The Set Builtin</A>).
6915 <P>
6916
6917 <LI>
6918 The shell will not exit on expansion errors caused by <VAR>var</VAR> being unset
6919 or null in <CODE>${<VAR>var</VAR>:?<VAR>word</VAR>}</CODE> expansions
6920 (see section <A HREF="bashref.html#SEC30">3.5.3 Shell Parameter Expansion</A>).
6921 <P>
6922
6923 <LI>
6924 Redirection errors encountered by shell builtins will not cause the
6925 shell to exit.
6926 <P>
6927
6928 <LI>
6929 When running in POSIX mode, a special builtin returning an error
6930 status will not cause the shell to exit (see section <A HREF="bashref.html#SEC86">6.11 Bash POSIX Mode</A>).
6931 <LI>
6932 A failed <CODE>exec</CODE> will not cause the shell to exit
6933 (see section <A HREF="bashref.html#SEC57">4.1 Bourne Shell Builtins</A>).
6934 <P>
6935
6936 <LI>
6937 Parser syntax errors will not cause the shell to exit.
6938 <P>
6939
6940 <LI>
6941 Simple spelling correction for directory arguments to the <CODE>cd</CODE>
6942 builtin is enabled by default (see the description of the <CODE>cdspell</CODE>
6943 option to the <CODE>shopt</CODE> builtin in <A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A>).
6944 <P>
6945
6946 <LI>
6947 The shell will check the value of the <CODE>TMOUT</CODE> variable and exit
6948 if a command is not read within the specified number of seconds after
6949 printing <CODE>$PS1</CODE> (see section <A HREF="bashref.html#SEC63">5.2 Bash Variables</A>).
6950 <P>
6951
6952 </OL>
6953 <P>
6954
6955 <A NAME="Bash Conditional Expressions"></A>
6956 <HR SIZE="6">
6957 <A NAME="SEC78"></A>
6958 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
6959 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC77"> &lt; </A>]</TD>
6960 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC79"> &gt; </A>]</TD>
6961 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC79"> &lt;&lt; </A>]</TD>
6962 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC64"> Up </A>]</TD>
6963 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC87"> &gt;&gt; </A>]</TD>
6964 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
6965 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
6966 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
6967 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
6968 </TR></TABLE>
6969 <H2> 6.4 Bash Conditional Expressions </H2>
6970 <!--docid::SEC78::-->
6971 <P>
6972
6973 Conditional expressions are used by the <CODE>[[</CODE> compound command
6974 and the <CODE>test</CODE> and <CODE>[</CODE> builtin commands.
6975 </P><P>
6976
6977 Expressions may be unary or binary.
6978 Unary expressions are often used to examine the status of a file.
6979 There are string operators and numeric comparison operators as well.
6980 If the <VAR>file</VAR> argument to one of the primaries is of the form
6981 <TT>`/dev/fd/<VAR>N</VAR>'</TT>, then file descriptor <VAR>N</VAR> is checked.
6982 If the <VAR>file</VAR> argument to one of the primaries is one of
6983 <TT>`/dev/stdin'</TT>, <TT>`/dev/stdout'</TT>, or <TT>`/dev/stderr'</TT>, file
6984 descriptor 0, 1, or 2, respectively, is checked.
6985 </P><P>
6986
6987 Unless otherwise specified, primaries that operate on files follow symbolic
6988 links and operate on the target of the link, rather than the link itself.
6989 </P><P>
6990
6991 <DL COMPACT>
6992 <DT><CODE>-a <VAR>file</VAR></CODE>
6993 <DD>True if <VAR>file</VAR> exists.
6994 <P>
6995
6996 <DT><CODE>-b <VAR>file</VAR></CODE>
6997 <DD>True if <VAR>file</VAR> exists and is a block special file.
6998 <P>
6999
7000 <DT><CODE>-c <VAR>file</VAR></CODE>
7001 <DD>True if <VAR>file</VAR> exists and is a character special file.
7002 <P>
7003
7004 <DT><CODE>-d <VAR>file</VAR></CODE>
7005 <DD>True if <VAR>file</VAR> exists and is a directory.
7006 <P>
7007
7008 <DT><CODE>-e <VAR>file</VAR></CODE>
7009 <DD>True if <VAR>file</VAR> exists.
7010 <P>
7011
7012 <DT><CODE>-f <VAR>file</VAR></CODE>
7013 <DD>True if <VAR>file</VAR> exists and is a regular file.
7014 <P>
7015
7016 <DT><CODE>-g <VAR>file</VAR></CODE>
7017 <DD>True if <VAR>file</VAR> exists and its set-group-id bit is set.
7018 <P>
7019
7020 <DT><CODE>-h <VAR>file</VAR></CODE>
7021 <DD>True if <VAR>file</VAR> exists and is a symbolic link.
7022 <P>
7023
7024 <DT><CODE>-k <VAR>file</VAR></CODE>
7025 <DD>True if <VAR>file</VAR> exists and its "sticky" bit is set.
7026 <P>
7027
7028 <DT><CODE>-p <VAR>file</VAR></CODE>
7029 <DD>True if <VAR>file</VAR> exists and is a named pipe (FIFO).
7030 <P>
7031
7032 <DT><CODE>-r <VAR>file</VAR></CODE>
7033 <DD>True if <VAR>file</VAR> exists and is readable.
7034 <P>
7035
7036 <DT><CODE>-s <VAR>file</VAR></CODE>
7037 <DD>True if <VAR>file</VAR> exists and has a size greater than zero.
7038 <P>
7039
7040 <DT><CODE>-t <VAR>fd</VAR></CODE>
7041 <DD>True if file descriptor <VAR>fd</VAR> is open and refers to a terminal.
7042 <P>
7043
7044 <DT><CODE>-u <VAR>file</VAR></CODE>
7045 <DD>True if <VAR>file</VAR> exists and its set-user-id bit is set.
7046 <P>
7047
7048 <DT><CODE>-w <VAR>file</VAR></CODE>
7049 <DD>True if <VAR>file</VAR> exists and is writable.
7050 <P>
7051
7052 <DT><CODE>-x <VAR>file</VAR></CODE>
7053 <DD>True if <VAR>file</VAR> exists and is executable.
7054 <P>
7055
7056 <DT><CODE>-O <VAR>file</VAR></CODE>
7057 <DD>True if <VAR>file</VAR> exists and is owned by the effective user id.
7058 <P>
7059
7060 <DT><CODE>-G <VAR>file</VAR></CODE>
7061 <DD>True if <VAR>file</VAR> exists and is owned by the effective group id.
7062 <P>
7063
7064 <DT><CODE>-L <VAR>file</VAR></CODE>
7065 <DD>True if <VAR>file</VAR> exists and is a symbolic link.
7066 <P>
7067
7068 <DT><CODE>-S <VAR>file</VAR></CODE>
7069 <DD>True if <VAR>file</VAR> exists and is a socket.
7070 <P>
7071
7072 <DT><CODE>-N <VAR>file</VAR></CODE>
7073 <DD>True if <VAR>file</VAR> exists and has been modified since it was last read.
7074 <P>
7075
7076 <DT><CODE><VAR>file1</VAR> -nt <VAR>file2</VAR></CODE>
7077 <DD>True if <VAR>file1</VAR> is newer (according to modification date)
7078 than <VAR>file2</VAR>, or if <VAR>file1</VAR> exists and <VAR>file2</VAR> does not.
7079 <P>
7080
7081 <DT><CODE><VAR>file1</VAR> -ot <VAR>file2</VAR></CODE>
7082 <DD>True if <VAR>file1</VAR> is older than <VAR>file2</VAR>,
7083 or if <VAR>file2</VAR> exists and <VAR>file1</VAR> does not.
7084 <P>
7085
7086 <DT><CODE><VAR>file1</VAR> -ef <VAR>file2</VAR></CODE>
7087 <DD>True if <VAR>file1</VAR> and <VAR>file2</VAR> refer to the same device and
7088 inode numbers.
7089 <P>
7090
7091 <DT><CODE>-o <VAR>optname</VAR></CODE>
7092 <DD>True if shell option <VAR>optname</VAR> is enabled.
7093 The list of options appears in the description of the <SAMP>`-o'</SAMP>
7094 option to the <CODE>set</CODE> builtin (see section <A HREF="bashref.html#SEC59">4.3 The Set Builtin</A>).
7095 <P>
7096
7097 <DT><CODE>-z <VAR>string</VAR></CODE>
7098 <DD>True if the length of <VAR>string</VAR> is zero.
7099 <P>
7100
7101 <DT><CODE>-n <VAR>string</VAR></CODE>
7102 <DD><DT><CODE><VAR>string</VAR></CODE>
7103 <DD>True if the length of <VAR>string</VAR> is non-zero.
7104 <P>
7105
7106 <DT><CODE><VAR>string1</VAR> == <VAR>string2</VAR></CODE>
7107 <DD>True if the strings are equal.
7108 <SAMP>`='</SAMP> may be used in place of <SAMP>`=='</SAMP> for strict POSIX compliance.
7109 <P>
7110
7111 <DT><CODE><VAR>string1</VAR> != <VAR>string2</VAR></CODE>
7112 <DD>True if the strings are not equal.
7113 <P>
7114
7115 <DT><CODE><VAR>string1</VAR> &#60; <VAR>string2</VAR></CODE>
7116 <DD>True if <VAR>string1</VAR> sorts before <VAR>string2</VAR> lexicographically
7117 in the current locale.
7118 <P>
7119
7120 <DT><CODE><VAR>string1</VAR> &#62; <VAR>string2</VAR></CODE>
7121 <DD>True if <VAR>string1</VAR> sorts after <VAR>string2</VAR> lexicographically
7122 in the current locale.
7123 <P>
7124
7125 <DT><CODE><VAR>arg1</VAR> OP <VAR>arg2</VAR></CODE>
7126 <DD><CODE>OP</CODE> is one of
7127 <SAMP>`-eq'</SAMP>, <SAMP>`-ne'</SAMP>, <SAMP>`-lt'</SAMP>, <SAMP>`-le'</SAMP>, <SAMP>`-gt'</SAMP>, or <SAMP>`-ge'</SAMP>.
7128 These arithmetic binary operators return true if <VAR>arg1</VAR>
7129 is equal to, not equal to, less than, less than or equal to,
7130 greater than, or greater than or equal to <VAR>arg2</VAR>,
7131 respectively. <VAR>Arg1</VAR> and <VAR>arg2</VAR>
7132 may be positive or negative integers.
7133 <P>
7134
7135 </DL>
7136 <P>
7137
7138 <A NAME="Shell Arithmetic"></A>
7139 <HR SIZE="6">
7140 <A NAME="SEC79"></A>
7141 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
7142 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC78"> &lt; </A>]</TD>
7143 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC80"> &gt; </A>]</TD>
7144 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC80"> &lt;&lt; </A>]</TD>
7145 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC64"> Up </A>]</TD>
7146 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC87"> &gt;&gt; </A>]</TD>
7147 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
7148 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
7149 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
7150 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
7151 </TR></TABLE>
7152 <H2> 6.5 Shell Arithmetic </H2>
7153 <!--docid::SEC79::-->
7154 <P>
7155
7156 The shell allows arithmetic expressions to be evaluated, as one of
7157 the shell expansions or by the <CODE>let</CODE> and the <SAMP>`-i'</SAMP> option
7158 to the <CODE>declare</CODE> builtins.
7159 </P><P>
7160
7161 Evaluation is done in fixed-width integers with no check for overflow,
7162 though division by 0 is trapped and flagged as an error.
7163 The operators and their precedence, associativity, and values
7164 are the same as in the C language.
7165 The following list of operators is grouped into levels of
7166 equal-precedence operators.
7167 The levels are listed in order of decreasing precedence.
7168 </P><P>
7169
7170 <DL COMPACT>
7171
7172 <DT><CODE><VAR>id</VAR>++ <VAR>id</VAR>--</CODE>
7173 <DD>variable post-increment and post-decrement
7174 <P>
7175
7176 <DT><CODE>++<VAR>id</VAR> --<VAR>id</VAR></CODE>
7177 <DD>variable pre-increment and pre-decrement
7178 <P>
7179
7180 <DT><CODE>- +</CODE>
7181 <DD>unary minus and plus
7182 <P>
7183
7184 <DT><CODE>! ~</CODE>
7185 <DD>logical and bitwise negation
7186 <P>
7187
7188 <DT><CODE>**</CODE>
7189 <DD>exponentiation
7190 <P>
7191
7192 <DT><CODE>* / %</CODE>
7193 <DD>multiplication, division, remainder
7194 <P>
7195
7196 <DT><CODE>+ -</CODE>
7197 <DD>addition, subtraction
7198 <P>
7199
7200 <DT><CODE>&#60;&#60; &#62;&#62;</CODE>
7201 <DD>left and right bitwise shifts
7202 <P>
7203
7204 <DT><CODE>&#60;= &#62;= &#60; &#62;</CODE>
7205 <DD>comparison
7206 <P>
7207
7208 <DT><CODE>== !=</CODE>
7209 <DD>equality and inequality
7210 <P>
7211
7212 <DT><CODE>&#38;</CODE>
7213 <DD>bitwise AND
7214 <P>
7215
7216 <DT><CODE>^</CODE>
7217 <DD>bitwise exclusive OR
7218 <P>
7219
7220 <DT><CODE>|</CODE>
7221 <DD>bitwise OR
7222 <P>
7223
7224 <DT><CODE>&#38;&#38;</CODE>
7225 <DD>logical AND
7226 <P>
7227
7228 <DT><CODE>||</CODE>
7229 <DD>logical OR
7230 <P>
7231
7232 <DT><CODE>expr ? expr : expr</CODE>
7233 <DD>conditional operator
7234 <P>
7235
7236 <DT><CODE>= *= /= %= += -= &#60;&#60;= &#62;&#62;= &#38;= ^= |=</CODE>
7237 <DD>assignment
7238 <P>
7239
7240 <DT><CODE>expr1 , expr2</CODE>
7241 <DD>comma
7242 </DL>
7243 <P>
7244
7245 Shell variables are allowed as operands; parameter expansion is
7246 performed before the expression is evaluated.
7247 Within an expression, shell variables may also be referenced by name
7248 without using the parameter expansion syntax.
7249 A shell variable that is null or unset evaluates to 0 when referenced
7250 by name without using the parameter expansion syntax.
7251 The value of a variable is evaluated as an arithmetic expression
7252 when it is referenced, or when a variable which has been given the
7253 <VAR>integer</VAR> attribute using <SAMP>`declare -i'</SAMP> is assigned a value.
7254 A null value evaluates to 0.
7255 A shell variable need not have its integer attribute turned on
7256 to be used in an expression.
7257 </P><P>
7258
7259 Constants with a leading 0 are interpreted as octal numbers.
7260 A leading <SAMP>`0x'</SAMP> or <SAMP>`0X'</SAMP> denotes hexadecimal. Otherwise,
7261 numbers take the form [<VAR>base</VAR><CODE>#</CODE>]<VAR>n</VAR>, where <VAR>base</VAR>
7262 is a decimal number between 2 and 64 representing the arithmetic
7263 base, and <VAR>n</VAR> is a number in that base. If <VAR>base</VAR><CODE>#</CODE> is
7264 omitted, then base 10 is used.
7265 The digits greater than 9 are represented by the lowercase letters,
7266 the uppercase letters, <SAMP>`@'</SAMP>, and <SAMP>`_'</SAMP>, in that order.
7267 If <VAR>base</VAR> is less than or equal to 36, lowercase and uppercase
7268 letters may be used interchangably to represent numbers between 10
7269 and 35.
7270 </P><P>
7271
7272 Operators are evaluated in order of precedence. Sub-expressions in
7273 parentheses are evaluated first and may override the precedence
7274 rules above.
7275 </P><P>
7276
7277 <A NAME="Aliases"></A>
7278 <HR SIZE="6">
7279 <A NAME="SEC80"></A>
7280 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
7281 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC79"> &lt; </A>]</TD>
7282 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC81"> &gt; </A>]</TD>
7283 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC81"> &lt;&lt; </A>]</TD>
7284 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC64"> Up </A>]</TD>
7285 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC87"> &gt;&gt; </A>]</TD>
7286 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
7287 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
7288 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
7289 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
7290 </TR></TABLE>
7291 <H2> 6.6 Aliases </H2>
7292 <!--docid::SEC80::-->
7293 <P>
7294
7295 <VAR>Aliases</VAR> allow a string to be substituted for a word when it is used
7296 as the first word of a simple command.
7297 The shell maintains a list of aliases that may be set and unset with
7298 the <CODE>alias</CODE> and <CODE>unalias</CODE> builtin commands.
7299 </P><P>
7300
7301 The first word of each simple command, if unquoted, is checked to see
7302 if it has an alias.
7303 If so, that word is replaced by the text of the alias.
7304 The characters <SAMP>`/'</SAMP>, <SAMP>`$'</SAMP>, <SAMP>``'</SAMP>, <SAMP>`='</SAMP> and any of the
7305 shell metacharacters or quoting characters listed above may not appear
7306 in an alias name.
7307 The replacement text may contain any valid
7308 shell input, including shell metacharacters.
7309 The first word of the replacement text is tested for
7310 aliases, but a word that is identical to an alias being expanded
7311 is not expanded a second time.
7312 This means that one may alias <CODE>ls</CODE> to <CODE>"ls -F"</CODE>,
7313 for instance, and Bash does not try to recursively expand the
7314 replacement text. If the last character of the alias value is a
7315 space or tab character, then the next command word following the
7316 alias is also checked for alias expansion.
7317 </P><P>
7318
7319 Aliases are created and listed with the <CODE>alias</CODE>
7320 command, and removed with the <CODE>unalias</CODE> command.
7321 </P><P>
7322
7323 There is no mechanism for using arguments in the replacement text,
7324 as in <CODE>csh</CODE>.
7325 If arguments are needed, a shell function should be used
7326 (see section <A HREF="bashref.html#SEC23">3.3 Shell Functions</A>).
7327 </P><P>
7328
7329 Aliases are not expanded when the shell is not interactive,
7330 unless the <CODE>expand_aliases</CODE> shell option is set using
7331 <CODE>shopt</CODE> (see section <A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A>).
7332 </P><P>
7333
7334 The rules concerning the definition and use of aliases are
7335 somewhat confusing. Bash
7336 always reads at least one complete line
7337 of input before executing any
7338 of the commands on that line. Aliases are expanded when a
7339 command is read, not when it is executed. Therefore, an
7340 alias definition appearing on the same line as another
7341 command does not take effect until the next line of input is read.
7342 The commands following the alias definition
7343 on that line are not affected by the new alias.
7344 This behavior is also an issue when functions are executed.
7345 Aliases are expanded when a function definition is read,
7346 not when the function is executed, because a function definition
7347 is itself a compound command. As a consequence, aliases
7348 defined in a function are not available until after that
7349 function is executed. To be safe, always put
7350 alias definitions on a separate line, and do not use <CODE>alias</CODE>
7351 in compound commands.
7352 </P><P>
7353
7354 For almost every purpose, shell functions are preferred over aliases.
7355 </P><P>
7356
7357 <A NAME="Arrays"></A>
7358 <HR SIZE="6">
7359 <A NAME="SEC81"></A>
7360 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
7361 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC80"> &lt; </A>]</TD>
7362 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC82"> &gt; </A>]</TD>
7363 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC82"> &lt;&lt; </A>]</TD>
7364 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC64"> Up </A>]</TD>
7365 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC87"> &gt;&gt; </A>]</TD>
7366 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
7367 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
7368 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
7369 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
7370 </TR></TABLE>
7371 <H2> 6.7 Arrays </H2>
7372 <!--docid::SEC81::-->
7373 <P>
7374
7375 Bash provides one-dimensional array variables. Any variable may be used as
7376 an array; the <CODE>declare</CODE> builtin will explicitly declare an array.
7377 There is no maximum
7378 limit on the size of an array, nor any requirement that members
7379 be indexed or assigned contiguously. Arrays are zero-based.
7380 </P><P>
7381
7382 An array is created automatically if any variable is assigned to using
7383 the syntax
7384 <TABLE><tr><td>&nbsp;</td><td class=example><pre>name[<VAR>subscript</VAR>]=<VAR>value</VAR>
7385 </pre></td></tr></table></P><P>
7386
7387 The <VAR>subscript</VAR>
7388 is treated as an arithmetic expression that must evaluate to a number
7389 greater than or equal to zero. To explicitly declare an array, use
7390 <TABLE><tr><td>&nbsp;</td><td class=example><pre>declare -a <VAR>name</VAR>
7391 </pre></td></tr></table>The syntax
7392 <TABLE><tr><td>&nbsp;</td><td class=example><pre>declare -a <VAR>name</VAR>[<VAR>subscript</VAR>]
7393 </pre></td></tr></table>is also accepted; the <VAR>subscript</VAR> is ignored. Attributes may be
7394 specified for an array variable using the <CODE>declare</CODE> and
7395 <CODE>readonly</CODE> builtins. Each attribute applies to all members of
7396 an array.
7397 </P><P>
7398
7399 Arrays are assigned to using compound assignments of the form
7400 <TABLE><tr><td>&nbsp;</td><td class=example><pre>name=(value<VAR>1</VAR> <small>...</small> value<VAR>n</VAR>)
7401 </pre></td></tr></table>where each
7402 <VAR>value</VAR> is of the form <CODE>[[<VAR>subscript</VAR>]=]</CODE><VAR>string</VAR>. If
7403 the optional subscript is supplied, that index is assigned to;
7404 otherwise the index of the element assigned is the last index assigned
7405 to by the statement plus one. Indexing starts at zero.
7406 This syntax is also accepted by the <CODE>declare</CODE>
7407 builtin. Individual array elements may be assigned to using the
7408 <CODE>name[</CODE><VAR>subscript</VAR><CODE>]=</CODE><VAR>value</VAR> syntax introduced above.
7409 </P><P>
7410
7411 Any element of an array may be referenced using
7412 <CODE>${name[</CODE><VAR>subscript</VAR><CODE>]}</CODE>.
7413 The braces are required to avoid
7414 conflicts with the shell's filename expansion operators. If the
7415 <VAR>subscript</VAR> is <SAMP>`@'</SAMP> or <SAMP>`*'</SAMP>, the word expands to all members
7416 of the array <VAR>name</VAR>. These subscripts differ only when the word
7417 appears within double quotes.
7418 If the word is double-quoted,
7419 <CODE>${name[*]}</CODE> expands to a single word with
7420 the value of each array member separated by the first character of the
7421 <CODE>IFS</CODE> variable, and <CODE>${name[@]}</CODE> expands each element of
7422 <VAR>name</VAR> to a separate word. When there are no array members,
7423 <CODE>${name[@]}</CODE> expands to nothing.
7424 If the double-quoted expansion occurs within a word, the expansion of
7425 the first parameter is joined with the beginning part of the original
7426 word, and the expansion of the last parameter is joined with the last
7427 part of the original word.
7428 This is analogous to the
7429 expansion of the special parameters <SAMP>`@'</SAMP> and <SAMP>`*'</SAMP>.
7430 <CODE>${#name[</CODE><VAR>subscript</VAR><CODE>]}</CODE> expands to the length of
7431 <CODE>${name[</CODE><VAR>subscript</VAR><CODE>]}</CODE>.
7432 If <VAR>subscript</VAR> is <SAMP>`@'</SAMP> or
7433 <SAMP>`*'</SAMP>, the expansion is the number of elements in the array.
7434 Referencing an array variable without a subscript is equivalent to
7435 referencing element zero.
7436 </P><P>
7437
7438 The <CODE>unset</CODE> builtin is used to destroy arrays.
7439 <CODE>unset</CODE> <VAR>name</VAR>[<VAR>subscript</VAR>]
7440 destroys the array element at index <VAR>subscript</VAR>.
7441 <CODE>unset</CODE> <VAR>name</VAR>, where <VAR>name</VAR> is an array, removes the
7442 entire array. A subscript of <SAMP>`*'</SAMP> or <SAMP>`@'</SAMP> also removes the
7443 entire array.
7444 </P><P>
7445
7446 The <CODE>declare</CODE>, <CODE>local</CODE>, and <CODE>readonly</CODE>
7447 builtins each accept a <SAMP>`-a'</SAMP>
7448 option to specify an array. The <CODE>read</CODE>
7449 builtin accepts a <SAMP>`-a'</SAMP>
7450 option to assign a list of words read from the standard input
7451 to an array, and can read values from the standard input into
7452 individual array elements. The <CODE>set</CODE> and <CODE>declare</CODE>
7453 builtins display array values in a way that allows them to be
7454 reused as input.
7455 </P><P>
7456
7457 <A NAME="The Directory Stack"></A>
7458 <HR SIZE="6">
7459 <A NAME="SEC82"></A>
7460 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
7461 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC81"> &lt; </A>]</TD>
7462 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC83"> &gt; </A>]</TD>
7463 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC84"> &lt;&lt; </A>]</TD>
7464 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC64"> Up </A>]</TD>
7465 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC84"> &gt;&gt; </A>]</TD>
7466 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
7467 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
7468 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
7469 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
7470 </TR></TABLE>
7471 <H2> 6.8 The Directory Stack </H2>
7472 <!--docid::SEC82::-->
7473 <P>
7474
7475 <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
7476 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC83">6.8.1 Directory Stack Builtins</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Bash builtin commands to manipulate
7477 the directory stack.</TD></TR>
7478 </TABLE></BLOCKQUOTE>
7479 <P>
7480
7481 The directory stack is a list of recently-visited directories. The
7482 <CODE>pushd</CODE> builtin adds directories to the stack as it changes
7483 the current directory, and the <CODE>popd</CODE> builtin removes specified
7484 directories from the stack and changes the current directory to
7485 the directory removed. The <CODE>dirs</CODE> builtin displays the contents
7486 of the directory stack.
7487 </P><P>
7488
7489 The contents of the directory stack are also visible
7490 as the value of the <CODE>DIRSTACK</CODE> shell variable.
7491 </P><P>
7492
7493 <A NAME="Directory Stack Builtins"></A>
7494 <HR SIZE="6">
7495 <A NAME="SEC83"></A>
7496 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
7497 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC82"> &lt; </A>]</TD>
7498 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC84"> &gt; </A>]</TD>
7499 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC84"> &lt;&lt; </A>]</TD>
7500 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC82"> Up </A>]</TD>
7501 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC84"> &gt;&gt; </A>]</TD>
7502 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
7503 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
7504 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
7505 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
7506 </TR></TABLE>
7507 <H3> 6.8.1 Directory Stack Builtins </H3>
7508 <!--docid::SEC83::-->
7509 <P>
7510
7511 <DL COMPACT>
7512
7513 <DT><CODE>dirs</CODE>
7514 <DD><A NAME="IDX270"></A>
7515 <TABLE><tr><td>&nbsp;</td><td class=example><pre>dirs [+<VAR>N</VAR> | -<VAR>N</VAR>] [-clpv]
7516 </pre></td></tr></table>Display the list of currently remembered directories. Directories
7517 are added to the list with the <CODE>pushd</CODE> command; the
7518 <CODE>popd</CODE> command removes directories from the list.
7519 <DL COMPACT>
7520 <DT><CODE>+<VAR>N</VAR></CODE>
7521 <DD>Displays the <VAR>N</VAR>th directory (counting from the left of the
7522 list printed by <CODE>dirs</CODE> when invoked without options), starting
7523 with zero.
7524 <DT><CODE>-<VAR>N</VAR></CODE>
7525 <DD>Displays the <VAR>N</VAR>th directory (counting from the right of the
7526 list printed by <CODE>dirs</CODE> when invoked without options), starting
7527 with zero.
7528 <DT><CODE>-c</CODE>
7529 <DD>Clears the directory stack by deleting all of the elements.
7530 <DT><CODE>-l</CODE>
7531 <DD>Produces a longer listing; the default listing format uses a
7532 tilde to denote the home directory.
7533 <DT><CODE>-p</CODE>
7534 <DD>Causes <CODE>dirs</CODE> to print the directory stack with one entry per
7535 line.
7536 <DT><CODE>-v</CODE>
7537 <DD>Causes <CODE>dirs</CODE> to print the directory stack with one entry per
7538 line, prefixing each entry with its index in the stack.
7539 </DL>
7540 <P>
7541
7542 <DT><CODE>popd</CODE>
7543 <DD><A NAME="IDX271"></A>
7544 <TABLE><tr><td>&nbsp;</td><td class=example><pre>popd [+<VAR>N</VAR> | -<VAR>N</VAR>] [-n]
7545 </pre></td></tr></table><P>
7546
7547 Remove the top entry from the directory stack, and <CODE>cd</CODE>
7548 to the new top directory.
7549 When no arguments are given, <CODE>popd</CODE>
7550 removes the top directory from the stack and
7551 performs a <CODE>cd</CODE> to the new top directory. The
7552 elements are numbered from 0 starting at the first directory listed with
7553 <CODE>dirs</CODE>; i.e., <CODE>popd</CODE> is equivalent to <CODE>popd +0</CODE>.
7554 <DL COMPACT>
7555 <DT><CODE>+<VAR>N</VAR></CODE>
7556 <DD>Removes the <VAR>N</VAR>th directory (counting from the left of the
7557 list printed by <CODE>dirs</CODE>), starting with zero.
7558 <DT><CODE>-<VAR>N</VAR></CODE>
7559 <DD>Removes the <VAR>N</VAR>th directory (counting from the right of the
7560 list printed by <CODE>dirs</CODE>), starting with zero.
7561 <DT><CODE>-n</CODE>
7562 <DD>Suppresses the normal change of directory when removing directories
7563 from the stack, so that only the stack is manipulated.
7564 </DL>
7565 <P>
7566
7567 <A NAME="IDX272"></A>
7568 <DT><CODE>pushd</CODE>
7569 <DD><TABLE><tr><td>&nbsp;</td><td class=example><pre>pushd [<VAR>dir</VAR> | <VAR>+N</VAR> | <VAR>-N</VAR>] [-n]
7570 </pre></td></tr></table><P>
7571
7572 Save the current directory on the top of the directory stack
7573 and then <CODE>cd</CODE> to <VAR>dir</VAR>.
7574 With no arguments, <CODE>pushd</CODE> exchanges the top two directories.
7575 </P><P>
7576
7577 <DL COMPACT>
7578 <DT><CODE>+<VAR>N</VAR></CODE>
7579 <DD>Brings the <VAR>N</VAR>th directory (counting from the left of the
7580 list printed by <CODE>dirs</CODE>, starting with zero) to the top of
7581 the list by rotating the stack.
7582 <DT><CODE>-<VAR>N</VAR></CODE>
7583 <DD>Brings the <VAR>N</VAR>th directory (counting from the right of the
7584 list printed by <CODE>dirs</CODE>, starting with zero) to the top of
7585 the list by rotating the stack.
7586 <DT><CODE>-n</CODE>
7587 <DD>Suppresses the normal change of directory when adding directories
7588 to the stack, so that only the stack is manipulated.
7589 <DT><CODE><VAR>dir</VAR></CODE>
7590 <DD>Makes the current working directory be the top of the stack, and then
7591 executes the equivalent of `<CODE>cd</CODE> <VAR>dir</VAR>'.
7592 <CODE>cd</CODE>s to <VAR>dir</VAR>.
7593 </DL>
7594 <P>
7595
7596 </DL>
7597 <P>
7598
7599 <A NAME="Printing a Prompt"></A>
7600 <HR SIZE="6">
7601 <A NAME="SEC84"></A>
7602 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
7603 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC83"> &lt; </A>]</TD>
7604 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC85"> &gt; </A>]</TD>
7605 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC64"> &lt;&lt; </A>]</TD>
7606 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC64"> Up </A>]</TD>
7607 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC87"> &gt;&gt; </A>]</TD>
7608 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
7609 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
7610 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
7611 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
7612 </TR></TABLE>
7613 <H2> 6.9 Controlling the Prompt </H2>
7614 <!--docid::SEC84::-->
7615 <P>
7616
7617 The value of the variable <CODE>PROMPT_COMMAND</CODE> is examined just before
7618 Bash prints each primary prompt. If <CODE>PROMPT_COMMAND</CODE> is set and
7619 has a non-null value, then the
7620 value is executed just as if it had been typed on the command line.
7621 </P><P>
7622
7623 In addition, the following table describes the special characters which
7624 can appear in the prompt variables:
7625 </P><P>
7626
7627 <DL COMPACT>
7628 <DT><CODE>\a</CODE>
7629 <DD>A bell character.
7630 <DT><CODE>\d</CODE>
7631 <DD>The date, in "Weekday Month Date" format (e.g., "Tue May 26").
7632 <DT><CODE>\D{<VAR>format</VAR>}</CODE>
7633 <DD>The <VAR>format</VAR> is passed to <CODE>strftime</CODE>(3) and the result is inserted
7634 into the prompt string; an empty <VAR>format</VAR> results in a locale-specific
7635 time representation. The braces are required.
7636 <DT><CODE>\e</CODE>
7637 <DD>An escape character.
7638 <DT><CODE>\h</CODE>
7639 <DD>The hostname, up to the first `.'.
7640 <DT><CODE>\H</CODE>
7641 <DD>The hostname.
7642 <DT><CODE>\j</CODE>
7643 <DD>The number of jobs currently managed by the shell.
7644 <DT><CODE>\l</CODE>
7645 <DD>The basename of the shell's terminal device name.
7646 <DT><CODE>\n</CODE>
7647 <DD>A newline.
7648 <DT><CODE>\r</CODE>
7649 <DD>A carriage return.
7650 <DT><CODE>\s</CODE>
7651 <DD>The name of the shell, the basename of <CODE>$0</CODE> (the portion
7652 following the final slash).
7653 <DT><CODE>\t</CODE>
7654 <DD>The time, in 24-hour HH:MM:SS format.
7655 <DT><CODE>\T</CODE>
7656 <DD>The time, in 12-hour HH:MM:SS format.
7657 <DT><CODE>\@</CODE>
7658 <DD>The time, in 12-hour am/pm format.
7659 <DT><CODE>\A</CODE>
7660 <DD>The time, in 24-hour HH:MM format.
7661 <DT><CODE>\u</CODE>
7662 <DD>The username of the current user.
7663 <DT><CODE>\v</CODE>
7664 <DD>The version of Bash (e.g., 2.00)
7665 <DT><CODE>\V</CODE>
7666 <DD>The release of Bash, version + patchlevel (e.g., 2.00.0)
7667 <DT><CODE>\w</CODE>
7668 <DD>The current working directory, with <CODE>$HOME</CODE> abbreviated with a tilde.
7669 <DT><CODE>\W</CODE>
7670 <DD>The basename of <CODE>$PWD</CODE>, with <CODE>$HOME</CODE> abbreviated with a tilde.
7671 <DT><CODE>\!</CODE>
7672 <DD>The history number of this command.
7673 <DT><CODE>\#</CODE>
7674 <DD>The command number of this command.
7675 <DT><CODE>\$</CODE>
7676 <DD>If the effective uid is 0, <CODE>#</CODE>, otherwise <CODE>$</CODE>.
7677 <DT><CODE>\<VAR>nnn</VAR></CODE>
7678 <DD>The character whose ASCII code is the octal value <VAR>nnn</VAR>.
7679 <DT><CODE>\\</CODE>
7680 <DD>A backslash.
7681 <DT><CODE>\[</CODE>
7682 <DD>Begin a sequence of non-printing characters. This could be used to
7683 embed a terminal control sequence into the prompt.
7684 <DT><CODE>\]</CODE>
7685 <DD>End a sequence of non-printing characters.
7686 </DL>
7687 <P>
7688
7689 The command number and the history number are usually different:
7690 the history number of a command is its position in the history
7691 list, which may include commands restored from the history file
7692 (see section <A HREF="bashref.html#SEC116">9.1 Bash History Facilities</A>), while the command number is
7693 the position in the sequence of commands executed during the current
7694 shell session.
7695 </P><P>
7696
7697 After the string is decoded, it is expanded via
7698 parameter expansion, command substitution, arithmetic
7699 expansion, and quote removal, subject to the value of the
7700 <CODE>promptvars</CODE> shell option (see section <A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A>).
7701 </P><P>
7702
7703 <A NAME="The Restricted Shell"></A>
7704 <HR SIZE="6">
7705 <A NAME="SEC85"></A>
7706 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
7707 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC84"> &lt; </A>]</TD>
7708 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC86"> &gt; </A>]</TD>
7709 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC66"> &lt;&lt; </A>]</TD>
7710 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC64"> Up </A>]</TD>
7711 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC87"> &gt;&gt; </A>]</TD>
7712 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
7713 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
7714 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
7715 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
7716 </TR></TABLE>
7717 <H2> 6.10 The Restricted Shell </H2>
7718 <!--docid::SEC85::-->
7719 <P>
7720
7721 If Bash is started with the name <CODE>rbash</CODE>, or the
7722 <SAMP>`--restricted'</SAMP>
7723 or
7724 <SAMP>`-r'</SAMP>
7725 option is supplied at invocation, the shell becomes restricted.
7726 A restricted shell is used to
7727 set up an environment more controlled than the standard shell.
7728 A restricted shell behaves identically to <CODE>bash</CODE>
7729 with the exception that the following are disallowed or not performed:
7730 </P><P>
7731
7732 <UL>
7733 <LI>
7734 Changing directories with the <CODE>cd</CODE> builtin.
7735 <LI>
7736 Setting or unsetting the values of the <CODE>SHELL</CODE>, <CODE>PATH</CODE>,
7737 <CODE>ENV</CODE>, or <CODE>BASH_ENV</CODE> variables.
7738 <LI>
7739 Specifying command names containing slashes.
7740 <LI>
7741 Specifying a filename containing a slash as an argument to the <CODE>.</CODE>
7742 builtin command.
7743 <LI>
7744 Specifying a filename containing a slash as an argument to the <SAMP>`-p'</SAMP>
7745 option to the <CODE>hash</CODE> builtin command.
7746 <LI>
7747 Importing function definitions from the shell environment at startup.
7748 <LI>
7749 Parsing the value of <CODE>SHELLOPTS</CODE> from the shell environment at startup.
7750 <LI>
7751 Redirecting output using the <SAMP>`&#62;'</SAMP>, <SAMP>`&#62;|'</SAMP>, <SAMP>`&#60;&#62;'</SAMP>, <SAMP>`&#62;&#38;'</SAMP>,
7752 <SAMP>`&#38;&#62;'</SAMP>, and <SAMP>`&#62;&#62;'</SAMP> redirection operators.
7753 <LI>
7754 Using the <CODE>exec</CODE> builtin to replace the shell with another command.
7755 <LI>
7756 Adding or deleting builtin commands with the
7757 <SAMP>`-f'</SAMP> and <SAMP>`-d'</SAMP> options to the <CODE>enable</CODE> builtin.
7758 <LI>
7759 Using the <CODE>enable</CODE> builtin command to enable disabled shell builtins.
7760 <LI>
7761 Specifying the <SAMP>`-p'</SAMP> option to the <CODE>command</CODE> builtin.
7762 <LI>
7763 Turning off restricted mode with <SAMP>`set +r'</SAMP> or <SAMP>`set +o restricted'</SAMP>.
7764 </UL>
7765 <P>
7766
7767 These restrictions are enforced after any startup files are read.
7768 </P><P>
7769
7770 When a command that is found to be a shell script is executed
7771 (see section <A HREF="bashref.html#SEC55">3.8 Shell Scripts</A>), <CODE>rbash</CODE> turns off any restrictions in
7772 the shell spawned to execute the script.
7773 </P><P>
7774
7775 <A NAME="Bash POSIX Mode"></A>
7776 <HR SIZE="6">
7777 <A NAME="SEC86"></A>
7778 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
7779 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC85"> &lt; </A>]</TD>
7780 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC87"> &gt; </A>]</TD>
7781 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC66"> &lt;&lt; </A>]</TD>
7782 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC64"> Up </A>]</TD>
7783 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC87"> &gt;&gt; </A>]</TD>
7784 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
7785 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
7786 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
7787 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
7788 </TR></TABLE>
7789 <H2> 6.11 Bash POSIX Mode </H2>
7790 <!--docid::SEC86::-->
7791 <P>
7792
7793 Starting Bash with the <SAMP>`--posix'</SAMP> command-line option or executing
7794 <SAMP>`set -o posix'</SAMP> while Bash is running will cause Bash to conform more
7795 closely to the POSIX 1003.2 standard by changing the behavior to
7796 match that specified by POSIX in areas where the Bash default differs.
7797 </P><P>
7798
7799 When invoked as <CODE>sh</CODE>, Bash enters POSIX mode after reading the
7800 startup files.
7801 </P><P>
7802
7803 The following list is what's changed when `POSIX mode' is in effect:
7804 </P><P>
7805
7806 <OL>
7807 <LI>
7808 When a command in the hash table no longer exists, Bash will re-search
7809 <CODE>$PATH</CODE> to find the new location. This is also available with
7810 <SAMP>`shopt -s checkhash'</SAMP>.
7811 <P>
7812
7813 <LI>
7814 The message printed by the job control code and builtins when a job
7815 exits with a non-zero status is `Done(status)'.
7816 <P>
7817
7818 <LI>
7819 The message printed by the job control code and builtins when a job
7820 is stopped is `Stopped(<VAR>signame</VAR>)', where <VAR>signame</VAR> is, for
7821 example, <CODE>SIGTSTP</CODE>.
7822 <P>
7823
7824 <LI>
7825 Reserved words may not be aliased.
7826 <P>
7827
7828 <LI>
7829 The POSIX 1003.2 <CODE>PS1</CODE> and <CODE>PS2</CODE> expansions of <SAMP>`!'</SAMP> to
7830 the history number and <SAMP>`!!'</SAMP> to <SAMP>`!'</SAMP> are enabled,
7831 and parameter expansion is performed on the values of <CODE>PS1</CODE> and
7832 <CODE>PS2</CODE> regardless of the setting of the <CODE>promptvars</CODE> option.
7833 <P>
7834
7835 <LI>
7836 The POSIX 1003.2 startup files are executed (<CODE>$ENV</CODE>) rather than
7837 the normal Bash files.
7838 <P>
7839
7840 <LI>
7841 Tilde expansion is only performed on assignments preceding a command
7842 name, rather than on all assignment statements on the line.
7843 <P>
7844
7845 <LI>
7846 The default history file is <TT>`~/.sh_history'</TT> (this is the
7847 default value of <CODE>$HISTFILE</CODE>).
7848 <P>
7849
7850 <LI>
7851 The output of <SAMP>`kill -l'</SAMP> prints all the signal names on a single line,
7852 separated by spaces, without the <SAMP>`SIG'</SAMP> prefix.
7853 <P>
7854
7855 <LI>
7856 The <CODE>kill</CODE> builtin does not accept signal names with a <SAMP>`SIG'</SAMP>
7857 prefix.
7858 <P>
7859
7860 <LI>
7861 Non-interactive shells exit if <VAR>filename</VAR> in <CODE>.</CODE> <VAR>filename</VAR>
7862 is not found.
7863 <P>
7864
7865 <LI>
7866 Non-interactive shells exit if a syntax error in an arithmetic expansion
7867 results in an invalid expression.
7868 <P>
7869
7870 <LI>
7871 Redirection operators do not perform filename expansion on the word
7872 in the redirection unless the shell is interactive.
7873 <P>
7874
7875 <LI>
7876 Redirection operators do not perform word splitting on the word in the
7877 redirection.
7878 <P>
7879
7880 <LI>
7881 Function names must be valid shell <CODE>name</CODE>s. That is, they may not
7882 contain characters other than letters, digits, and underscores, and
7883 may not start with a digit. Declaring a function with an invalid name
7884 causes a fatal syntax error in non-interactive shells.
7885 <P>
7886
7887 <LI>
7888 POSIX 1003.2 `special' builtins are found before shell functions
7889 during command lookup.
7890 <P>
7891
7892 <LI>
7893 If a POSIX 1003.2 special builtin returns an error status, a
7894 non-interactive shell exits. The fatal errors are those listed in
7895 the POSIX.2 standard, and include things like passing incorrect options,
7896 redirection errors, variable assignment errors for assignments preceding
7897 the command name, and so on.
7898 <P>
7899
7900 <LI>
7901 If the <CODE>cd</CODE> builtin finds a directory to change to
7902 using <CODE>$CDPATH</CODE>, the
7903 value it assigns to the <CODE>PWD</CODE> variable does not contain any
7904 symbolic links, as if <SAMP>`cd -P'</SAMP> had been executed.
7905 <P>
7906
7907 <LI>
7908 If <CODE>CDPATH</CODE> is set, the <CODE>cd</CODE> builtin will not implicitly
7909 append the current directory to it. This means that <CODE>cd</CODE> will
7910 fail if no valid directory name can be constructed from
7911 any of the entries in <CODE>$CDPATH</CODE>, even if the a directory with
7912 the same name as the name given as an argument to <CODE>cd</CODE> exists
7913 in the current directory.
7914 <P>
7915
7916 <LI>
7917 A non-interactive shell exits with an error status if a variable
7918 assignment error occurs when no command name follows the assignment
7919 statements.
7920 A variable assignment error occurs, for example, when trying to assign
7921 a value to a readonly variable.
7922 <P>
7923
7924 <LI>
7925 A non-interactive shell exits with an error status if the iteration
7926 variable in a <CODE>for</CODE> statement or the selection variable in a
7927 <CODE>select</CODE> statement is a readonly variable.
7928 <P>
7929
7930 <LI>
7931 Process substitution is not available.
7932 <P>
7933
7934 <LI>
7935 Assignment statements preceding POSIX 1003.2 special builtins
7936 persist in the shell environment after the builtin completes.
7937 <P>
7938
7939 <LI>
7940 Assignment statements preceding shell function calls persist in the
7941 shell environment after the function returns, as if a POSIX
7942 special builtin command had been executed.
7943 <P>
7944
7945 <LI>
7946 The <CODE>export</CODE> and <CODE>readonly</CODE> builtin commands display their
7947 output in the format required by POSIX 1003.2.
7948 <P>
7949
7950 <LI>
7951 The <CODE>trap</CODE> builtin displays signal names without the leading
7952 <CODE>SIG</CODE>.
7953 <P>
7954
7955 <LI>
7956 The <CODE>trap</CODE> builtin doesn't check the first argument for a possible
7957 signal specification and revert the signal handling to the original
7958 disposition if it is, unless that argument consists solely of digits and
7959 is a valid signal number. If users want to reset the handler for a given
7960 signal to the original disposition, they should use <SAMP>`-'</SAMP> as the
7961 first argument.
7962 <P>
7963
7964 <LI>
7965 The <CODE>.</CODE> and <CODE>source</CODE> builtins do not search the current directory
7966 for the filename argument if it is not found by searching <CODE>PATH</CODE>.
7967 <P>
7968
7969 <LI>
7970 Subshells spawned to execute command substitutions inherit the value of
7971 the <SAMP>`-e'</SAMP> option from the parent shell. When not in POSIX mode,
7972 Bash clears the <SAMP>`-e'</SAMP> option in such subshells.
7973 <P>
7974
7975 <LI>
7976 Alias expansion is always enabled, even in non-interactive shells.
7977 <P>
7978
7979 <LI>
7980 When the <CODE>alias</CODE> builtin displays alias definitions, it does not
7981 display them with a leading <SAMP>`alias '</SAMP> unless the <SAMP>`-p'</SAMP> option
7982 is supplied.
7983 <P>
7984
7985 <LI>
7986 When the <CODE>set</CODE> builtin is invoked without options, it does not display
7987 shell function names and definitions.
7988 <P>
7989
7990 <LI>
7991 When the <CODE>set</CODE> builtin is invoked without options, it displays
7992 variable values without quotes, unless they contain shell metacharacters,
7993 even if the result contains nonprinting characters.
7994 <P>
7995
7996 <LI>
7997 When the <CODE>cd</CODE> builtin is invoked in <VAR>logical</VAR> mode, and the pathname
7998 constructed from <CODE>$PWD</CODE> and the directory name supplied as an argument
7999 does not refer to an existing directory, <CODE>cd</CODE> will fail instead of
8000 falling back to <VAR>physical</VAR> mode.
8001 <P>
8002
8003 <LI>
8004 When listing the history, the <CODE>fc</CODE> builtin does not include an
8005 indication of whether or not a history entry has been modified.
8006 <P>
8007
8008 <LI>
8009 The default editor used by <CODE>fc</CODE> is <CODE>ed</CODE>.
8010 <P>
8011
8012 <LI>
8013 The <CODE>type</CODE> and <CODE>command</CODE> builtins will not report a non-executable
8014 file as having been found, though the shell will attempt to execute such a
8015 file if it is the only so-named file found in <CODE>$PATH</CODE>.
8016 <P>
8017
8018 <LI>
8019 When the <CODE>xpg_echo</CODE> option is enabled, Bash does not attempt to interpret
8020 any arguments to <CODE>echo</CODE> as options. Each argument is displayed, after
8021 escape characters are converted.
8022 <P>
8023
8024 </OL>
8025 <P>
8026
8027 There is other POSIX 1003.2 behavior that Bash does not implement.
8028 Specifically:
8029 </P><P>
8030
8031 <OL>
8032 <LI>
8033 Assignment statements affect the execution environment of all
8034 builtins, not just special ones.
8035 <P>
8036
8037 <LI>
8038 When a subshell is created to execute a shell script with execute permission,
8039 but without a leading <SAMP>`#!'</SAMP>, Bash sets <CODE>$0</CODE> to the full pathname of
8040 the script as found by searching <CODE>$PATH</CODE>, rather than the command as
8041 typed by the user.
8042 <P>
8043
8044 <LI>
8045 When using <SAMP>`.'</SAMP> to source a shell script found in <CODE>$PATH</CODE>, bash
8046 checks execute permission bits rather than read permission bits, just as
8047 if it were searching for a command.
8048 <P>
8049
8050 </OL>
8051 <P>
8052
8053 <A NAME="Job Control"></A>
8054 <HR SIZE="6">
8055 <A NAME="SEC87"></A>
8056 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
8057 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC86"> &lt; </A>]</TD>
8058 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC88"> &gt; </A>]</TD>
8059 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC91"> &lt;&lt; </A>]</TD>
8060 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top"> Up </A>]</TD>
8061 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC91"> &gt;&gt; </A>]</TD>
8062 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
8063 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
8064 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
8065 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
8066 </TR></TABLE>
8067 <H1> 7. Job Control </H1>
8068 <!--docid::SEC87::-->
8069 <P>
8070
8071 This chapter discusses what job control is, how it works, and how
8072 Bash allows you to access its facilities.
8073 </P><P>
8074
8075 <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
8076 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC88">7.1 Job Control Basics</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How job control works.</TD></TR>
8077 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC89">7.2 Job Control Builtins</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Bash builtin commands used to interact
8078 with job control.</TD></TR>
8079 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC90">7.3 Job Control Variables</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Variables Bash uses to customize job
8080 control.</TD></TR>
8081 </TABLE></BLOCKQUOTE>
8082 <P>
8083
8084 <A NAME="Job Control Basics"></A>
8085 <HR SIZE="6">
8086 <A NAME="SEC88"></A>
8087 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
8088 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC87"> &lt; </A>]</TD>
8089 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC89"> &gt; </A>]</TD>
8090 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC87"> &lt;&lt; </A>]</TD>
8091 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC87"> Up </A>]</TD>
8092 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC91"> &gt;&gt; </A>]</TD>
8093 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
8094 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
8095 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
8096 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
8097 </TR></TABLE>
8098 <H2> 7.1 Job Control Basics </H2>
8099 <!--docid::SEC88::-->
8100 <P>
8101
8102 Job control
8103 refers to the ability to selectively stop (suspend)
8104 the execution of processes and continue (resume)
8105 their execution at a later point. A user typically employs
8106 this facility via an interactive interface supplied jointly
8107 by the system's terminal driver and Bash.
8108 </P><P>
8109
8110 The shell associates a <VAR>job</VAR> with each pipeline. It keeps a
8111 table of currently executing jobs, which may be listed with the
8112 <CODE>jobs</CODE> command. When Bash starts a job
8113 asynchronously, it prints a line that looks
8114 like:
8115 <TABLE><tr><td>&nbsp;</td><td class=example><pre>[1] 25647
8116 </pre></td></tr></table>indicating that this job is job number 1 and that the process ID
8117 of the last process in the pipeline associated with this job is
8118 25647. All of the processes in a single pipeline are members of
8119 the same job. Bash uses the <VAR>job</VAR> abstraction as the
8120 basis for job control.
8121 </P><P>
8122
8123 To facilitate the implementation of the user interface to job
8124 control, the operating system maintains the notion of a current terminal
8125 process group ID. Members of this process group (processes whose
8126 process group ID is equal to the current terminal process group
8127 ID) receive keyboard-generated signals such as <CODE>SIGINT</CODE>.
8128 These processes are said to be in the foreground. Background
8129 processes are those whose process group ID differs from the
8130 terminal's; such processes are immune to keyboard-generated
8131 signals. Only foreground processes are allowed to read from or
8132 write to the terminal. Background processes which attempt to
8133 read from (write to) the terminal are sent a <CODE>SIGTTIN</CODE>
8134 (<CODE>SIGTTOU</CODE>) signal by the terminal driver, which, unless
8135 caught, suspends the process.
8136 </P><P>
8137
8138 If the operating system on which Bash is running supports
8139 job control, Bash contains facilities to use it. Typing the
8140 <VAR>suspend</VAR> character (typically <SAMP>`^Z'</SAMP>, Control-Z) while a
8141 process is running causes that process to be stopped and returns
8142 control to Bash. Typing the <VAR>delayed suspend</VAR> character
8143 (typically <SAMP>`^Y'</SAMP>, Control-Y) causes the process to be stopped
8144 when it attempts to read input from the terminal, and control to
8145 be returned to Bash. The user then manipulates the state of
8146 this job, using the <CODE>bg</CODE> command to continue it in the
8147 background, the <CODE>fg</CODE> command to continue it in the
8148 foreground, or the <CODE>kill</CODE> command to kill it. A <SAMP>`^Z'</SAMP>
8149 takes effect immediately, and has the additional side effect of
8150 causing pending output and typeahead to be discarded.
8151 </P><P>
8152
8153 There are a number of ways to refer to a job in the shell. The
8154 character <SAMP>`%'</SAMP> introduces a job name.
8155 </P><P>
8156
8157 Job number <CODE>n</CODE> may be referred to as <SAMP>`%n'</SAMP>.
8158 The symbols <SAMP>`%%'</SAMP> and
8159 <SAMP>`%+'</SAMP> refer to the shell's notion of the current job, which
8160 is the last job stopped while it was in the foreground or started
8161 in the background. The
8162 previous job may be referenced using <SAMP>`%-'</SAMP>. In output
8163 pertaining to jobs (e.g., the output of the <CODE>jobs</CODE> command),
8164 the current job is always flagged with a <SAMP>`+'</SAMP>, and the
8165 previous job with a <SAMP>`-'</SAMP>.
8166 </P><P>
8167
8168 A job may also be referred to
8169 using a prefix of the name used to start it, or using a substring
8170 that appears in its command line. For example, <SAMP>`%ce'</SAMP> refers
8171 to a stopped <CODE>ce</CODE> job. Using <SAMP>`%?ce'</SAMP>, on the
8172 other hand, refers to any job containing the string <SAMP>`ce'</SAMP> in
8173 its command line. If the prefix or substring matches more than one job,
8174 Bash reports an error.
8175 </P><P>
8176
8177 Simply naming a job can be used to bring it into the foreground:
8178 <SAMP>`%1'</SAMP> is a synonym for <SAMP>`fg %1'</SAMP>, bringing job 1 from the
8179 background into the foreground. Similarly, <SAMP>`%1 &#38;'</SAMP> resumes
8180 job 1 in the background, equivalent to <SAMP>`bg %1'</SAMP>
8181 </P><P>
8182
8183 The shell learns immediately whenever a job changes state.
8184 Normally, Bash waits until it is about to print a prompt
8185 before reporting changes in a job's status so as to not interrupt
8186 any other output.
8187 If the <SAMP>`-b'</SAMP> option to the <CODE>set</CODE> builtin is enabled,
8188 Bash reports such changes immediately (see section <A HREF="bashref.html#SEC59">4.3 The Set Builtin</A>).
8189 Any trap on <CODE>SIGCHLD</CODE> is executed for each child process
8190 that exits.
8191 </P><P>
8192
8193 If an attempt to exit Bash is made while jobs are stopped, the
8194 shell prints a message warning that there are stopped jobs.
8195 The <CODE>jobs</CODE> command may then be used to inspect their status.
8196 If a second attempt to exit is made without an intervening command,
8197 Bash does not print another warning, and the stopped jobs are terminated.
8198 </P><P>
8199
8200 <A NAME="Job Control Builtins"></A>
8201 <HR SIZE="6">
8202 <A NAME="SEC89"></A>
8203 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
8204 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC88"> &lt; </A>]</TD>
8205 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC90"> &gt; </A>]</TD>
8206 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC90"> &lt;&lt; </A>]</TD>
8207 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC87"> Up </A>]</TD>
8208 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC91"> &gt;&gt; </A>]</TD>
8209 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
8210 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
8211 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
8212 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
8213 </TR></TABLE>
8214 <H2> 7.2 Job Control Builtins </H2>
8215 <!--docid::SEC89::-->
8216 <P>
8217
8218 <DL COMPACT>
8219
8220 <DT><CODE>bg</CODE>
8221 <DD><A NAME="IDX273"></A>
8222 <TABLE><tr><td>&nbsp;</td><td class=example><pre>bg [<VAR>jobspec</VAR> <small>...</small>]
8223 </pre></td></tr></table>Resume each suspended job <VAR>jobspec</VAR> in the background, as if it
8224 had been started with <SAMP>`&#38;'</SAMP>.
8225 If <VAR>jobspec</VAR> is not supplied, the current job is used.
8226 The return status is zero unless it is run when job control is not
8227 enabled, or, when run with job control enabled, if the last
8228 <VAR>jobspec</VAR> was not found or the last <VAR>jobspec</VAR> specifies a job
8229 that was started without job control.
8230 <P>
8231
8232 <DT><CODE>fg</CODE>
8233 <DD><A NAME="IDX274"></A>
8234 <TABLE><tr><td>&nbsp;</td><td class=example><pre>fg [<VAR>jobspec</VAR>]
8235 </pre></td></tr></table>Resume the job <VAR>jobspec</VAR> in the foreground and make it the current job.
8236 If <VAR>jobspec</VAR> is not supplied, the current job is used.
8237 The return status is that of the command placed into the foreground,
8238 or non-zero if run when job control is disabled or, when run with
8239 job control enabled, <VAR>jobspec</VAR> does not specify a valid job or
8240 <VAR>jobspec</VAR> specifies a job that was started without job control.
8241 <P>
8242
8243 <DT><CODE>jobs</CODE>
8244 <DD><A NAME="IDX275"></A>
8245 <TABLE><tr><td>&nbsp;</td><td class=example><pre>jobs [-lnprs] [<VAR>jobspec</VAR>]
8246 jobs -x <VAR>command</VAR> [<VAR>arguments</VAR>]
8247 </pre></td></tr></table><P>
8248
8249 The first form lists the active jobs. The options have the
8250 following meanings:
8251 </P><P>
8252
8253 <DL COMPACT>
8254 <DT><CODE>-l</CODE>
8255 <DD>List process IDs in addition to the normal information.
8256 <P>
8257
8258 <DT><CODE>-n</CODE>
8259 <DD>Display information only about jobs that have changed status since
8260 the user was last notified of their status.
8261 <P>
8262
8263 <DT><CODE>-p</CODE>
8264 <DD>List only the process ID of the job's process group leader.
8265 <P>
8266
8267 <DT><CODE>-r</CODE>
8268 <DD>Restrict output to running jobs.
8269 <P>
8270
8271 <DT><CODE>-s</CODE>
8272 <DD>Restrict output to stopped jobs.
8273 </DL>
8274 <P>
8275
8276 If <VAR>jobspec</VAR> is given,
8277 output is restricted to information about that job.
8278 If <VAR>jobspec</VAR> is not supplied, the status of all jobs is
8279 listed.
8280 </P><P>
8281
8282 If the <SAMP>`-x'</SAMP> option is supplied, <CODE>jobs</CODE> replaces any
8283 <VAR>jobspec</VAR> found in <VAR>command</VAR> or <VAR>arguments</VAR> with the
8284 corresponding process group ID, and executes <VAR>command</VAR>,
8285 passing it <VAR>argument</VAR>s, returning its exit status.
8286 </P><P>
8287
8288 <DT><CODE>kill</CODE>
8289 <DD><A NAME="IDX276"></A>
8290 <TABLE><tr><td>&nbsp;</td><td class=example><pre>kill [-s <VAR>sigspec</VAR>] [-n <VAR>signum</VAR>] [-<VAR>sigspec</VAR>] <VAR>jobspec</VAR> or <VAR>pid</VAR>
8291 kill -l [<VAR>exit_status</VAR>]
8292 </pre></td></tr></table>Send a signal specified by <VAR>sigspec</VAR> or <VAR>signum</VAR> to the process
8293 named by job specification <VAR>jobspec</VAR> or process ID <VAR>pid</VAR>.
8294 <VAR>sigspec</VAR> is either a case-insensitive signal name such as
8295 <CODE>SIGINT</CODE> (with or without the <CODE>SIG</CODE> prefix)
8296 or a signal number; <VAR>signum</VAR> is a signal number.
8297 If <VAR>sigspec</VAR> and <VAR>signum</VAR> are not present, <CODE>SIGTERM</CODE> is used.
8298 The <SAMP>`-l'</SAMP> option lists the signal names.
8299 If any arguments are supplied when <SAMP>`-l'</SAMP> is given, the names of the
8300 signals corresponding to the arguments are listed, and the return status
8301 is zero.
8302 <VAR>exit_status</VAR> is a number specifying a signal number or the exit
8303 status of a process terminated by a signal.
8304 The return status is zero if at least one signal was successfully sent,
8305 or non-zero if an error occurs or an invalid option is encountered.
8306 <P>
8307
8308 <DT><CODE>wait</CODE>
8309 <DD><A NAME="IDX277"></A>
8310 <TABLE><tr><td>&nbsp;</td><td class=example><pre>wait [<VAR>jobspec</VAR> or <VAR>pid</VAR>]
8311 </pre></td></tr></table>Wait until the child process specified by process ID <VAR>pid</VAR> or job
8312 specification <VAR>jobspec</VAR> exits and return the exit status of the last
8313 command waited for.
8314 If a job spec is given, all processes in the job are waited for.
8315 If no arguments are given, all currently active child processes are
8316 waited for, and the return status is zero.
8317 If neither <VAR>jobspec</VAR> nor <VAR>pid</VAR> specifies an active child process
8318 of the shell, the return status is 127.
8319 <P>
8320
8321 <DT><CODE>disown</CODE>
8322 <DD><A NAME="IDX278"></A>
8323 <TABLE><tr><td>&nbsp;</td><td class=example><pre>disown [-ar] [-h] [<VAR>jobspec</VAR> <small>...</small>]
8324 </pre></td></tr></table>Without options, each <VAR>jobspec</VAR> is removed from the table of
8325 active jobs.
8326 If the <SAMP>`-h'</SAMP> option is given, the job is not removed from the table,
8327 but is marked so that <CODE>SIGHUP</CODE> is not sent to the job if the shell
8328 receives a <CODE>SIGHUP</CODE>.
8329 If <VAR>jobspec</VAR> is not present, and neither the <SAMP>`-a'</SAMP> nor <SAMP>`-r'</SAMP>
8330 option is supplied, the current job is used.
8331 If no <VAR>jobspec</VAR> is supplied, the <SAMP>`-a'</SAMP> option means to remove or
8332 mark all jobs; the <SAMP>`-r'</SAMP> option without a <VAR>jobspec</VAR>
8333 argument restricts operation to running jobs.
8334 <P>
8335
8336 <DT><CODE>suspend</CODE>
8337 <DD><A NAME="IDX279"></A>
8338 <TABLE><tr><td>&nbsp;</td><td class=example><pre>suspend [-f]
8339 </pre></td></tr></table>Suspend the execution of this shell until it receives a
8340 <CODE>SIGCONT</CODE> signal. The <SAMP>`-f'</SAMP> option means to suspend
8341 even if the shell is a login shell.
8342 <P>
8343
8344 </DL>
8345 <P>
8346
8347 When job control is not active, the <CODE>kill</CODE> and <CODE>wait</CODE>
8348 builtins do not accept <VAR>jobspec</VAR> arguments. They must be
8349 supplied process IDs.
8350 </P><P>
8351
8352 <A NAME="Job Control Variables"></A>
8353 <HR SIZE="6">
8354 <A NAME="SEC90"></A>
8355 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
8356 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC89"> &lt; </A>]</TD>
8357 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC91"> &gt; </A>]</TD>
8358 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC87"> &lt;&lt; </A>]</TD>
8359 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC87"> Up </A>]</TD>
8360 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC91"> &gt;&gt; </A>]</TD>
8361 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
8362 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
8363 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
8364 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
8365 </TR></TABLE>
8366 <H2> 7.3 Job Control Variables </H2>
8367 <!--docid::SEC90::-->
8368 <P>
8369
8370 <DL COMPACT>
8371
8372 <A NAME="IDX280"></A>
8373 <DT><CODE>auto_resume</CODE>
8374 <DD><A NAME="IDX281"></A>
8375 This variable controls how the shell interacts with the user and
8376 job control. If this variable exists then single word simple
8377 commands without redirections are treated as candidates for resumption
8378 of an existing job. There is no ambiguity allowed; if there is
8379 more than one job beginning with the string typed, then
8380 the most recently accessed job will be selected.
8381 The name of a stopped job, in this context, is the command line
8382 used to start it. If this variable is set to the value <SAMP>`exact'</SAMP>,
8383 the string supplied must match the name of a stopped job exactly;
8384 if set to <SAMP>`substring'</SAMP>,
8385 the string supplied needs to match a substring of the name of a
8386 stopped job. The <SAMP>`substring'</SAMP> value provides functionality
8387 analogous to the <SAMP>`%?'</SAMP> job ID (see section <A HREF="bashref.html#SEC88">7.1 Job Control Basics</A>).
8388 If set to any other value, the supplied string must
8389 be a prefix of a stopped job's name; this provides functionality
8390 analogous to the <SAMP>`%'</SAMP> job ID.
8391 <P>
8392
8393 </DL>
8394 <P>
8395
8396 <A NAME="IDX282"></A>
8397 </P><P>
8398
8399 <A NAME="Command Line Editing"></A>
8400 <HR SIZE="6">
8401 <A NAME="SEC91"></A>
8402 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
8403 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC90"> &lt; </A>]</TD>
8404 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC92"> &gt; </A>]</TD>
8405 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC115"> &lt;&lt; </A>]</TD>
8406 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top"> Up </A>]</TD>
8407 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC115"> &gt;&gt; </A>]</TD>
8408 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
8409 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
8410 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
8411 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
8412 </TR></TABLE>
8413 <H1> 8. Command Line Editing </H1>
8414 <!--docid::SEC91::-->
8415 <P>
8416
8417 This chapter describes the basic features of the GNU
8418 command line editing interface.
8419 Command line editing is provided by the Readline library, which is
8420 used by several different programs, including Bash.
8421 </P><P>
8422
8423 <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
8424 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC92">8.1 Introduction to Line Editing</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Notation used in this text.</TD></TR>
8425 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC93">8.2 Readline Interaction</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">The minimum set of commands for editing a line.</TD></TR>
8426 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC99">8.3 Readline Init File</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Customizing Readline from a user's view.</TD></TR>
8427 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC103">8.4 Bindable Readline Commands</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">A description of most of the Readline commands
8428 available for binding</TD></TR>
8429 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC112">8.5 Readline vi Mode</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">A short description of how to make Readline
8430 behave like the vi editor.</TD></TR>
8431 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC113">8.6 Programmable Completion</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to specify the possible completions for
8432 a specific command.</TD></TR>
8433 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC114">8.7 Programmable Completion Builtins</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Builtin commands to specify how to
8434 complete arguments for a particular command.</TD></TR>
8435 </TABLE></BLOCKQUOTE>
8436 <P>
8437
8438 <A NAME="Introduction and Notation"></A>
8439 <HR SIZE="6">
8440 <A NAME="SEC92"></A>
8441 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
8442 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC91"> &lt; </A>]</TD>
8443 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC93"> &gt; </A>]</TD>
8444 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC91"> &lt;&lt; </A>]</TD>
8445 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC91"> Up </A>]</TD>
8446 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC115"> &gt;&gt; </A>]</TD>
8447 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
8448 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
8449 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
8450 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
8451 </TR></TABLE>
8452 <H2> 8.1 Introduction to Line Editing </H2>
8453 <!--docid::SEC92::-->
8454 <P>
8455
8456 The following paragraphs describe the notation used to represent
8457 keystrokes.
8458 </P><P>
8459
8460 The text <KBD>C-k</KBD> is read as `Control-K' and describes the character
8461 produced when the <KBD>k</KBD> key is pressed while the Control key
8462 is depressed.
8463 </P><P>
8464
8465 The text <KBD>M-k</KBD> is read as `Meta-K' and describes the character
8466 produced when the Meta key (if you have one) is depressed, and the <KBD>k</KBD>
8467 key is pressed.
8468 The Meta key is labeled <KBD>ALT</KBD> on many keyboards.
8469 On keyboards with two keys labeled <KBD>ALT</KBD> (usually to either side of
8470 the space bar), the <KBD>ALT</KBD> on the left side is generally set to
8471 work as a Meta key.
8472 The <KBD>ALT</KBD> key on the right may also be configured to work as a
8473 Meta key or may be configured as some other modifier, such as a
8474 Compose key for typing accented characters.
8475 </P><P>
8476
8477 If you do not have a Meta or <KBD>ALT</KBD> key, or another key working as
8478 a Meta key, the identical keystroke can be generated by typing <KBD>ESC</KBD>
8479 <EM>first</EM>, and then typing <KBD>k</KBD>.
8480 Either process is known as <EM>metafying</EM> the <KBD>k</KBD> key.
8481 </P><P>
8482
8483 The text <KBD>M-C-k</KBD> is read as `Meta-Control-k' and describes the
8484 character produced by <EM>metafying</EM> <KBD>C-k</KBD>.
8485 </P><P>
8486
8487 In addition, several keys have their own names. Specifically,
8488 <KBD>DEL</KBD>, <KBD>ESC</KBD>, <KBD>LFD</KBD>, <KBD>SPC</KBD>, <KBD>RET</KBD>, and <KBD>TAB</KBD> all
8489 stand for themselves when seen in this text, or in an init file
8490 (see section <A HREF="bashref.html#SEC99">8.3 Readline Init File</A>).
8491 If your keyboard lacks a <KBD>LFD</KBD> key, typing <KBD>C-j</KBD> will
8492 produce the desired character.
8493 The <KBD>RET</KBD> key may be labeled <KBD>Return</KBD> or <KBD>Enter</KBD> on
8494 some keyboards.
8495 </P><P>
8496
8497 <A NAME="Readline Interaction"></A>
8498 <HR SIZE="6">
8499 <A NAME="SEC93"></A>
8500 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
8501 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC92"> &lt; </A>]</TD>
8502 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC94"> &gt; </A>]</TD>
8503 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC99"> &lt;&lt; </A>]</TD>
8504 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC91"> Up </A>]</TD>
8505 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC99"> &gt;&gt; </A>]</TD>
8506 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
8507 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
8508 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
8509 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
8510 </TR></TABLE>
8511 <H2> 8.2 Readline Interaction </H2>
8512 <!--docid::SEC93::-->
8513 <P>
8514
8515 Often during an interactive session you type in a long line of text,
8516 only to notice that the first word on the line is misspelled. The
8517 Readline library gives you a set of commands for manipulating the text
8518 as you type it in, allowing you to just fix your typo, and not forcing
8519 you to retype the majority of the line. Using these editing commands,
8520 you move the cursor to the place that needs correction, and delete or
8521 insert the text of the corrections. Then, when you are satisfied with
8522 the line, you simply press <KBD>RET</KBD>. You do not have to be at the
8523 end of the line to press <KBD>RET</KBD>; the entire line is accepted
8524 regardless of the location of the cursor within the line.
8525 </P><P>
8526
8527 <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
8528 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC94">8.2.1 Readline Bare Essentials</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">The least you need to know about Readline.</TD></TR>
8529 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC95">8.2.2 Readline Movement Commands</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Moving about the input line.</TD></TR>
8530 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC96">8.2.3 Readline Killing Commands</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to delete text, and how to get it back!</TD></TR>
8531 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC97">8.2.4 Readline Arguments</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Giving numeric arguments to commands.</TD></TR>
8532 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC98">8.2.5 Searching for Commands in the History</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Searching through previous lines.</TD></TR>
8533 </TABLE></BLOCKQUOTE>
8534 <P>
8535
8536 <A NAME="Readline Bare Essentials"></A>
8537 <HR SIZE="6">
8538 <A NAME="SEC94"></A>
8539 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
8540 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC93"> &lt; </A>]</TD>
8541 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC95"> &gt; </A>]</TD>
8542 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC99"> &lt;&lt; </A>]</TD>
8543 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC93"> Up </A>]</TD>
8544 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC99"> &gt;&gt; </A>]</TD>
8545 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
8546 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
8547 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
8548 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
8549 </TR></TABLE>
8550 <H3> 8.2.1 Readline Bare Essentials </H3>
8551 <!--docid::SEC94::-->
8552 <P>
8553
8554 In order to enter characters into the line, simply type them. The typed
8555 character appears where the cursor was, and then the cursor moves one
8556 space to the right. If you mistype a character, you can use your
8557 erase character to back up and delete the mistyped character.
8558 </P><P>
8559
8560 Sometimes you may mistype a character, and
8561 not notice the error until you have typed several other characters. In
8562 that case, you can type <KBD>C-b</KBD> to move the cursor to the left, and then
8563 correct your mistake. Afterwards, you can move the cursor to the right
8564 with <KBD>C-f</KBD>.
8565 </P><P>
8566
8567 When you add text in the middle of a line, you will notice that characters
8568 to the right of the cursor are `pushed over' to make room for the text
8569 that you have inserted. Likewise, when you delete text behind the cursor,
8570 characters to the right of the cursor are `pulled back' to fill in the
8571 blank space created by the removal of the text. A list of the bare
8572 essentials for editing the text of an input line follows.
8573 </P><P>
8574
8575 <DL COMPACT>
8576 <DT><KBD>C-b</KBD>
8577 <DD>Move back one character.
8578 <DT><KBD>C-f</KBD>
8579 <DD>Move forward one character.
8580 <DT><KBD>DEL</KBD> or <KBD>Backspace</KBD>
8581 <DD>Delete the character to the left of the cursor.
8582 <DT><KBD>C-d</KBD>
8583 <DD>Delete the character underneath the cursor.
8584 <DT>Printing characters
8585 <DD>Insert the character into the line at the cursor.
8586 <DT><KBD>C-_</KBD> or <KBD>C-x C-u</KBD>
8587 <DD>Undo the last editing command. You can undo all the way back to an
8588 empty line.
8589 </DL>
8590 <P>
8591
8592 (Depending on your configuration, the <KBD>Backspace</KBD> key be set to
8593 delete the character to the left of the cursor and the <KBD>DEL</KBD> key set
8594 to delete the character underneath the cursor, like <KBD>C-d</KBD>, rather
8595 than the character to the left of the cursor.)
8596 </P><P>
8597
8598 <A NAME="Readline Movement Commands"></A>
8599 <HR SIZE="6">
8600 <A NAME="SEC95"></A>
8601 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
8602 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC94"> &lt; </A>]</TD>
8603 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC96"> &gt; </A>]</TD>
8604 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC96"> &lt;&lt; </A>]</TD>
8605 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC93"> Up </A>]</TD>
8606 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC99"> &gt;&gt; </A>]</TD>
8607 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
8608 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
8609 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
8610 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
8611 </TR></TABLE>
8612 <H3> 8.2.2 Readline Movement Commands </H3>
8613 <!--docid::SEC95::-->
8614 <P>
8615
8616 The above table describes the most basic keystrokes that you need
8617 in order to do editing of the input line. For your convenience, many
8618 other commands have been added in addition to <KBD>C-b</KBD>, <KBD>C-f</KBD>,
8619 <KBD>C-d</KBD>, and <KBD>DEL</KBD>. Here are some commands for moving more rapidly
8620 about the line.
8621 </P><P>
8622
8623 <DL COMPACT>
8624 <DT><KBD>C-a</KBD>
8625 <DD>Move to the start of the line.
8626 <DT><KBD>C-e</KBD>
8627 <DD>Move to the end of the line.
8628 <DT><KBD>M-f</KBD>
8629 <DD>Move forward a word, where a word is composed of letters and digits.
8630 <DT><KBD>M-b</KBD>
8631 <DD>Move backward a word.
8632 <DT><KBD>C-l</KBD>
8633 <DD>Clear the screen, reprinting the current line at the top.
8634 </DL>
8635 <P>
8636
8637 Notice how <KBD>C-f</KBD> moves forward a character, while <KBD>M-f</KBD> moves
8638 forward a word. It is a loose convention that control keystrokes
8639 operate on characters while meta keystrokes operate on words.
8640 </P><P>
8641
8642 <A NAME="Readline Killing Commands"></A>
8643 <HR SIZE="6">
8644 <A NAME="SEC96"></A>
8645 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
8646 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC95"> &lt; </A>]</TD>
8647 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC97"> &gt; </A>]</TD>
8648 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC97"> &lt;&lt; </A>]</TD>
8649 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC93"> Up </A>]</TD>
8650 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC99"> &gt;&gt; </A>]</TD>
8651 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
8652 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
8653 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
8654 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
8655 </TR></TABLE>
8656 <H3> 8.2.3 Readline Killing Commands </H3>
8657 <!--docid::SEC96::-->
8658 <P>
8659
8660 <A NAME="IDX283"></A>
8661 <A NAME="IDX284"></A>
8662 </P><P>
8663
8664 <EM>Killing</EM> text means to delete the text from the line, but to save
8665 it away for later use, usually by <EM>yanking</EM> (re-inserting)
8666 it back into the line.
8667 (`Cut' and `paste' are more recent jargon for `kill' and `yank'.)
8668 </P><P>
8669
8670 If the description for a command says that it `kills' text, then you can
8671 be sure that you can get the text back in a different (or the same)
8672 place later.
8673 </P><P>
8674
8675 When you use a kill command, the text is saved in a <EM>kill-ring</EM>.
8676 Any number of consecutive kills save all of the killed text together, so
8677 that when you yank it back, you get it all. The kill
8678 ring is not line specific; the text that you killed on a previously
8679 typed line is available to be yanked back later, when you are typing
8680 another line.
8681 <A NAME="IDX285"></A>
8682 </P><P>
8683
8684 Here is the list of commands for killing text.
8685 </P><P>
8686
8687 <DL COMPACT>
8688 <DT><KBD>C-k</KBD>
8689 <DD>Kill the text from the current cursor position to the end of the line.
8690 <P>
8691
8692 <DT><KBD>M-d</KBD>
8693 <DD>Kill from the cursor to the end of the current word, or, if between
8694 words, to the end of the next word.
8695 Word boundaries are the same as those used by <KBD>M-f</KBD>.
8696 <P>
8697
8698 <DT><KBD>M-<KBD>DEL</KBD></KBD>
8699 <DD>Kill from the cursor the start of the current word, or, if between
8700 words, to the start of the previous word.
8701 Word boundaries are the same as those used by <KBD>M-b</KBD>.
8702 <P>
8703
8704 <DT><KBD>C-w</KBD>
8705 <DD>Kill from the cursor to the previous whitespace. This is different than
8706 <KBD>M-<KBD>DEL</KBD></KBD> because the word boundaries differ.
8707 <P>
8708
8709 </DL>
8710 <P>
8711
8712 Here is how to <EM>yank</EM> the text back into the line. Yanking
8713 means to copy the most-recently-killed text from the kill buffer.
8714 </P><P>
8715
8716 <DL COMPACT>
8717 <DT><KBD>C-y</KBD>
8718 <DD>Yank the most recently killed text back into the buffer at the cursor.
8719 <P>
8720
8721 <DT><KBD>M-y</KBD>
8722 <DD>Rotate the kill-ring, and yank the new top. You can only do this if
8723 the prior command is <KBD>C-y</KBD> or <KBD>M-y</KBD>.
8724 </DL>
8725 <P>
8726
8727 <A NAME="Readline Arguments"></A>
8728 <HR SIZE="6">
8729 <A NAME="SEC97"></A>
8730 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
8731 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC96"> &lt; </A>]</TD>
8732 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC98"> &gt; </A>]</TD>
8733 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC98"> &lt;&lt; </A>]</TD>
8734 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC93"> Up </A>]</TD>
8735 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC99"> &gt;&gt; </A>]</TD>
8736 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
8737 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
8738 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
8739 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
8740 </TR></TABLE>
8741 <H3> 8.2.4 Readline Arguments </H3>
8742 <!--docid::SEC97::-->
8743 <P>
8744
8745 You can pass numeric arguments to Readline commands. Sometimes the
8746 argument acts as a repeat count, other times it is the <I>sign</I> of the
8747 argument that is significant. If you pass a negative argument to a
8748 command which normally acts in a forward direction, that command will
8749 act in a backward direction. For example, to kill text back to the
8750 start of the line, you might type <SAMP>`M-- C-k'</SAMP>.
8751 </P><P>
8752
8753 The general way to pass numeric arguments to a command is to type meta
8754 digits before the command. If the first `digit' typed is a minus
8755 sign (<SAMP>`-'</SAMP>), then the sign of the argument will be negative. Once
8756 you have typed one meta digit to get the argument started, you can type
8757 the remainder of the digits, and then the command. For example, to give
8758 the <KBD>C-d</KBD> command an argument of 10, you could type <SAMP>`M-1 0 C-d'</SAMP>,
8759 which will delete the next ten characters on the input line.
8760 </P><P>
8761
8762 <A NAME="Searching"></A>
8763 <HR SIZE="6">
8764 <A NAME="SEC98"></A>
8765 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
8766 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC97"> &lt; </A>]</TD>
8767 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC99"> &gt; </A>]</TD>
8768 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC99"> &lt;&lt; </A>]</TD>
8769 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC93"> Up </A>]</TD>
8770 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC99"> &gt;&gt; </A>]</TD>
8771 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
8772 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
8773 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
8774 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
8775 </TR></TABLE>
8776 <H3> 8.2.5 Searching for Commands in the History </H3>
8777 <!--docid::SEC98::-->
8778 <P>
8779
8780 Readline provides commands for searching through the command history
8781 (see section <A HREF="bashref.html#SEC116">9.1 Bash History Facilities</A>)
8782 for lines containing a specified string.
8783 There are two search modes: <EM>incremental</EM> and <EM>non-incremental</EM>.
8784 </P><P>
8785
8786 Incremental searches begin before the user has finished typing the
8787 search string.
8788 As each character of the search string is typed, Readline displays
8789 the next entry from the history matching the string typed so far.
8790 An incremental search requires only as many characters as needed to
8791 find the desired history entry.
8792 To search backward in the history for a particular string, type
8793 <KBD>C-r</KBD>. Typing <KBD>C-s</KBD> searches forward through the history.
8794 The characters present in the value of the <CODE>isearch-terminators</CODE> variable
8795 are used to terminate an incremental search.
8796 If that variable has not been assigned a value, the <KBD>ESC</KBD> and
8797 <KBD>C-J</KBD> characters will terminate an incremental search.
8798 <KBD>C-g</KBD> will abort an incremental search and restore the original line.
8799 When the search is terminated, the history entry containing the
8800 search string becomes the current line.
8801 </P><P>
8802
8803 To find other matching entries in the history list, type <KBD>C-r</KBD> or
8804 <KBD>C-s</KBD> as appropriate.
8805 This will search backward or forward in the history for the next
8806 entry matching the search string typed so far.
8807 Any other key sequence bound to a Readline command will terminate
8808 the search and execute that command.
8809 For instance, a <KBD>RET</KBD> will terminate the search and accept
8810 the line, thereby executing the command from the history list.
8811 A movement command will terminate the search, make the last line found
8812 the current line, and begin editing.
8813 </P><P>
8814
8815 Readline remembers the last incremental search string. If two
8816 <KBD>C-r</KBD>s are typed without any intervening characters defining a new
8817 search string, any remembered search string is used.
8818 </P><P>
8819
8820 Non-incremental searches read the entire search string before starting
8821 to search for matching history lines. The search string may be
8822 typed by the user or be part of the contents of the current line.
8823 </P><P>
8824
8825 <A NAME="Readline Init File"></A>
8826 <HR SIZE="6">
8827 <A NAME="SEC99"></A>
8828 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
8829 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC98"> &lt; </A>]</TD>
8830 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC100"> &gt; </A>]</TD>
8831 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC103"> &lt;&lt; </A>]</TD>
8832 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC91"> Up </A>]</TD>
8833 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC103"> &gt;&gt; </A>]</TD>
8834 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
8835 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
8836 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
8837 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
8838 </TR></TABLE>
8839 <H2> 8.3 Readline Init File </H2>
8840 <!--docid::SEC99::-->
8841 <P>
8842
8843 Although the Readline library comes with a set of Emacs-like
8844 keybindings installed by default, it is possible to use a different set
8845 of keybindings.
8846 Any user can customize programs that use Readline by putting
8847 commands in an <EM>inputrc</EM> file, conventionally in his home directory.
8848 The name of this
8849 file is taken from the value of the shell variable <CODE>INPUTRC</CODE>. If
8850 that variable is unset, the default is <TT>`~/.inputrc'</TT>.
8851 </P><P>
8852
8853 When a program which uses the Readline library starts up, the
8854 init file is read, and the key bindings are set.
8855 </P><P>
8856
8857 In addition, the <CODE>C-x C-r</CODE> command re-reads this init file, thus
8858 incorporating any changes that you might have made to it.
8859 </P><P>
8860
8861 <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
8862 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC100">8.3.1 Readline Init File Syntax</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Syntax for the commands in the inputrc file.</TD></TR>
8863 </TABLE>
8864
8865 <br>
8866 <TABLE BORDER=0 CELLSPACING=0>
8867 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC101">8.3.2 Conditional Init Constructs</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Conditional key bindings in the inputrc file.</TD></TR>
8868 </TABLE>
8869
8870 <br>
8871 <TABLE BORDER=0 CELLSPACING=0>
8872 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC102">8.3.3 Sample Init File</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">An example inputrc file.</TD></TR>
8873 </TABLE></BLOCKQUOTE>
8874 <P>
8875
8876 <A NAME="Readline Init File Syntax"></A>
8877 <HR SIZE="6">
8878 <A NAME="SEC100"></A>
8879 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
8880 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC99"> &lt; </A>]</TD>
8881 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC101"> &gt; </A>]</TD>
8882 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC103"> &lt;&lt; </A>]</TD>
8883 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC99"> Up </A>]</TD>
8884 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC103"> &gt;&gt; </A>]</TD>
8885 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
8886 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
8887 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
8888 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
8889 </TR></TABLE>
8890 <H3> 8.3.1 Readline Init File Syntax </H3>
8891 <!--docid::SEC100::-->
8892 <P>
8893
8894 There are only a few basic constructs allowed in the
8895 Readline init file. Blank lines are ignored.
8896 Lines beginning with a <SAMP>`#'</SAMP> are comments.
8897 Lines beginning with a <SAMP>`$'</SAMP> indicate conditional
8898 constructs (see section <A HREF="bashref.html#SEC101">8.3.2 Conditional Init Constructs</A>). Other lines
8899 denote variable settings and key bindings.
8900 </P><P>
8901
8902 <DL COMPACT>
8903 <DT>Variable Settings
8904 <DD>You can modify the run-time behavior of Readline by
8905 altering the values of variables in Readline
8906 using the <CODE>set</CODE> command within the init file.
8907 The syntax is simple:
8908 <P>
8909
8910 <TABLE><tr><td>&nbsp;</td><td class=example><pre>set <VAR>variable</VAR> <VAR>value</VAR>
8911 </pre></td></tr></table></P><P>
8912
8913 Here, for example, is how to
8914 change from the default Emacs-like key binding to use
8915 <CODE>vi</CODE> line editing commands:
8916 </P><P>
8917
8918 <TABLE><tr><td>&nbsp;</td><td class=example><pre>set editing-mode vi
8919 </pre></td></tr></table></P><P>
8920
8921 Variable names and values, where appropriate, are recognized without regard
8922 to case.
8923 </P><P>
8924
8925 The <CODE>bind -V</CODE> command lists the current Readline variable names
8926 and values. See section <A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A>.
8927 </P><P>
8928
8929 A great deal of run-time behavior is changeable with the following
8930 variables.
8931 </P><P>
8932
8933 <A NAME="IDX286"></A>
8934 <DL COMPACT>
8935
8936 <DT><CODE>bell-style</CODE>
8937 <DD><A NAME="IDX287"></A>
8938 Controls what happens when Readline wants to ring the terminal bell.
8939 If set to <SAMP>`none'</SAMP>, Readline never rings the bell. If set to
8940 <SAMP>`visible'</SAMP>, Readline uses a visible bell if one is available.
8941 If set to <SAMP>`audible'</SAMP> (the default), Readline attempts to ring
8942 the terminal's bell.
8943 <P>
8944
8945 <DT><CODE>comment-begin</CODE>
8946 <DD><A NAME="IDX288"></A>
8947 The string to insert at the beginning of the line when the
8948 <CODE>insert-comment</CODE> command is executed. The default value
8949 is <CODE>"#"</CODE>.
8950 <P>
8951
8952 <DT><CODE>completion-ignore-case</CODE>
8953 <DD>If set to <SAMP>`on'</SAMP>, Readline performs filename matching and completion
8954 in a case-insensitive fashion.
8955 The default value is <SAMP>`off'</SAMP>.
8956 <P>
8957
8958 <DT><CODE>completion-query-items</CODE>
8959 <DD><A NAME="IDX289"></A>
8960 The number of possible completions that determines when the user is
8961 asked whether the list of possibilities should be displayed.
8962 If the number of possible completions is greater than this value,
8963 Readline will ask the user whether or not he wishes to view
8964 them; otherwise, they are simply listed.
8965 This variable must be set to an integer value greater than or equal to 0.
8966 The default limit is <CODE>100</CODE>.
8967 <P>
8968
8969 <DT><CODE>convert-meta</CODE>
8970 <DD><A NAME="IDX290"></A>
8971 If set to <SAMP>`on'</SAMP>, Readline will convert characters with the
8972 eighth bit set to an ASCII key sequence by stripping the eighth
8973 bit and prefixing an <KBD>ESC</KBD> character, converting them to a
8974 meta-prefixed key sequence. The default value is <SAMP>`on'</SAMP>.
8975 <P>
8976
8977 <DT><CODE>disable-completion</CODE>
8978 <DD><A NAME="IDX291"></A>
8979 If set to <SAMP>`On'</SAMP>, Readline will inhibit word completion.
8980 Completion characters will be inserted into the line as if they had
8981 been mapped to <CODE>self-insert</CODE>. The default is <SAMP>`off'</SAMP>.
8982 <P>
8983
8984 <DT><CODE>editing-mode</CODE>
8985 <DD><A NAME="IDX292"></A>
8986 The <CODE>editing-mode</CODE> variable controls which default set of
8987 key bindings is used. By default, Readline starts up in Emacs editing
8988 mode, where the keystrokes are most similar to Emacs. This variable can be
8989 set to either <SAMP>`emacs'</SAMP> or <SAMP>`vi'</SAMP>.
8990 <P>
8991
8992 <DT><CODE>enable-keypad</CODE>
8993 <DD><A NAME="IDX293"></A>
8994 When set to <SAMP>`on'</SAMP>, Readline will try to enable the application
8995 keypad when it is called. Some systems need this to enable the
8996 arrow keys. The default is <SAMP>`off'</SAMP>.
8997 <P>
8998
8999 <DT><CODE>expand-tilde</CODE>
9000 <DD><A NAME="IDX294"></A>
9001 If set to <SAMP>`on'</SAMP>, tilde expansion is performed when Readline
9002 attempts word completion. The default is <SAMP>`off'</SAMP>.
9003 <P>
9004
9005 <A NAME="IDX295"></A>
9006 If set to <SAMP>`on'</SAMP>, the history code attempts to place point at the
9007 same location on each history line retrieved with <CODE>previous-history</CODE>
9008 or <CODE>next-history</CODE>.
9009 </P><P>
9010
9011 <DT><CODE>horizontal-scroll-mode</CODE>
9012 <DD><A NAME="IDX296"></A>
9013 This variable can be set to either <SAMP>`on'</SAMP> or <SAMP>`off'</SAMP>. Setting it
9014 to <SAMP>`on'</SAMP> means that the text of the lines being edited will scroll
9015 horizontally on a single screen line when they are longer than the width
9016 of the screen, instead of wrapping onto a new screen line. By default,
9017 this variable is set to <SAMP>`off'</SAMP>.
9018 <P>
9019
9020 <DT><CODE>input-meta</CODE>
9021 <DD><A NAME="IDX297"></A>
9022 <A NAME="IDX298"></A>
9023 If set to <SAMP>`on'</SAMP>, Readline will enable eight-bit input (it
9024 will not clear the eighth bit in the characters it reads),
9025 regardless of what the terminal claims it can support. The
9026 default value is <SAMP>`off'</SAMP>. The name <CODE>meta-flag</CODE> is a
9027 synonym for this variable.
9028 <P>
9029
9030 <DT><CODE>isearch-terminators</CODE>
9031 <DD><A NAME="IDX299"></A>
9032 The string of characters that should terminate an incremental search without
9033 subsequently executing the character as a command (see section <A HREF="bashref.html#SEC98">8.2.5 Searching for Commands in the History</A>).
9034 If this variable has not been given a value, the characters <KBD>ESC</KBD> and
9035 <KBD>C-J</KBD> will terminate an incremental search.
9036 <P>
9037
9038 <DT><CODE>keymap</CODE>
9039 <DD><A NAME="IDX300"></A>
9040 Sets Readline's idea of the current keymap for key binding commands.
9041 Acceptable <CODE>keymap</CODE> names are
9042 <CODE>emacs</CODE>,
9043 <CODE>emacs-standard</CODE>,
9044 <CODE>emacs-meta</CODE>,
9045 <CODE>emacs-ctlx</CODE>,
9046 <CODE>vi</CODE>,
9047 <CODE>vi-move</CODE>,
9048 <CODE>vi-command</CODE>, and
9049 <CODE>vi-insert</CODE>.
9050 <CODE>vi</CODE> is equivalent to <CODE>vi-command</CODE>; <CODE>emacs</CODE> is
9051 equivalent to <CODE>emacs-standard</CODE>. The default value is <CODE>emacs</CODE>.
9052 The value of the <CODE>editing-mode</CODE> variable also affects the
9053 default keymap.
9054 <P>
9055
9056 <DT><CODE>mark-directories</CODE>
9057 <DD>If set to <SAMP>`on'</SAMP>, completed directory names have a slash
9058 appended. The default is <SAMP>`on'</SAMP>.
9059 <P>
9060
9061 <DT><CODE>mark-modified-lines</CODE>
9062 <DD><A NAME="IDX301"></A>
9063 This variable, when set to <SAMP>`on'</SAMP>, causes Readline to display an
9064 asterisk (<SAMP>`*'</SAMP>) at the start of history lines which have been modified.
9065 This variable is <SAMP>`off'</SAMP> by default.
9066 <P>
9067
9068 <DT><CODE>mark-symlinked-directories</CODE>
9069 <DD><A NAME="IDX302"></A>
9070 If set to <SAMP>`on'</SAMP>, completed names which are symbolic links
9071 to directories have a slash appended (subject to the value of
9072 <CODE>mark-directories</CODE>).
9073 The default is <SAMP>`off'</SAMP>.
9074 <P>
9075
9076 <DT><CODE>match-hidden-files</CODE>
9077 <DD><A NAME="IDX303"></A>
9078 This variable, when set to <SAMP>`on'</SAMP>, causes Readline to match files whose
9079 names begin with a <SAMP>`.'</SAMP> (hidden files) when performing filename
9080 completion, unless the leading <SAMP>`.'</SAMP> is
9081 supplied by the user in the filename to be completed.
9082 This variable is <SAMP>`on'</SAMP> by default.
9083 <P>
9084
9085 <DT><CODE>output-meta</CODE>
9086 <DD><A NAME="IDX304"></A>
9087 If set to <SAMP>`on'</SAMP>, Readline will display characters with the
9088 eighth bit set directly rather than as a meta-prefixed escape
9089 sequence. The default is <SAMP>`off'</SAMP>.
9090 <P>
9091
9092 <DT><CODE>page-completions</CODE>
9093 <DD><A NAME="IDX305"></A>
9094 If set to <SAMP>`on'</SAMP>, Readline uses an internal <CODE>more</CODE>-like pager
9095 to display a screenful of possible completions at a time.
9096 This variable is <SAMP>`on'</SAMP> by default.
9097 <P>
9098
9099 <DT><CODE>print-completions-horizontally</CODE>
9100 <DD>If set to <SAMP>`on'</SAMP>, Readline will display completions with matches
9101 sorted horizontally in alphabetical order, rather than down the screen.
9102 The default is <SAMP>`off'</SAMP>.
9103 <P>
9104
9105 <DT><CODE>show-all-if-ambiguous</CODE>
9106 <DD><A NAME="IDX306"></A>
9107 This alters the default behavior of the completion functions. If
9108 set to <SAMP>`on'</SAMP>,
9109 words which have more than one possible completion cause the
9110 matches to be listed immediately instead of ringing the bell.
9111 The default value is <SAMP>`off'</SAMP>.
9112 <P>
9113
9114 <DT><CODE>show-all-if-unmodified</CODE>
9115 <DD><A NAME="IDX307"></A>
9116 This alters the default behavior of the completion functions in
9117 a fashion similar to <VAR>show-all-if-ambiguous</VAR>.
9118 If set to <SAMP>`on'</SAMP>,
9119 words which have more than one possible completion without any
9120 possible partial completion (the possible completions don't share
9121 a common prefix) cause the matches to be listed immediately instead
9122 of ringing the bell.
9123 The default value is <SAMP>`off'</SAMP>.
9124 <P>
9125
9126 <DT><CODE>visible-stats</CODE>
9127 <DD><A NAME="IDX308"></A>
9128 If set to <SAMP>`on'</SAMP>, a character denoting a file's type
9129 is appended to the filename when listing possible
9130 completions. The default is <SAMP>`off'</SAMP>.
9131 <P>
9132
9133 </DL>
9134 <P>
9135
9136 <DT>Key Bindings
9137 <DD>The syntax for controlling key bindings in the init file is
9138 simple. First you need to find the name of the command that you
9139 want to change. The following sections contain tables of the command
9140 name, the default keybinding, if any, and a short description of what
9141 the command does.
9142 <P>
9143
9144 Once you know the name of the command, simply place on a line
9145 in the init file the name of the key
9146 you wish to bind the command to, a colon, and then the name of the
9147 command. The name of the key
9148 can be expressed in different ways, depending on what you find most
9149 comfortable.
9150 </P><P>
9151
9152 In addition to command names, readline allows keys to be bound
9153 to a string that is inserted when the key is pressed (a <VAR>macro</VAR>).
9154 </P><P>
9155
9156 The <CODE>bind -p</CODE> command displays Readline function names and
9157 bindings in a format that can put directly into an initialization file.
9158 See section <A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A>.
9159 </P><P>
9160
9161 <DL COMPACT>
9162 <DT><VAR>keyname</VAR>: <VAR>function-name</VAR> or <VAR>macro</VAR>
9163 <DD><VAR>keyname</VAR> is the name of a key spelled out in English. For example:
9164 <TABLE><tr><td>&nbsp;</td><td class=example><pre>Control-u: universal-argument
9165 Meta-Rubout: backward-kill-word
9166 Control-o: "&#62; output"
9167 </pre></td></tr></table><P>
9168
9169 In the above example, <KBD>C-u</KBD> is bound to the function
9170 <CODE>universal-argument</CODE>,
9171 <KBD>M-DEL</KBD> is bound to the function <CODE>backward-kill-word</CODE>, and
9172 <KBD>C-o</KBD> is bound to run the macro
9173 expressed on the right hand side (that is, to insert the text
9174 <SAMP>`&#62; output'</SAMP> into the line).
9175 </P><P>
9176
9177 A number of symbolic character names are recognized while
9178 processing this key binding syntax:
9179 <VAR>DEL</VAR>,
9180 <VAR>ESC</VAR>,
9181 <VAR>ESCAPE</VAR>,
9182 <VAR>LFD</VAR>,
9183 <VAR>NEWLINE</VAR>,
9184 <VAR>RET</VAR>,
9185 <VAR>RETURN</VAR>,
9186 <VAR>RUBOUT</VAR>,
9187 <VAR>SPACE</VAR>,
9188 <VAR>SPC</VAR>,
9189 and
9190 <VAR>TAB</VAR>.
9191 </P><P>
9192
9193 <DT>"<VAR>keyseq</VAR>": <VAR>function-name</VAR> or <VAR>macro</VAR>
9194 <DD><VAR>keyseq</VAR> differs from <VAR>keyname</VAR> above in that strings
9195 denoting an entire key sequence can be specified, by placing
9196 the key sequence in double quotes. Some GNU Emacs style key
9197 escapes can be used, as in the following example, but the
9198 special character names are not recognized.
9199 <P>
9200
9201 <TABLE><tr><td>&nbsp;</td><td class=example><pre>"\C-u": universal-argument
9202 "\C-x\C-r": re-read-init-file
9203 "\e[11~": "Function Key 1"
9204 </pre></td></tr></table></P><P>
9205
9206 In the above example, <KBD>C-u</KBD> is again bound to the function
9207 <CODE>universal-argument</CODE> (just as it was in the first example),
9208 <SAMP>`<KBD>C-x</KBD> <KBD>C-r</KBD>'</SAMP> is bound to the function <CODE>re-read-init-file</CODE>,
9209 and <SAMP>`<KBD>ESC</KBD> <KBD>[</KBD> <KBD>1</KBD> <KBD>1</KBD> <KBD>~</KBD>'</SAMP> is bound to insert
9210 the text <SAMP>`Function Key 1'</SAMP>.
9211 </P><P>
9212
9213 </DL>
9214 <P>
9215
9216 The following GNU Emacs style escape sequences are available when
9217 specifying key sequences:
9218 </P><P>
9219
9220 <DL COMPACT>
9221 <DT><CODE><KBD>\C-</KBD></CODE>
9222 <DD>control prefix
9223 <DT><CODE><KBD>\M-</KBD></CODE>
9224 <DD>meta prefix
9225 <DT><CODE><KBD>\e</KBD></CODE>
9226 <DD>an escape character
9227 <DT><CODE><KBD>\\</KBD></CODE>
9228 <DD>backslash
9229 <DT><CODE><KBD>\"</KBD></CODE>
9230 <DD><KBD>"</KBD>, a double quotation mark
9231 <DT><CODE><KBD>\'</KBD></CODE>
9232 <DD><KBD>'</KBD>, a single quote or apostrophe
9233 </DL>
9234 <P>
9235
9236 In addition to the GNU Emacs style escape sequences, a second
9237 set of backslash escapes is available:
9238 </P><P>
9239
9240 <DL COMPACT>
9241 <DT><CODE>\a</CODE>
9242 <DD>alert (bell)
9243 <DT><CODE>\b</CODE>
9244 <DD>backspace
9245 <DT><CODE>\d</CODE>
9246 <DD>delete
9247 <DT><CODE>\f</CODE>
9248 <DD>form feed
9249 <DT><CODE>\n</CODE>
9250 <DD>newline
9251 <DT><CODE>\r</CODE>
9252 <DD>carriage return
9253 <DT><CODE>\t</CODE>
9254 <DD>horizontal tab
9255 <DT><CODE>\v</CODE>
9256 <DD>vertical tab
9257 <DT><CODE>\<VAR>nnn</VAR></CODE>
9258 <DD>the eight-bit character whose value is the octal value <VAR>nnn</VAR>
9259 (one to three digits)
9260 <DT><CODE>\x<VAR>HH</VAR></CODE>
9261 <DD>the eight-bit character whose value is the hexadecimal value <VAR>HH</VAR>
9262 (one or two hex digits)
9263 </DL>
9264 <P>
9265
9266 When entering the text of a macro, single or double quotes must
9267 be used to indicate a macro definition.
9268 Unquoted text is assumed to be a function name.
9269 In the macro body, the backslash escapes described above are expanded.
9270 Backslash will quote any other character in the macro text,
9271 including <SAMP>`"'</SAMP> and <SAMP>`''</SAMP>.
9272 For example, the following binding will make <SAMP>`<KBD>C-x</KBD> \'</SAMP>
9273 insert a single <SAMP>`\'</SAMP> into the line:
9274 <TABLE><tr><td>&nbsp;</td><td class=example><pre>"\C-x\\": "\\"
9275 </pre></td></tr></table></P><P>
9276
9277 </DL>
9278 <P>
9279
9280 <A NAME="Conditional Init Constructs"></A>
9281 <HR SIZE="6">
9282 <A NAME="SEC101"></A>
9283 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
9284 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC100"> &lt; </A>]</TD>
9285 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC102"> &gt; </A>]</TD>
9286 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC102"> &lt;&lt; </A>]</TD>
9287 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC99"> Up </A>]</TD>
9288 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC103"> &gt;&gt; </A>]</TD>
9289 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
9290 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
9291 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
9292 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
9293 </TR></TABLE>
9294 <H3> 8.3.2 Conditional Init Constructs </H3>
9295 <!--docid::SEC101::-->
9296 <P>
9297
9298 Readline implements a facility similar in spirit to the conditional
9299 compilation features of the C preprocessor which allows key
9300 bindings and variable settings to be performed as the result
9301 of tests. There are four parser directives used.
9302 </P><P>
9303
9304 <DL COMPACT>
9305 <DT><CODE>$if</CODE>
9306 <DD>The <CODE>$if</CODE> construct allows bindings to be made based on the
9307 editing mode, the terminal being used, or the application using
9308 Readline. The text of the test extends to the end of the line;
9309 no characters are required to isolate it.
9310 <P>
9311
9312 <DL COMPACT>
9313 <DT><CODE>mode</CODE>
9314 <DD>The <CODE>mode=</CODE> form of the <CODE>$if</CODE> directive is used to test
9315 whether Readline is in <CODE>emacs</CODE> or <CODE>vi</CODE> mode.
9316 This may be used in conjunction
9317 with the <SAMP>`set keymap'</SAMP> command, for instance, to set bindings in
9318 the <CODE>emacs-standard</CODE> and <CODE>emacs-ctlx</CODE> keymaps only if
9319 Readline is starting out in <CODE>emacs</CODE> mode.
9320 <P>
9321
9322 <DT><CODE>term</CODE>
9323 <DD>The <CODE>term=</CODE> form may be used to include terminal-specific
9324 key bindings, perhaps to bind the key sequences output by the
9325 terminal's function keys. The word on the right side of the
9326 <SAMP>`='</SAMP> is tested against both the full name of the terminal and
9327 the portion of the terminal name before the first <SAMP>`-'</SAMP>. This
9328 allows <CODE>sun</CODE> to match both <CODE>sun</CODE> and <CODE>sun-cmd</CODE>,
9329 for instance.
9330 <P>
9331
9332 <DT><CODE>application</CODE>
9333 <DD>The <VAR>application</VAR> construct is used to include
9334 application-specific settings. Each program using the Readline
9335 library sets the <VAR>application name</VAR>, and you can test for
9336 a particular value.
9337 This could be used to bind key sequences to functions useful for
9338 a specific program. For instance, the following command adds a
9339 key sequence that quotes the current or previous word in Bash:
9340 <TABLE><tr><td>&nbsp;</td><td class=example><pre>$if Bash
9341 # Quote the current or previous word
9342 "\C-xq": "\eb\"\ef\""
9343 $endif
9344 </pre></td></tr></table></DL>
9345 <P>
9346
9347 <DT><CODE>$endif</CODE>
9348 <DD>This command, as seen in the previous example, terminates an
9349 <CODE>$if</CODE> command.
9350 <P>
9351
9352 <DT><CODE>$else</CODE>
9353 <DD>Commands in this branch of the <CODE>$if</CODE> directive are executed if
9354 the test fails.
9355 <P>
9356
9357 <DT><CODE>$include</CODE>
9358 <DD>This directive takes a single filename as an argument and reads commands
9359 and bindings from that file.
9360 For example, the following directive reads from <TT>`/etc/inputrc'</TT>:
9361 <TABLE><tr><td>&nbsp;</td><td class=example><pre>$include /etc/inputrc
9362 </pre></td></tr></table></DL>
9363 <P>
9364
9365 <A NAME="Sample Init File"></A>
9366 <HR SIZE="6">
9367 <A NAME="SEC102"></A>
9368 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
9369 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC101"> &lt; </A>]</TD>
9370 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC103"> &gt; </A>]</TD>
9371 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC103"> &lt;&lt; </A>]</TD>
9372 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC99"> Up </A>]</TD>
9373 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC103"> &gt;&gt; </A>]</TD>
9374 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
9375 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
9376 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
9377 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
9378 </TR></TABLE>
9379 <H3> 8.3.3 Sample Init File </H3>
9380 <!--docid::SEC102::-->
9381 <P>
9382
9383 Here is an example of an <VAR>inputrc</VAR> file. This illustrates key
9384 binding, variable assignment, and conditional syntax.
9385 </P><P>
9386
9387 <TABLE><tr><td>&nbsp;</td><td class=example><pre># This file controls the behaviour of line input editing for
9388 # programs that use the GNU Readline library. Existing
9389 # programs include FTP, Bash, and GDB.
9390 #
9391 # You can re-read the inputrc file with C-x C-r.
9392 # Lines beginning with '#' are comments.
9393 #
9394 # First, include any systemwide bindings and variable
9395 # assignments from /etc/Inputrc
9396 $include /etc/Inputrc
9397
9398 #
9399 # Set various bindings for emacs mode.
9400
9401 set editing-mode emacs
9402
9403 $if mode=emacs
9404
9405 Meta-Control-h: backward-kill-word Text after the function name is ignored
9406
9407 #
9408 # Arrow keys in keypad mode
9409 #
9410 #"\M-OD": backward-char
9411 #"\M-OC": forward-char
9412 #"\M-OA": previous-history
9413 #"\M-OB": next-history
9414 #
9415 # Arrow keys in ANSI mode
9416 #
9417 "\M-[D": backward-char
9418 "\M-[C": forward-char
9419 "\M-[A": previous-history
9420 "\M-[B": next-history
9421 #
9422 # Arrow keys in 8 bit keypad mode
9423 #
9424 #"\M-\C-OD": backward-char
9425 #"\M-\C-OC": forward-char
9426 #"\M-\C-OA": previous-history
9427 #"\M-\C-OB": next-history
9428 #
9429 # Arrow keys in 8 bit ANSI mode
9430 #
9431 #"\M-\C-[D": backward-char
9432 #"\M-\C-[C": forward-char
9433 #"\M-\C-[A": previous-history
9434 #"\M-\C-[B": next-history
9435
9436 C-q: quoted-insert
9437
9438 $endif
9439
9440 # An old-style binding. This happens to be the default.
9441 TAB: complete
9442
9443 # Macros that are convenient for shell interaction
9444 $if Bash
9445 # edit the path
9446 "\C-xp": "PATH=${PATH}\e\C-e\C-a\ef\C-f"
9447 # prepare to type a quoted word --
9448 # insert open and close double quotes
9449 # and move to just after the open quote
9450 "\C-x\"": "\"\"\C-b"
9451 # insert a backslash (testing backslash escapes
9452 # in sequences and macros)
9453 "\C-x\\": "\\"
9454 # Quote the current or previous word
9455 "\C-xq": "\eb\"\ef\""
9456 # Add a binding to refresh the line, which is unbound
9457 "\C-xr": redraw-current-line
9458 # Edit variable on current line.
9459 "\M-\C-v": "\C-a\C-k$\C-y\M-\C-e\C-a\C-y="
9460 $endif
9461
9462 # use a visible bell if one is available
9463 set bell-style visible
9464
9465 # don't strip characters to 7 bits when reading
9466 set input-meta on
9467
9468 # allow iso-latin1 characters to be inserted rather
9469 # than converted to prefix-meta sequences
9470 set convert-meta off
9471
9472 # display characters with the eighth bit set directly
9473 # rather than as meta-prefixed characters
9474 set output-meta on
9475
9476 # if there are more than 150 possible completions for
9477 # a word, ask the user if he wants to see all of them
9478 set completion-query-items 150
9479
9480 # For FTP
9481 $if Ftp
9482 "\C-xg": "get \M-?"
9483 "\C-xt": "put \M-?"
9484 "\M-.": yank-last-arg
9485 $endif
9486 </pre></td></tr></table></P><P>
9487
9488 <A NAME="Bindable Readline Commands"></A>
9489 <HR SIZE="6">
9490 <A NAME="SEC103"></A>
9491 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
9492 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC102"> &lt; </A>]</TD>
9493 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC104"> &gt; </A>]</TD>
9494 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC112"> &lt;&lt; </A>]</TD>
9495 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC91"> Up </A>]</TD>
9496 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC112"> &gt;&gt; </A>]</TD>
9497 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
9498 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
9499 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
9500 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
9501 </TR></TABLE>
9502 <H2> 8.4 Bindable Readline Commands </H2>
9503 <!--docid::SEC103::-->
9504 <P>
9505
9506 <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
9507 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC104">8.4.1 Commands For Moving</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Moving about the line.</TD></TR>
9508 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC105">8.4.2 Commands For Manipulating The History</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Getting at previous lines.</TD></TR>
9509 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC106">8.4.3 Commands For Changing Text</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Commands for changing text.</TD></TR>
9510 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC107">8.4.4 Killing And Yanking</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Commands for killing and yanking.</TD></TR>
9511 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC108">8.4.5 Specifying Numeric Arguments</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Specifying numeric arguments, repeat counts.</TD></TR>
9512 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC109">8.4.6 Letting Readline Type For You</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Getting Readline to do the typing for you.</TD></TR>
9513 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC110">8.4.7 Keyboard Macros</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Saving and re-executing typed characters</TD></TR>
9514 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Other miscellaneous commands.</TD></TR>
9515 </TABLE></BLOCKQUOTE>
9516 <P>
9517
9518 This section describes Readline commands that may be bound to key
9519 sequences.
9520 You can list your key bindings by executing
9521 <CODE>bind -P</CODE> or, for a more terse format, suitable for an
9522 <VAR>inputrc</VAR> file, <CODE>bind -p</CODE>. (See section <A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A>.)
9523 Command names without an accompanying key sequence are unbound by default.
9524 </P><P>
9525
9526 In the following descriptions, <EM>point</EM> refers to the current cursor
9527 position, and <EM>mark</EM> refers to a cursor position saved by the
9528 <CODE>set-mark</CODE> command.
9529 The text between the point and mark is referred to as the <EM>region</EM>.
9530 </P><P>
9531
9532 <A NAME="Commands For Moving"></A>
9533 <HR SIZE="6">
9534 <A NAME="SEC104"></A>
9535 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
9536 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC103"> &lt; </A>]</TD>
9537 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC105"> &gt; </A>]</TD>
9538 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC112"> &lt;&lt; </A>]</TD>
9539 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC103"> Up </A>]</TD>
9540 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC112"> &gt;&gt; </A>]</TD>
9541 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
9542 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
9543 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
9544 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
9545 </TR></TABLE>
9546 <H3> 8.4.1 Commands For Moving </H3>
9547 <!--docid::SEC104::-->
9548 <DL COMPACT>
9549 <A NAME="IDX309"></A>
9550 <DT><CODE>beginning-of-line (C-a)</CODE>
9551 <DD><A NAME="IDX310"></A>
9552 Move to the start of the current line.
9553 <P>
9554
9555 <A NAME="IDX311"></A>
9556 <DT><CODE>end-of-line (C-e)</CODE>
9557 <DD><A NAME="IDX312"></A>
9558 Move to the end of the line.
9559 <P>
9560
9561 <A NAME="IDX313"></A>
9562 <DT><CODE>forward-char (C-f)</CODE>
9563 <DD><A NAME="IDX314"></A>
9564 Move forward a character.
9565 <P>
9566
9567 <A NAME="IDX315"></A>
9568 <DT><CODE>backward-char (C-b)</CODE>
9569 <DD><A NAME="IDX316"></A>
9570 Move back a character.
9571 <P>
9572
9573 <A NAME="IDX317"></A>
9574 <DT><CODE>forward-word (M-f)</CODE>
9575 <DD><A NAME="IDX318"></A>
9576 Move forward to the end of the next word. Words are composed of
9577 letters and digits.
9578 <P>
9579
9580 <A NAME="IDX319"></A>
9581 <DT><CODE>backward-word (M-b)</CODE>
9582 <DD><A NAME="IDX320"></A>
9583 Move back to the start of the current or previous word. Words are
9584 composed of letters and digits.
9585 <P>
9586
9587 <A NAME="IDX321"></A>
9588 <DT><CODE>clear-screen (C-l)</CODE>
9589 <DD><A NAME="IDX322"></A>
9590 Clear the screen and redraw the current line,
9591 leaving the current line at the top of the screen.
9592 <P>
9593
9594 <A NAME="IDX323"></A>
9595 <DT><CODE>redraw-current-line ()</CODE>
9596 <DD><A NAME="IDX324"></A>
9597 Refresh the current line. By default, this is unbound.
9598 <P>
9599
9600 </DL>
9601 <P>
9602
9603 <A NAME="Commands For History"></A>
9604 <HR SIZE="6">
9605 <A NAME="SEC105"></A>
9606 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
9607 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC104"> &lt; </A>]</TD>
9608 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC106"> &gt; </A>]</TD>
9609 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC106"> &lt;&lt; </A>]</TD>
9610 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC103"> Up </A>]</TD>
9611 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC112"> &gt;&gt; </A>]</TD>
9612 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
9613 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
9614 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
9615 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
9616 </TR></TABLE>
9617 <H3> 8.4.2 Commands For Manipulating The History </H3>
9618 <!--docid::SEC105::-->
9619 <P>
9620
9621 <DL COMPACT>
9622 <A NAME="IDX325"></A>
9623 <DT><CODE>accept-line (Newline or Return)</CODE>
9624 <DD><A NAME="IDX326"></A>
9625 Accept the line regardless of where the cursor is.
9626 If this line is
9627 non-empty, add it to the history list according to the setting of
9628 the <CODE>HISTCONTROL</CODE> and <CODE>HISTIGNORE</CODE> variables.
9629 If this line is a modified history line, then restore the history line
9630 to its original state.
9631 <P>
9632
9633 <A NAME="IDX327"></A>
9634 <DT><CODE>previous-history (C-p)</CODE>
9635 <DD><A NAME="IDX328"></A>
9636 Move `back' through the history list, fetching the previous command.
9637 <P>
9638
9639 <A NAME="IDX329"></A>
9640 <DT><CODE>next-history (C-n)</CODE>
9641 <DD><A NAME="IDX330"></A>
9642 Move `forward' through the history list, fetching the next command.
9643 <P>
9644
9645 <A NAME="IDX331"></A>
9646 <DT><CODE>beginning-of-history (M-&#60;)</CODE>
9647 <DD><A NAME="IDX332"></A>
9648 Move to the first line in the history.
9649 <P>
9650
9651 <A NAME="IDX333"></A>
9652 <DT><CODE>end-of-history (M-&#62;)</CODE>
9653 <DD><A NAME="IDX334"></A>
9654 Move to the end of the input history, i.e., the line currently
9655 being entered.
9656 <P>
9657
9658 <A NAME="IDX335"></A>
9659 <DT><CODE>reverse-search-history (C-r)</CODE>
9660 <DD><A NAME="IDX336"></A>
9661 Search backward starting at the current line and moving `up' through
9662 the history as necessary. This is an incremental search.
9663 <P>
9664
9665 <A NAME="IDX337"></A>
9666 <DT><CODE>forward-search-history (C-s)</CODE>
9667 <DD><A NAME="IDX338"></A>
9668 Search forward starting at the current line and moving `down' through
9669 the the history as necessary. This is an incremental search.
9670 <P>
9671
9672 <A NAME="IDX339"></A>
9673 <DT><CODE>non-incremental-reverse-search-history (M-p)</CODE>
9674 <DD><A NAME="IDX340"></A>
9675 Search backward starting at the current line and moving `up'
9676 through the history as necessary using a non-incremental search
9677 for a string supplied by the user.
9678 <P>
9679
9680 <A NAME="IDX341"></A>
9681 <DT><CODE>non-incremental-forward-search-history (M-n)</CODE>
9682 <DD><A NAME="IDX342"></A>
9683 Search forward starting at the current line and moving `down'
9684 through the the history as necessary using a non-incremental search
9685 for a string supplied by the user.
9686 <P>
9687
9688 <A NAME="IDX343"></A>
9689 <DT><CODE>history-search-forward ()</CODE>
9690 <DD><A NAME="IDX344"></A>
9691 Search forward through the history for the string of characters
9692 between the start of the current line and the point.
9693 This is a non-incremental search.
9694 By default, this command is unbound.
9695 <P>
9696
9697 <A NAME="IDX345"></A>
9698 <DT><CODE>history-search-backward ()</CODE>
9699 <DD><A NAME="IDX346"></A>
9700 Search backward through the history for the string of characters
9701 between the start of the current line and the point. This
9702 is a non-incremental search. By default, this command is unbound.
9703 <P>
9704
9705 <A NAME="IDX347"></A>
9706 <DT><CODE>yank-nth-arg (M-C-y)</CODE>
9707 <DD><A NAME="IDX348"></A>
9708 Insert the first argument to the previous command (usually
9709 the second word on the previous line) at point.
9710 With an argument <VAR>n</VAR>,
9711 insert the <VAR>n</VAR>th word from the previous command (the words
9712 in the previous command begin with word 0). A negative argument
9713 inserts the <VAR>n</VAR>th word from the end of the previous command.
9714 <P>
9715
9716 <A NAME="IDX349"></A>
9717 <DT><CODE>yank-last-arg (M-. or M-_)</CODE>
9718 <DD><A NAME="IDX350"></A>
9719 Insert last argument to the previous command (the last word of the
9720 previous history entry). With an
9721 argument, behave exactly like <CODE>yank-nth-arg</CODE>.
9722 Successive calls to <CODE>yank-last-arg</CODE> move back through the history
9723 list, inserting the last argument of each line in turn.
9724 <P>
9725
9726 </DL>
9727 <P>
9728
9729 <A NAME="Commands For Text"></A>
9730 <HR SIZE="6">
9731 <A NAME="SEC106"></A>
9732 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
9733 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC105"> &lt; </A>]</TD>
9734 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC107"> &gt; </A>]</TD>
9735 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC107"> &lt;&lt; </A>]</TD>
9736 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC103"> Up </A>]</TD>
9737 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC112"> &gt;&gt; </A>]</TD>
9738 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
9739 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
9740 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
9741 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
9742 </TR></TABLE>
9743 <H3> 8.4.3 Commands For Changing Text </H3>
9744 <!--docid::SEC106::-->
9745 <P>
9746
9747 <DL COMPACT>
9748 <A NAME="IDX351"></A>
9749 <DT><CODE>delete-char (C-d)</CODE>
9750 <DD><A NAME="IDX352"></A>
9751 Delete the character at point. If point is at the
9752 beginning of the line, there are no characters in the line, and
9753 the last character typed was not bound to <CODE>delete-char</CODE>, then
9754 return EOF.
9755 <P>
9756
9757 <A NAME="IDX353"></A>
9758 <DT><CODE>backward-delete-char (Rubout)</CODE>
9759 <DD><A NAME="IDX354"></A>
9760 Delete the character behind the cursor. A numeric argument means
9761 to kill the characters instead of deleting them.
9762 <P>
9763
9764 <A NAME="IDX355"></A>
9765 <DT><CODE>forward-backward-delete-char ()</CODE>
9766 <DD><A NAME="IDX356"></A>
9767 Delete the character under the cursor, unless the cursor is at the
9768 end of the line, in which case the character behind the cursor is
9769 deleted. By default, this is not bound to a key.
9770 <P>
9771
9772 <A NAME="IDX357"></A>
9773 <DT><CODE>quoted-insert (C-q or C-v)</CODE>
9774 <DD><A NAME="IDX358"></A>
9775 Add the next character typed to the line verbatim. This is
9776 how to insert key sequences like <KBD>C-q</KBD>, for example.
9777 <P>
9778
9779 <A NAME="IDX359"></A>
9780 <DT><CODE>self-insert (a, b, A, 1, !, <small>...</small>)</CODE>
9781 <DD><A NAME="IDX360"></A>
9782 Insert yourself.
9783 <P>
9784
9785 <A NAME="IDX361"></A>
9786 <DT><CODE>transpose-chars (C-t)</CODE>
9787 <DD><A NAME="IDX362"></A>
9788 Drag the character before the cursor forward over
9789 the character at the cursor, moving the
9790 cursor forward as well. If the insertion point
9791 is at the end of the line, then this
9792 transposes the last two characters of the line.
9793 Negative arguments have no effect.
9794 <P>
9795
9796 <A NAME="IDX363"></A>
9797 <DT><CODE>transpose-words (M-t)</CODE>
9798 <DD><A NAME="IDX364"></A>
9799 Drag the word before point past the word after point,
9800 moving point past that word as well.
9801 If the insertion point is at the end of the line, this transposes
9802 the last two words on the line.
9803 <P>
9804
9805 <A NAME="IDX365"></A>
9806 <DT><CODE>upcase-word (M-u)</CODE>
9807 <DD><A NAME="IDX366"></A>
9808 Uppercase the current (or following) word. With a negative argument,
9809 uppercase the previous word, but do not move the cursor.
9810 <P>
9811
9812 <A NAME="IDX367"></A>
9813 <DT><CODE>downcase-word (M-l)</CODE>
9814 <DD><A NAME="IDX368"></A>
9815 Lowercase the current (or following) word. With a negative argument,
9816 lowercase the previous word, but do not move the cursor.
9817 <P>
9818
9819 <A NAME="IDX369"></A>
9820 <DT><CODE>capitalize-word (M-c)</CODE>
9821 <DD><A NAME="IDX370"></A>
9822 Capitalize the current (or following) word. With a negative argument,
9823 capitalize the previous word, but do not move the cursor.
9824 <P>
9825
9826 <A NAME="IDX371"></A>
9827 <DT><CODE>overwrite-mode ()</CODE>
9828 <DD><A NAME="IDX372"></A>
9829 Toggle overwrite mode. With an explicit positive numeric argument,
9830 switches to overwrite mode. With an explicit non-positive numeric
9831 argument, switches to insert mode. This command affects only
9832 <CODE>emacs</CODE> mode; <CODE>vi</CODE> mode does overwrite differently.
9833 Each call to <CODE>readline()</CODE> starts in insert mode.
9834 <P>
9835
9836 In overwrite mode, characters bound to <CODE>self-insert</CODE> replace
9837 the text at point rather than pushing the text to the right.
9838 Characters bound to <CODE>backward-delete-char</CODE> replace the character
9839 before point with a space.
9840 </P><P>
9841
9842 By default, this command is unbound.
9843 </P><P>
9844
9845 </DL>
9846 <P>
9847
9848 <A NAME="Commands For Killing"></A>
9849 <HR SIZE="6">
9850 <A NAME="SEC107"></A>
9851 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
9852 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC106"> &lt; </A>]</TD>
9853 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC108"> &gt; </A>]</TD>
9854 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC108"> &lt;&lt; </A>]</TD>
9855 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC103"> Up </A>]</TD>
9856 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC112"> &gt;&gt; </A>]</TD>
9857 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
9858 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
9859 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
9860 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
9861 </TR></TABLE>
9862 <H3> 8.4.4 Killing And Yanking </H3>
9863 <!--docid::SEC107::-->
9864 <P>
9865
9866 <DL COMPACT>
9867
9868 <A NAME="IDX373"></A>
9869 <DT><CODE>kill-line (C-k)</CODE>
9870 <DD><A NAME="IDX374"></A>
9871 Kill the text from point to the end of the line.
9872 <P>
9873
9874 <A NAME="IDX375"></A>
9875 <DT><CODE>backward-kill-line (C-x Rubout)</CODE>
9876 <DD><A NAME="IDX376"></A>
9877 Kill backward to the beginning of the line.
9878 <P>
9879
9880 <A NAME="IDX377"></A>
9881 <DT><CODE>unix-line-discard (C-u)</CODE>
9882 <DD><A NAME="IDX378"></A>
9883 Kill backward from the cursor to the beginning of the current line.
9884 <P>
9885
9886 <A NAME="IDX379"></A>
9887 <DT><CODE>kill-whole-line ()</CODE>
9888 <DD><A NAME="IDX380"></A>
9889 Kill all characters on the current line, no matter where point is.
9890 By default, this is unbound.
9891 <P>
9892
9893 <A NAME="IDX381"></A>
9894 <DT><CODE>kill-word (M-d)</CODE>
9895 <DD><A NAME="IDX382"></A>
9896 Kill from point to the end of the current word, or if between
9897 words, to the end of the next word.
9898 Word boundaries are the same as <CODE>forward-word</CODE>.
9899 <P>
9900
9901 <A NAME="IDX383"></A>
9902 <DT><CODE>backward-kill-word (M-<KBD>DEL</KBD>)</CODE>
9903 <DD><A NAME="IDX384"></A>
9904 Kill the word behind point.
9905 Word boundaries are the same as <CODE>backward-word</CODE>.
9906 <P>
9907
9908 <A NAME="IDX385"></A>
9909 <DT><CODE>unix-word-rubout (C-w)</CODE>
9910 <DD><A NAME="IDX386"></A>
9911 Kill the word behind point, using white space as a word boundary.
9912 The killed text is saved on the kill-ring.
9913 <P>
9914
9915 <A NAME="IDX387"></A>
9916 <DT><CODE>unix-filename-rubout ()</CODE>
9917 <DD><A NAME="IDX388"></A>
9918 Kill the word behind point, using white space and the slash character
9919 as the word boundaries.
9920 The killed text is saved on the kill-ring.
9921 <P>
9922
9923 <A NAME="IDX389"></A>
9924 <DT><CODE>delete-horizontal-space ()</CODE>
9925 <DD><A NAME="IDX390"></A>
9926 Delete all spaces and tabs around point. By default, this is unbound.
9927 <P>
9928
9929 <A NAME="IDX391"></A>
9930 <DT><CODE>kill-region ()</CODE>
9931 <DD><A NAME="IDX392"></A>
9932 Kill the text in the current region.
9933 By default, this command is unbound.
9934 <P>
9935
9936 <A NAME="IDX393"></A>
9937 <DT><CODE>copy-region-as-kill ()</CODE>
9938 <DD><A NAME="IDX394"></A>
9939 Copy the text in the region to the kill buffer, so it can be yanked
9940 right away. By default, this command is unbound.
9941 <P>
9942
9943 <A NAME="IDX395"></A>
9944 <DT><CODE>copy-backward-word ()</CODE>
9945 <DD><A NAME="IDX396"></A>
9946 Copy the word before point to the kill buffer.
9947 The word boundaries are the same as <CODE>backward-word</CODE>.
9948 By default, this command is unbound.
9949 <P>
9950
9951 <A NAME="IDX397"></A>
9952 <DT><CODE>copy-forward-word ()</CODE>
9953 <DD><A NAME="IDX398"></A>
9954 Copy the word following point to the kill buffer.
9955 The word boundaries are the same as <CODE>forward-word</CODE>.
9956 By default, this command is unbound.
9957 <P>
9958
9959 <A NAME="IDX399"></A>
9960 <DT><CODE>yank (C-y)</CODE>
9961 <DD><A NAME="IDX400"></A>
9962 Yank the top of the kill ring into the buffer at point.
9963 <P>
9964
9965 <A NAME="IDX401"></A>
9966 <DT><CODE>yank-pop (M-y)</CODE>
9967 <DD><A NAME="IDX402"></A>
9968 Rotate the kill-ring, and yank the new top. You can only do this if
9969 the prior command is <CODE>yank</CODE> or <CODE>yank-pop</CODE>.
9970 </DL>
9971 <P>
9972
9973 <A NAME="Numeric Arguments"></A>
9974 <HR SIZE="6">
9975 <A NAME="SEC108"></A>
9976 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
9977 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC107"> &lt; </A>]</TD>
9978 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC109"> &gt; </A>]</TD>
9979 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC109"> &lt;&lt; </A>]</TD>
9980 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC103"> Up </A>]</TD>
9981 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC112"> &gt;&gt; </A>]</TD>
9982 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
9983 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
9984 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
9985 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
9986 </TR></TABLE>
9987 <H3> 8.4.5 Specifying Numeric Arguments </H3>
9988 <!--docid::SEC108::-->
9989 <DL COMPACT>
9990
9991 <A NAME="IDX403"></A>
9992 <DT><CODE>digit-argument (<KBD>M-0</KBD>, <KBD>M-1</KBD>, <small>...</small> <KBD>M--</KBD>)</CODE>
9993 <DD><A NAME="IDX404"></A>
9994 Add this digit to the argument already accumulating, or start a new
9995 argument. <KBD>M--</KBD> starts a negative argument.
9996 <P>
9997
9998 <A NAME="IDX405"></A>
9999 <DT><CODE>universal-argument ()</CODE>
10000 <DD><A NAME="IDX406"></A>
10001 This is another way to specify an argument.
10002 If this command is followed by one or more digits, optionally with a
10003 leading minus sign, those digits define the argument.
10004 If the command is followed by digits, executing <CODE>universal-argument</CODE>
10005 again ends the numeric argument, but is otherwise ignored.
10006 As a special case, if this command is immediately followed by a
10007 character that is neither a digit or minus sign, the argument count
10008 for the next command is multiplied by four.
10009 The argument count is initially one, so executing this function the
10010 first time makes the argument count four, a second time makes the
10011 argument count sixteen, and so on.
10012 By default, this is not bound to a key.
10013 </DL>
10014 <P>
10015
10016 <A NAME="Commands For Completion"></A>
10017 <HR SIZE="6">
10018 <A NAME="SEC109"></A>
10019 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
10020 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC108"> &lt; </A>]</TD>
10021 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC110"> &gt; </A>]</TD>
10022 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC110"> &lt;&lt; </A>]</TD>
10023 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC103"> Up </A>]</TD>
10024 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC112"> &gt;&gt; </A>]</TD>
10025 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
10026 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
10027 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
10028 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
10029 </TR></TABLE>
10030 <H3> 8.4.6 Letting Readline Type For You </H3>
10031 <!--docid::SEC109::-->
10032 <P>
10033
10034 <DL COMPACT>
10035 <A NAME="IDX407"></A>
10036 <DT><CODE>complete (<KBD>TAB</KBD>)</CODE>
10037 <DD><A NAME="IDX408"></A>
10038 Attempt to perform completion on the text before point.
10039 The actual completion performed is application-specific.
10040 Bash attempts completion treating the text as a variable (if the
10041 text begins with <SAMP>`$'</SAMP>), username (if the text begins with
10042 <SAMP>`~'</SAMP>), hostname (if the text begins with <SAMP>`@'</SAMP>), or
10043 command (including aliases and functions) in turn. If none
10044 of these produces a match, filename completion is attempted.
10045 <P>
10046
10047 <A NAME="IDX409"></A>
10048 <DT><CODE>possible-completions (M-?)</CODE>
10049 <DD><A NAME="IDX410"></A>
10050 List the possible completions of the text before point.
10051 <P>
10052
10053 <A NAME="IDX411"></A>
10054 <DT><CODE>insert-completions (M-*)</CODE>
10055 <DD><A NAME="IDX412"></A>
10056 Insert all completions of the text before point that would have
10057 been generated by <CODE>possible-completions</CODE>.
10058 <P>
10059
10060 <A NAME="IDX413"></A>
10061 <DT><CODE>menu-complete ()</CODE>
10062 <DD><A NAME="IDX414"></A>
10063 Similar to <CODE>complete</CODE>, but replaces the word to be completed
10064 with a single match from the list of possible completions.
10065 Repeated execution of <CODE>menu-complete</CODE> steps through the list
10066 of possible completions, inserting each match in turn.
10067 At the end of the list of completions, the bell is rung
10068 (subject to the setting of <CODE>bell-style</CODE>)
10069 and the original text is restored.
10070 An argument of <VAR>n</VAR> moves <VAR>n</VAR> positions forward in the list
10071 of matches; a negative argument may be used to move backward
10072 through the list.
10073 This command is intended to be bound to <KBD>TAB</KBD>, but is unbound
10074 by default.
10075 <P>
10076
10077 <A NAME="IDX415"></A>
10078 <DT><CODE>delete-char-or-list ()</CODE>
10079 <DD><A NAME="IDX416"></A>
10080 Deletes the character under the cursor if not at the beginning or
10081 end of the line (like <CODE>delete-char</CODE>).
10082 If at the end of the line, behaves identically to
10083 <CODE>possible-completions</CODE>.
10084 This command is unbound by default.
10085 <P>
10086
10087 <A NAME="IDX417"></A>
10088 <DT><CODE>complete-filename (M-/)</CODE>
10089 <DD><A NAME="IDX418"></A>
10090 Attempt filename completion on the text before point.
10091 <P>
10092
10093 <A NAME="IDX419"></A>
10094 <DT><CODE>possible-filename-completions (C-x /)</CODE>
10095 <DD><A NAME="IDX420"></A>
10096 List the possible completions of the text before point,
10097 treating it as a filename.
10098 <P>
10099
10100 <A NAME="IDX421"></A>
10101 <DT><CODE>complete-username (M-~)</CODE>
10102 <DD><A NAME="IDX422"></A>
10103 Attempt completion on the text before point, treating
10104 it as a username.
10105 <P>
10106
10107 <A NAME="IDX423"></A>
10108 <DT><CODE>possible-username-completions (C-x ~)</CODE>
10109 <DD><A NAME="IDX424"></A>
10110 List the possible completions of the text before point,
10111 treating it as a username.
10112 <P>
10113
10114 <A NAME="IDX425"></A>
10115 <DT><CODE>complete-variable (M-$)</CODE>
10116 <DD><A NAME="IDX426"></A>
10117 Attempt completion on the text before point, treating
10118 it as a shell variable.
10119 <P>
10120
10121 <A NAME="IDX427"></A>
10122 <DT><CODE>possible-variable-completions (C-x $)</CODE>
10123 <DD><A NAME="IDX428"></A>
10124 List the possible completions of the text before point,
10125 treating it as a shell variable.
10126 <P>
10127
10128 <A NAME="IDX429"></A>
10129 <DT><CODE>complete-hostname (M-@)</CODE>
10130 <DD><A NAME="IDX430"></A>
10131 Attempt completion on the text before point, treating
10132 it as a hostname.
10133 <P>
10134
10135 <A NAME="IDX431"></A>
10136 <DT><CODE>possible-hostname-completions (C-x @)</CODE>
10137 <DD><A NAME="IDX432"></A>
10138 List the possible completions of the text before point,
10139 treating it as a hostname.
10140 <P>
10141
10142 <A NAME="IDX433"></A>
10143 <DT><CODE>complete-command (M-!)</CODE>
10144 <DD><A NAME="IDX434"></A>
10145 Attempt completion on the text before point, treating
10146 it as a command name. Command completion attempts to
10147 match the text against aliases, reserved words, shell
10148 functions, shell builtins, and finally executable filenames,
10149 in that order.
10150 <P>
10151
10152 <A NAME="IDX435"></A>
10153 <DT><CODE>possible-command-completions (C-x !)</CODE>
10154 <DD><A NAME="IDX436"></A>
10155 List the possible completions of the text before point,
10156 treating it as a command name.
10157 <P>
10158
10159 <A NAME="IDX437"></A>
10160 <DT><CODE>dynamic-complete-history (M-<KBD>TAB</KBD>)</CODE>
10161 <DD><A NAME="IDX438"></A>
10162 Attempt completion on the text before point, comparing
10163 the text against lines from the history list for possible
10164 completion matches.
10165 <P>
10166
10167 <A NAME="IDX439"></A>
10168 <DT><CODE>complete-into-braces (M-{)</CODE>
10169 <DD><A NAME="IDX440"></A>
10170 Perform filename completion and insert the list of possible completions
10171 enclosed within braces so the list is available to the shell
10172 (see section <A HREF="bashref.html#SEC28">3.5.1 Brace Expansion</A>).
10173 <P>
10174
10175 </DL>
10176 <P>
10177
10178 <A NAME="Keyboard Macros"></A>
10179 <HR SIZE="6">
10180 <A NAME="SEC110"></A>
10181 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
10182 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC109"> &lt; </A>]</TD>
10183 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC111"> &gt; </A>]</TD>
10184 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC111"> &lt;&lt; </A>]</TD>
10185 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC103"> Up </A>]</TD>
10186 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC112"> &gt;&gt; </A>]</TD>
10187 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
10188 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
10189 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
10190 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
10191 </TR></TABLE>
10192 <H3> 8.4.7 Keyboard Macros </H3>
10193 <!--docid::SEC110::-->
10194 <DL COMPACT>
10195
10196 <A NAME="IDX441"></A>
10197 <DT><CODE>start-kbd-macro (C-x ()</CODE>
10198 <DD><A NAME="IDX442"></A>
10199 Begin saving the characters typed into the current keyboard macro.
10200 <P>
10201
10202 <A NAME="IDX443"></A>
10203 <DT><CODE>end-kbd-macro (C-x ))</CODE>
10204 <DD><A NAME="IDX444"></A>
10205 Stop saving the characters typed into the current keyboard macro
10206 and save the definition.
10207 <P>
10208
10209 <A NAME="IDX445"></A>
10210 <DT><CODE>call-last-kbd-macro (C-x e)</CODE>
10211 <DD><A NAME="IDX446"></A>
10212 Re-execute the last keyboard macro defined, by making the characters
10213 in the macro appear as if typed at the keyboard.
10214 <P>
10215
10216 </DL>
10217 <P>
10218
10219 <A NAME="Miscellaneous Commands"></A>
10220 <HR SIZE="6">
10221 <A NAME="SEC111"></A>
10222 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
10223 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC110"> &lt; </A>]</TD>
10224 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC112"> &gt; </A>]</TD>
10225 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC112"> &lt;&lt; </A>]</TD>
10226 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC103"> Up </A>]</TD>
10227 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC112"> &gt;&gt; </A>]</TD>
10228 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
10229 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
10230 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
10231 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
10232 </TR></TABLE>
10233 <H3> 8.4.8 Some Miscellaneous Commands </H3>
10234 <!--docid::SEC111::-->
10235 <DL COMPACT>
10236
10237 <A NAME="IDX447"></A>
10238 <DT><CODE>re-read-init-file (C-x C-r)</CODE>
10239 <DD><A NAME="IDX448"></A>
10240 Read in the contents of the <VAR>inputrc</VAR> file, and incorporate
10241 any bindings or variable assignments found there.
10242 <P>
10243
10244 <A NAME="IDX449"></A>
10245 <DT><CODE>abort (C-g)</CODE>
10246 <DD><A NAME="IDX450"></A>
10247 Abort the current editing command and
10248 ring the terminal's bell (subject to the setting of
10249 <CODE>bell-style</CODE>).
10250 <P>
10251
10252 <A NAME="IDX451"></A>
10253 <DT><CODE>do-uppercase-version (M-a, M-b, M-<VAR>x</VAR>, <small>...</small>)</CODE>
10254 <DD><A NAME="IDX452"></A>
10255 If the metafied character <VAR>x</VAR> is lowercase, run the command
10256 that is bound to the corresponding uppercase character.
10257 <P>
10258
10259 <A NAME="IDX453"></A>
10260 <DT><CODE>prefix-meta (<KBD>ESC</KBD>)</CODE>
10261 <DD><A NAME="IDX454"></A>
10262 Metafy the next character typed. This is for keyboards
10263 without a meta key. Typing <SAMP>`<KBD>ESC</KBD> f'</SAMP> is equivalent to typing
10264 <KBD>M-f</KBD>.
10265 <P>
10266
10267 <A NAME="IDX455"></A>
10268 <DT><CODE>undo (C-_ or C-x C-u)</CODE>
10269 <DD><A NAME="IDX456"></A>
10270 Incremental undo, separately remembered for each line.
10271 <P>
10272
10273 <A NAME="IDX457"></A>
10274 <DT><CODE>revert-line (M-r)</CODE>
10275 <DD><A NAME="IDX458"></A>
10276 Undo all changes made to this line. This is like executing the <CODE>undo</CODE>
10277 command enough times to get back to the beginning.
10278 <P>
10279
10280 <A NAME="IDX459"></A>
10281 <DT><CODE>tilde-expand (M-&#38;)</CODE>
10282 <DD><A NAME="IDX460"></A>
10283 Perform tilde expansion on the current word.
10284 <P>
10285
10286 <A NAME="IDX461"></A>
10287 <DT><CODE>set-mark (C-@)</CODE>
10288 <DD><A NAME="IDX462"></A>
10289 Set the mark to the point. If a
10290 numeric argument is supplied, the mark is set to that position.
10291 <P>
10292
10293 <A NAME="IDX463"></A>
10294 <DT><CODE>exchange-point-and-mark (C-x C-x)</CODE>
10295 <DD><A NAME="IDX464"></A>
10296 Swap the point with the mark. The current cursor position is set to
10297 the saved position, and the old cursor position is saved as the mark.
10298 <P>
10299
10300 <A NAME="IDX465"></A>
10301 <DT><CODE>character-search (C-])</CODE>
10302 <DD><A NAME="IDX466"></A>
10303 A character is read and point is moved to the next occurrence of that
10304 character. A negative count searches for previous occurrences.
10305 <P>
10306
10307 <A NAME="IDX467"></A>
10308 <DT><CODE>character-search-backward (M-C-])</CODE>
10309 <DD><A NAME="IDX468"></A>
10310 A character is read and point is moved to the previous occurrence
10311 of that character. A negative count searches for subsequent
10312 occurrences.
10313 <P>
10314
10315 <A NAME="IDX469"></A>
10316 <DT><CODE>insert-comment (M-#)</CODE>
10317 <DD><A NAME="IDX470"></A>
10318 Without a numeric argument, the value of the <CODE>comment-begin</CODE>
10319 variable is inserted at the beginning of the current line.
10320 If a numeric argument is supplied, this command acts as a toggle: if
10321 the characters at the beginning of the line do not match the value
10322 of <CODE>comment-begin</CODE>, the value is inserted, otherwise
10323 the characters in <CODE>comment-begin</CODE> are deleted from the beginning of
10324 the line.
10325 In either case, the line is accepted as if a newline had been typed.
10326 The default value of <CODE>comment-begin</CODE> causes this command
10327 to make the current line a shell comment.
10328 If a numeric argument causes the comment character to be removed, the line
10329 will be executed by the shell.
10330 <P>
10331
10332 <A NAME="IDX471"></A>
10333 <DT><CODE>dump-functions ()</CODE>
10334 <DD><A NAME="IDX472"></A>
10335 Print all of the functions and their key bindings to the
10336 Readline output stream. If a numeric argument is supplied,
10337 the output is formatted in such a way that it can be made part
10338 of an <VAR>inputrc</VAR> file. This command is unbound by default.
10339 <P>
10340
10341 <A NAME="IDX473"></A>
10342 <DT><CODE>dump-variables ()</CODE>
10343 <DD><A NAME="IDX474"></A>
10344 Print all of the settable variables and their values to the
10345 Readline output stream. If a numeric argument is supplied,
10346 the output is formatted in such a way that it can be made part
10347 of an <VAR>inputrc</VAR> file. This command is unbound by default.
10348 <P>
10349
10350 <A NAME="IDX475"></A>
10351 <DT><CODE>dump-macros ()</CODE>
10352 <DD><A NAME="IDX476"></A>
10353 Print all of the Readline key sequences bound to macros and the
10354 strings they output. If a numeric argument is supplied,
10355 the output is formatted in such a way that it can be made part
10356 of an <VAR>inputrc</VAR> file. This command is unbound by default.
10357 <P>
10358
10359 <A NAME="IDX477"></A>
10360 <DT><CODE>glob-complete-word (M-g)</CODE>
10361 <DD><A NAME="IDX478"></A>
10362 The word before point is treated as a pattern for pathname expansion,
10363 with an asterisk implicitly appended. This pattern is used to
10364 generate a list of matching file names for possible completions.
10365 <P>
10366
10367 <A NAME="IDX479"></A>
10368 <DT><CODE>glob-expand-word (C-x *)</CODE>
10369 <DD><A NAME="IDX480"></A>
10370 The word before point is treated as a pattern for pathname expansion,
10371 and the list of matching file names is inserted, replacing the word.
10372 If a numeric argument is supplied, a <SAMP>`*'</SAMP> is appended before
10373 pathname expansion.
10374 <P>
10375
10376 <A NAME="IDX481"></A>
10377 <DT><CODE>glob-list-expansions (C-x g)</CODE>
10378 <DD><A NAME="IDX482"></A>
10379 The list of expansions that would have been generated by
10380 <CODE>glob-expand-word</CODE> is displayed, and the line is redrawn.
10381 If a numeric argument is supplied, a <SAMP>`*'</SAMP> is appended before
10382 pathname expansion.
10383 <P>
10384
10385 <A NAME="IDX483"></A>
10386 <DT><CODE>display-shell-version (C-x C-v)</CODE>
10387 <DD><A NAME="IDX484"></A>
10388 Display version information about the current instance of Bash.
10389 <P>
10390
10391 <A NAME="IDX485"></A>
10392 <DT><CODE>shell-expand-line (M-C-e)</CODE>
10393 <DD><A NAME="IDX486"></A>
10394 Expand the line as the shell does.
10395 This performs alias and history expansion as well as all of the shell
10396 word expansions (see section <A HREF="bashref.html#SEC27">3.5 Shell Expansions</A>).
10397 <P>
10398
10399 <A NAME="IDX487"></A>
10400 <DT><CODE>history-expand-line (M-^)</CODE>
10401 <DD><A NAME="IDX488"></A>
10402 Perform history expansion on the current line.
10403 <P>
10404
10405 <A NAME="IDX489"></A>
10406 <DT><CODE>magic-space ()</CODE>
10407 <DD><A NAME="IDX490"></A>
10408 Perform history expansion on the current line and insert a space
10409 (see section <A HREF="bashref.html#SEC118">9.3 History Expansion</A>).
10410 <P>
10411
10412 <A NAME="IDX491"></A>
10413 <DT><CODE>alias-expand-line ()</CODE>
10414 <DD><A NAME="IDX492"></A>
10415 Perform alias expansion on the current line (see section <A HREF="bashref.html#SEC80">6.6 Aliases</A>).
10416 <P>
10417
10418 <A NAME="IDX493"></A>
10419 <DT><CODE>history-and-alias-expand-line ()</CODE>
10420 <DD><A NAME="IDX494"></A>
10421 Perform history and alias expansion on the current line.
10422 <P>
10423
10424 <A NAME="IDX495"></A>
10425 <DT><CODE>insert-last-argument (M-. or M-_)</CODE>
10426 <DD><A NAME="IDX496"></A>
10427 A synonym for <CODE>yank-last-arg</CODE>.
10428 <P>
10429
10430 <A NAME="IDX497"></A>
10431 <DT><CODE>operate-and-get-next (C-o)</CODE>
10432 <DD><A NAME="IDX498"></A>
10433 Accept the current line for execution and fetch the next line
10434 relative to the current line from the history for editing. Any
10435 argument is ignored.
10436 <P>
10437
10438 <A NAME="IDX499"></A>
10439 <DT><CODE>edit-and-execute-command (C-xC-e)</CODE>
10440 <DD><A NAME="IDX500"></A>
10441 Invoke an editor on the current command line, and execute the result as shell
10442 commands.
10443 Bash attempts to invoke
10444 <CODE>$VISUAL</CODE>, <CODE>$EDITOR</CODE>, and <CODE>emacs</CODE>
10445 as the editor, in that order.
10446 <P>
10447
10448 </DL>
10449 <P>
10450
10451 <A NAME="Readline vi Mode"></A>
10452 <HR SIZE="6">
10453 <A NAME="SEC112"></A>
10454 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
10455 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC111"> &lt; </A>]</TD>
10456 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC113"> &gt; </A>]</TD>
10457 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC113"> &lt;&lt; </A>]</TD>
10458 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC91"> Up </A>]</TD>
10459 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC115"> &gt;&gt; </A>]</TD>
10460 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
10461 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
10462 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
10463 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
10464 </TR></TABLE>
10465 <H2> 8.5 Readline vi Mode </H2>
10466 <!--docid::SEC112::-->
10467 <P>
10468
10469 While the Readline library does not have a full set of <CODE>vi</CODE>
10470 editing functions, it does contain enough to allow simple editing
10471 of the line. The Readline <CODE>vi</CODE> mode behaves as specified in
10472 the POSIX 1003.2 standard.
10473 </P><P>
10474
10475 In order to switch interactively between <CODE>emacs</CODE> and <CODE>vi</CODE>
10476 editing modes, use the <SAMP>`set -o emacs'</SAMP> and <SAMP>`set -o vi'</SAMP>
10477 commands (see section <A HREF="bashref.html#SEC59">4.3 The Set Builtin</A>).
10478 The Readline default is <CODE>emacs</CODE> mode.
10479 </P><P>
10480
10481 When you enter a line in <CODE>vi</CODE> mode, you are already placed in
10482 `insertion' mode, as if you had typed an <SAMP>`i'</SAMP>. Pressing <KBD>ESC</KBD>
10483 switches you into `command' mode, where you can edit the text of the
10484 line with the standard <CODE>vi</CODE> movement keys, move to previous
10485 history lines with <SAMP>`k'</SAMP> and subsequent lines with <SAMP>`j'</SAMP>, and
10486 so forth.
10487 </P><P>
10488
10489 <A NAME="Programmable Completion"></A>
10490 <HR SIZE="6">
10491 <A NAME="SEC113"></A>
10492 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
10493 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC112"> &lt; </A>]</TD>
10494 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC114"> &gt; </A>]</TD>
10495 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC114"> &lt;&lt; </A>]</TD>
10496 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC91"> Up </A>]</TD>
10497 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC115"> &gt;&gt; </A>]</TD>
10498 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
10499 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
10500 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
10501 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
10502 </TR></TABLE>
10503 <H2> 8.6 Programmable Completion </H2>
10504 <!--docid::SEC113::-->
10505 <P>
10506
10507 When word completion is attempted for an argument to a command for
10508 which a completion specification (a <VAR>compspec</VAR>) has been defined
10509 using the <CODE>complete</CODE> builtin (see section <A HREF="bashref.html#SEC114">8.7 Programmable Completion Builtins</A>),
10510 the programmable completion facilities are invoked.
10511 </P><P>
10512
10513 First, the command name is identified.
10514 If a compspec has been defined for that command, the
10515 compspec is used to generate the list of possible completions for the word.
10516 If the command word is a full pathname, a compspec for the full
10517 pathname is searched for first.
10518 If no compspec is found for the full pathname, an attempt is made to
10519 find a compspec for the portion following the final slash.
10520 </P><P>
10521
10522 Once a compspec has been found, it is used to generate the list of
10523 matching words.
10524 If a compspec is not found, the default Bash completion
10525 described above (see section <A HREF="bashref.html#SEC109">8.4.6 Letting Readline Type For You</A>) is performed.
10526 </P><P>
10527
10528 First, the actions specified by the compspec are used.
10529 Only matches which are prefixed by the word being completed are
10530 returned.
10531 When the <SAMP>`-f'</SAMP> or <SAMP>`-d'</SAMP> option is used for filename or
10532 directory name completion, the shell variable <CODE>FIGNORE</CODE> is
10533 used to filter the matches.
10534 See section <A HREF="bashref.html#SEC63">5.2 Bash Variables</A>, for a description of <CODE>FIGNORE</CODE>.
10535 </P><P>
10536
10537 Any completions specified by a filename expansion pattern to the
10538 <SAMP>`-G'</SAMP> option are generated next.
10539 The words generated by the pattern need not match the word being completed.
10540 The <CODE>GLOBIGNORE</CODE> shell variable is not used to filter the matches,
10541 but the <CODE>FIGNORE</CODE> shell variable is used.
10542 </P><P>
10543
10544 Next, the string specified as the argument to the <SAMP>`-W'</SAMP> option
10545 is considered.
10546 The string is first split using the characters in the <CODE>IFS</CODE>
10547 special variable as delimiters.
10548 Shell quoting is honored.
10549 Each word is then expanded using
10550 brace expansion, tilde expansion, parameter and variable expansion,
10551 command substitution, arithmetic expansion, and pathname expansion,
10552 as described above (see section <A HREF="bashref.html#SEC27">3.5 Shell Expansions</A>).
10553 The results are split using the rules described above
10554 (see section <A HREF="bashref.html#SEC34">3.5.7 Word Splitting</A>).
10555 The results of the expansion are prefix-matched against the word being
10556 completed, and the matching words become the possible completions.
10557 </P><P>
10558
10559 After these matches have been generated, any shell function or command
10560 specified with the <SAMP>`-F'</SAMP> and <SAMP>`-C'</SAMP> options is invoked.
10561 When the command or function is invoked, the <CODE>COMP_LINE</CODE> and
10562 <CODE>COMP_POINT</CODE> variables are assigned values as described above
10563 (see section <A HREF="bashref.html#SEC63">5.2 Bash Variables</A>).
10564 If a shell function is being invoked, the <CODE>COMP_WORDS</CODE> and
10565 <CODE>COMP_CWORD</CODE> variables are also set.
10566 When the function or command is invoked, the first argument is the
10567 name of the command whose arguments are being completed, the
10568 second argument is the word being completed, and the third argument
10569 is the word preceding the word being completed on the current command line.
10570 No filtering of the generated completions against the word being completed
10571 is performed; the function or command has complete freedom in generating
10572 the matches.
10573 </P><P>
10574
10575 Any function specified with <SAMP>`-F'</SAMP> is invoked first.
10576 The function may use any of the shell facilities, including the
10577 <CODE>compgen</CODE> builtin described below
10578 (see section <A HREF="bashref.html#SEC114">8.7 Programmable Completion Builtins</A>), to generate the matches.
10579 It must put the possible completions in the <CODE>COMPREPLY</CODE> array
10580 variable.
10581 </P><P>
10582
10583 Next, any command specified with the <SAMP>`-C'</SAMP> option is invoked
10584 in an environment equivalent to command substitution.
10585 It should print a list of completions, one per line, to
10586 the standard output.
10587 Backslash may be used to escape a newline, if necessary.
10588 </P><P>
10589
10590 After all of the possible completions are generated, any filter
10591 specified with the <SAMP>`-X'</SAMP> option is applied to the list.
10592 The filter is a pattern as used for pathname expansion; a <SAMP>`&#38;'</SAMP>
10593 in the pattern is replaced with the text of the word being completed.
10594 A literal <SAMP>`&#38;'</SAMP> may be escaped with a backslash; the backslash
10595 is removed before attempting a match.
10596 Any completion that matches the pattern will be removed from the list.
10597 A leading <SAMP>`!'</SAMP> negates the pattern; in this case any completion
10598 not matching the pattern will be removed.
10599 </P><P>
10600
10601 Finally, any prefix and suffix specified with the <SAMP>`-P'</SAMP> and <SAMP>`-S'</SAMP>
10602 options are added to each member of the completion list, and the result is
10603 returned to the Readline completion code as the list of possible
10604 completions.
10605 </P><P>
10606
10607 If the previously-applied actions do not generate any matches, and the
10608 <SAMP>`-o dirnames'</SAMP> option was supplied to <CODE>complete</CODE> when the
10609 compspec was defined, directory name completion is attempted.
10610 </P><P>
10611
10612 If the <SAMP>`-o plusdirs'</SAMP> option was supplied to <CODE>complete</CODE> when
10613 the compspec was defined, directory name completion is attempted and any
10614 matches are added to the results of the other actions.
10615 </P><P>
10616
10617 By default, if a compspec is found, whatever it generates is returned to
10618 the completion code as the full set of possible completions.
10619 The default Bash completions are not attempted, and the Readline default
10620 of filename completion is disabled.
10621 If the <SAMP>`-o bashdefault'</SAMP> option was supplied to <CODE>complete</CODE> when
10622 the compspec was defined, the default Bash completions are attempted
10623 if the compspec generates no matches.
10624 If the <SAMP>`-o default'</SAMP> option was supplied to <CODE>complete</CODE> when the
10625 compspec was defined, Readline's default completion will be performed
10626 if the compspec (and, if attempted, the default Bash completions)
10627 generate no matches.
10628 </P><P>
10629
10630 When a compspec indicates that directory name completion is desired,
10631 the programmable completion functions force Readline to append a slash
10632 to completed names which are symbolic links to directories, subject to
10633 the value of the <VAR>mark-directories</VAR> Readline variable, regardless
10634 of the setting of the <VAR>mark-symlinked-directories</VAR> Readline variable.
10635 </P><P>
10636
10637 <A NAME="Programmable Completion Builtins"></A>
10638 <HR SIZE="6">
10639 <A NAME="SEC114"></A>
10640 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
10641 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC113"> &lt; </A>]</TD>
10642 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC115"> &gt; </A>]</TD>
10643 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC91"> &lt;&lt; </A>]</TD>
10644 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC91"> Up </A>]</TD>
10645 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC115"> &gt;&gt; </A>]</TD>
10646 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
10647 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
10648 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
10649 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
10650 </TR></TABLE>
10651 <H2> 8.7 Programmable Completion Builtins </H2>
10652 <!--docid::SEC114::-->
10653 <P>
10654
10655 Two builtin commands are available to manipulate the programmable completion
10656 facilities.
10657 </P><P>
10658
10659 <DL COMPACT>
10660 <DT><CODE>compgen</CODE>
10661 <DD><A NAME="IDX501"></A>
10662 <TABLE><tr><td>&nbsp;</td><td class=example><pre><CODE>compgen [<VAR>option</VAR>] [<VAR>word</VAR>]</CODE>
10663 </pre></td></tr></table><P>
10664
10665 Generate possible completion matches for <VAR>word</VAR> according to
10666 the <VAR>option</VAR>s, which may be any option accepted by the
10667 <CODE>complete</CODE>
10668 builtin with the exception of <SAMP>`-p'</SAMP> and <SAMP>`-r'</SAMP>, and write
10669 the matches to the standard output.
10670 When using the <SAMP>`-F'</SAMP> or <SAMP>`-C'</SAMP> options, the various shell variables
10671 set by the programmable completion facilities, while available, will not
10672 have useful values.
10673 </P><P>
10674
10675 The matches will be generated in the same way as if the programmable
10676 completion code had generated them directly from a completion specification
10677 with the same flags.
10678 If <VAR>word</VAR> is specified, only those completions matching <VAR>word</VAR>
10679 will be displayed.
10680 </P><P>
10681
10682 The return value is true unless an invalid option is supplied, or no
10683 matches were generated.
10684 </P><P>
10685
10686 <DT><CODE>complete</CODE>
10687 <DD><A NAME="IDX502"></A>
10688 <TABLE><tr><td>&nbsp;</td><td class=example><pre><CODE>complete [-abcdefgjksuv] [-o <VAR>comp-option</VAR>] [-A <VAR>action</VAR>] [-G <VAR>globpat</VAR>] [-W <VAR>wordlist</VAR>]
10689 [-P <VAR>prefix</VAR>] [-S <VAR>suffix</VAR>] [-X <VAR>filterpat</VAR>] [-F <VAR>function</VAR>]
10690 [-C <VAR>command</VAR>] <VAR>name</VAR> [<VAR>name</VAR> <small>...</small>]</CODE>
10691 <CODE>complete -pr [<VAR>name</VAR> <small>...</small>]</CODE>
10692 </pre></td></tr></table><P>
10693
10694 Specify how arguments to each <VAR>name</VAR> should be completed.
10695 If the <SAMP>`-p'</SAMP> option is supplied, or if no options are supplied, existing
10696 completion specifications are printed in a way that allows them to be
10697 reused as input.
10698 The <SAMP>`-r'</SAMP> option removes a completion specification for
10699 each <VAR>name</VAR>, or, if no <VAR>name</VAR>s are supplied, all
10700 completion specifications.
10701 </P><P>
10702
10703 The process of applying these completion specifications when word completion
10704 is attempted is described above (see section <A HREF="bashref.html#SEC113">8.6 Programmable Completion</A>).
10705 </P><P>
10706
10707 Other options, if specified, have the following meanings.
10708 The arguments to the <SAMP>`-G'</SAMP>, <SAMP>`-W'</SAMP>, and <SAMP>`-X'</SAMP> options
10709 (and, if necessary, the <SAMP>`-P'</SAMP> and <SAMP>`-S'</SAMP> options)
10710 should be quoted to protect them from expansion before the
10711 <CODE>complete</CODE> builtin is invoked.
10712 </P><P>
10713
10714 <DL COMPACT>
10715 <DT><CODE>-o <VAR>comp-option</VAR></CODE>
10716 <DD>The <VAR>comp-option</VAR> controls several aspects of the compspec's behavior
10717 beyond the simple generation of completions.
10718 <VAR>comp-option</VAR> may be one of:
10719 <P>
10720
10721 <DL COMPACT>
10722
10723 <DT><CODE>bashdefault</CODE>
10724 <DD>Perform the rest of the default Bash completions if the compspec
10725 generates no matches.
10726 <P>
10727
10728 <DT><CODE>default</CODE>
10729 <DD>Use Readline's default filename completion if the compspec generates
10730 no matches.
10731 <P>
10732
10733 <DT><CODE>dirnames</CODE>
10734 <DD>Perform directory name completion if the compspec generates no matches.
10735 <P>
10736
10737 <DT><CODE>filenames</CODE>
10738 <DD>Tell Readline that the compspec generates filenames, so it can perform any
10739 filename-specific processing (like adding a slash to directory names or
10740 suppressing trailing spaces). This option is intended to be used with
10741 shell functions specified with <SAMP>`-F'</SAMP>.
10742 <P>
10743
10744 <DT><CODE>nospace</CODE>
10745 <DD>Tell Readline not to append a space (the default) to words completed at
10746 the end of the line.
10747 </DL>
10748 <P>
10749
10750 <DT><CODE>-A <VAR>action</VAR></CODE>
10751 <DD>The <VAR>action</VAR> may be one of the following to generate a list of possible
10752 completions:
10753 <P>
10754
10755 <DL COMPACT>
10756 <DT><CODE>alias</CODE>
10757 <DD>Alias names. May also be specified as <SAMP>`-a'</SAMP>.
10758 <P>
10759
10760 <DT><CODE>arrayvar</CODE>
10761 <DD>Array variable names.
10762 <P>
10763
10764 <DT><CODE>binding</CODE>
10765 <DD>Readline key binding names (see section <A HREF="bashref.html#SEC103">8.4 Bindable Readline Commands</A>).
10766 <P>
10767
10768 <DT><CODE>builtin</CODE>
10769 <DD>Names of shell builtin commands. May also be specified as <SAMP>`-b'</SAMP>.
10770 <P>
10771
10772 <DT><CODE>command</CODE>
10773 <DD>Command names. May also be specified as <SAMP>`-c'</SAMP>.
10774 <P>
10775
10776 <DT><CODE>directory</CODE>
10777 <DD>Directory names. May also be specified as <SAMP>`-d'</SAMP>.
10778 <P>
10779
10780 <DT><CODE>disabled</CODE>
10781 <DD>Names of disabled shell builtins.
10782 <P>
10783
10784 <DT><CODE>enabled</CODE>
10785 <DD>Names of enabled shell builtins.
10786 <P>
10787
10788 <DT><CODE>export</CODE>
10789 <DD>Names of exported shell variables. May also be specified as <SAMP>`-e'</SAMP>.
10790 <P>
10791
10792 <DT><CODE>file</CODE>
10793 <DD>File names. May also be specified as <SAMP>`-f'</SAMP>.
10794 <P>
10795
10796 <DT><CODE>function</CODE>
10797 <DD>Names of shell functions.
10798 <P>
10799
10800 <DT><CODE>group</CODE>
10801 <DD>Group names. May also be specified as <SAMP>`-g'</SAMP>.
10802 <P>
10803
10804 <DT><CODE>helptopic</CODE>
10805 <DD>Help topics as accepted by the <CODE>help</CODE> builtin (see section <A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A>).
10806 <P>
10807
10808 <DT><CODE>hostname</CODE>
10809 <DD>Hostnames, as taken from the file specified by the
10810 <CODE>HOSTFILE</CODE> shell variable (see section <A HREF="bashref.html#SEC63">5.2 Bash Variables</A>).
10811 <P>
10812
10813 <DT><CODE>job</CODE>
10814 <DD>Job names, if job control is active. May also be specified as <SAMP>`-j'</SAMP>.
10815 <P>
10816
10817 <DT><CODE>keyword</CODE>
10818 <DD>Shell reserved words. May also be specified as <SAMP>`-k'</SAMP>.
10819 <P>
10820
10821 <DT><CODE>running</CODE>
10822 <DD>Names of running jobs, if job control is active.
10823 <P>
10824
10825 <DT><CODE>service</CODE>
10826 <DD>Service names. May also be specified as <SAMP>`-s'</SAMP>.
10827 <P>
10828
10829 <DT><CODE>setopt</CODE>
10830 <DD>Valid arguments for the <SAMP>`-o'</SAMP> option to the <CODE>set</CODE> builtin
10831 (see section <A HREF="bashref.html#SEC59">4.3 The Set Builtin</A>).
10832 <P>
10833
10834 <DT><CODE>shopt</CODE>
10835 <DD>Shell option names as accepted by the <CODE>shopt</CODE> builtin
10836 (see section <A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A>).
10837 <P>
10838
10839 <DT><CODE>signal</CODE>
10840 <DD>Signal names.
10841 <P>
10842
10843 <DT><CODE>stopped</CODE>
10844 <DD>Names of stopped jobs, if job control is active.
10845 <P>
10846
10847 <DT><CODE>user</CODE>
10848 <DD>User names. May also be specified as <SAMP>`-u'</SAMP>.
10849 <P>
10850
10851 <DT><CODE>variable</CODE>
10852 <DD>Names of all shell variables. May also be specified as <SAMP>`-v'</SAMP>.
10853 </DL>
10854 <P>
10855
10856 <DT><CODE>-G <VAR>globpat</VAR></CODE>
10857 <DD>The filename expansion pattern <VAR>globpat</VAR> is expanded to generate
10858 the possible completions.
10859 <P>
10860
10861 <DT><CODE>-W <VAR>wordlist</VAR></CODE>
10862 <DD>The <VAR>wordlist</VAR> is split using the characters in the
10863 <CODE>IFS</CODE> special variable as delimiters, and each resultant word
10864 is expanded.
10865 The possible completions are the members of the resultant list which
10866 match the word being completed.
10867 <P>
10868
10869 <DT><CODE>-C <VAR>command</VAR></CODE>
10870 <DD><VAR>command</VAR> is executed in a subshell environment, and its output is
10871 used as the possible completions.
10872 <P>
10873
10874 <DT><CODE>-F <VAR>function</VAR></CODE>
10875 <DD>The shell function <VAR>function</VAR> is executed in the current shell
10876 environment.
10877 When it finishes, the possible completions are retrieved from the value
10878 of the <CODE>COMPREPLY</CODE> array variable.
10879 <P>
10880
10881 <DT><CODE>-X <VAR>filterpat</VAR></CODE>
10882 <DD><VAR>filterpat</VAR> is a pattern as used for filename expansion.
10883 It is applied to the list of possible completions generated by the
10884 preceding options and arguments, and each completion matching
10885 <VAR>filterpat</VAR> is removed from the list.
10886 A leading <SAMP>`!'</SAMP> in <VAR>filterpat</VAR> negates the pattern; in this
10887 case, any completion not matching <VAR>filterpat</VAR> is removed.
10888 <P>
10889
10890 <DT><CODE>-P <VAR>prefix</VAR></CODE>
10891 <DD><VAR>prefix</VAR> is added at the beginning of each possible completion
10892 after all other options have been applied.
10893 <P>
10894
10895 <DT><CODE>-S <VAR>suffix</VAR></CODE>
10896 <DD><VAR>suffix</VAR> is appended to each possible completion
10897 after all other options have been applied.
10898 </DL>
10899 <P>
10900
10901 The return value is true unless an invalid option is supplied, an option
10902 other than <SAMP>`-p'</SAMP> or <SAMP>`-r'</SAMP> is supplied without a <VAR>name</VAR>
10903 argument, an attempt is made to remove a completion specification for
10904 a <VAR>name</VAR> for which no specification exists, or
10905 an error occurs adding a completion specification.
10906 </P><P>
10907
10908 </DL>
10909 <A NAME="IDX503"></A>
10910 <P>
10911
10912 <A NAME="Using History Interactively"></A>
10913 <HR SIZE="6">
10914 <A NAME="SEC115"></A>
10915 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
10916 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC114"> &lt; </A>]</TD>
10917 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC116"> &gt; </A>]</TD>
10918 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
10919 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top"> Up </A>]</TD>
10920 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC122"> &gt;&gt; </A>]</TD>
10921 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
10922 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
10923 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
10924 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
10925 </TR></TABLE>
10926 <H1> 9. Using History Interactively </H1>
10927 <!--docid::SEC115::-->
10928 <P>
10929
10930 This chapter describes how to use the GNU History Library
10931 interactively, from a user's standpoint.
10932 It should be considered a user's guide.
10933 For information on using the GNU History Library in other programs,
10934 see the GNU Readline Library Manual.
10935 </P><P>
10936
10937 <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
10938 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC116">9.1 Bash History Facilities</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How Bash lets you manipulate your command
10939 history.</TD></TR>
10940 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC117">9.2 Bash History Builtins</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">The Bash builtin commands that manipulate
10941 the command history.</TD></TR>
10942 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC118">9.3 History Expansion</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">What it feels like using History as a user.</TD></TR>
10943 </TABLE></BLOCKQUOTE>
10944 <P>
10945
10946 <A NAME="Bash History Facilities"></A>
10947 <HR SIZE="6">
10948 <A NAME="SEC116"></A>
10949 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
10950 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC115"> &lt; </A>]</TD>
10951 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC117"> &gt; </A>]</TD>
10952 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
10953 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC115"> Up </A>]</TD>
10954 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC122"> &gt;&gt; </A>]</TD>
10955 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
10956 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
10957 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
10958 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
10959 </TR></TABLE>
10960 <H2> 9.1 Bash History Facilities </H2>
10961 <!--docid::SEC116::-->
10962 <P>
10963
10964 When the <SAMP>`-o history'</SAMP> option to the <CODE>set</CODE> builtin
10965 is enabled (see section <A HREF="bashref.html#SEC59">4.3 The Set Builtin</A>),
10966 the shell provides access to the <EM>command history</EM>,
10967 the list of commands previously typed.
10968 The value of the <CODE>HISTSIZE</CODE> shell variable is used as the
10969 number of commands to save in a history list.
10970 The text of the last <CODE>$HISTSIZE</CODE>
10971 commands (default 500) is saved.
10972 The shell stores each command in the history list prior to
10973 parameter and variable expansion
10974 but after history expansion is performed, subject to the
10975 values of the shell variables
10976 <CODE>HISTIGNORE</CODE> and <CODE>HISTCONTROL</CODE>.
10977 </P><P>
10978
10979 When the shell starts up, the history is initialized from the
10980 file named by the <CODE>HISTFILE</CODE> variable (default <TT>`~/.bash_history'</TT>).
10981 The file named by the value of <CODE>HISTFILE</CODE> is truncated, if
10982 necessary, to contain no more than the number of lines specified by
10983 the value of the <CODE>HISTFILESIZE</CODE> variable.
10984 When an interactive shell exits, the last
10985 <CODE>$HISTSIZE</CODE> lines are copied from the history list to the file
10986 named by <CODE>$HISTFILE</CODE>.
10987 If the <CODE>histappend</CODE> shell option is set (see section <A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A>),
10988 the lines are appended to the history file,
10989 otherwise the history file is overwritten.
10990 If <CODE>HISTFILE</CODE>
10991 is unset, or if the history file is unwritable, the history is
10992 not saved. After saving the history, the history file is truncated
10993 to contain no more than <CODE>$HISTFILESIZE</CODE>
10994 lines. If <CODE>HISTFILESIZE</CODE> is not set, no truncation is performed.
10995 </P><P>
10996
10997 If the <CODE>HISTTIMEFORMAT</CODE> is set, the time stamp information
10998 associated with each history entry is written to the history file.
10999 </P><P>
11000
11001 The builtin command <CODE>fc</CODE> may be used to list or edit and re-execute
11002 a portion of the history list.
11003 The <CODE>history</CODE> builtin may be used to display or modify the history
11004 list and manipulate the history file.
11005 When using command-line editing, search commands
11006 are available in each editing mode that provide access to the
11007 history list (see section <A HREF="bashref.html#SEC105">8.4.2 Commands For Manipulating The History</A>).
11008 </P><P>
11009
11010 The shell allows control over which commands are saved on the history
11011 list. The <CODE>HISTCONTROL</CODE> and <CODE>HISTIGNORE</CODE>
11012 variables may be set to cause the shell to save only a subset of the
11013 commands entered.
11014 The <CODE>cmdhist</CODE>
11015 shell option, if enabled, causes the shell to attempt to save each
11016 line of a multi-line command in the same history entry, adding
11017 semicolons where necessary to preserve syntactic correctness.
11018 The <CODE>lithist</CODE>
11019 shell option causes the shell to save the command with embedded newlines
11020 instead of semicolons.
11021 The <CODE>shopt</CODE> builtin is used to set these options.
11022 See section <A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A>, for a description of <CODE>shopt</CODE>.
11023 </P><P>
11024
11025 <A NAME="Bash History Builtins"></A>
11026 <HR SIZE="6">
11027 <A NAME="SEC117"></A>
11028 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
11029 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC116"> &lt; </A>]</TD>
11030 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC118"> &gt; </A>]</TD>
11031 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC118"> &lt;&lt; </A>]</TD>
11032 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC115"> Up </A>]</TD>
11033 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC122"> &gt;&gt; </A>]</TD>
11034 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
11035 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
11036 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
11037 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
11038 </TR></TABLE>
11039 <H2> 9.2 Bash History Builtins </H2>
11040 <!--docid::SEC117::-->
11041 <P>
11042
11043 Bash provides two builtin commands which manipulate the
11044 history list and history file.
11045 </P><P>
11046
11047 <DL COMPACT>
11048
11049 <DT><CODE>fc</CODE>
11050 <DD><A NAME="IDX504"></A>
11051 <TABLE><tr><td>&nbsp;</td><td class=example><pre><CODE>fc [-e <VAR>ename</VAR>] [-nlr] [<VAR>first</VAR>] [<VAR>last</VAR>]</CODE>
11052 <CODE>fc -s [<VAR>pat</VAR>=<VAR>rep</VAR>] [<VAR>command</VAR>]</CODE>
11053 </pre></td></tr></table><P>
11054
11055 Fix Command. In the first form, a range of commands from <VAR>first</VAR> to
11056 <VAR>last</VAR> is selected from the history list. Both <VAR>first</VAR> and
11057 <VAR>last</VAR> may be specified as a string (to locate the most recent
11058 command beginning with that string) or as a number (an index into the
11059 history list, where a negative number is used as an offset from the
11060 current command number). If <VAR>last</VAR> is not specified it is set to
11061 <VAR>first</VAR>. If <VAR>first</VAR> is not specified it is set to the previous
11062 command for editing and -16 for listing. If the <SAMP>`-l'</SAMP> flag is
11063 given, the commands are listed on standard output. The <SAMP>`-n'</SAMP> flag
11064 suppresses the command numbers when listing. The <SAMP>`-r'</SAMP> flag
11065 reverses the order of the listing. Otherwise, the editor given by
11066 <VAR>ename</VAR> is invoked on a file containing those commands. If
11067 <VAR>ename</VAR> is not given, the value of the following variable expansion
11068 is used: <CODE>${FCEDIT:-${EDITOR:-vi}}</CODE>. This says to use the
11069 value of the <CODE>FCEDIT</CODE> variable if set, or the value of the
11070 <CODE>EDITOR</CODE> variable if that is set, or <CODE>vi</CODE> if neither is set.
11071 When editing is complete, the edited commands are echoed and executed.
11072 </P><P>
11073
11074 In the second form, <VAR>command</VAR> is re-executed after each instance
11075 of <VAR>pat</VAR> in the selected command is replaced by <VAR>rep</VAR>.
11076 </P><P>
11077
11078 A useful alias to use with the <CODE>fc</CODE> command is <CODE>r='fc -s'</CODE>, so
11079 that typing <SAMP>`r cc'</SAMP> runs the last command beginning with <CODE>cc</CODE>
11080 and typing <SAMP>`r'</SAMP> re-executes the last command (see section <A HREF="bashref.html#SEC80">6.6 Aliases</A>).
11081 </P><P>
11082
11083 <DT><CODE>history</CODE>
11084 <DD><A NAME="IDX505"></A>
11085 <TABLE><tr><td>&nbsp;</td><td class=example><pre>history [<VAR>n</VAR>]
11086 history -c
11087 history -d <VAR>offset</VAR>
11088 history [-anrw] [<VAR>filename</VAR>]
11089 history -ps <VAR>arg</VAR>
11090 </pre></td></tr></table><P>
11091
11092 With no options, display the history list with line numbers.
11093 Lines prefixed with a <SAMP>`*'</SAMP> have been modified.
11094 An argument of <VAR>n</VAR> lists only the last <VAR>n</VAR> lines.
11095 If the shell variable <CODE>HISTTIMEFORMAT</CODE> is set and not null,
11096 it is used as a format string for <VAR>strftime</VAR> to display
11097 the time stamp associated with each displayed history entry.
11098 No intervening blank is printed between the formatted time stamp
11099 and the history line.
11100 </P><P>
11101
11102 Options, if supplied, have the following meanings:
11103 </P><P>
11104
11105 <DL COMPACT>
11106 <DT><CODE>-c</CODE>
11107 <DD>Clear the history list. This may be combined
11108 with the other options to replace the history list completely.
11109 <P>
11110
11111 <DT><CODE>-d <VAR>offset</VAR></CODE>
11112 <DD>Delete the history entry at position <VAR>offset</VAR>.
11113 <VAR>offset</VAR> should be specified as it appears when the history is
11114 displayed.
11115 <P>
11116
11117 <DT><CODE>-a</CODE>
11118 <DD>Append the new
11119 history lines (history lines entered since the beginning of the
11120 current Bash session) to the history file.
11121 <P>
11122
11123 <DT><CODE>-n</CODE>
11124 <DD>Append the history lines not already read from the history file
11125 to the current history list. These are lines appended to the history
11126 file since the beginning of the current Bash session.
11127 <P>
11128
11129 <DT><CODE>-r</CODE>
11130 <DD>Read the current history file and append its contents to
11131 the history list.
11132 <P>
11133
11134 <DT><CODE>-w</CODE>
11135 <DD>Write out the current history to the history file.
11136 <P>
11137
11138 <DT><CODE>-p</CODE>
11139 <DD>Perform history substitution on the <VAR>arg</VAR>s and display the result
11140 on the standard output, without storing the results in the history list.
11141 <P>
11142
11143 <DT><CODE>-s</CODE>
11144 <DD>The <VAR>arg</VAR>s are added to the end of
11145 the history list as a single entry.
11146 <P>
11147
11148 </DL>
11149 <P>
11150
11151 When any of the <SAMP>`-w'</SAMP>, <SAMP>`-r'</SAMP>, <SAMP>`-a'</SAMP>, or <SAMP>`-n'</SAMP> options is
11152 used, if <VAR>filename</VAR>
11153 is given, then it is used as the history file. If not, then
11154 the value of the <CODE>HISTFILE</CODE> variable is used.
11155 </P><P>
11156
11157 </DL>
11158 <P>
11159
11160 <A NAME="History Interaction"></A>
11161 <HR SIZE="6">
11162 <A NAME="SEC118"></A>
11163 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
11164 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC117"> &lt; </A>]</TD>
11165 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC119"> &gt; </A>]</TD>
11166 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
11167 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC115"> Up </A>]</TD>
11168 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC122"> &gt;&gt; </A>]</TD>
11169 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
11170 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
11171 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
11172 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
11173 </TR></TABLE>
11174 <H2> 9.3 History Expansion </H2>
11175 <!--docid::SEC118::-->
11176 <P>
11177
11178 The History library provides a history expansion feature that is similar
11179 to the history expansion provided by <CODE>csh</CODE>. This section
11180 describes the syntax used to manipulate the history information.
11181 </P><P>
11182
11183 History expansions introduce words from the history list into
11184 the input stream, making it easy to repeat commands, insert the
11185 arguments to a previous command into the current input line, or
11186 fix errors in previous commands quickly.
11187 </P><P>
11188
11189 History expansion takes place in two parts. The first is to determine
11190 which line from the history list should be used during substitution.
11191 The second is to select portions of that line for inclusion into the
11192 current one. The line selected from the history is called the
11193 <EM>event</EM>, and the portions of that line that are acted upon are
11194 called <EM>words</EM>. Various <EM>modifiers</EM> are available to manipulate
11195 the selected words. The line is broken into words in the same fashion
11196 that Bash does, so that several words
11197 surrounded by quotes are considered one word.
11198 History expansions are introduced by the appearance of the
11199 history expansion character, which is <SAMP>`!'</SAMP> by default.
11200 Only <SAMP>`\'</SAMP> and <SAMP>`''</SAMP> may be used to escape the history expansion
11201 character.
11202 </P><P>
11203
11204 Several shell options settable with the <CODE>shopt</CODE>
11205 builtin (see section <A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A>) may be used to tailor
11206 the behavior of history expansion. If the
11207 <CODE>histverify</CODE> shell option is enabled, and Readline
11208 is being used, history substitutions are not immediately passed to
11209 the shell parser.
11210 Instead, the expanded line is reloaded into the Readline
11211 editing buffer for further modification.
11212 If Readline is being used, and the <CODE>histreedit</CODE>
11213 shell option is enabled, a failed history expansion will be
11214 reloaded into the Readline editing buffer for correction.
11215 The <SAMP>`-p'</SAMP> option to the <CODE>history</CODE> builtin command
11216 may be used to see what a history expansion will do before using it.
11217 The <SAMP>`-s'</SAMP> option to the <CODE>history</CODE> builtin may be used to
11218 add commands to the end of the history list without actually executing
11219 them, so that they are available for subsequent recall.
11220 This is most useful in conjunction with Readline.
11221 </P><P>
11222
11223 The shell allows control of the various characters used by the
11224 history expansion mechanism with the <CODE>histchars</CODE> variable.
11225 </P><P>
11226
11227 <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
11228 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC119">9.3.1 Event Designators</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to specify which history line to use.</TD></TR>
11229 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC120">9.3.2 Word Designators</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Specifying which words are of interest.</TD></TR>
11230 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC121">9.3.3 Modifiers</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Modifying the results of substitution.</TD></TR>
11231 </TABLE></BLOCKQUOTE>
11232 <P>
11233
11234 <A NAME="Event Designators"></A>
11235 <HR SIZE="6">
11236 <A NAME="SEC119"></A>
11237 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
11238 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC118"> &lt; </A>]</TD>
11239 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC120"> &gt; </A>]</TD>
11240 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
11241 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC118"> Up </A>]</TD>
11242 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC122"> &gt;&gt; </A>]</TD>
11243 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
11244 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
11245 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
11246 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
11247 </TR></TABLE>
11248 <H3> 9.3.1 Event Designators </H3>
11249 <!--docid::SEC119::-->
11250 <P>
11251
11252 An event designator is a reference to a command line entry in the
11253 history list.
11254 <A NAME="IDX506"></A>
11255 </P><P>
11256
11257 <DL COMPACT>
11258
11259 <DT><CODE>!</CODE>
11260 <DD>Start a history substitution, except when followed by a space, tab,
11261 the end of the line, <SAMP>`='</SAMP> or <SAMP>`('</SAMP> (when the
11262 <CODE>extglob</CODE> shell option is enabled using the <CODE>shopt</CODE> builtin).
11263 <P>
11264
11265 <DT><CODE>!<VAR>n</VAR></CODE>
11266 <DD>Refer to command line <VAR>n</VAR>.
11267 <P>
11268
11269 <DT><CODE>!-<VAR>n</VAR></CODE>
11270 <DD>Refer to the command <VAR>n</VAR> lines back.
11271 <P>
11272
11273 <DT><CODE>!!</CODE>
11274 <DD>Refer to the previous command. This is a synonym for <SAMP>`!-1'</SAMP>.
11275 <P>
11276
11277 <DT><CODE>!<VAR>string</VAR></CODE>
11278 <DD>Refer to the most recent command starting with <VAR>string</VAR>.
11279 <P>
11280
11281 <DT><CODE>!?<VAR>string</VAR>[?]</CODE>
11282 <DD>Refer to the most recent command containing <VAR>string</VAR>. The trailing
11283 <SAMP>`?'</SAMP> may be omitted if the <VAR>string</VAR> is followed immediately by
11284 a newline.
11285 <P>
11286
11287 <DT><CODE>^<VAR>string1</VAR>^<VAR>string2</VAR>^</CODE>
11288 <DD>Quick Substitution. Repeat the last command, replacing <VAR>string1</VAR>
11289 with <VAR>string2</VAR>. Equivalent to
11290 <CODE>!!:s/<VAR>string1</VAR>/<VAR>string2</VAR>/</CODE>.
11291 <P>
11292
11293 <DT><CODE>!#</CODE>
11294 <DD>The entire command line typed so far.
11295 <P>
11296
11297 </DL>
11298 <P>
11299
11300 <A NAME="Word Designators"></A>
11301 <HR SIZE="6">
11302 <A NAME="SEC120"></A>
11303 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
11304 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC119"> &lt; </A>]</TD>
11305 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC121"> &gt; </A>]</TD>
11306 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC121"> &lt;&lt; </A>]</TD>
11307 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC118"> Up </A>]</TD>
11308 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC122"> &gt;&gt; </A>]</TD>
11309 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
11310 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
11311 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
11312 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
11313 </TR></TABLE>
11314 <H3> 9.3.2 Word Designators </H3>
11315 <!--docid::SEC120::-->
11316 <P>
11317
11318 Word designators are used to select desired words from the event.
11319 A <SAMP>`:'</SAMP> separates the event specification from the word designator. It
11320 may be omitted if the word designator begins with a <SAMP>`^'</SAMP>, <SAMP>`$'</SAMP>,
11321 <SAMP>`*'</SAMP>, <SAMP>`-'</SAMP>, or <SAMP>`%'</SAMP>. Words are numbered from the beginning
11322 of the line, with the first word being denoted by 0 (zero). Words are
11323 inserted into the current line separated by single spaces.
11324 </P><P>
11325
11326 For example,
11327 </P><P>
11328
11329 <DL COMPACT>
11330 <DT><CODE>!!</CODE>
11331 <DD>designates the preceding command. When you type this, the preceding
11332 command is repeated in toto.
11333 <P>
11334
11335 <DT><CODE>!!:$</CODE>
11336 <DD>designates the last argument of the preceding command. This may be
11337 shortened to <CODE>!$</CODE>.
11338 <P>
11339
11340 <DT><CODE>!fi:2</CODE>
11341 <DD>designates the second argument of the most recent command starting with
11342 the letters <CODE>fi</CODE>.
11343 </DL>
11344 <P>
11345
11346 Here are the word designators:
11347
11348 <DL COMPACT>
11349
11350 <DT><CODE>0 (zero)</CODE>
11351 <DD>The <CODE>0</CODE>th word. For many applications, this is the command word.
11352 <P>
11353
11354 <DT><CODE><VAR>n</VAR></CODE>
11355 <DD>The <VAR>n</VAR>th word.
11356 <P>
11357
11358 <DT><CODE>^</CODE>
11359 <DD>The first argument; that is, word 1.
11360 <P>
11361
11362 <DT><CODE>$</CODE>
11363 <DD>The last argument.
11364 <P>
11365
11366 <DT><CODE>%</CODE>
11367 <DD>The word matched by the most recent <SAMP>`?<VAR>string</VAR>?'</SAMP> search.
11368 <P>
11369
11370 <DT><CODE><VAR>x</VAR>-<VAR>y</VAR></CODE>
11371 <DD>A range of words; <SAMP>`-<VAR>y</VAR>'</SAMP> abbreviates <SAMP>`0-<VAR>y</VAR>'</SAMP>.
11372 <P>
11373
11374 <DT><CODE>*</CODE>
11375 <DD>All of the words, except the <CODE>0</CODE>th. This is a synonym for <SAMP>`1-$'</SAMP>.
11376 It is not an error to use <SAMP>`*'</SAMP> if there is just one word in the event;
11377 the empty string is returned in that case.
11378 <P>
11379
11380 <DT><CODE><VAR>x</VAR>*</CODE>
11381 <DD>Abbreviates <SAMP>`<VAR>x</VAR>-$'</SAMP>
11382 <P>
11383
11384 <DT><CODE><VAR>x</VAR>-</CODE>
11385 <DD>Abbreviates <SAMP>`<VAR>x</VAR>-$'</SAMP> like <SAMP>`<VAR>x</VAR>*'</SAMP>, but omits the last word.
11386 <P>
11387
11388 </DL>
11389 <P>
11390
11391 If a word designator is supplied without an event specification, the
11392 previous command is used as the event.
11393 </P><P>
11394
11395 <A NAME="Modifiers"></A>
11396 <HR SIZE="6">
11397 <A NAME="SEC121"></A>
11398 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
11399 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC120"> &lt; </A>]</TD>
11400 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC122"> &gt; </A>]</TD>
11401 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
11402 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC118"> Up </A>]</TD>
11403 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC122"> &gt;&gt; </A>]</TD>
11404 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
11405 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
11406 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
11407 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
11408 </TR></TABLE>
11409 <H3> 9.3.3 Modifiers </H3>
11410 <!--docid::SEC121::-->
11411 <P>
11412
11413 After the optional word designator, you can add a sequence of one or more
11414 of the following modifiers, each preceded by a <SAMP>`:'</SAMP>.
11415 </P><P>
11416
11417 <DL COMPACT>
11418
11419 <DT><CODE>h</CODE>
11420 <DD>Remove a trailing pathname component, leaving only the head.
11421 <P>
11422
11423 <DT><CODE>t</CODE>
11424 <DD>Remove all leading pathname components, leaving the tail.
11425 <P>
11426
11427 <DT><CODE>r</CODE>
11428 <DD>Remove a trailing suffix of the form <SAMP>`.<VAR>suffix</VAR>'</SAMP>, leaving
11429 the basename.
11430 <P>
11431
11432 <DT><CODE>e</CODE>
11433 <DD>Remove all but the trailing suffix.
11434 <P>
11435
11436 <DT><CODE>p</CODE>
11437 <DD>Print the new command but do not execute it.
11438 <P>
11439
11440 <DT><CODE>q</CODE>
11441 <DD>Quote the substituted words, escaping further substitutions.
11442 <P>
11443
11444 <DT><CODE>x</CODE>
11445 <DD>Quote the substituted words as with <SAMP>`q'</SAMP>,
11446 but break into words at spaces, tabs, and newlines.
11447 <P>
11448
11449 <DT><CODE>s/<VAR>old</VAR>/<VAR>new</VAR>/</CODE>
11450 <DD>Substitute <VAR>new</VAR> for the first occurrence of <VAR>old</VAR> in the
11451 event line. Any delimiter may be used in place of <SAMP>`/'</SAMP>.
11452 The delimiter may be quoted in <VAR>old</VAR> and <VAR>new</VAR>
11453 with a single backslash. If <SAMP>`&#38;'</SAMP> appears in <VAR>new</VAR>,
11454 it is replaced by <VAR>old</VAR>. A single backslash will quote
11455 the <SAMP>`&#38;'</SAMP>. The final delimiter is optional if it is the last
11456 character on the input line.
11457 <P>
11458
11459 <DT><CODE>&#38;</CODE>
11460 <DD>Repeat the previous substitution.
11461 <P>
11462
11463 <DT><CODE>g</CODE>
11464 <DD><DT><CODE>a</CODE>
11465 <DD>Cause changes to be applied over the entire event line. Used in
11466 conjunction with <SAMP>`s'</SAMP>, as in <CODE>gs/<VAR>old</VAR>/<VAR>new</VAR>/</CODE>,
11467 or with <SAMP>`&#38;'</SAMP>.
11468 <P>
11469
11470 <DT><CODE>G</CODE>
11471 <DD>Apply the following <SAMP>`s'</SAMP> modifier once to each word in the event.
11472 <P>
11473
11474 </DL>
11475 <P>
11476
11477 <A NAME="Installing Bash"></A>
11478 <HR SIZE="6">
11479 <A NAME="SEC122"></A>
11480 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
11481 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC121"> &lt; </A>]</TD>
11482 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC123"> &gt; </A>]</TD>
11483 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC4"> &lt;&lt; </A>]</TD>
11484 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top"> Up </A>]</TD>
11485 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC131"> &gt;&gt; </A>]</TD>
11486 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
11487 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
11488 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
11489 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
11490 </TR></TABLE>
11491 <H1> 10. Installing Bash </H1>
11492 <!--docid::SEC122::-->
11493 <P>
11494
11495 This chapter provides basic instructions for installing Bash on
11496 the various supported platforms. The distribution supports the
11497 GNU operating systems, nearly every version of Unix, and several
11498 non-Unix systems such as BeOS and Interix.
11499 Other independent ports exist for
11500 MS-DOS, OS/2, and Windows platforms.
11501 </P><P>
11502
11503 <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
11504 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC123">10.1 Basic Installation</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Installation instructions.</TD></TR>
11505 </TABLE>
11506
11507 <br>
11508 <TABLE BORDER=0 CELLSPACING=0>
11509 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC124">10.2 Compilers and Options</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to set special options for various
11510 systems.</TD></TR>
11511 </TABLE>
11512
11513 <br>
11514 <TABLE BORDER=0 CELLSPACING=0>
11515 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC125">10.3 Compiling For Multiple Architectures</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to compile Bash for more
11516 than one kind of system from
11517 the same source tree.</TD></TR>
11518 </TABLE>
11519
11520 <br>
11521 <TABLE BORDER=0 CELLSPACING=0>
11522 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC126">10.4 Installation Names</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to set the various paths used by the installation.</TD></TR>
11523 </TABLE>
11524
11525 <br>
11526 <TABLE BORDER=0 CELLSPACING=0>
11527 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC127">10.5 Specifying the System Type</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to configure Bash for a particular system.</TD></TR>
11528 </TABLE>
11529
11530 <br>
11531 <TABLE BORDER=0 CELLSPACING=0>
11532 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC128">10.6 Sharing Defaults</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to share default configuration values among GNU
11533 programs.</TD></TR>
11534 </TABLE>
11535
11536 <br>
11537 <TABLE BORDER=0 CELLSPACING=0>
11538 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC129">10.7 Operation Controls</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Options recognized by the configuration program.</TD></TR>
11539 </TABLE>
11540
11541 <br>
11542 <TABLE BORDER=0 CELLSPACING=0>
11543 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC130">10.8 Optional Features</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to enable and disable optional features when
11544 building Bash.</TD></TR>
11545 </TABLE></BLOCKQUOTE>
11546 <P>
11547
11548 <A NAME="Basic Installation"></A>
11549 <HR SIZE="6">
11550 <A NAME="SEC123"></A>
11551 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
11552 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC122"> &lt; </A>]</TD>
11553 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC124"> &gt; </A>]</TD>
11554 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC122"> &lt;&lt; </A>]</TD>
11555 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC122"> Up </A>]</TD>
11556 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC131"> &gt;&gt; </A>]</TD>
11557 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
11558 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
11559 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
11560 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
11561 </TR></TABLE>
11562 <H2> 10.1 Basic Installation </H2>
11563 <!--docid::SEC123::-->
11564 <P>
11565
11566 These are installation instructions for Bash.
11567 </P><P>
11568
11569 The simplest way to compile Bash is:
11570 </P><P>
11571
11572 <OL>
11573 <LI>
11574 <CODE>cd</CODE> to the directory containing the source code and type
11575 <SAMP>`./configure'</SAMP> to configure Bash for your system. If you're
11576 using <CODE>csh</CODE> on an old version of System V, you might need to
11577 type <SAMP>`sh ./configure'</SAMP> instead to prevent <CODE>csh</CODE> from trying
11578 to execute <CODE>configure</CODE> itself.
11579 <P>
11580
11581 Running <CODE>configure</CODE> takes some time.
11582 While running, it prints messages telling which features it is
11583 checking for.
11584 </P><P>
11585
11586 <LI>
11587 Type <SAMP>`make'</SAMP> to compile Bash and build the <CODE>bashbug</CODE> bug
11588 reporting script.
11589 <P>
11590
11591 <LI>
11592 Optionally, type <SAMP>`make tests'</SAMP> to run the Bash test suite.
11593 <P>
11594
11595 <LI>
11596 Type <SAMP>`make install'</SAMP> to install <CODE>bash</CODE> and <CODE>bashbug</CODE>.
11597 This will also install the manual pages and Info file.
11598 <P>
11599
11600 </OL>
11601 <P>
11602
11603 The <CODE>configure</CODE> shell script attempts to guess correct
11604 values for various system-dependent variables used during
11605 compilation. It uses those values to create a <TT>`Makefile'</TT> in
11606 each directory of the package (the top directory, the
11607 <TT>`builtins'</TT>, <TT>`doc'</TT>, and <TT>`support'</TT> directories,
11608 each directory under <TT>`lib'</TT>, and several others). It also creates a
11609 <TT>`config.h'</TT> file containing system-dependent definitions.
11610 Finally, it creates a shell script named <CODE>config.status</CODE> that you
11611 can run in the future to recreate the current configuration, a
11612 file <TT>`config.cache'</TT> that saves the results of its tests to
11613 speed up reconfiguring, and a file <TT>`config.log'</TT> containing
11614 compiler output (useful mainly for debugging <CODE>configure</CODE>).
11615 If at some point
11616 <TT>`config.cache'</TT> contains results you don't want to keep, you
11617 may remove or edit it.
11618 </P><P>
11619
11620 To find out more about the options and arguments that the
11621 <CODE>configure</CODE> script understands, type
11622 </P><P>
11623
11624 <TABLE><tr><td>&nbsp;</td><td class=example><pre>bash-2.04$ ./configure --help
11625 </pre></td></tr></table></P><P>
11626
11627 at the Bash prompt in your Bash source directory.
11628 </P><P>
11629
11630 If you need to do unusual things to compile Bash, please
11631 try to figure out how <CODE>configure</CODE> could check whether or not
11632 to do them, and mail diffs or instructions to
11633 <A HREF="mailto:bash-maintainers@gnu.org">bash-maintainers@gnu.org</A> so they can be
11634 considered for the next release.
11635 </P><P>
11636
11637 The file <TT>`configure.in'</TT> is used to create <CODE>configure</CODE>
11638 by a program called Autoconf. You only need
11639 <TT>`configure.in'</TT> if you want to change it or regenerate
11640 <CODE>configure</CODE> using a newer version of Autoconf. If
11641 you do this, make sure you are using Autoconf version 2.50 or
11642 newer.
11643 </P><P>
11644
11645 You can remove the program binaries and object files from the
11646 source code directory by typing <SAMP>`make clean'</SAMP>. To also remove the
11647 files that <CODE>configure</CODE> created (so you can compile Bash for
11648 a different kind of computer), type <SAMP>`make distclean'</SAMP>.
11649 </P><P>
11650
11651 <A NAME="Compilers and Options"></A>
11652 <HR SIZE="6">
11653 <A NAME="SEC124"></A>
11654 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
11655 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC123"> &lt; </A>]</TD>
11656 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC125"> &gt; </A>]</TD>
11657 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC125"> &lt;&lt; </A>]</TD>
11658 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC122"> Up </A>]</TD>
11659 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC131"> &gt;&gt; </A>]</TD>
11660 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
11661 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
11662 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
11663 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
11664 </TR></TABLE>
11665 <H2> 10.2 Compilers and Options </H2>
11666 <!--docid::SEC124::-->
11667 <P>
11668
11669 Some systems require unusual options for compilation or linking
11670 that the <CODE>configure</CODE> script does not know about. You can
11671 give <CODE>configure</CODE> initial values for variables by setting
11672 them in the environment. Using a Bourne-compatible shell, you
11673 can do that on the command line like this:
11674 </P><P>
11675
11676 <TABLE><tr><td>&nbsp;</td><td class=example><pre>CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
11677 </pre></td></tr></table></P><P>
11678
11679 On systems that have the <CODE>env</CODE> program, you can do it like this:
11680 </P><P>
11681
11682 <TABLE><tr><td>&nbsp;</td><td class=example><pre>env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
11683 </pre></td></tr></table></P><P>
11684
11685 The configuration process uses GCC to build Bash if it
11686 is available.
11687 </P><P>
11688
11689 <A NAME="Compiling For Multiple Architectures"></A>
11690 <HR SIZE="6">
11691 <A NAME="SEC125"></A>
11692 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
11693 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC124"> &lt; </A>]</TD>
11694 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC126"> &gt; </A>]</TD>
11695 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC126"> &lt;&lt; </A>]</TD>
11696 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC122"> Up </A>]</TD>
11697 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC131"> &gt;&gt; </A>]</TD>
11698 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
11699 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
11700 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
11701 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
11702 </TR></TABLE>
11703 <H2> 10.3 Compiling For Multiple Architectures </H2>
11704 <!--docid::SEC125::-->
11705 <P>
11706
11707 You can compile Bash for more than one kind of computer at the
11708 same time, by placing the object files for each architecture in their
11709 own directory. To do this, you must use a version of <CODE>make</CODE> that
11710 supports the <CODE>VPATH</CODE> variable, such as GNU <CODE>make</CODE>.
11711 <CODE>cd</CODE> to the
11712 directory where you want the object files and executables to go and run
11713 the <CODE>configure</CODE> script from the source directory. You may need to
11714 supply the <SAMP>`--srcdir=PATH'</SAMP> argument to tell <CODE>configure</CODE> where the
11715 source files are. <CODE>configure</CODE> automatically checks for the
11716 source code in the directory that <CODE>configure</CODE> is in and in `..'.
11717 </P><P>
11718
11719 If you have to use a <CODE>make</CODE> that does not supports the <CODE>VPATH</CODE>
11720 variable, you can compile Bash for one architecture at a
11721 time in the source code directory. After you have installed
11722 Bash for one architecture, use <SAMP>`make distclean'</SAMP> before
11723 reconfiguring for another architecture.
11724 </P><P>
11725
11726 Alternatively, if your system supports symbolic links, you can use the
11727 <TT>`support/mkclone'</TT> script to create a build tree which has
11728 symbolic links back to each file in the source directory. Here's an
11729 example that creates a build directory in the current directory from a
11730 source directory <TT>`/usr/gnu/src/bash-2.0'</TT>:
11731 </P><P>
11732
11733 <TABLE><tr><td>&nbsp;</td><td class=example><pre>bash /usr/gnu/src/bash-2.0/support/mkclone -s /usr/gnu/src/bash-2.0 .
11734 </pre></td></tr></table></P><P>
11735
11736 The <CODE>mkclone</CODE> script requires Bash, so you must have already built
11737 Bash for at least one architecture before you can create build
11738 directories for other architectures.
11739 </P><P>
11740
11741 <A NAME="Installation Names"></A>
11742 <HR SIZE="6">
11743 <A NAME="SEC126"></A>
11744 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
11745 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC125"> &lt; </A>]</TD>
11746 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC127"> &gt; </A>]</TD>
11747 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC127"> &lt;&lt; </A>]</TD>
11748 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC122"> Up </A>]</TD>
11749 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC131"> &gt;&gt; </A>]</TD>
11750 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
11751 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
11752 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
11753 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
11754 </TR></TABLE>
11755 <H2> 10.4 Installation Names </H2>
11756 <!--docid::SEC126::-->
11757 <P>
11758
11759 By default, <SAMP>`make install'</SAMP> will install into
11760 <TT>`/usr/local/bin'</TT>, <TT>`/usr/local/man'</TT>, etc. You can
11761 specify an installation prefix other than <TT>`/usr/local'</TT> by
11762 giving <CODE>configure</CODE> the option <SAMP>`--prefix=<VAR>PATH</VAR>'</SAMP>,
11763 or by specifying a value for the <CODE>DESTDIR</CODE> <SAMP>`make'</SAMP>
11764 variable when running <SAMP>`make install'</SAMP>.
11765 </P><P>
11766
11767 You can specify separate installation prefixes for
11768 architecture-specific files and architecture-independent files.
11769 If you give <CODE>configure</CODE> the option
11770 <SAMP>`--exec-prefix=<VAR>PATH</VAR>'</SAMP>, <SAMP>`make install'</SAMP> will use
11771 <VAR>PATH</VAR> as the prefix for installing programs and libraries.
11772 Documentation and other data files will still use the regular prefix.
11773 </P><P>
11774
11775 <A NAME="Specifying the System Type"></A>
11776 <HR SIZE="6">
11777 <A NAME="SEC127"></A>
11778 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
11779 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC126"> &lt; </A>]</TD>
11780 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC128"> &gt; </A>]</TD>
11781 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC128"> &lt;&lt; </A>]</TD>
11782 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC122"> Up </A>]</TD>
11783 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC131"> &gt;&gt; </A>]</TD>
11784 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
11785 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
11786 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
11787 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
11788 </TR></TABLE>
11789 <H2> 10.5 Specifying the System Type </H2>
11790 <!--docid::SEC127::-->
11791 <P>
11792
11793 There may be some features <CODE>configure</CODE> can not figure out
11794 automatically, but need to determine by the type of host Bash
11795 will run on. Usually <CODE>configure</CODE> can figure that
11796 out, but if it prints a message saying it can not guess the host
11797 type, give it the <SAMP>`--host=TYPE'</SAMP> option. <SAMP>`TYPE'</SAMP> can
11798 either be a short name for the system type, such as <SAMP>`sun4'</SAMP>,
11799 or a canonical name with three fields: <SAMP>`CPU-COMPANY-SYSTEM'</SAMP>
11800 (e.g., <SAMP>`i386-unknown-freebsd4.2'</SAMP>).
11801 </P><P>
11802
11803 See the file <TT>`support/config.sub'</TT> for the possible
11804 values of each field.
11805 </P><P>
11806
11807 <A NAME="Sharing Defaults"></A>
11808 <HR SIZE="6">
11809 <A NAME="SEC128"></A>
11810 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
11811 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC127"> &lt; </A>]</TD>
11812 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC129"> &gt; </A>]</TD>
11813 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC129"> &lt;&lt; </A>]</TD>
11814 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC122"> Up </A>]</TD>
11815 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC131"> &gt;&gt; </A>]</TD>
11816 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
11817 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
11818 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
11819 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
11820 </TR></TABLE>
11821 <H2> 10.6 Sharing Defaults </H2>
11822 <!--docid::SEC128::-->
11823 <P>
11824
11825 If you want to set default values for <CODE>configure</CODE> scripts to
11826 share, you can create a site shell script called
11827 <CODE>config.site</CODE> that gives default values for variables like
11828 <CODE>CC</CODE>, <CODE>cache_file</CODE>, and <CODE>prefix</CODE>. <CODE>configure</CODE>
11829 looks for <TT>`PREFIX/share/config.site'</TT> if it exists, then
11830 <TT>`PREFIX/etc/config.site'</TT> if it exists. Or, you can set the
11831 <CODE>CONFIG_SITE</CODE> environment variable to the location of the site
11832 script. A warning: the Bash <CODE>configure</CODE> looks for a site script,
11833 but not all <CODE>configure</CODE> scripts do.
11834 </P><P>
11835
11836 <A NAME="Operation Controls"></A>
11837 <HR SIZE="6">
11838 <A NAME="SEC129"></A>
11839 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
11840 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC128"> &lt; </A>]</TD>
11841 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC130"> &gt; </A>]</TD>
11842 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC130"> &lt;&lt; </A>]</TD>
11843 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC122"> Up </A>]</TD>
11844 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC131"> &gt;&gt; </A>]</TD>
11845 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
11846 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
11847 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
11848 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
11849 </TR></TABLE>
11850 <H2> 10.7 Operation Controls </H2>
11851 <!--docid::SEC129::-->
11852 <P>
11853
11854 <CODE>configure</CODE> recognizes the following options to control how it
11855 operates.
11856 </P><P>
11857
11858 <DL COMPACT>
11859
11860 <DT><CODE>--cache-file=<VAR>file</VAR></CODE>
11861 <DD>Use and save the results of the tests in
11862 <VAR>file</VAR> instead of <TT>`./config.cache'</TT>. Set <VAR>file</VAR> to
11863 <TT>`/dev/null'</TT> to disable caching, for debugging
11864 <CODE>configure</CODE>.
11865 <P>
11866
11867 <DT><CODE>--help</CODE>
11868 <DD>Print a summary of the options to <CODE>configure</CODE>, and exit.
11869 <P>
11870
11871 <DT><CODE>--quiet</CODE>
11872 <DD><DT><CODE>--silent</CODE>
11873 <DD><DT><CODE>-q</CODE>
11874 <DD>Do not print messages saying which checks are being made.
11875 <P>
11876
11877 <DT><CODE>--srcdir=<VAR>dir</VAR></CODE>
11878 <DD>Look for the Bash source code in directory <VAR>dir</VAR>. Usually
11879 <CODE>configure</CODE> can determine that directory automatically.
11880 <P>
11881
11882 <DT><CODE>--version</CODE>
11883 <DD>Print the version of Autoconf used to generate the <CODE>configure</CODE>
11884 script, and exit.
11885 </DL>
11886 <P>
11887
11888 <CODE>configure</CODE> also accepts some other, not widely used, boilerplate
11889 options. <SAMP>`configure --help'</SAMP> prints the complete list.
11890 </P><P>
11891
11892 <A NAME="Optional Features"></A>
11893 <HR SIZE="6">
11894 <A NAME="SEC130"></A>
11895 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
11896 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC129"> &lt; </A>]</TD>
11897 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC131"> &gt; </A>]</TD>
11898 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC122"> &lt;&lt; </A>]</TD>
11899 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC122"> Up </A>]</TD>
11900 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC131"> &gt;&gt; </A>]</TD>
11901 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
11902 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
11903 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
11904 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
11905 </TR></TABLE>
11906 <H2> 10.8 Optional Features </H2>
11907 <!--docid::SEC130::-->
11908 <P>
11909
11910 The Bash <CODE>configure</CODE> has a number of <SAMP>`--enable-<VAR>feature</VAR>'</SAMP>
11911 options, where <VAR>feature</VAR> indicates an optional part of Bash.
11912 There are also several <SAMP>`--with-<VAR>package</VAR>'</SAMP> options,
11913 where <VAR>package</VAR> is something like <SAMP>`bash-malloc'</SAMP> or <SAMP>`purify'</SAMP>.
11914 To turn off the default use of a package, use
11915 <SAMP>`--without-<VAR>package</VAR>'</SAMP>. To configure Bash without a feature
11916 that is enabled by default, use <SAMP>`--disable-<VAR>feature</VAR>'</SAMP>.
11917 </P><P>
11918
11919 Here is a complete list of the <SAMP>`--enable-'</SAMP> and
11920 <SAMP>`--with-'</SAMP> options that the Bash <CODE>configure</CODE> recognizes.
11921 </P><P>
11922
11923 <DL COMPACT>
11924 <DT><CODE>--with-afs</CODE>
11925 <DD>Define if you are using the Andrew File System from Transarc.
11926 <P>
11927
11928 <DT><CODE>--with-bash-malloc</CODE>
11929 <DD>Use the Bash version of
11930 <CODE>malloc</CODE> in <TT>`lib/malloc/malloc.c'</TT>. This is not the same
11931 <CODE>malloc</CODE> that appears in GNU libc, but an older version
11932 derived from the 4.2 BSD <CODE>malloc</CODE>. This <CODE>malloc</CODE> is
11933 very fast, but wastes some space on each allocation.
11934 This option is enabled by default.
11935 The <TT>`NOTES'</TT> file contains a list of systems for
11936 which this should be turned off, and <CODE>configure</CODE> disables this
11937 option automatically for a number of systems.
11938 <P>
11939
11940 <DT><CODE>--with-curses</CODE>
11941 <DD>Use the curses library instead of the termcap library. This should
11942 be supplied if your system has an inadequate or incomplete termcap
11943 database.
11944 <P>
11945
11946 <DT><CODE>--with-gnu-malloc</CODE>
11947 <DD>A synonym for <CODE>--with-bash-malloc</CODE>.
11948 <P>
11949
11950 <DT><CODE>--with-installed-readline[=<VAR>PREFIX</VAR>]</CODE>
11951 <DD>Define this to make Bash link with a locally-installed version of Readline
11952 rather than the version in <TT>`lib/readline'</TT>. This works only with
11953 Readline 4.3 and later versions. If <VAR>PREFIX</VAR> is <CODE>yes</CODE> or not
11954 supplied, <CODE>configure</CODE> uses the values of the make variables
11955 <CODE>includedir</CODE> and <CODE>libdir</CODE>, which are subdirectories of <CODE>prefix</CODE>
11956 by default, to find the installed version of Readline if it is not in
11957 the standard system include and library directories.
11958 If <VAR>PREFIX</VAR> is <CODE>no</CODE>, Bash links with the version in
11959 <TT>`lib/readline'</TT>.
11960 If <VAR>PREFIX</VAR> is set to any other value, <CODE>configure</CODE> treats it as
11961 a directory pathname and looks for
11962 the installed version of Readline in subdirectories of that directory
11963 (include files in <VAR>PREFIX</VAR>/<CODE>include</CODE> and the library in
11964 <VAR>PREFIX</VAR>/<CODE>lib</CODE>).
11965 <P>
11966
11967 <DT><CODE>--with-purify</CODE>
11968 <DD>Define this to use the Purify memory allocation checker from Rational
11969 Software.
11970 <P>
11971
11972 <DT><CODE>--enable-minimal-config</CODE>
11973 <DD>This produces a shell with minimal features, close to the historical
11974 Bourne shell.
11975 </DL>
11976 <P>
11977
11978 There are several <SAMP>`--enable-'</SAMP> options that alter how Bash is
11979 compiled and linked, rather than changing run-time features.
11980 </P><P>
11981
11982 <DL COMPACT>
11983 <DT><CODE>--enable-largefile</CODE>
11984 <DD>Enable support for <A HREF="http://www.sas.com/standards/large_file/x_open.20Mar96.html">large files</A> if the operating system requires special compiler options
11985 to build programs which can access large files. This is enabled by
11986 default, if the operating system provides large file support.
11987 <P>
11988
11989 <DT><CODE>--enable-profiling</CODE>
11990 <DD>This builds a Bash binary that produces profiling information to be
11991 processed by <CODE>gprof</CODE> each time it is executed.
11992 <P>
11993
11994 <DT><CODE>--enable-static-link</CODE>
11995 <DD>This causes Bash to be linked statically, if <CODE>gcc</CODE> is being used.
11996 This could be used to build a version to use as root's shell.
11997 </DL>
11998 <P>
11999
12000 The <SAMP>`minimal-config'</SAMP> option can be used to disable all of
12001 the following options, but it is processed first, so individual
12002 options may be enabled using <SAMP>`enable-<VAR>feature</VAR>'</SAMP>.
12003 </P><P>
12004
12005 All of the following options except for <SAMP>`disabled-builtins'</SAMP> and
12006 <SAMP>`xpg-echo-default'</SAMP> are
12007 enabled by default, unless the operating system does not provide the
12008 necessary support.
12009 </P><P>
12010
12011 <DL COMPACT>
12012 <DT><CODE>--enable-alias</CODE>
12013 <DD>Allow alias expansion and include the <CODE>alias</CODE> and <CODE>unalias</CODE>
12014 builtins (see section <A HREF="bashref.html#SEC80">6.6 Aliases</A>).
12015 <P>
12016
12017 <DT><CODE>--enable-arith-for-command</CODE>
12018 <DD>Include support for the alternate form of the <CODE>for</CODE> command
12019 that behaves like the C language <CODE>for</CODE> statement
12020 (see section <A HREF="bashref.html#SEC20">3.2.4.1 Looping Constructs</A>).
12021 <P>
12022
12023 <DT><CODE>--enable-array-variables</CODE>
12024 <DD>Include support for one-dimensional array shell variables
12025 (see section <A HREF="bashref.html#SEC81">6.7 Arrays</A>).
12026 <P>
12027
12028 <DT><CODE>--enable-bang-history</CODE>
12029 <DD>Include support for <CODE>csh</CODE>-like history substitution
12030 (see section <A HREF="bashref.html#SEC118">9.3 History Expansion</A>).
12031 <P>
12032
12033 <DT><CODE>--enable-brace-expansion</CODE>
12034 <DD>Include <CODE>csh</CODE>-like brace expansion
12035 ( <CODE>b{a,b}c</CODE> ==> <CODE>bac bbc</CODE> ).
12036 See <A HREF="bashref.html#SEC28">3.5.1 Brace Expansion</A>, for a complete description.
12037 <P>
12038
12039 <DT><CODE>--enable-command-timing</CODE>
12040 <DD>Include support for recognizing <CODE>time</CODE> as a reserved word and for
12041 displaying timing statistics for the pipeline following <CODE>time</CODE>
12042 (see section <A HREF="bashref.html#SEC17">3.2.2 Pipelines</A>).
12043 This allows pipelines as well as shell builtins and functions to be timed.
12044 <P>
12045
12046 <DT><CODE>--enable-cond-command</CODE>
12047 <DD>Include support for the <CODE>[[</CODE> conditional command.
12048 (see section <A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A>).
12049 <P>
12050
12051 <DT><CODE>--enable-cond-regexp</CODE>
12052 <DD>Include support for matching POSIX regular expressions using the
12053 <SAMP>`=~'</SAMP> binary operator in the <CODE>[[</CODE> conditional command.
12054 (see section <A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A>).
12055 <P>
12056
12057 <DT><CODE>--enable-directory-stack</CODE>
12058 <DD>Include support for a <CODE>csh</CODE>-like directory stack and the
12059 <CODE>pushd</CODE>, <CODE>popd</CODE>, and <CODE>dirs</CODE> builtins
12060 (see section <A HREF="bashref.html#SEC82">6.8 The Directory Stack</A>).
12061 <P>
12062
12063 <DT><CODE>--enable-disabled-builtins</CODE>
12064 <DD>Allow builtin commands to be invoked via <SAMP>`builtin xxx'</SAMP>
12065 even after <CODE>xxx</CODE> has been disabled using <SAMP>`enable -n xxx'</SAMP>.
12066 See <A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A>, for details of the <CODE>builtin</CODE> and
12067 <CODE>enable</CODE> builtin commands.
12068 <P>
12069
12070 <DT><CODE>--enable-dparen-arithmetic</CODE>
12071 <DD>Include support for the <CODE>((<small>...</small>))</CODE> command
12072 (see section <A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A>).
12073 <P>
12074
12075 <DT><CODE>--enable-extended-glob</CODE>
12076 <DD>Include support for the extended pattern matching features described
12077 above under <A HREF="bashref.html#SEC36">3.5.8.1 Pattern Matching</A>.
12078 <P>
12079
12080 <DT><CODE>--enable-help-builtin</CODE>
12081 <DD>Include the <CODE>help</CODE> builtin, which displays help on shell builtins and
12082 variables (see section <A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A>).
12083 <P>
12084
12085 <DT><CODE>--enable-history</CODE>
12086 <DD>Include command history and the <CODE>fc</CODE> and <CODE>history</CODE>
12087 builtin commands (see section <A HREF="bashref.html#SEC116">9.1 Bash History Facilities</A>).
12088 <P>
12089
12090 <DT><CODE>--enable-job-control</CODE>
12091 <DD>This enables the job control features (see section <A HREF="bashref.html#SEC87">7. Job Control</A>),
12092 if the operating system supports them.
12093 <P>
12094
12095 <DT><CODE>--enable-multibyte</CODE>
12096 <DD>This enables support for multibyte characters if the operating
12097 system provides the necessary support.
12098 <P>
12099
12100 <DT><CODE>--enable-net-redirections</CODE>
12101 <DD>This enables the special handling of filenames of the form
12102 <CODE>/dev/tcp/<VAR>host</VAR>/<VAR>port</VAR></CODE> and
12103 <CODE>/dev/udp/<VAR>host</VAR>/<VAR>port</VAR></CODE>
12104 when used in redirections (see section <A HREF="bashref.html#SEC38">3.6 Redirections</A>).
12105 <P>
12106
12107 <DT><CODE>--enable-process-substitution</CODE>
12108 <DD>This enables process substitution (see section <A HREF="bashref.html#SEC33">3.5.6 Process Substitution</A>) if
12109 the operating system provides the necessary support.
12110 <P>
12111
12112 <DT><CODE>--enable-prompt-string-decoding</CODE>
12113 <DD>Turn on the interpretation of a number of backslash-escaped characters
12114 in the <CODE>$PS1</CODE>, <CODE>$PS2</CODE>, <CODE>$PS3</CODE>, and <CODE>$PS4</CODE> prompt
12115 strings. See <A HREF="bashref.html#SEC84">6.9 Controlling the Prompt</A>, for a complete list of prompt
12116 string escape sequences.
12117 <P>
12118
12119 <DT><CODE>--enable-progcomp</CODE>
12120 <DD>Enable the programmable completion facilities
12121 (see section <A HREF="bashref.html#SEC113">8.6 Programmable Completion</A>).
12122 If Readline is not enabled, this option has no effect.
12123 <P>
12124
12125 <DT><CODE>--enable-readline</CODE>
12126 <DD>Include support for command-line editing and history with the Bash
12127 version of the Readline library (see section <A HREF="bashref.html#SEC91">8. Command Line Editing</A>).
12128 <P>
12129
12130 <DT><CODE>--enable-restricted</CODE>
12131 <DD>Include support for a <EM>restricted shell</EM>. If this is enabled, Bash,
12132 when called as <CODE>rbash</CODE>, enters a restricted mode. See
12133 <A HREF="bashref.html#SEC85">6.10 The Restricted Shell</A>, for a description of restricted mode.
12134 <P>
12135
12136 <DT><CODE>--enable-select</CODE>
12137 <DD>Include the <CODE>select</CODE> builtin, which allows the generation of simple
12138 menus (see section <A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A>).
12139 <P>
12140
12141 <DT><CODE>--enable-usg-echo-default</CODE>
12142 <DD>A synonym for <CODE>--enable-xpg-echo-default</CODE>.
12143 <P>
12144
12145 <DT><CODE>--enable-xpg-echo-default</CODE>
12146 <DD>Make the <CODE>echo</CODE> builtin expand backslash-escaped characters by default,
12147 without requiring the <SAMP>`-e'</SAMP> option.
12148 This sets the default value of the <CODE>xpg_echo</CODE> shell option to <CODE>on</CODE>,
12149 which makes the Bash <CODE>echo</CODE> behave more like the version specified in
12150 the Single Unix Specification, version 2.
12151 See section <A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A>, for a description of the escape sequences that
12152 <CODE>echo</CODE> recognizes.
12153 <P>
12154
12155 </DL>
12156 <P>
12157
12158 The file <TT>`config-top.h'</TT> contains C Preprocessor
12159 <SAMP>`#define'</SAMP> statements for options which are not settable from
12160 <CODE>configure</CODE>.
12161 Some of these are not meant to be changed; beware of the consequences if
12162 you do.
12163 Read the comments associated with each definition for more
12164 information about its effect.
12165 </P><P>
12166
12167 <A NAME="Reporting Bugs"></A>
12168 <HR SIZE="6">
12169 <A NAME="SEC131"></A>
12170 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
12171 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC130"> &lt; </A>]</TD>
12172 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC132"> &gt; </A>]</TD>
12173 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC122"> &lt;&lt; </A>]</TD>
12174 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top"> Up </A>]</TD>
12175 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC132"> &gt;&gt; </A>]</TD>
12176 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
12177 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
12178 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
12179 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
12180 </TR></TABLE>
12181 <H1> A. Reporting Bugs </H1>
12182 <!--docid::SEC131::-->
12183 <P>
12184
12185 Please report all bugs you find in Bash.
12186 But first, you should
12187 make sure that it really is a bug, and that it appears in the latest
12188 version of Bash.
12189 The latest version of Bash is always available for FTP from
12190 <A HREF="ftp://ftp.gnu.org/pub/bash/">ftp://ftp.gnu.org/pub/bash/</A>.
12191 </P><P>
12192
12193 Once you have determined that a bug actually exists, use the
12194 <CODE>bashbug</CODE> command to submit a bug report.
12195 If you have a fix, you are encouraged to mail that as well!
12196 Suggestions and `philosophical' bug reports may be mailed
12197 to <A HREF="mailto:bug-bash@gnu.org">bug-bash@gnu.org</A> or posted to the Usenet
12198 newsgroup <CODE>gnu.bash.bug</CODE>.
12199 </P><P>
12200
12201 All bug reports should include:
12202 <UL>
12203 <LI>
12204 The version number of Bash.
12205 <LI>
12206 The hardware and operating system.
12207 <LI>
12208 The compiler used to compile Bash.
12209 <LI>
12210 A description of the bug behaviour.
12211 <LI>
12212 A short script or `recipe' which exercises the bug and may be used
12213 to reproduce it.
12214 </UL>
12215 <P>
12216
12217 <CODE>bashbug</CODE> inserts the first three items automatically into
12218 the template it provides for filing a bug report.
12219 </P><P>
12220
12221 Please send all reports concerning this manual to
12222 <A HREF="mailto:chet@po.CWRU.Edu">chet@po.CWRU.Edu</A>.
12223 </P><P>
12224
12225 <A NAME="Major Differences From The Bourne Shell"></A>
12226 <HR SIZE="6">
12227 <A NAME="SEC132"></A>
12228 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
12229 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC131"> &lt; </A>]</TD>
12230 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC133"> &gt; </A>]</TD>
12231 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC134"> &lt;&lt; </A>]</TD>
12232 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top"> Up </A>]</TD>
12233 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC134"> &gt;&gt; </A>]</TD>
12234 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
12235 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
12236 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
12237 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
12238 </TR></TABLE>
12239 <H1> B. Major Differences From The Bourne Shell </H1>
12240 <!--docid::SEC132::-->
12241 <P>
12242
12243 Bash implements essentially the same grammar, parameter and
12244 variable expansion, redirection, and quoting as the Bourne Shell.
12245 Bash uses the POSIX 1003.2 standard as the specification of
12246 how these features are to be implemented. There are some
12247 differences between the traditional Bourne shell and Bash; this
12248 section quickly details the differences of significance. A
12249 number of these differences are explained in greater depth in
12250 previous sections.
12251 This section uses the version of <CODE>sh</CODE> included in SVR4.2 as
12252 the baseline reference.
12253 </P><P>
12254
12255 <UL>
12256
12257 <LI>
12258 Bash is POSIX-conformant, even where the POSIX specification
12259 differs from traditional <CODE>sh</CODE> behavior (see section <A HREF="bashref.html#SEC86">6.11 Bash POSIX Mode</A>).
12260 <P>
12261
12262 <LI>
12263 Bash has multi-character invocation options (see section <A HREF="bashref.html#SEC65">6.1 Invoking Bash</A>).
12264 <P>
12265
12266 <LI>
12267 Bash has command-line editing (see section <A HREF="bashref.html#SEC91">8. Command Line Editing</A>) and
12268 the <CODE>bind</CODE> builtin.
12269 <P>
12270
12271 <LI>
12272 Bash provides a programmable word completion mechanism
12273 (see section <A HREF="bashref.html#SEC113">8.6 Programmable Completion</A>), and two builtin commands,
12274 <CODE>complete</CODE> and <CODE>compgen</CODE>, to manipulate it.
12275 <P>
12276
12277 <LI>
12278 Bash has command history (see section <A HREF="bashref.html#SEC116">9.1 Bash History Facilities</A>) and the
12279 <CODE>history</CODE> and <CODE>fc</CODE> builtins to manipulate it.
12280 The Bash history list maintains timestamp information and uses the
12281 value of the <CODE>HISTTIMEFORMAT</CODE> variable to display it.
12282 <P>
12283
12284 <LI>
12285 Bash implements <CODE>csh</CODE>-like history expansion
12286 (see section <A HREF="bashref.html#SEC118">9.3 History Expansion</A>).
12287 <P>
12288
12289 <LI>
12290 Bash has one-dimensional array variables (see section <A HREF="bashref.html#SEC81">6.7 Arrays</A>), and the
12291 appropriate variable expansions and assignment syntax to use them.
12292 Several of the Bash builtins take options to act on arrays.
12293 Bash provides a number of built-in array variables.
12294 <P>
12295
12296 <LI>
12297 The <CODE>$'<small>...</small>'</CODE> quoting syntax, which expands ANSI-C
12298 backslash-escaped characters in the text between the single quotes,
12299 is supported (see section <A HREF="bashref.html#SEC12">3.1.2.4 ANSI-C Quoting</A>).
12300 <P>
12301
12302 <LI>
12303 Bash supports the <CODE>$"<small>...</small>"</CODE> quoting syntax to do
12304 locale-specific translation of the characters between the double
12305 quotes. The <SAMP>`-D'</SAMP>, <SAMP>`--dump-strings'</SAMP>, and <SAMP>`--dump-po-strings'</SAMP>
12306 invocation options list the translatable strings found in a script
12307 (see section <A HREF="bashref.html#SEC13">3.1.2.5 Locale-Specific Translation</A>).
12308 <P>
12309
12310 <LI>
12311 Bash implements the <CODE>!</CODE> keyword to negate the return value of
12312 a pipeline (see section <A HREF="bashref.html#SEC17">3.2.2 Pipelines</A>).
12313 Very useful when an <CODE>if</CODE> statement needs to act only if a test fails.
12314 <P>
12315
12316 <LI>
12317 Bash has the <CODE>time</CODE> reserved word and command timing (see section <A HREF="bashref.html#SEC17">3.2.2 Pipelines</A>).
12318 The display of the timing statistics may be controlled with the
12319 <CODE>TIMEFORMAT</CODE> variable.
12320 <P>
12321
12322 <LI>
12323 Bash implements the <CODE>for (( <VAR>expr1</VAR> ; <VAR>expr2</VAR> ; <VAR>expr3</VAR> ))</CODE>
12324 arithmetic for command, similar to the C language (see section <A HREF="bashref.html#SEC20">3.2.4.1 Looping Constructs</A>).
12325 <P>
12326
12327 <LI>
12328 Bash includes the <CODE>select</CODE> compound command, which allows the
12329 generation of simple menus (see section <A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A>).
12330 <P>
12331
12332 <LI>
12333 Bash includes the <CODE>[[</CODE> compound command, which makes conditional
12334 testing part of the shell grammar (see section <A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A>).
12335 <P>
12336
12337 <LI>
12338 Bash includes brace expansion (see section <A HREF="bashref.html#SEC28">3.5.1 Brace Expansion</A>) and tilde
12339 expansion (see section <A HREF="bashref.html#SEC29">3.5.2 Tilde Expansion</A>).
12340 <P>
12341
12342 <LI>
12343 Bash implements command aliases and the <CODE>alias</CODE> and <CODE>unalias</CODE>
12344 builtins (see section <A HREF="bashref.html#SEC80">6.6 Aliases</A>).
12345 <P>
12346
12347 <LI>
12348 Bash provides shell arithmetic, the <CODE>((</CODE> compound command
12349 (see section <A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A>),
12350 and arithmetic expansion (see section <A HREF="bashref.html#SEC79">6.5 Shell Arithmetic</A>).
12351 <P>
12352
12353 <LI>
12354 Variables present in the shell's initial environment are automatically
12355 exported to child processes. The Bourne shell does not normally do
12356 this unless the variables are explicitly marked using the <CODE>export</CODE>
12357 command.
12358 <P>
12359
12360 <LI>
12361 Bash includes the POSIX pattern removal <SAMP>`%'</SAMP>, <SAMP>`#'</SAMP>, <SAMP>`%%'</SAMP>
12362 and <SAMP>`##'</SAMP> expansions to remove leading or trailing substrings from
12363 variable values (see section <A HREF="bashref.html#SEC30">3.5.3 Shell Parameter Expansion</A>).
12364 <P>
12365
12366 <LI>
12367 The expansion <CODE>${#xx}</CODE>, which returns the length of <CODE>${xx}</CODE>,
12368 is supported (see section <A HREF="bashref.html#SEC30">3.5.3 Shell Parameter Expansion</A>).
12369 <P>
12370
12371 <LI>
12372 The expansion <CODE>${var:</CODE><VAR>offset</VAR><CODE>[:</CODE><VAR>length</VAR><CODE>]}</CODE>,
12373 which expands to the substring of <CODE>var</CODE>'s value of length
12374 <VAR>length</VAR>, beginning at <VAR>offset</VAR>, is present
12375 (see section <A HREF="bashref.html#SEC30">3.5.3 Shell Parameter Expansion</A>).
12376 <P>
12377
12378 <LI>
12379 The expansion
12380 <CODE>${var/[/]</CODE><VAR>pattern</VAR><CODE>[/</CODE><VAR>replacement</VAR><CODE>]}</CODE>,
12381 which matches <VAR>pattern</VAR> and replaces it with <VAR>replacement</VAR> in
12382 the value of <CODE>var</CODE>, is available (see section <A HREF="bashref.html#SEC30">3.5.3 Shell Parameter Expansion</A>).
12383 <P>
12384
12385 <LI>
12386 The expansion <CODE>${!<VAR>prefix}*</VAR></CODE> expansion, which expands to
12387 the names of all shell variables whose names begin with <VAR>prefix</VAR>,
12388 is available (see section <A HREF="bashref.html#SEC30">3.5.3 Shell Parameter Expansion</A>).
12389 <P>
12390
12391 <LI>
12392 Bash has <VAR>indirect</VAR> variable expansion using <CODE>${!word}</CODE>
12393 (see section <A HREF="bashref.html#SEC30">3.5.3 Shell Parameter Expansion</A>).
12394 <P>
12395
12396 <LI>
12397 Bash can expand positional parameters beyond <CODE>$9</CODE> using
12398 <CODE>${<VAR>num</VAR>}</CODE>.
12399 <P>
12400
12401 <LI>
12402 The POSIX <CODE>$()</CODE> form of command substitution
12403 is implemented (see section <A HREF="bashref.html#SEC31">3.5.4 Command Substitution</A>),
12404 and preferred to the Bourne shell's <CODE>"</CODE> (which
12405 is also implemented for backwards compatibility).
12406 <P>
12407
12408 <LI>
12409 Bash has process substitution (see section <A HREF="bashref.html#SEC33">3.5.6 Process Substitution</A>).
12410 <P>
12411
12412 <LI>
12413 Bash automatically assigns variables that provide information about the
12414 current user (<CODE>UID</CODE>, <CODE>EUID</CODE>, and <CODE>GROUPS</CODE>), the current host
12415 (<CODE>HOSTTYPE</CODE>, <CODE>OSTYPE</CODE>, <CODE>MACHTYPE</CODE>, and <CODE>HOSTNAME</CODE>),
12416 and the instance of Bash that is running (<CODE>BASH</CODE>,
12417 <CODE>BASH_VERSION</CODE>, and <CODE>BASH_VERSINFO</CODE>). See section <A HREF="bashref.html#SEC63">5.2 Bash Variables</A>,
12418 for details.
12419 <P>
12420
12421 <LI>
12422 The <CODE>IFS</CODE> variable is used to split only the results of expansion,
12423 not all words (see section <A HREF="bashref.html#SEC34">3.5.7 Word Splitting</A>).
12424 This closes a longstanding shell security hole.
12425 <P>
12426
12427 <LI>
12428 Bash implements the full set of POSIX 1003.2 filename expansion operators,
12429 including <VAR>character classes</VAR>, <VAR>equivalence classes</VAR>, and
12430 <VAR>collating symbols</VAR> (see section <A HREF="bashref.html#SEC35">3.5.8 Filename Expansion</A>).
12431 <P>
12432
12433 <LI>
12434 Bash implements extended pattern matching features when the <CODE>extglob</CODE>
12435 shell option is enabled (see section <A HREF="bashref.html#SEC36">3.5.8.1 Pattern Matching</A>).
12436 <P>
12437
12438 <LI>
12439 It is possible to have a variable and a function with the same name;
12440 <CODE>sh</CODE> does not separate the two name spaces.
12441 <P>
12442
12443 <LI>
12444 Bash functions are permitted to have local variables using the
12445 <CODE>local</CODE> builtin, and thus useful recursive functions may be written
12446 (see section <A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A>).
12447 <P>
12448
12449 <LI>
12450 Variable assignments preceding commands affect only that command, even
12451 builtins and functions (see section <A HREF="bashref.html#SEC52">3.7.4 Environment</A>).
12452 In <CODE>sh</CODE>, all variable assignments
12453 preceding commands are global unless the command is executed from the
12454 file system.
12455 <P>
12456
12457 <LI>
12458 Bash performs filename expansion on filenames specified as operands
12459 to input and output redirection operators (see section <A HREF="bashref.html#SEC38">3.6 Redirections</A>).
12460 <P>
12461
12462 <LI>
12463 Bash contains the <SAMP>`&#60;&#62;'</SAMP> redirection operator, allowing a file to be
12464 opened for both reading and writing, and the <SAMP>`&#38;&#62;'</SAMP> redirection
12465 operator, for directing standard output and standard error to the same
12466 file (see section <A HREF="bashref.html#SEC38">3.6 Redirections</A>).
12467 <P>
12468
12469 <LI>
12470 Bash treats a number of filenames specially when they are
12471 used in redirection operators (see section <A HREF="bashref.html#SEC38">3.6 Redirections</A>).
12472 <P>
12473
12474 <LI>
12475 Bash can open network connections to arbitrary machines and services
12476 with the redirection operators (see section <A HREF="bashref.html#SEC38">3.6 Redirections</A>).
12477 <P>
12478
12479 <LI>
12480 The <CODE>noclobber</CODE> option is available to avoid overwriting existing
12481 files with output redirection (see section <A HREF="bashref.html#SEC59">4.3 The Set Builtin</A>).
12482 The <SAMP>`&#62;|'</SAMP> redirection operator may be used to override <CODE>noclobber</CODE>.
12483 <P>
12484
12485 <LI>
12486 The Bash <CODE>cd</CODE> and <CODE>pwd</CODE> builtins (see section <A HREF="bashref.html#SEC57">4.1 Bourne Shell Builtins</A>)
12487 each take <SAMP>`-L'</SAMP> and <SAMP>`-P'</SAMP> options to switch between logical and
12488 physical modes.
12489 <P>
12490
12491 <LI>
12492 Bash allows a function to override a builtin with the same name, and provides
12493 access to that builtin's functionality within the function via the
12494 <CODE>builtin</CODE> and <CODE>command</CODE> builtins (see section <A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A>).
12495 <P>
12496
12497 <LI>
12498 The <CODE>command</CODE> builtin allows selective disabling of functions
12499 when command lookup is performed (see section <A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A>).
12500 <P>
12501
12502 <LI>
12503 Individual builtins may be enabled or disabled using the <CODE>enable</CODE>
12504 builtin (see section <A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A>).
12505 <P>
12506
12507 <LI>
12508 The Bash <CODE>exec</CODE> builtin takes additional options that allow users
12509 to control the contents of the environment passed to the executed
12510 command, and what the zeroth argument to the command is to be
12511 (see section <A HREF="bashref.html#SEC57">4.1 Bourne Shell Builtins</A>).
12512 <P>
12513
12514 <LI>
12515 Shell functions may be exported to children via the environment
12516 using <CODE>export -f</CODE> (see section <A HREF="bashref.html#SEC23">3.3 Shell Functions</A>).
12517 <P>
12518
12519 <LI>
12520 The Bash <CODE>export</CODE>, <CODE>readonly</CODE>, and <CODE>declare</CODE> builtins can
12521 take a <SAMP>`-f'</SAMP> option to act on shell functions, a <SAMP>`-p'</SAMP> option to
12522 display variables with various attributes set in a format that can be
12523 used as shell input, a <SAMP>`-n'</SAMP> option to remove various variable
12524 attributes, and <SAMP>`name=value'</SAMP> arguments to set variable attributes
12525 and values simultaneously.
12526 <P>
12527
12528 <LI>
12529 The Bash <CODE>hash</CODE> builtin allows a name to be associated with
12530 an arbitrary filename, even when that filename cannot be found by
12531 searching the <CODE>$PATH</CODE>, using <SAMP>`hash -p'</SAMP>
12532 (see section <A HREF="bashref.html#SEC57">4.1 Bourne Shell Builtins</A>).
12533 <P>
12534
12535 <LI>
12536 Bash includes a <CODE>help</CODE> builtin for quick reference to shell
12537 facilities (see section <A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A>).
12538 <P>
12539
12540 <LI>
12541 The <CODE>printf</CODE> builtin is available to display formatted output
12542 (see section <A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A>).
12543 <P>
12544
12545 <LI>
12546 The Bash <CODE>read</CODE> builtin (see section <A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A>)
12547 will read a line ending in <SAMP>`\'</SAMP> with
12548 the <SAMP>`-r'</SAMP> option, and will use the <CODE>REPLY</CODE> variable as a
12549 default if no non-option arguments are supplied.
12550 The Bash <CODE>read</CODE> builtin
12551 also accepts a prompt string with the <SAMP>`-p'</SAMP> option and will use
12552 Readline to obtain the line when given the <SAMP>`-e'</SAMP> option.
12553 The <CODE>read</CODE> builtin also has additional options to control input:
12554 the <SAMP>`-s'</SAMP> option will turn off echoing of input characters as
12555 they are read, the <SAMP>`-t'</SAMP> option will allow <CODE>read</CODE> to time out
12556 if input does not arrive within a specified number of seconds, the
12557 <SAMP>`-n'</SAMP> option will allow reading only a specified number of
12558 characters rather than a full line, and the <SAMP>`-d'</SAMP> option will read
12559 until a particular character rather than newline.
12560 <P>
12561
12562 <LI>
12563 The <CODE>return</CODE> builtin may be used to abort execution of scripts
12564 executed with the <CODE>.</CODE> or <CODE>source</CODE> builtins
12565 (see section <A HREF="bashref.html#SEC57">4.1 Bourne Shell Builtins</A>).
12566 <P>
12567
12568 <LI>
12569 Bash includes the <CODE>shopt</CODE> builtin, for finer control of shell
12570 optional capabilities (see section <A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A>), and allows these options
12571 to be set and unset at shell invocation (see section <A HREF="bashref.html#SEC65">6.1 Invoking Bash</A>).
12572 <P>
12573
12574 <LI>
12575 Bash has much more optional behavior controllable with the <CODE>set</CODE>
12576 builtin (see section <A HREF="bashref.html#SEC59">4.3 The Set Builtin</A>).
12577 <P>
12578
12579 <LI>
12580 The <SAMP>`-x'</SAMP> (<CODE>xtrace</CODE>) option displays commands other than
12581 simple commands when performing an execution trace
12582 (see section <A HREF="bashref.html#SEC59">4.3 The Set Builtin</A>).
12583 <P>
12584
12585 <LI>
12586 The <CODE>test</CODE> builtin (see section <A HREF="bashref.html#SEC57">4.1 Bourne Shell Builtins</A>)
12587 is slightly different, as it implements the POSIX algorithm,
12588 which specifies the behavior based on the number of arguments.
12589 <P>
12590
12591 <LI>
12592 Bash includes the <CODE>caller</CODE> builtin, which displays the context of
12593 any active subroutine call (a shell function or a script executed with
12594 the <CODE>.</CODE> or <CODE>source</CODE> builtins). This supports the bash
12595 debugger.
12596 <P>
12597
12598 <LI>
12599 The <CODE>trap</CODE> builtin (see section <A HREF="bashref.html#SEC57">4.1 Bourne Shell Builtins</A>) allows a
12600 <CODE>DEBUG</CODE> pseudo-signal specification, similar to <CODE>EXIT</CODE>.
12601 Commands specified with a <CODE>DEBUG</CODE> trap are executed before every
12602 simple command, <CODE>for</CODE> command, <CODE>case</CODE> command,
12603 <CODE>select</CODE> command, every arithmetic <CODE>for</CODE> command, and before
12604 the first command executes in a shell function.
12605 The <CODE>DEBUG</CODE> trap is not inherited by shell functions unless the
12606 function has been given the <CODE>trace</CODE> attribute or the
12607 <CODE>functrace</CODE> option has been enabled using the <CODE>shopt</CODE> builtin.
12608 The <CODE>extdebug</CODE> shell option has additional effects on the
12609 <CODE>DEBUG</CODE> trap.
12610 <P>
12611
12612 The <CODE>trap</CODE> builtin (see section <A HREF="bashref.html#SEC57">4.1 Bourne Shell Builtins</A>) allows an
12613 <CODE>ERR</CODE> pseudo-signal specification, similar to <CODE>EXIT</CODE> and <CODE>DEBUG</CODE>.
12614 Commands specified with an <CODE>ERR</CODE> trap are executed after a simple
12615 command fails, with a few exceptions.
12616 The <CODE>ERR</CODE> trap is not inherited by shell functions unless the
12617 <CODE>-o errtrace</CODE> option to the <CODE>set</CODE> builtin is enabled.
12618 </P><P>
12619
12620 The <CODE>trap</CODE> builtin (see section <A HREF="bashref.html#SEC57">4.1 Bourne Shell Builtins</A>) allows a
12621 <CODE>RETURN</CODE> pseudo-signal specification, similar to
12622 <CODE>EXIT</CODE> and <CODE>DEBUG</CODE>.
12623 Commands specified with an <CODE>RETURN</CODE> trap are executed before
12624 execution resumes after a shell function or a shell script executed with
12625 <CODE>.</CODE> or <CODE>source</CODE> returns.
12626 The <CODE>RETURN</CODE> trap is not inherited by shell functions.
12627 </P><P>
12628
12629 <LI>
12630 The Bash <CODE>type</CODE> builtin is more extensive and gives more information
12631 about the names it finds (see section <A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A>).
12632 <P>
12633
12634 <LI>
12635 The Bash <CODE>umask</CODE> builtin permits a <SAMP>`-p'</SAMP> option to cause
12636 the output to be displayed in the form of a <CODE>umask</CODE> command
12637 that may be reused as input (see section <A HREF="bashref.html#SEC57">4.1 Bourne Shell Builtins</A>).
12638 <P>
12639
12640 <LI>
12641 Bash implements a <CODE>csh</CODE>-like directory stack, and provides the
12642 <CODE>pushd</CODE>, <CODE>popd</CODE>, and <CODE>dirs</CODE> builtins to manipulate it
12643 (see section <A HREF="bashref.html#SEC82">6.8 The Directory Stack</A>).
12644 Bash also makes the directory stack visible as the value of the
12645 <CODE>DIRSTACK</CODE> shell variable.
12646 <P>
12647
12648 <LI>
12649 Bash interprets special backslash-escaped characters in the prompt
12650 strings when interactive (see section <A HREF="bashref.html#SEC84">6.9 Controlling the Prompt</A>).
12651 <P>
12652
12653 <LI>
12654 The Bash restricted mode is more useful (see section <A HREF="bashref.html#SEC85">6.10 The Restricted Shell</A>);
12655 the SVR4.2 shell restricted mode is too limited.
12656 <P>
12657
12658 <LI>
12659 The <CODE>disown</CODE> builtin can remove a job from the internal shell
12660 job table (see section <A HREF="bashref.html#SEC89">7.2 Job Control Builtins</A>) or suppress the sending
12661 of <CODE>SIGHUP</CODE> to a job when the shell exits as the result of a
12662 <CODE>SIGHUP</CODE>.
12663 <P>
12664
12665 <LI>
12666 The SVR4.2 shell has two privilege-related builtins
12667 (<CODE>mldmode</CODE> and <CODE>priv</CODE>) not present in Bash.
12668 <P>
12669
12670 <LI>
12671 Bash does not have the <CODE>stop</CODE> or <CODE>newgrp</CODE> builtins.
12672 <P>
12673
12674 <LI>
12675 Bash does not use the <CODE>SHACCT</CODE> variable or perform shell accounting.
12676 <P>
12677
12678 <LI>
12679 The SVR4.2 <CODE>sh</CODE> uses a <CODE>TIMEOUT</CODE> variable like Bash uses
12680 <CODE>TMOUT</CODE>.
12681 <P>
12682
12683 </UL>
12684 <P>
12685
12686 More features unique to Bash may be found in <A HREF="bashref.html#SEC64">6. Bash Features</A>.
12687 </P><P>
12688
12689 <HR SIZE="6">
12690 <A NAME="SEC133"></A>
12691 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
12692 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC132"> &lt; </A>]</TD>
12693 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC134"> &gt; </A>]</TD>
12694 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC132"> &lt;&lt; </A>]</TD>
12695 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC132"> Up </A>]</TD>
12696 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC134"> &gt;&gt; </A>]</TD>
12697 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
12698 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
12699 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
12700 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
12701 </TR></TABLE>
12702 <H2> B.1 Implementation Differences From The SVR4.2 Shell </H2>
12703 <!--docid::SEC133::-->
12704 <P>
12705
12706 Since Bash is a completely new implementation, it does not suffer from
12707 many of the limitations of the SVR4.2 shell. For instance:
12708 </P><P>
12709
12710 <UL>
12711
12712 <LI>
12713 Bash does not fork a subshell when redirecting into or out of
12714 a shell control structure such as an <CODE>if</CODE> or <CODE>while</CODE>
12715 statement.
12716 <P>
12717
12718 <LI>
12719 Bash does not allow unbalanced quotes. The SVR4.2 shell will silently
12720 insert a needed closing quote at <CODE>EOF</CODE> under certain circumstances.
12721 This can be the cause of some hard-to-find errors.
12722 <P>
12723
12724 <LI>
12725 The SVR4.2 shell uses a baroque memory management scheme based on
12726 trapping <CODE>SIGSEGV</CODE>. If the shell is started from a process with
12727 <CODE>SIGSEGV</CODE> blocked (e.g., by using the <CODE>system()</CODE> C library
12728 function call), it misbehaves badly.
12729 <P>
12730
12731 <LI>
12732 In a questionable attempt at security, the SVR4.2 shell,
12733 when invoked without the <SAMP>`-p'</SAMP> option, will alter its real
12734 and effective UID and GID if they are less than some
12735 magic threshold value, commonly 100.
12736 This can lead to unexpected results.
12737 <P>
12738
12739 <LI>
12740 The SVR4.2 shell does not allow users to trap <CODE>SIGSEGV</CODE>,
12741 <CODE>SIGALRM</CODE>, or <CODE>SIGCHLD</CODE>.
12742 <P>
12743
12744 <LI>
12745 The SVR4.2 shell does not allow the <CODE>IFS</CODE>, <CODE>MAILCHECK</CODE>,
12746 <CODE>PATH</CODE>, <CODE>PS1</CODE>, or <CODE>PS2</CODE> variables to be unset.
12747 <P>
12748
12749 <LI>
12750 The SVR4.2 shell treats <SAMP>`^'</SAMP> as the undocumented equivalent of
12751 <SAMP>`|'</SAMP>.
12752 <P>
12753
12754 <LI>
12755 Bash allows multiple option arguments when it is invoked (<CODE>-x -v</CODE>);
12756 the SVR4.2 shell allows only one option argument (<CODE>-xv</CODE>). In
12757 fact, some versions of the shell dump core if the second argument begins
12758 with a <SAMP>`-'</SAMP>.
12759 <P>
12760
12761 <LI>
12762 The SVR4.2 shell exits a script if any builtin fails; Bash exits
12763 a script only if one of the POSIX 1003.2 special builtins fails, and
12764 only for certain failures, as enumerated in the POSIX 1003.2 standard.
12765 <P>
12766
12767 <LI>
12768 The SVR4.2 shell behaves differently when invoked as <CODE>jsh</CODE>
12769 (it turns on job control).
12770 </UL>
12771 <P>
12772
12773 <A NAME="Copying This Manual"></A>
12774 <HR SIZE="6">
12775 <A NAME="SEC134"></A>
12776 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
12777 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC133"> &lt; </A>]</TD>
12778 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC135"> &gt; </A>]</TD>
12779 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
12780 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top"> Up </A>]</TD>
12781 <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
12782 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
12783 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
12784 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
12785 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
12786 </TR></TABLE>
12787 <H1> C. Copying This Manual </H1>
12788 <!--docid::SEC134::-->
12789 <P>
12790
12791 <BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
12792 <TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC135">C.1 GNU Free Documentation License</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">License for copying this manual.</TD></TR>
12793 </TABLE></BLOCKQUOTE>
12794 <P>
12795
12796 <A NAME="GNU Free Documentation License"></A>
12797 <HR SIZE="6">
12798 <A NAME="SEC135"></A>
12799 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
12800 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC134"> &lt; </A>]</TD>
12801 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC136"> &gt; </A>]</TD>
12802 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
12803 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC134"> Up </A>]</TD>
12804 <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
12805 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
12806 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
12807 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
12808 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
12809 </TR></TABLE>
12810 <H2> C.1 GNU Free Documentation License </H2>
12811 <!--docid::SEC135::-->
12812 <P>
12813
12814 <A NAME="IDX507"></A>
12815 <center>
12816 Version 1.2, November 2002
12817 </center>
12818 </P><P>
12819
12820 <TABLE><tr><td>&nbsp;</td><td class=display><pre style="font-family: serif">Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
12821 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
12822
12823 Everyone is permitted to copy and distribute verbatim copies
12824 of this license document, but changing it is not allowed.
12825 </pre></td></tr></table></P><P>
12826
12827 <OL>
12828 <LI>
12829 PREAMBLE
12830 <P>
12831
12832 The purpose of this License is to make a manual, textbook, or other
12833 functional and useful document <EM>free</EM> in the sense of freedom: to
12834 assure everyone the effective freedom to copy and redistribute it,
12835 with or without modifying it, either commercially or noncommercially.
12836 Secondarily, this License preserves for the author and publisher a way
12837 to get credit for their work, while not being considered responsible
12838 for modifications made by others.
12839 </P><P>
12840
12841 This License is a kind of "copyleft", which means that derivative
12842 works of the document must themselves be free in the same sense. It
12843 complements the GNU General Public License, which is a copyleft
12844 license designed for free software.
12845 </P><P>
12846
12847 We have designed this License in order to use it for manuals for free
12848 software, because free software needs free documentation: a free
12849 program should come with manuals providing the same freedoms that the
12850 software does. But this License is not limited to software manuals;
12851 it can be used for any textual work, regardless of subject matter or
12852 whether it is published as a printed book. We recommend this License
12853 principally for works whose purpose is instruction or reference.
12854 </P><P>
12855
12856 <LI>
12857 APPLICABILITY AND DEFINITIONS
12858 <P>
12859
12860 This License applies to any manual or other work, in any medium, that
12861 contains a notice placed by the copyright holder saying it can be
12862 distributed under the terms of this License. Such a notice grants a
12863 world-wide, royalty-free license, unlimited in duration, to use that
12864 work under the conditions stated herein. The "Document", below,
12865 refers to any such manual or work. Any member of the public is a
12866 licensee, and is addressed as "you". You accept the license if you
12867 copy, modify or distribute the work in a way requiring permission
12868 under copyright law.
12869 </P><P>
12870
12871 A "Modified Version" of the Document means any work containing the
12872 Document or a portion of it, either copied verbatim, or with
12873 modifications and/or translated into another language.
12874 </P><P>
12875
12876 A "Secondary Section" is a named appendix or a front-matter section
12877 of the Document that deals exclusively with the relationship of the
12878 publishers or authors of the Document to the Document's overall
12879 subject (or to related matters) and contains nothing that could fall
12880 directly within that overall subject. (Thus, if the Document is in
12881 part a textbook of mathematics, a Secondary Section may not explain
12882 any mathematics.) The relationship could be a matter of historical
12883 connection with the subject or with related matters, or of legal,
12884 commercial, philosophical, ethical or political position regarding
12885 them.
12886 </P><P>
12887
12888 The "Invariant Sections" are certain Secondary Sections whose titles
12889 are designated, as being those of Invariant Sections, in the notice
12890 that says that the Document is released under this License. If a
12891 section does not fit the above definition of Secondary then it is not
12892 allowed to be designated as Invariant. The Document may contain zero
12893 Invariant Sections. If the Document does not identify any Invariant
12894 Sections then there are none.
12895 </P><P>
12896
12897 The "Cover Texts" are certain short passages of text that are listed,
12898 as Front-Cover Texts or Back-Cover Texts, in the notice that says that
12899 the Document is released under this License. A Front-Cover Text may
12900 be at most 5 words, and a Back-Cover Text may be at most 25 words.
12901 </P><P>
12902
12903 A "Transparent" copy of the Document means a machine-readable copy,
12904 represented in a format whose specification is available to the
12905 general public, that is suitable for revising the document
12906 straightforwardly with generic text editors or (for images composed of
12907 pixels) generic paint programs or (for drawings) some widely available
12908 drawing editor, and that is suitable for input to text formatters or
12909 for automatic translation to a variety of formats suitable for input
12910 to text formatters. A copy made in an otherwise Transparent file
12911 format whose markup, or absence of markup, has been arranged to thwart
12912 or discourage subsequent modification by readers is not Transparent.
12913 An image format is not Transparent if used for any substantial amount
12914 of text. A copy that is not "Transparent" is called "Opaque".
12915 </P><P>
12916
12917 Examples of suitable formats for Transparent copies include plain
12918 ASCII without markup, Texinfo input format, LaTeX input
12919 format, <FONT SIZE="-1">SGML</FONT> or <FONT SIZE="-1">XML</FONT> using a publicly available
12920 <FONT SIZE="-1">DTD</FONT>, and standard-conforming simple <FONT SIZE="-1">HTML</FONT>,
12921 PostScript or <FONT SIZE="-1">PDF</FONT> designed for human modification. Examples
12922 of transparent image formats include <FONT SIZE="-1">PNG</FONT>, <FONT SIZE="-1">XCF</FONT> and
12923 <FONT SIZE="-1">JPG</FONT>. Opaque formats include proprietary formats that can be
12924 read and edited only by proprietary word processors, <FONT SIZE="-1">SGML</FONT> or
12925 <FONT SIZE="-1">XML</FONT> for which the <FONT SIZE="-1">DTD</FONT> and/or processing tools are
12926 not generally available, and the machine-generated <FONT SIZE="-1">HTML</FONT>,
12927 PostScript or <FONT SIZE="-1">PDF</FONT> produced by some word processors for
12928 output purposes only.
12929 </P><P>
12930
12931 The "Title Page" means, for a printed book, the title page itself,
12932 plus such following pages as are needed to hold, legibly, the material
12933 this License requires to appear in the title page. For works in
12934 formats which do not have any title page as such, "Title Page" means
12935 the text near the most prominent appearance of the work's title,
12936 preceding the beginning of the body of the text.
12937 </P><P>
12938
12939 A section "Entitled XYZ" means a named subunit of the Document whose
12940 title either is precisely XYZ or contains XYZ in parentheses following
12941 text that translates XYZ in another language. (Here XYZ stands for a
12942 specific section name mentioned below, such as "Acknowledgements",
12943 "Dedications", "Endorsements", or "History".) To "Preserve the Title"
12944 of such a section when you modify the Document means that it remains a
12945 section "Entitled XYZ" according to this definition.
12946 </P><P>
12947
12948 The Document may include Warranty Disclaimers next to the notice which
12949 states that this License applies to the Document. These Warranty
12950 Disclaimers are considered to be included by reference in this
12951 License, but only as regards disclaiming warranties: any other
12952 implication that these Warranty Disclaimers may have is void and has
12953 no effect on the meaning of this License.
12954 </P><P>
12955
12956 <LI>
12957 VERBATIM COPYING
12958 <P>
12959
12960 You may copy and distribute the Document in any medium, either
12961 commercially or noncommercially, provided that this License, the
12962 copyright notices, and the license notice saying this License applies
12963 to the Document are reproduced in all copies, and that you add no other
12964 conditions whatsoever to those of this License. You may not use
12965 technical measures to obstruct or control the reading or further
12966 copying of the copies you make or distribute. However, you may accept
12967 compensation in exchange for copies. If you distribute a large enough
12968 number of copies you must also follow the conditions in section 3.
12969 </P><P>
12970
12971 You may also lend copies, under the same conditions stated above, and
12972 you may publicly display copies.
12973 </P><P>
12974
12975 <LI>
12976 COPYING IN QUANTITY
12977 <P>
12978
12979 If you publish printed copies (or copies in media that commonly have
12980 printed covers) of the Document, numbering more than 100, and the
12981 Document's license notice requires Cover Texts, you must enclose the
12982 copies in covers that carry, clearly and legibly, all these Cover
12983 Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
12984 the back cover. Both covers must also clearly and legibly identify
12985 you as the publisher of these copies. The front cover must present
12986 the full title with all words of the title equally prominent and
12987 visible. You may add other material on the covers in addition.
12988 Copying with changes limited to the covers, as long as they preserve
12989 the title of the Document and satisfy these conditions, can be treated
12990 as verbatim copying in other respects.
12991 </P><P>
12992
12993 If the required texts for either cover are too voluminous to fit
12994 legibly, you should put the first ones listed (as many as fit
12995 reasonably) on the actual cover, and continue the rest onto adjacent
12996 pages.
12997 </P><P>
12998
12999 If you publish or distribute Opaque copies of the Document numbering
13000 more than 100, you must either include a machine-readable Transparent
13001 copy along with each Opaque copy, or state in or with each Opaque copy
13002 a computer-network location from which the general network-using
13003 public has access to download using public-standard network protocols
13004 a complete Transparent copy of the Document, free of added material.
13005 If you use the latter option, you must take reasonably prudent steps,
13006 when you begin distribution of Opaque copies in quantity, to ensure
13007 that this Transparent copy will remain thus accessible at the stated
13008 location until at least one year after the last time you distribute an
13009 Opaque copy (directly or through your agents or retailers) of that
13010 edition to the public.
13011 </P><P>
13012
13013 It is requested, but not required, that you contact the authors of the
13014 Document well before redistributing any large number of copies, to give
13015 them a chance to provide you with an updated version of the Document.
13016 </P><P>
13017
13018 <LI>
13019 MODIFICATIONS
13020 <P>
13021
13022 You may copy and distribute a Modified Version of the Document under
13023 the conditions of sections 2 and 3 above, provided that you release
13024 the Modified Version under precisely this License, with the Modified
13025 Version filling the role of the Document, thus licensing distribution
13026 and modification of the Modified Version to whoever possesses a copy
13027 of it. In addition, you must do these things in the Modified Version:
13028 </P><P>
13029
13030 <OL>
13031 <LI>
13032 Use in the Title Page (and on the covers, if any) a title distinct
13033 from that of the Document, and from those of previous versions
13034 (which should, if there were any, be listed in the History section
13035 of the Document). You may use the same title as a previous version
13036 if the original publisher of that version gives permission.
13037 <P>
13038
13039 <LI>
13040 List on the Title Page, as authors, one or more persons or entities
13041 responsible for authorship of the modifications in the Modified
13042 Version, together with at least five of the principal authors of the
13043 Document (all of its principal authors, if it has fewer than five),
13044 unless they release you from this requirement.
13045 <P>
13046
13047 <LI>
13048 State on the Title page the name of the publisher of the
13049 Modified Version, as the publisher.
13050 <P>
13051
13052 <LI>
13053 Preserve all the copyright notices of the Document.
13054 <P>
13055
13056 <LI>
13057 Add an appropriate copyright notice for your modifications
13058 adjacent to the other copyright notices.
13059 <P>
13060
13061 <LI>
13062 Include, immediately after the copyright notices, a license notice
13063 giving the public permission to use the Modified Version under the
13064 terms of this License, in the form shown in the Addendum below.
13065 <P>
13066
13067 <LI>
13068 Preserve in that license notice the full lists of Invariant Sections
13069 and required Cover Texts given in the Document's license notice.
13070 <P>
13071
13072 <LI>
13073 Include an unaltered copy of this License.
13074 <P>
13075
13076 <LI>
13077 Preserve the section Entitled "History", Preserve its Title, and add
13078 to it an item stating at least the title, year, new authors, and
13079 publisher of the Modified Version as given on the Title Page. If
13080 there is no section Entitled "History" in the Document, create one
13081 stating the title, year, authors, and publisher of the Document as
13082 given on its Title Page, then add an item describing the Modified
13083 Version as stated in the previous sentence.
13084 <P>
13085
13086 <LI>
13087 Preserve the network location, if any, given in the Document for
13088 public access to a Transparent copy of the Document, and likewise
13089 the network locations given in the Document for previous versions
13090 it was based on. These may be placed in the "History" section.
13091 You may omit a network location for a work that was published at
13092 least four years before the Document itself, or if the original
13093 publisher of the version it refers to gives permission.
13094 <P>
13095
13096 <LI>
13097 For any section Entitled "Acknowledgements" or "Dedications", Preserve
13098 the Title of the section, and preserve in the section all the
13099 substance and tone of each of the contributor acknowledgements and/or
13100 dedications given therein.
13101 <P>
13102
13103 <LI>
13104 Preserve all the Invariant Sections of the Document,
13105 unaltered in their text and in their titles. Section numbers
13106 or the equivalent are not considered part of the section titles.
13107 <P>
13108
13109 <LI>
13110 Delete any section Entitled "Endorsements". Such a section
13111 may not be included in the Modified Version.
13112 <P>
13113
13114 <LI>
13115 Do not retitle any existing section to be Entitled "Endorsements" or
13116 to conflict in title with any Invariant Section.
13117 <P>
13118
13119 <LI>
13120 Preserve any Warranty Disclaimers.
13121 </OL>
13122 <P>
13123
13124 If the Modified Version includes new front-matter sections or
13125 appendices that qualify as Secondary Sections and contain no material
13126 copied from the Document, you may at your option designate some or all
13127 of these sections as invariant. To do this, add their titles to the
13128 list of Invariant Sections in the Modified Version's license notice.
13129 These titles must be distinct from any other section titles.
13130 </P><P>
13131
13132 You may add a section Entitled "Endorsements", provided it contains
13133 nothing but endorsements of your Modified Version by various
13134 parties--for example, statements of peer review or that the text has
13135 been approved by an organization as the authoritative definition of a
13136 standard.
13137 </P><P>
13138
13139 You may add a passage of up to five words as a Front-Cover Text, and a
13140 passage of up to 25 words as a Back-Cover Text, to the end of the list
13141 of Cover Texts in the Modified Version. Only one passage of
13142 Front-Cover Text and one of Back-Cover Text may be added by (or
13143 through arrangements made by) any one entity. If the Document already
13144 includes a cover text for the same cover, previously added by you or
13145 by arrangement made by the same entity you are acting on behalf of,
13146 you may not add another; but you may replace the old one, on explicit
13147 permission from the previous publisher that added the old one.
13148 </P><P>
13149
13150 The author(s) and publisher(s) of the Document do not by this License
13151 give permission to use their names for publicity for or to assert or
13152 imply endorsement of any Modified Version.
13153 </P><P>
13154
13155 <LI>
13156 COMBINING DOCUMENTS
13157 <P>
13158
13159 You may combine the Document with other documents released under this
13160 License, under the terms defined in section 4 above for modified
13161 versions, provided that you include in the combination all of the
13162 Invariant Sections of all of the original documents, unmodified, and
13163 list them all as Invariant Sections of your combined work in its
13164 license notice, and that you preserve all their Warranty Disclaimers.
13165 </P><P>
13166
13167 The combined work need only contain one copy of this License, and
13168 multiple identical Invariant Sections may be replaced with a single
13169 copy. If there are multiple Invariant Sections with the same name but
13170 different contents, make the title of each such section unique by
13171 adding at the end of it, in parentheses, the name of the original
13172 author or publisher of that section if known, or else a unique number.
13173 Make the same adjustment to the section titles in the list of
13174 Invariant Sections in the license notice of the combined work.
13175 </P><P>
13176
13177 In the combination, you must combine any sections Entitled "History"
13178 in the various original documents, forming one section Entitled
13179 "History"; likewise combine any sections Entitled "Acknowledgements",
13180 and any sections Entitled "Dedications". You must delete all
13181 sections Entitled "Endorsements."
13182 </P><P>
13183
13184 <LI>
13185 COLLECTIONS OF DOCUMENTS
13186 <P>
13187
13188 You may make a collection consisting of the Document and other documents
13189 released under this License, and replace the individual copies of this
13190 License in the various documents with a single copy that is included in
13191 the collection, provided that you follow the rules of this License for
13192 verbatim copying of each of the documents in all other respects.
13193 </P><P>
13194
13195 You may extract a single document from such a collection, and distribute
13196 it individually under this License, provided you insert a copy of this
13197 License into the extracted document, and follow this License in all
13198 other respects regarding verbatim copying of that document.
13199 </P><P>
13200
13201 <LI>
13202 AGGREGATION WITH INDEPENDENT WORKS
13203 <P>
13204
13205 A compilation of the Document or its derivatives with other separate
13206 and independent documents or works, in or on a volume of a storage or
13207 distribution medium, is called an "aggregate" if the copyright
13208 resulting from the compilation is not used to limit the legal rights
13209 of the compilation's users beyond what the individual works permit.
13210 When the Document is included an aggregate, this License does not
13211 apply to the other works in the aggregate which are not themselves
13212 derivative works of the Document.
13213 </P><P>
13214
13215 If the Cover Text requirement of section 3 is applicable to these
13216 copies of the Document, then if the Document is less than one half of
13217 the entire aggregate, the Document's Cover Texts may be placed on
13218 covers that bracket the Document within the aggregate, or the
13219 electronic equivalent of covers if the Document is in electronic form.
13220 Otherwise they must appear on printed covers that bracket the whole
13221 aggregate.
13222 </P><P>
13223
13224 <LI>
13225 TRANSLATION
13226 <P>
13227
13228 Translation is considered a kind of modification, so you may
13229 distribute translations of the Document under the terms of section 4.
13230 Replacing Invariant Sections with translations requires special
13231 permission from their copyright holders, but you may include
13232 translations of some or all Invariant Sections in addition to the
13233 original versions of these Invariant Sections. You may include a
13234 translation of this License, and all the license notices in the
13235 Document, and any Warranty Disclaimers, provided that you also include
13236 the original English version of this License and the original versions
13237 of those notices and disclaimers. In case of a disagreement between
13238 the translation and the original version of this License or a notice
13239 or disclaimer, the original version will prevail.
13240 </P><P>
13241
13242 If a section in the Document is Entitled "Acknowledgements",
13243 "Dedications", or "History", the requirement (section 4) to Preserve
13244 its Title (section 1) will typically require changing the actual
13245 title.
13246 </P><P>
13247
13248 <LI>
13249 TERMINATION
13250 <P>
13251
13252 You may not copy, modify, sublicense, or distribute the Document except
13253 as expressly provided for under this License. Any other attempt to
13254 copy, modify, sublicense or distribute the Document is void, and will
13255 automatically terminate your rights under this License. However,
13256 parties who have received copies, or rights, from you under this
13257 License will not have their licenses terminated so long as such
13258 parties remain in full compliance.
13259 </P><P>
13260
13261 <LI>
13262 FUTURE REVISIONS OF THIS LICENSE
13263 <P>
13264
13265 The Free Software Foundation may publish new, revised versions
13266 of the GNU Free Documentation License from time to time. Such new
13267 versions will be similar in spirit to the present version, but may
13268 differ in detail to address new problems or concerns. See
13269 <A HREF="http://www.gnu.org/copyleft/">http://www.gnu.org/copyleft/</A>.
13270 </P><P>
13271
13272 Each version of the License is given a distinguishing version number.
13273 If the Document specifies that a particular numbered version of this
13274 License "or any later version" applies to it, you have the option of
13275 following the terms and conditions either of that specified version or
13276 of any later version that has been published (not as a draft) by the
13277 Free Software Foundation. If the Document does not specify a version
13278 number of this License, you may choose any version ever published (not
13279 as a draft) by the Free Software Foundation.
13280 </OL>
13281 <P>
13282
13283 <HR SIZE="6">
13284 <A NAME="SEC136"></A>
13285 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
13286 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC135"> &lt; </A>]</TD>
13287 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC137"> &gt; </A>]</TD>
13288 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
13289 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC135"> Up </A>]</TD>
13290 <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
13291 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
13292 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
13293 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
13294 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
13295 </TR></TABLE>
13296 <H3> C.1.1 ADDENDUM: How to use this License for your documents </H3>
13297 <!--docid::SEC136::-->
13298 <P>
13299
13300 To use this License in a document you have written, include a copy of
13301 the License in the document and put the following copyright and
13302 license notices just after the title page:
13303 </P><P>
13304
13305 <TABLE><tr><td>&nbsp;</td><td class=smallexample><FONT SIZE=-1><pre> Copyright (C) <VAR>year</VAR> <VAR>your name</VAR>.
13306 Permission is granted to copy, distribute and/or modify this document
13307 under the terms of the GNU Free Documentation License, Version 1.2
13308 or any later version published by the Free Software Foundation;
13309 with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
13310 A copy of the license is included in the section entitled ``GNU
13311 Free Documentation License''.
13312 </FONT></pre></td></tr></table></P><P>
13313
13314 If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
13315 replace the "with...Texts." line with this:
13316 </P><P>
13317
13318 <TABLE><tr><td>&nbsp;</td><td class=smallexample><FONT SIZE=-1><pre> with the Invariant Sections being <VAR>list their titles</VAR>, with
13319 the Front-Cover Texts being <VAR>list</VAR>, and with the Back-Cover Texts
13320 being <VAR>list</VAR>.
13321 </FONT></pre></td></tr></table></P><P>
13322
13323 If you have Invariant Sections without Cover Texts, or some other
13324 combination of the three, merge those two alternatives to suit the
13325 situation.
13326 </P><P>
13327
13328 If your document contains nontrivial examples of program code, we
13329 recommend releasing these examples in parallel under your choice of
13330 free software license, such as the GNU General Public License,
13331 to permit their use in free software.
13332 </P><P>
13333
13334 <A NAME="Builtin Index"></A>
13335 <HR SIZE="6">
13336 <A NAME="SEC137"></A>
13337 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
13338 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC136"> &lt; </A>]</TD>
13339 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC138"> &gt; </A>]</TD>
13340 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
13341 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top"> Up </A>]</TD>
13342 <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
13343 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
13344 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
13345 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
13346 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
13347 </TR></TABLE>
13348 <H1> Index of Shell Builtin Commands </H1>
13349 <!--docid::SEC137::-->
13350 <table><tr><th valign=top>Jump to: &nbsp; </th><td><A HREF="bashref.html#bt_." style="text-decoration:none"><b>.</b></A>
13351 &nbsp;
13352 <A HREF="bashref.html#bt_:" style="text-decoration:none"><b>:</b></A>
13353 &nbsp;
13354 <A HREF="bashref.html#bt_[" style="text-decoration:none"><b>[</b></A>
13355 &nbsp;
13356 <BR>
13357 <A HREF="bashref.html#bt_A" style="text-decoration:none"><b>A</b></A>
13358 &nbsp;
13359 <A HREF="bashref.html#bt_B" style="text-decoration:none"><b>B</b></A>
13360 &nbsp;
13361 <A HREF="bashref.html#bt_C" style="text-decoration:none"><b>C</b></A>
13362 &nbsp;
13363 <A HREF="bashref.html#bt_D" style="text-decoration:none"><b>D</b></A>
13364 &nbsp;
13365 <A HREF="bashref.html#bt_E" style="text-decoration:none"><b>E</b></A>
13366 &nbsp;
13367 <A HREF="bashref.html#bt_F" style="text-decoration:none"><b>F</b></A>
13368 &nbsp;
13369 <A HREF="bashref.html#bt_G" style="text-decoration:none"><b>G</b></A>
13370 &nbsp;
13371 <A HREF="bashref.html#bt_H" style="text-decoration:none"><b>H</b></A>
13372 &nbsp;
13373 <A HREF="bashref.html#bt_J" style="text-decoration:none"><b>J</b></A>
13374 &nbsp;
13375 <A HREF="bashref.html#bt_K" style="text-decoration:none"><b>K</b></A>
13376 &nbsp;
13377 <A HREF="bashref.html#bt_L" style="text-decoration:none"><b>L</b></A>
13378 &nbsp;
13379 <A HREF="bashref.html#bt_P" style="text-decoration:none"><b>P</b></A>
13380 &nbsp;
13381 <A HREF="bashref.html#bt_R" style="text-decoration:none"><b>R</b></A>
13382 &nbsp;
13383 <A HREF="bashref.html#bt_S" style="text-decoration:none"><b>S</b></A>
13384 &nbsp;
13385 <A HREF="bashref.html#bt_T" style="text-decoration:none"><b>T</b></A>
13386 &nbsp;
13387 <A HREF="bashref.html#bt_U" style="text-decoration:none"><b>U</b></A>
13388 &nbsp;
13389 <A HREF="bashref.html#bt_W" style="text-decoration:none"><b>W</b></A>
13390 &nbsp;
13391 </td></tr></table><br><P></P>
13392 <TABLE border=0>
13393 <TR><TD></TD><TH ALIGN=LEFT>Index Entry</TH><TH ALIGN=LEFT> Section</TH></TR>
13394 <TR><TD COLSPAN=3> <HR></TD></TR>
13395 <TR><TH><A NAME="bt_."></A>.</TH><TD></TD><TD></TD></TR>
13396 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX69"><CODE>.</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC57">4.1 Bourne Shell Builtins</A></TD></TR>
13397 <TR><TD COLSPAN=3> <HR></TD></TR>
13398 <TR><TH><A NAME="bt_:"></A>:</TH><TD></TD><TD></TD></TR>
13399 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX68"><CODE>:</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC57">4.1 Bourne Shell Builtins</A></TD></TR>
13400 <TR><TD COLSPAN=3> <HR></TD></TR>
13401 <TR><TH><A NAME="bt_["></A>[</TH><TD></TD><TD></TD></TR>
13402 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX84"><CODE>[</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC57">4.1 Bourne Shell Builtins</A></TD></TR>
13403 <TR><TD COLSPAN=3> <HR></TD></TR>
13404 <TR><TH><A NAME="bt_A"></A>A</TH><TD></TD><TD></TD></TR>
13405 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX89"><CODE>alias</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A></TD></TR>
13406 <TR><TD COLSPAN=3> <HR></TD></TR>
13407 <TR><TH><A NAME="bt_B"></A>B</TH><TD></TD><TD></TD></TR>
13408 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX273"><CODE>bg</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC89">7.2 Job Control Builtins</A></TD></TR>
13409 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX90"><CODE>bind</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A></TD></TR>
13410 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX70"><CODE>break</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC57">4.1 Bourne Shell Builtins</A></TD></TR>
13411 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX91"><CODE>builtin</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A></TD></TR>
13412 <TR><TD COLSPAN=3> <HR></TD></TR>
13413 <TR><TH><A NAME="bt_C"></A>C</TH><TD></TD><TD></TD></TR>
13414 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX92"><CODE>caller</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A></TD></TR>
13415 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX71"><CODE>cd</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC57">4.1 Bourne Shell Builtins</A></TD></TR>
13416 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX93"><CODE>command</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A></TD></TR>
13417 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX501"><CODE>compgen</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC114">8.7 Programmable Completion Builtins</A></TD></TR>
13418 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX502"><CODE>complete</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC114">8.7 Programmable Completion Builtins</A></TD></TR>
13419 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX72"><CODE>continue</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC57">4.1 Bourne Shell Builtins</A></TD></TR>
13420 <TR><TD COLSPAN=3> <HR></TD></TR>
13421 <TR><TH><A NAME="bt_D"></A>D</TH><TD></TD><TD></TD></TR>
13422 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX94"><CODE>declare</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A></TD></TR>
13423 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX270"><CODE>dirs</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC83">6.8.1 Directory Stack Builtins</A></TD></TR>
13424 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX278"><CODE>disown</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC89">7.2 Job Control Builtins</A></TD></TR>
13425 <TR><TD COLSPAN=3> <HR></TD></TR>
13426 <TR><TH><A NAME="bt_E"></A>E</TH><TD></TD><TD></TD></TR>
13427 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX95"><CODE>echo</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A></TD></TR>
13428 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX96"><CODE>enable</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A></TD></TR>
13429 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX73"><CODE>eval</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC57">4.1 Bourne Shell Builtins</A></TD></TR>
13430 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX74"><CODE>exec</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC57">4.1 Bourne Shell Builtins</A></TD></TR>
13431 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX75"><CODE>exit</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC57">4.1 Bourne Shell Builtins</A></TD></TR>
13432 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX76"><CODE>export</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC57">4.1 Bourne Shell Builtins</A></TD></TR>
13433 <TR><TD COLSPAN=3> <HR></TD></TR>
13434 <TR><TH><A NAME="bt_F"></A>F</TH><TD></TD><TD></TD></TR>
13435 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX504"><CODE>fc</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC117">9.2 Bash History Builtins</A></TD></TR>
13436 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX274"><CODE>fg</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC89">7.2 Job Control Builtins</A></TD></TR>
13437 <TR><TD COLSPAN=3> <HR></TD></TR>
13438 <TR><TH><A NAME="bt_G"></A>G</TH><TD></TD><TD></TD></TR>
13439 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX77"><CODE>getopts</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC57">4.1 Bourne Shell Builtins</A></TD></TR>
13440 <TR><TD COLSPAN=3> <HR></TD></TR>
13441 <TR><TH><A NAME="bt_H"></A>H</TH><TD></TD><TD></TD></TR>
13442 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX78"><CODE>hash</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC57">4.1 Bourne Shell Builtins</A></TD></TR>
13443 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX97"><CODE>help</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A></TD></TR>
13444 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX505"><CODE>history</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC117">9.2 Bash History Builtins</A></TD></TR>
13445 <TR><TD COLSPAN=3> <HR></TD></TR>
13446 <TR><TH><A NAME="bt_J"></A>J</TH><TD></TD><TD></TD></TR>
13447 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX275"><CODE>jobs</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC89">7.2 Job Control Builtins</A></TD></TR>
13448 <TR><TD COLSPAN=3> <HR></TD></TR>
13449 <TR><TH><A NAME="bt_K"></A>K</TH><TD></TD><TD></TD></TR>
13450 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX276"><CODE>kill</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC89">7.2 Job Control Builtins</A></TD></TR>
13451 <TR><TD COLSPAN=3> <HR></TD></TR>
13452 <TR><TH><A NAME="bt_L"></A>L</TH><TD></TD><TD></TD></TR>
13453 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX98"><CODE>let</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A></TD></TR>
13454 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX99"><CODE>local</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A></TD></TR>
13455 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX100"><CODE>logout</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A></TD></TR>
13456 <TR><TD COLSPAN=3> <HR></TD></TR>
13457 <TR><TH><A NAME="bt_P"></A>P</TH><TD></TD><TD></TD></TR>
13458 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX271"><CODE>popd</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC83">6.8.1 Directory Stack Builtins</A></TD></TR>
13459 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX101"><CODE>printf</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A></TD></TR>
13460 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX272"><CODE>pushd</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC83">6.8.1 Directory Stack Builtins</A></TD></TR>
13461 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX79"><CODE>pwd</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC57">4.1 Bourne Shell Builtins</A></TD></TR>
13462 <TR><TD COLSPAN=3> <HR></TD></TR>
13463 <TR><TH><A NAME="bt_R"></A>R</TH><TD></TD><TD></TD></TR>
13464 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX102"><CODE>read</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A></TD></TR>
13465 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX80"><CODE>readonly</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC57">4.1 Bourne Shell Builtins</A></TD></TR>
13466 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX81"><CODE>return</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC57">4.1 Bourne Shell Builtins</A></TD></TR>
13467 <TR><TD COLSPAN=3> <HR></TD></TR>
13468 <TR><TH><A NAME="bt_S"></A>S</TH><TD></TD><TD></TD></TR>
13469 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX109"><CODE>set</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC59">4.3 The Set Builtin</A></TD></TR>
13470 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX82"><CODE>shift</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC57">4.1 Bourne Shell Builtins</A></TD></TR>
13471 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX103"><CODE>shopt</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A></TD></TR>
13472 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX104"><CODE>source</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A></TD></TR>
13473 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX279"><CODE>suspend</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC89">7.2 Job Control Builtins</A></TD></TR>
13474 <TR><TD COLSPAN=3> <HR></TD></TR>
13475 <TR><TH><A NAME="bt_T"></A>T</TH><TD></TD><TD></TD></TR>
13476 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX83"><CODE>test</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC57">4.1 Bourne Shell Builtins</A></TD></TR>
13477 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX85"><CODE>times</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC57">4.1 Bourne Shell Builtins</A></TD></TR>
13478 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX86"><CODE>trap</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC57">4.1 Bourne Shell Builtins</A></TD></TR>
13479 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX105"><CODE>type</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A></TD></TR>
13480 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX106"><CODE>typeset</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A></TD></TR>
13481 <TR><TD COLSPAN=3> <HR></TD></TR>
13482 <TR><TH><A NAME="bt_U"></A>U</TH><TD></TD><TD></TD></TR>
13483 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX107"><CODE>ulimit</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A></TD></TR>
13484 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX87"><CODE>umask</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC57">4.1 Bourne Shell Builtins</A></TD></TR>
13485 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX108"><CODE>unalias</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A></TD></TR>
13486 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX88"><CODE>unset</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC57">4.1 Bourne Shell Builtins</A></TD></TR>
13487 <TR><TD COLSPAN=3> <HR></TD></TR>
13488 <TR><TH><A NAME="bt_W"></A>W</TH><TD></TD><TD></TD></TR>
13489 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX277"><CODE>wait</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC89">7.2 Job Control Builtins</A></TD></TR>
13490 <TR><TD COLSPAN=3> <HR></TD></TR>
13491 </TABLE><P></P><table><tr><th valign=top>Jump to: &nbsp; </th><td><A HREF="bashref.html#bt_." style="text-decoration:none"><b>.</b></A>
13492 &nbsp;
13493 <A HREF="bashref.html#bt_:" style="text-decoration:none"><b>:</b></A>
13494 &nbsp;
13495 <A HREF="bashref.html#bt_[" style="text-decoration:none"><b>[</b></A>
13496 &nbsp;
13497 <BR>
13498 <A HREF="bashref.html#bt_A" style="text-decoration:none"><b>A</b></A>
13499 &nbsp;
13500 <A HREF="bashref.html#bt_B" style="text-decoration:none"><b>B</b></A>
13501 &nbsp;
13502 <A HREF="bashref.html#bt_C" style="text-decoration:none"><b>C</b></A>
13503 &nbsp;
13504 <A HREF="bashref.html#bt_D" style="text-decoration:none"><b>D</b></A>
13505 &nbsp;
13506 <A HREF="bashref.html#bt_E" style="text-decoration:none"><b>E</b></A>
13507 &nbsp;
13508 <A HREF="bashref.html#bt_F" style="text-decoration:none"><b>F</b></A>
13509 &nbsp;
13510 <A HREF="bashref.html#bt_G" style="text-decoration:none"><b>G</b></A>
13511 &nbsp;
13512 <A HREF="bashref.html#bt_H" style="text-decoration:none"><b>H</b></A>
13513 &nbsp;
13514 <A HREF="bashref.html#bt_J" style="text-decoration:none"><b>J</b></A>
13515 &nbsp;
13516 <A HREF="bashref.html#bt_K" style="text-decoration:none"><b>K</b></A>
13517 &nbsp;
13518 <A HREF="bashref.html#bt_L" style="text-decoration:none"><b>L</b></A>
13519 &nbsp;
13520 <A HREF="bashref.html#bt_P" style="text-decoration:none"><b>P</b></A>
13521 &nbsp;
13522 <A HREF="bashref.html#bt_R" style="text-decoration:none"><b>R</b></A>
13523 &nbsp;
13524 <A HREF="bashref.html#bt_S" style="text-decoration:none"><b>S</b></A>
13525 &nbsp;
13526 <A HREF="bashref.html#bt_T" style="text-decoration:none"><b>T</b></A>
13527 &nbsp;
13528 <A HREF="bashref.html#bt_U" style="text-decoration:none"><b>U</b></A>
13529 &nbsp;
13530 <A HREF="bashref.html#bt_W" style="text-decoration:none"><b>W</b></A>
13531 &nbsp;
13532 </td></tr></table><br><P>
13533
13534 <A NAME="Reserved Word Index"></A>
13535 <HR SIZE="6">
13536 <A NAME="SEC138"></A>
13537 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
13538 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC137"> &lt; </A>]</TD>
13539 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC139"> &gt; </A>]</TD>
13540 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
13541 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top"> Up </A>]</TD>
13542 <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
13543 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
13544 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
13545 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
13546 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
13547 </TR></TABLE>
13548 <H1> Index of Shell Reserved Words </H1>
13549 <!--docid::SEC138::-->
13550 <table><tr><th valign=top>Jump to: &nbsp; </th><td><A HREF="bashref.html#rw_!" style="text-decoration:none"><b>!</b></A>
13551 &nbsp;
13552 <A HREF="bashref.html#rw_[" style="text-decoration:none"><b>[</b></A>
13553 &nbsp;
13554 <A HREF="bashref.html#rw_]" style="text-decoration:none"><b>]</b></A>
13555 &nbsp;
13556 <A HREF="bashref.html#rw_{" style="text-decoration:none"><b>{</b></A>
13557 &nbsp;
13558 <A HREF="bashref.html#rw_}" style="text-decoration:none"><b>}</b></A>
13559 &nbsp;
13560 <BR>
13561 <A HREF="bashref.html#rw_C" style="text-decoration:none"><b>C</b></A>
13562 &nbsp;
13563 <A HREF="bashref.html#rw_D" style="text-decoration:none"><b>D</b></A>
13564 &nbsp;
13565 <A HREF="bashref.html#rw_E" style="text-decoration:none"><b>E</b></A>
13566 &nbsp;
13567 <A HREF="bashref.html#rw_F" style="text-decoration:none"><b>F</b></A>
13568 &nbsp;
13569 <A HREF="bashref.html#rw_I" style="text-decoration:none"><b>I</b></A>
13570 &nbsp;
13571 <A HREF="bashref.html#rw_S" style="text-decoration:none"><b>S</b></A>
13572 &nbsp;
13573 <A HREF="bashref.html#rw_T" style="text-decoration:none"><b>T</b></A>
13574 &nbsp;
13575 <A HREF="bashref.html#rw_U" style="text-decoration:none"><b>U</b></A>
13576 &nbsp;
13577 <A HREF="bashref.html#rw_W" style="text-decoration:none"><b>W</b></A>
13578 &nbsp;
13579 </td></tr></table><br><P></P>
13580 <TABLE border=0>
13581 <TR><TD></TD><TH ALIGN=LEFT>Index Entry</TH><TH ALIGN=LEFT> Section</TH></TR>
13582 <TR><TD COLSPAN=3> <HR></TD></TR>
13583 <TR><TH><A NAME="rw_!"></A>!</TH><TD></TD><TD></TD></TR>
13584 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX25"><CODE>!</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC17">3.2.2 Pipelines</A></TD></TR>
13585 <TR><TD COLSPAN=3> <HR></TD></TR>
13586 <TR><TH><A NAME="rw_["></A>[</TH><TD></TD><TD></TD></TR>
13587 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX41"><CODE>[[</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A></TD></TR>
13588 <TR><TD COLSPAN=3> <HR></TD></TR>
13589 <TR><TH><A NAME="rw_]"></A>]</TH><TD></TD><TD></TD></TR>
13590 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX42"><CODE>]]</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A></TD></TR>
13591 <TR><TD COLSPAN=3> <HR></TD></TR>
13592 <TR><TH><A NAME="rw_{"></A>{</TH><TD></TD><TD></TD></TR>
13593 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX43"><CODE>{</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC22">3.2.4.3 Grouping Commands</A></TD></TR>
13594 <TR><TD COLSPAN=3> <HR></TD></TR>
13595 <TR><TH><A NAME="rw_}"></A>}</TH><TD></TD><TD></TD></TR>
13596 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX44"><CODE>}</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC22">3.2.4.3 Grouping Commands</A></TD></TR>
13597 <TR><TD COLSPAN=3> <HR></TD></TR>
13598 <TR><TH><A NAME="rw_C"></A>C</TH><TD></TD><TD></TD></TR>
13599 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX37"><CODE>case</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A></TD></TR>
13600 <TR><TD COLSPAN=3> <HR></TD></TR>
13601 <TR><TH><A NAME="rw_D"></A>D</TH><TD></TD><TD></TD></TR>
13602 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX28"><CODE>do</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC20">3.2.4.1 Looping Constructs</A></TD></TR>
13603 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX29"><CODE>done</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC20">3.2.4.1 Looping Constructs</A></TD></TR>
13604 <TR><TD COLSPAN=3> <HR></TD></TR>
13605 <TR><TH><A NAME="rw_E"></A>E</TH><TD></TD><TD></TD></TR>
13606 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX35"><CODE>elif</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A></TD></TR>
13607 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX34"><CODE>else</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A></TD></TR>
13608 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX39"><CODE>esac</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A></TD></TR>
13609 <TR><TD COLSPAN=3> <HR></TD></TR>
13610 <TR><TH><A NAME="rw_F"></A>F</TH><TD></TD><TD></TD></TR>
13611 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX36"><CODE>fi</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A></TD></TR>
13612 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX31"><CODE>for</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC20">3.2.4.1 Looping Constructs</A></TD></TR>
13613 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX45"><CODE>function</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC23">3.3 Shell Functions</A></TD></TR>
13614 <TR><TD COLSPAN=3> <HR></TD></TR>
13615 <TR><TH><A NAME="rw_I"></A>I</TH><TD></TD><TD></TD></TR>
13616 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX32"><CODE>if</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A></TD></TR>
13617 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX38"><CODE>in</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A></TD></TR>
13618 <TR><TD COLSPAN=3> <HR></TD></TR>
13619 <TR><TH><A NAME="rw_S"></A>S</TH><TD></TD><TD></TD></TR>
13620 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX40"><CODE>select</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A></TD></TR>
13621 <TR><TD COLSPAN=3> <HR></TD></TR>
13622 <TR><TH><A NAME="rw_T"></A>T</TH><TD></TD><TD></TD></TR>
13623 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX33"><CODE>then</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A></TD></TR>
13624 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX24"><CODE>time</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC17">3.2.2 Pipelines</A></TD></TR>
13625 <TR><TD COLSPAN=3> <HR></TD></TR>
13626 <TR><TH><A NAME="rw_U"></A>U</TH><TD></TD><TD></TD></TR>
13627 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX27"><CODE>until</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC20">3.2.4.1 Looping Constructs</A></TD></TR>
13628 <TR><TD COLSPAN=3> <HR></TD></TR>
13629 <TR><TH><A NAME="rw_W"></A>W</TH><TD></TD><TD></TD></TR>
13630 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX30"><CODE>while</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC20">3.2.4.1 Looping Constructs</A></TD></TR>
13631 <TR><TD COLSPAN=3> <HR></TD></TR>
13632 </TABLE><P></P><table><tr><th valign=top>Jump to: &nbsp; </th><td><A HREF="bashref.html#rw_!" style="text-decoration:none"><b>!</b></A>
13633 &nbsp;
13634 <A HREF="bashref.html#rw_[" style="text-decoration:none"><b>[</b></A>
13635 &nbsp;
13636 <A HREF="bashref.html#rw_]" style="text-decoration:none"><b>]</b></A>
13637 &nbsp;
13638 <A HREF="bashref.html#rw_{" style="text-decoration:none"><b>{</b></A>
13639 &nbsp;
13640 <A HREF="bashref.html#rw_}" style="text-decoration:none"><b>}</b></A>
13641 &nbsp;
13642 <BR>
13643 <A HREF="bashref.html#rw_C" style="text-decoration:none"><b>C</b></A>
13644 &nbsp;
13645 <A HREF="bashref.html#rw_D" style="text-decoration:none"><b>D</b></A>
13646 &nbsp;
13647 <A HREF="bashref.html#rw_E" style="text-decoration:none"><b>E</b></A>
13648 &nbsp;
13649 <A HREF="bashref.html#rw_F" style="text-decoration:none"><b>F</b></A>
13650 &nbsp;
13651 <A HREF="bashref.html#rw_I" style="text-decoration:none"><b>I</b></A>
13652 &nbsp;
13653 <A HREF="bashref.html#rw_S" style="text-decoration:none"><b>S</b></A>
13654 &nbsp;
13655 <A HREF="bashref.html#rw_T" style="text-decoration:none"><b>T</b></A>
13656 &nbsp;
13657 <A HREF="bashref.html#rw_U" style="text-decoration:none"><b>U</b></A>
13658 &nbsp;
13659 <A HREF="bashref.html#rw_W" style="text-decoration:none"><b>W</b></A>
13660 &nbsp;
13661 </td></tr></table><br><P>
13662
13663 <A NAME="Variable Index"></A>
13664 <HR SIZE="6">
13665 <A NAME="SEC139"></A>
13666 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
13667 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC138"> &lt; </A>]</TD>
13668 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140"> &gt; </A>]</TD>
13669 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
13670 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top"> Up </A>]</TD>
13671 <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
13672 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
13673 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
13674 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
13675 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
13676 </TR></TABLE>
13677 <H1> Parameter and Variable Index </H1>
13678 <!--docid::SEC139::-->
13679 <table><tr><th valign=top>Jump to: &nbsp; </th><td><A HREF="bashref.html#vr_!" style="text-decoration:none"><b>!</b></A>
13680 &nbsp;
13681 <A HREF="bashref.html#vr_#" style="text-decoration:none"><b>#</b></A>
13682 &nbsp;
13683 <A HREF="bashref.html#vr_$" style="text-decoration:none"><b>$</b></A>
13684 &nbsp;
13685 <A HREF="bashref.html#vr_*" style="text-decoration:none"><b>*</b></A>
13686 &nbsp;
13687 <A HREF="bashref.html#vr_-" style="text-decoration:none"><b>-</b></A>
13688 &nbsp;
13689 <A HREF="bashref.html#vr_0" style="text-decoration:none"><b>0</b></A>
13690 &nbsp;
13691 <A HREF="bashref.html#vr_?" style="text-decoration:none"><b>?</b></A>
13692 &nbsp;
13693 <A HREF="bashref.html#vr_@" style="text-decoration:none"><b>@</b></A>
13694 &nbsp;
13695 <A HREF="bashref.html#vr__" style="text-decoration:none"><b>_</b></A>
13696 &nbsp;
13697 <BR>
13698 <A HREF="bashref.html#vr_A" style="text-decoration:none"><b>A</b></A>
13699 &nbsp;
13700 <A HREF="bashref.html#vr_B" style="text-decoration:none"><b>B</b></A>
13701 &nbsp;
13702 <A HREF="bashref.html#vr_C" style="text-decoration:none"><b>C</b></A>
13703 &nbsp;
13704 <A HREF="bashref.html#vr_D" style="text-decoration:none"><b>D</b></A>
13705 &nbsp;
13706 <A HREF="bashref.html#vr_E" style="text-decoration:none"><b>E</b></A>
13707 &nbsp;
13708 <A HREF="bashref.html#vr_F" style="text-decoration:none"><b>F</b></A>
13709 &nbsp;
13710 <A HREF="bashref.html#vr_G" style="text-decoration:none"><b>G</b></A>
13711 &nbsp;
13712 <A HREF="bashref.html#vr_H" style="text-decoration:none"><b>H</b></A>
13713 &nbsp;
13714 <A HREF="bashref.html#vr_I" style="text-decoration:none"><b>I</b></A>
13715 &nbsp;
13716 <A HREF="bashref.html#vr_K" style="text-decoration:none"><b>K</b></A>
13717 &nbsp;
13718 <A HREF="bashref.html#vr_L" style="text-decoration:none"><b>L</b></A>
13719 &nbsp;
13720 <A HREF="bashref.html#vr_M" style="text-decoration:none"><b>M</b></A>
13721 &nbsp;
13722 <A HREF="bashref.html#vr_O" style="text-decoration:none"><b>O</b></A>
13723 &nbsp;
13724 <A HREF="bashref.html#vr_P" style="text-decoration:none"><b>P</b></A>
13725 &nbsp;
13726 <A HREF="bashref.html#vr_R" style="text-decoration:none"><b>R</b></A>
13727 &nbsp;
13728 <A HREF="bashref.html#vr_S" style="text-decoration:none"><b>S</b></A>
13729 &nbsp;
13730 <A HREF="bashref.html#vr_T" style="text-decoration:none"><b>T</b></A>
13731 &nbsp;
13732 <A HREF="bashref.html#vr_U" style="text-decoration:none"><b>U</b></A>
13733 &nbsp;
13734 <A HREF="bashref.html#vr_V" style="text-decoration:none"><b>V</b></A>
13735 &nbsp;
13736 </td></tr></table><br><P></P>
13737 <TABLE border=0>
13738 <TR><TD></TD><TH ALIGN=LEFT>Index Entry</TH><TH ALIGN=LEFT> Section</TH></TR>
13739 <TR><TD COLSPAN=3> <HR></TD></TR>
13740 <TR><TH><A NAME="vr_!"></A>!</TH><TD></TD><TD></TD></TR>
13741 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX58"><CODE>!</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC26">3.4.2 Special Parameters</A></TD></TR>
13742 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX59"><CODE>!</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC26">3.4.2 Special Parameters</A></TD></TR>
13743 <TR><TD COLSPAN=3> <HR></TD></TR>
13744 <TR><TH><A NAME="vr_#"></A>#</TH><TD></TD><TD></TD></TR>
13745 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX50"><CODE>#</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC26">3.4.2 Special Parameters</A></TD></TR>
13746 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX51"><CODE>#</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC26">3.4.2 Special Parameters</A></TD></TR>
13747 <TR><TD COLSPAN=3> <HR></TD></TR>
13748 <TR><TH><A NAME="vr_$"></A>$</TH><TD></TD><TD></TD></TR>
13749 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX56"><CODE>$</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC26">3.4.2 Special Parameters</A></TD></TR>
13750 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX57"><CODE>$</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC26">3.4.2 Special Parameters</A></TD></TR>
13751 <TR><TD COLSPAN=3> <HR></TD></TR>
13752 <TR><TH><A NAME="vr_*"></A>*</TH><TD></TD><TD></TD></TR>
13753 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX46"><CODE>*</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC26">3.4.2 Special Parameters</A></TD></TR>
13754 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX47"><CODE>*</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC26">3.4.2 Special Parameters</A></TD></TR>
13755 <TR><TD COLSPAN=3> <HR></TD></TR>
13756 <TR><TH><A NAME="vr_-"></A>-</TH><TD></TD><TD></TD></TR>
13757 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX54"><CODE>-</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC26">3.4.2 Special Parameters</A></TD></TR>
13758 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX55"><CODE>-</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC26">3.4.2 Special Parameters</A></TD></TR>
13759 <TR><TD COLSPAN=3> <HR></TD></TR>
13760 <TR><TH><A NAME="vr_0"></A>0</TH><TD></TD><TD></TD></TR>
13761 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX60"><CODE>0</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC26">3.4.2 Special Parameters</A></TD></TR>
13762 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX61"><CODE>0</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC26">3.4.2 Special Parameters</A></TD></TR>
13763 <TR><TD COLSPAN=3> <HR></TD></TR>
13764 <TR><TH><A NAME="vr_?"></A>?</TH><TD></TD><TD></TD></TR>
13765 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX52"><CODE>?</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC26">3.4.2 Special Parameters</A></TD></TR>
13766 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX53"><CODE>?</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC26">3.4.2 Special Parameters</A></TD></TR>
13767 <TR><TD COLSPAN=3> <HR></TD></TR>
13768 <TR><TH><A NAME="vr_@"></A>@</TH><TD></TD><TD></TD></TR>
13769 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX48"><CODE>@</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC26">3.4.2 Special Parameters</A></TD></TR>
13770 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX49"><CODE>@</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC26">3.4.2 Special Parameters</A></TD></TR>
13771 <TR><TD COLSPAN=3> <HR></TD></TR>
13772 <TR><TH><A NAME="vr__"></A>_</TH><TD></TD><TD></TD></TR>
13773 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX62"><CODE>_</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC26">3.4.2 Special Parameters</A></TD></TR>
13774 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX63"><CODE>_</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC26">3.4.2 Special Parameters</A></TD></TR>
13775 <TR><TD COLSPAN=3> <HR></TD></TR>
13776 <TR><TH><A NAME="vr_A"></A>A</TH><TD></TD><TD></TD></TR>
13777 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX280"><CODE>auto_resume</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC90">7.3 Job Control Variables</A></TD></TR>
13778 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX281"><CODE>auto_resume</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC90">7.3 Job Control Variables</A></TD></TR>
13779 <TR><TD COLSPAN=3> <HR></TD></TR>
13780 <TR><TH><A NAME="vr_B"></A>B</TH><TD></TD><TD></TD></TR>
13781 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX130"><CODE>BASH</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13782 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX131"><CODE>BASH</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13783 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX132"><CODE>BASH_ARGC</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13784 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX133"><CODE>BASH_ARGC</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13785 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX134"><CODE>BASH_ARGV</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13786 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX135"><CODE>BASH_ARGV</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13787 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX136"><CODE>BASH_COMMAND</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13788 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX137"><CODE>BASH_COMMAND</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13789 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX138"><CODE>BASH_ENV</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13790 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX139"><CODE>BASH_ENV</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13791 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX140"><CODE>BASH_EXECUTION_STRING</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13792 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX141"><CODE>BASH_EXECUTION_STRING</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13793 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX142"><CODE>BASH_LINENO</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13794 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX143"><CODE>BASH_LINENO</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13795 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX144"><CODE>BASH_REMATCH</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13796 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX145"><CODE>BASH_REMATCH</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13797 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX146"><CODE>BASH_SOURCE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13798 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX147"><CODE>BASH_SOURCE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13799 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX148"><CODE>BASH_SUBSHELL</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13800 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX149"><CODE>BASH_SUBSHELL</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13801 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX150"><CODE>BASH_VERSINFO</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13802 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX151"><CODE>BASH_VERSINFO</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13803 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX152"><CODE>BASH_VERSION</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13804 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX153"><CODE>BASH_VERSION</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13805 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX287"><CODE>bell-style</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC100">8.3.1 Readline Init File Syntax</A></TD></TR>
13806 <TR><TD COLSPAN=3> <HR></TD></TR>
13807 <TR><TH><A NAME="vr_C"></A>C</TH><TD></TD><TD></TD></TR>
13808 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX110"><CODE>CDPATH</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC62">5.1 Bourne Shell Variables</A></TD></TR>
13809 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX111"><CODE>CDPATH</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC62">5.1 Bourne Shell Variables</A></TD></TR>
13810 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX154"><CODE>COLUMNS</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13811 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX155"><CODE>COLUMNS</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13812 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX288"><CODE>comment-begin</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC100">8.3.1 Readline Init File Syntax</A></TD></TR>
13813 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX156"><CODE>COMP_CWORD</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13814 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX157"><CODE>COMP_CWORD</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13815 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX158"><CODE>COMP_LINE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13816 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX159"><CODE>COMP_LINE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13817 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX160"><CODE>COMP_POINT</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13818 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX161"><CODE>COMP_POINT</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13819 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX162"><CODE>COMP_WORDBREAKS</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13820 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX163"><CODE>COMP_WORDBREAKS</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13821 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX164"><CODE>COMP_WORDS</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13822 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX165"><CODE>COMP_WORDS</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13823 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX289"><CODE>completion-query-items</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC100">8.3.1 Readline Init File Syntax</A></TD></TR>
13824 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX166"><CODE>COMPREPLY</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13825 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX167"><CODE>COMPREPLY</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13826 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX290"><CODE>convert-meta</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC100">8.3.1 Readline Init File Syntax</A></TD></TR>
13827 <TR><TD COLSPAN=3> <HR></TD></TR>
13828 <TR><TH><A NAME="vr_D"></A>D</TH><TD></TD><TD></TD></TR>
13829 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX168"><CODE>DIRSTACK</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13830 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX169"><CODE>DIRSTACK</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13831 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX291"><CODE>disable-completion</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC100">8.3.1 Readline Init File Syntax</A></TD></TR>
13832 <TR><TD COLSPAN=3> <HR></TD></TR>
13833 <TR><TH><A NAME="vr_E"></A>E</TH><TD></TD><TD></TD></TR>
13834 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX292"><CODE>editing-mode</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC100">8.3.1 Readline Init File Syntax</A></TD></TR>
13835 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX170"><CODE>EMACS</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13836 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX171"><CODE>EMACS</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13837 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX293"><CODE>enable-keypad</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC100">8.3.1 Readline Init File Syntax</A></TD></TR>
13838 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX172"><CODE>EUID</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13839 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX173"><CODE>EUID</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13840 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX294"><CODE>expand-tilde</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC100">8.3.1 Readline Init File Syntax</A></TD></TR>
13841 <TR><TD COLSPAN=3> <HR></TD></TR>
13842 <TR><TH><A NAME="vr_F"></A>F</TH><TD></TD><TD></TD></TR>
13843 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX174"><CODE>FCEDIT</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13844 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX175"><CODE>FCEDIT</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13845 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX176"><CODE>FIGNORE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13846 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX177"><CODE>FIGNORE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13847 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX178"><CODE>FUNCNAME</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13848 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX179"><CODE>FUNCNAME</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13849 <TR><TD COLSPAN=3> <HR></TD></TR>
13850 <TR><TH><A NAME="vr_G"></A>G</TH><TD></TD><TD></TD></TR>
13851 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX180"><CODE>GLOBIGNORE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13852 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX181"><CODE>GLOBIGNORE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13853 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX182"><CODE>GROUPS</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13854 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX183"><CODE>GROUPS</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13855 <TR><TD COLSPAN=3> <HR></TD></TR>
13856 <TR><TH><A NAME="vr_H"></A>H</TH><TD></TD><TD></TD></TR>
13857 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX184"><CODE>histchars</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13858 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX185"><CODE>histchars</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13859 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX186"><CODE>HISTCMD</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13860 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX187"><CODE>HISTCMD</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13861 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX188"><CODE>HISTCONTROL</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13862 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX189"><CODE>HISTCONTROL</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13863 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX190"><CODE>HISTFILE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13864 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX191"><CODE>HISTFILE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13865 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX192"><CODE>HISTFILESIZE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13866 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX193"><CODE>HISTFILESIZE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13867 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX194"><CODE>HISTIGNORE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13868 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX195"><CODE>HISTIGNORE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13869 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX295"><CODE>history-preserve-point</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC100">8.3.1 Readline Init File Syntax</A></TD></TR>
13870 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX196"><CODE>HISTSIZE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13871 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX197"><CODE>HISTSIZE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13872 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX198"><CODE>HISTTIMEFORMAT</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13873 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX199"><CODE>HISTTIMEFORMAT</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13874 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX112"><CODE>HOME</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC62">5.1 Bourne Shell Variables</A></TD></TR>
13875 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX113"><CODE>HOME</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC62">5.1 Bourne Shell Variables</A></TD></TR>
13876 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX296"><CODE>horizontal-scroll-mode</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC100">8.3.1 Readline Init File Syntax</A></TD></TR>
13877 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX200"><CODE>HOSTFILE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13878 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX201"><CODE>HOSTFILE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13879 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX202"><CODE>HOSTNAME</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13880 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX203"><CODE>HOSTNAME</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13881 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX204"><CODE>HOSTTYPE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13882 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX205"><CODE>HOSTTYPE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13883 <TR><TD COLSPAN=3> <HR></TD></TR>
13884 <TR><TH><A NAME="vr_I"></A>I</TH><TD></TD><TD></TD></TR>
13885 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX114"><CODE>IFS</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC62">5.1 Bourne Shell Variables</A></TD></TR>
13886 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX115"><CODE>IFS</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC62">5.1 Bourne Shell Variables</A></TD></TR>
13887 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX206"><CODE>IGNOREEOF</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13888 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX207"><CODE>IGNOREEOF</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13889 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX297"><CODE>input-meta</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC100">8.3.1 Readline Init File Syntax</A></TD></TR>
13890 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX208"><CODE>INPUTRC</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13891 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX209"><CODE>INPUTRC</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13892 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX299"><CODE>isearch-terminators</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC100">8.3.1 Readline Init File Syntax</A></TD></TR>
13893 <TR><TD COLSPAN=3> <HR></TD></TR>
13894 <TR><TH><A NAME="vr_K"></A>K</TH><TD></TD><TD></TD></TR>
13895 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX300"><CODE>keymap</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC100">8.3.1 Readline Init File Syntax</A></TD></TR>
13896 <TR><TD COLSPAN=3> <HR></TD></TR>
13897 <TR><TH><A NAME="vr_L"></A>L</TH><TD></TD><TD></TD></TR>
13898 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX210"><CODE>LANG</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13899 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX211"><CODE>LANG</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13900 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX212"><CODE>LC_ALL</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13901 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX213"><CODE>LC_ALL</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13902 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX214"><CODE>LC_COLLATE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13903 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX215"><CODE>LC_COLLATE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13904 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX216"><CODE>LC_CTYPE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13905 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX217"><CODE>LC_CTYPE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13906 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX21"><CODE>LC_MESSAGES</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC13">3.1.2.5 Locale-Specific Translation</A></TD></TR>
13907 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX218"><CODE>LC_MESSAGES</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13908 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX219"><CODE>LC_MESSAGES</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13909 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX220"><CODE>LC_NUMERIC</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13910 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX221"><CODE>LC_NUMERIC</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13911 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX222"><CODE>LINENO</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13912 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX223"><CODE>LINENO</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13913 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX224"><CODE>LINES</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13914 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX225"><CODE>LINES</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13915 <TR><TD COLSPAN=3> <HR></TD></TR>
13916 <TR><TH><A NAME="vr_M"></A>M</TH><TD></TD><TD></TD></TR>
13917 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX226"><CODE>MACHTYPE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13918 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX227"><CODE>MACHTYPE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13919 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX116"><CODE>MAIL</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC62">5.1 Bourne Shell Variables</A></TD></TR>
13920 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX117"><CODE>MAIL</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC62">5.1 Bourne Shell Variables</A></TD></TR>
13921 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX228"><CODE>MAILCHECK</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13922 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX229"><CODE>MAILCHECK</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13923 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX118"><CODE>MAILPATH</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC62">5.1 Bourne Shell Variables</A></TD></TR>
13924 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX119"><CODE>MAILPATH</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC62">5.1 Bourne Shell Variables</A></TD></TR>
13925 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX301"><CODE>mark-modified-lines</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC100">8.3.1 Readline Init File Syntax</A></TD></TR>
13926 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX302"><CODE>mark-symlinked-directories</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC100">8.3.1 Readline Init File Syntax</A></TD></TR>
13927 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX303"><CODE>match-hidden-files</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC100">8.3.1 Readline Init File Syntax</A></TD></TR>
13928 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX298"><CODE>meta-flag</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC100">8.3.1 Readline Init File Syntax</A></TD></TR>
13929 <TR><TD COLSPAN=3> <HR></TD></TR>
13930 <TR><TH><A NAME="vr_O"></A>O</TH><TD></TD><TD></TD></TR>
13931 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX230"><CODE>OLDPWD</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13932 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX231"><CODE>OLDPWD</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13933 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX120"><CODE>OPTARG</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC62">5.1 Bourne Shell Variables</A></TD></TR>
13934 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX121"><CODE>OPTARG</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC62">5.1 Bourne Shell Variables</A></TD></TR>
13935 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX232"><CODE>OPTERR</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13936 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX233"><CODE>OPTERR</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13937 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX122"><CODE>OPTIND</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC62">5.1 Bourne Shell Variables</A></TD></TR>
13938 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX123"><CODE>OPTIND</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC62">5.1 Bourne Shell Variables</A></TD></TR>
13939 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX234"><CODE>OSTYPE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13940 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX235"><CODE>OSTYPE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13941 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX304"><CODE>output-meta</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC100">8.3.1 Readline Init File Syntax</A></TD></TR>
13942 <TR><TD COLSPAN=3> <HR></TD></TR>
13943 <TR><TH><A NAME="vr_P"></A>P</TH><TD></TD><TD></TD></TR>
13944 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX305"><CODE>page-completions</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC100">8.3.1 Readline Init File Syntax</A></TD></TR>
13945 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX124"><CODE>PATH</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC62">5.1 Bourne Shell Variables</A></TD></TR>
13946 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX125"><CODE>PATH</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC62">5.1 Bourne Shell Variables</A></TD></TR>
13947 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX236"><CODE>PIPESTATUS</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13948 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX237"><CODE>PIPESTATUS</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13949 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX238"><CODE>POSIXLY_CORRECT</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13950 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX239"><CODE>POSIXLY_CORRECT</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13951 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX240"><CODE>PPID</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13952 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX241"><CODE>PPID</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13953 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX242"><CODE>PROMPT_COMMAND</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13954 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX243"><CODE>PROMPT_COMMAND</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13955 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX126"><CODE>PS1</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC62">5.1 Bourne Shell Variables</A></TD></TR>
13956 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX127"><CODE>PS1</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC62">5.1 Bourne Shell Variables</A></TD></TR>
13957 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX128"><CODE>PS2</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC62">5.1 Bourne Shell Variables</A></TD></TR>
13958 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX129"><CODE>PS2</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC62">5.1 Bourne Shell Variables</A></TD></TR>
13959 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX244"><CODE>PS3</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13960 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX245"><CODE>PS3</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13961 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX246"><CODE>PS4</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13962 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX247"><CODE>PS4</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13963 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX248"><CODE>PWD</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13964 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX249"><CODE>PWD</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13965 <TR><TD COLSPAN=3> <HR></TD></TR>
13966 <TR><TH><A NAME="vr_R"></A>R</TH><TD></TD><TD></TD></TR>
13967 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX250"><CODE>RANDOM</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13968 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX251"><CODE>RANDOM</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13969 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX252"><CODE>REPLY</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13970 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX253"><CODE>REPLY</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13971 <TR><TD COLSPAN=3> <HR></TD></TR>
13972 <TR><TH><A NAME="vr_S"></A>S</TH><TD></TD><TD></TD></TR>
13973 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX254"><CODE>SECONDS</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13974 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX255"><CODE>SECONDS</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13975 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX256"><CODE>SHELL</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13976 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX257"><CODE>SHELL</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13977 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX258"><CODE>SHELLOPTS</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13978 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX259"><CODE>SHELLOPTS</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13979 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX260"><CODE>SHLVL</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13980 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX261"><CODE>SHLVL</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13981 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX306"><CODE>show-all-if-ambiguous</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC100">8.3.1 Readline Init File Syntax</A></TD></TR>
13982 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX307"><CODE>show-all-if-unmodified</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC100">8.3.1 Readline Init File Syntax</A></TD></TR>
13983 <TR><TD COLSPAN=3> <HR></TD></TR>
13984 <TR><TH><A NAME="vr_T"></A>T</TH><TD></TD><TD></TD></TR>
13985 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX22"><CODE>TEXTDOMAIN</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC13">3.1.2.5 Locale-Specific Translation</A></TD></TR>
13986 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX23"><CODE>TEXTDOMAINDIR</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC13">3.1.2.5 Locale-Specific Translation</A></TD></TR>
13987 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX262"><CODE>TIMEFORMAT</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13988 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX263"><CODE>TIMEFORMAT</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13989 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX264"><CODE>TMOUT</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13990 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX265"><CODE>TMOUT</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13991 <TR><TD COLSPAN=3> <HR></TD></TR>
13992 <TR><TH><A NAME="vr_U"></A>U</TH><TD></TD><TD></TD></TR>
13993 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX266"><CODE>UID</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13994 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX267"><CODE>UID</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">5.2 Bash Variables</A></TD></TR>
13995 <TR><TD COLSPAN=3> <HR></TD></TR>
13996 <TR><TH><A NAME="vr_V"></A>V</TH><TD></TD><TD></TD></TR>
13997 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX308"><CODE>visible-stats</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC100">8.3.1 Readline Init File Syntax</A></TD></TR>
13998 <TR><TD COLSPAN=3> <HR></TD></TR>
13999 </TABLE><P></P><table><tr><th valign=top>Jump to: &nbsp; </th><td><A HREF="bashref.html#vr_!" style="text-decoration:none"><b>!</b></A>
14000 &nbsp;
14001 <A HREF="bashref.html#vr_#" style="text-decoration:none"><b>#</b></A>
14002 &nbsp;
14003 <A HREF="bashref.html#vr_$" style="text-decoration:none"><b>$</b></A>
14004 &nbsp;
14005 <A HREF="bashref.html#vr_*" style="text-decoration:none"><b>*</b></A>
14006 &nbsp;
14007 <A HREF="bashref.html#vr_-" style="text-decoration:none"><b>-</b></A>
14008 &nbsp;
14009 <A HREF="bashref.html#vr_0" style="text-decoration:none"><b>0</b></A>
14010 &nbsp;
14011 <A HREF="bashref.html#vr_?" style="text-decoration:none"><b>?</b></A>
14012 &nbsp;
14013 <A HREF="bashref.html#vr_@" style="text-decoration:none"><b>@</b></A>
14014 &nbsp;
14015 <A HREF="bashref.html#vr__" style="text-decoration:none"><b>_</b></A>
14016 &nbsp;
14017 <BR>
14018 <A HREF="bashref.html#vr_A" style="text-decoration:none"><b>A</b></A>
14019 &nbsp;
14020 <A HREF="bashref.html#vr_B" style="text-decoration:none"><b>B</b></A>
14021 &nbsp;
14022 <A HREF="bashref.html#vr_C" style="text-decoration:none"><b>C</b></A>
14023 &nbsp;
14024 <A HREF="bashref.html#vr_D" style="text-decoration:none"><b>D</b></A>
14025 &nbsp;
14026 <A HREF="bashref.html#vr_E" style="text-decoration:none"><b>E</b></A>
14027 &nbsp;
14028 <A HREF="bashref.html#vr_F" style="text-decoration:none"><b>F</b></A>
14029 &nbsp;
14030 <A HREF="bashref.html#vr_G" style="text-decoration:none"><b>G</b></A>
14031 &nbsp;
14032 <A HREF="bashref.html#vr_H" style="text-decoration:none"><b>H</b></A>
14033 &nbsp;
14034 <A HREF="bashref.html#vr_I" style="text-decoration:none"><b>I</b></A>
14035 &nbsp;
14036 <A HREF="bashref.html#vr_K" style="text-decoration:none"><b>K</b></A>
14037 &nbsp;
14038 <A HREF="bashref.html#vr_L" style="text-decoration:none"><b>L</b></A>
14039 &nbsp;
14040 <A HREF="bashref.html#vr_M" style="text-decoration:none"><b>M</b></A>
14041 &nbsp;
14042 <A HREF="bashref.html#vr_O" style="text-decoration:none"><b>O</b></A>
14043 &nbsp;
14044 <A HREF="bashref.html#vr_P" style="text-decoration:none"><b>P</b></A>
14045 &nbsp;
14046 <A HREF="bashref.html#vr_R" style="text-decoration:none"><b>R</b></A>
14047 &nbsp;
14048 <A HREF="bashref.html#vr_S" style="text-decoration:none"><b>S</b></A>
14049 &nbsp;
14050 <A HREF="bashref.html#vr_T" style="text-decoration:none"><b>T</b></A>
14051 &nbsp;
14052 <A HREF="bashref.html#vr_U" style="text-decoration:none"><b>U</b></A>
14053 &nbsp;
14054 <A HREF="bashref.html#vr_V" style="text-decoration:none"><b>V</b></A>
14055 &nbsp;
14056 </td></tr></table><br><P>
14057
14058 <A NAME="Function Index"></A>
14059 <HR SIZE="6">
14060 <A NAME="SEC140"></A>
14061 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
14062 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC139"> &lt; </A>]</TD>
14063 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC141"> &gt; </A>]</TD>
14064 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
14065 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top"> Up </A>]</TD>
14066 <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
14067 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
14068 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
14069 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
14070 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
14071 </TR></TABLE>
14072 <H1> Function Index </H1>
14073 <!--docid::SEC140::-->
14074 <table><tr><th valign=top>Jump to: &nbsp; </th><td><A HREF="bashref.html#fn_A" style="text-decoration:none"><b>A</b></A>
14075 &nbsp;
14076 <A HREF="bashref.html#fn_B" style="text-decoration:none"><b>B</b></A>
14077 &nbsp;
14078 <A HREF="bashref.html#fn_C" style="text-decoration:none"><b>C</b></A>
14079 &nbsp;
14080 <A HREF="bashref.html#fn_D" style="text-decoration:none"><b>D</b></A>
14081 &nbsp;
14082 <A HREF="bashref.html#fn_E" style="text-decoration:none"><b>E</b></A>
14083 &nbsp;
14084 <A HREF="bashref.html#fn_F" style="text-decoration:none"><b>F</b></A>
14085 &nbsp;
14086 <A HREF="bashref.html#fn_G" style="text-decoration:none"><b>G</b></A>
14087 &nbsp;
14088 <A HREF="bashref.html#fn_H" style="text-decoration:none"><b>H</b></A>
14089 &nbsp;
14090 <A HREF="bashref.html#fn_I" style="text-decoration:none"><b>I</b></A>
14091 &nbsp;
14092 <A HREF="bashref.html#fn_K" style="text-decoration:none"><b>K</b></A>
14093 &nbsp;
14094 <A HREF="bashref.html#fn_M" style="text-decoration:none"><b>M</b></A>
14095 &nbsp;
14096 <A HREF="bashref.html#fn_N" style="text-decoration:none"><b>N</b></A>
14097 &nbsp;
14098 <A HREF="bashref.html#fn_O" style="text-decoration:none"><b>O</b></A>
14099 &nbsp;
14100 <A HREF="bashref.html#fn_P" style="text-decoration:none"><b>P</b></A>
14101 &nbsp;
14102 <A HREF="bashref.html#fn_Q" style="text-decoration:none"><b>Q</b></A>
14103 &nbsp;
14104 <A HREF="bashref.html#fn_R" style="text-decoration:none"><b>R</b></A>
14105 &nbsp;
14106 <A HREF="bashref.html#fn_S" style="text-decoration:none"><b>S</b></A>
14107 &nbsp;
14108 <A HREF="bashref.html#fn_T" style="text-decoration:none"><b>T</b></A>
14109 &nbsp;
14110 <A HREF="bashref.html#fn_U" style="text-decoration:none"><b>U</b></A>
14111 &nbsp;
14112 <A HREF="bashref.html#fn_Y" style="text-decoration:none"><b>Y</b></A>
14113 &nbsp;
14114 </td></tr></table><br><P></P>
14115 <TABLE border=0>
14116 <TR><TD></TD><TH ALIGN=LEFT>Index Entry</TH><TH ALIGN=LEFT> Section</TH></TR>
14117 <TR><TD COLSPAN=3> <HR></TD></TR>
14118 <TR><TH><A NAME="fn_A"></A>A</TH><TD></TD><TD></TD></TR>
14119 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX449"><CODE>abort (C-g)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14120 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX450"><CODE>abort (C-g)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14121 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX325"><CODE>accept-line (Newline or Return)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC105">8.4.2 Commands For Manipulating The History</A></TD></TR>
14122 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX326"><CODE>accept-line (Newline or Return)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC105">8.4.2 Commands For Manipulating The History</A></TD></TR>
14123 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX491"><CODE>alias-expand-line ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14124 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX492"><CODE>alias-expand-line ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14125 <TR><TD COLSPAN=3> <HR></TD></TR>
14126 <TR><TH><A NAME="fn_B"></A>B</TH><TD></TD><TD></TD></TR>
14127 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX315"><CODE>backward-char (C-b)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.4.1 Commands For Moving</A></TD></TR>
14128 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX316"><CODE>backward-char (C-b)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.4.1 Commands For Moving</A></TD></TR>
14129 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX353"><CODE>backward-delete-char (Rubout)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC106">8.4.3 Commands For Changing Text</A></TD></TR>
14130 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX354"><CODE>backward-delete-char (Rubout)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC106">8.4.3 Commands For Changing Text</A></TD></TR>
14131 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX375"><CODE>backward-kill-line (C-x Rubout)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC107">8.4.4 Killing And Yanking</A></TD></TR>
14132 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX376"><CODE>backward-kill-line (C-x Rubout)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC107">8.4.4 Killing And Yanking</A></TD></TR>
14133 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX383"><CODE>backward-kill-word (M-<KBD>DEL</KBD>)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC107">8.4.4 Killing And Yanking</A></TD></TR>
14134 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX384"><CODE>backward-kill-word (M-<KBD>DEL</KBD>)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC107">8.4.4 Killing And Yanking</A></TD></TR>
14135 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX319"><CODE>backward-word (M-b)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.4.1 Commands For Moving</A></TD></TR>
14136 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX320"><CODE>backward-word (M-b)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.4.1 Commands For Moving</A></TD></TR>
14137 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX331"><CODE>beginning-of-history (M-&#38;#60;)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC105">8.4.2 Commands For Manipulating The History</A></TD></TR>
14138 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX332"><CODE>beginning-of-history (M-&#38;#60;)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC105">8.4.2 Commands For Manipulating The History</A></TD></TR>
14139 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX309"><CODE>beginning-of-line (C-a)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.4.1 Commands For Moving</A></TD></TR>
14140 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX310"><CODE>beginning-of-line (C-a)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.4.1 Commands For Moving</A></TD></TR>
14141 <TR><TD COLSPAN=3> <HR></TD></TR>
14142 <TR><TH><A NAME="fn_C"></A>C</TH><TD></TD><TD></TD></TR>
14143 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX445"><CODE>call-last-kbd-macro (C-x e)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.7 Keyboard Macros</A></TD></TR>
14144 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX446"><CODE>call-last-kbd-macro (C-x e)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.7 Keyboard Macros</A></TD></TR>
14145 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX369"><CODE>capitalize-word (M-c)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC106">8.4.3 Commands For Changing Text</A></TD></TR>
14146 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX370"><CODE>capitalize-word (M-c)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC106">8.4.3 Commands For Changing Text</A></TD></TR>
14147 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX465"><CODE>character-search (C-])</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14148 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX466"><CODE>character-search (C-])</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14149 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX467"><CODE>character-search-backward (M-C-])</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14150 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX468"><CODE>character-search-backward (M-C-])</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14151 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX321"><CODE>clear-screen (C-l)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.4.1 Commands For Moving</A></TD></TR>
14152 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX322"><CODE>clear-screen (C-l)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.4.1 Commands For Moving</A></TD></TR>
14153 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX407"><CODE>complete (<KBD>TAB</KBD>)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.6 Letting Readline Type For You</A></TD></TR>
14154 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX408"><CODE>complete (<KBD>TAB</KBD>)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.6 Letting Readline Type For You</A></TD></TR>
14155 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX433"><CODE>complete-command (M-!)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.6 Letting Readline Type For You</A></TD></TR>
14156 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX434"><CODE>complete-command (M-!)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.6 Letting Readline Type For You</A></TD></TR>
14157 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX417"><CODE>complete-filename (M-/)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.6 Letting Readline Type For You</A></TD></TR>
14158 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX418"><CODE>complete-filename (M-/)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.6 Letting Readline Type For You</A></TD></TR>
14159 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX429"><CODE>complete-hostname (M-@)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.6 Letting Readline Type For You</A></TD></TR>
14160 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX430"><CODE>complete-hostname (M-@)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.6 Letting Readline Type For You</A></TD></TR>
14161 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX439"><CODE>complete-into-braces (M-{)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.6 Letting Readline Type For You</A></TD></TR>
14162 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX440"><CODE>complete-into-braces (M-{)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.6 Letting Readline Type For You</A></TD></TR>
14163 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX421"><CODE>complete-username (M-~)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.6 Letting Readline Type For You</A></TD></TR>
14164 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX422"><CODE>complete-username (M-~)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.6 Letting Readline Type For You</A></TD></TR>
14165 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX425"><CODE>complete-variable (M-$)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.6 Letting Readline Type For You</A></TD></TR>
14166 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX426"><CODE>complete-variable (M-$)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.6 Letting Readline Type For You</A></TD></TR>
14167 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX395"><CODE>copy-backward-word ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC107">8.4.4 Killing And Yanking</A></TD></TR>
14168 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX396"><CODE>copy-backward-word ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC107">8.4.4 Killing And Yanking</A></TD></TR>
14169 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX397"><CODE>copy-forward-word ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC107">8.4.4 Killing And Yanking</A></TD></TR>
14170 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX398"><CODE>copy-forward-word ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC107">8.4.4 Killing And Yanking</A></TD></TR>
14171 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX393"><CODE>copy-region-as-kill ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC107">8.4.4 Killing And Yanking</A></TD></TR>
14172 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX394"><CODE>copy-region-as-kill ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC107">8.4.4 Killing And Yanking</A></TD></TR>
14173 <TR><TD COLSPAN=3> <HR></TD></TR>
14174 <TR><TH><A NAME="fn_D"></A>D</TH><TD></TD><TD></TD></TR>
14175 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX351"><CODE>delete-char (C-d)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC106">8.4.3 Commands For Changing Text</A></TD></TR>
14176 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX352"><CODE>delete-char (C-d)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC106">8.4.3 Commands For Changing Text</A></TD></TR>
14177 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX415"><CODE>delete-char-or-list ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.6 Letting Readline Type For You</A></TD></TR>
14178 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX416"><CODE>delete-char-or-list ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.6 Letting Readline Type For You</A></TD></TR>
14179 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX389"><CODE>delete-horizontal-space ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC107">8.4.4 Killing And Yanking</A></TD></TR>
14180 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX390"><CODE>delete-horizontal-space ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC107">8.4.4 Killing And Yanking</A></TD></TR>
14181 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX403"><CODE>digit-argument (<KBD>M-0</KBD>, <KBD>M-1</KBD>, &#60;small&#62;...&#60;/small&#62; <KBD>M--</KBD>)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC108">8.4.5 Specifying Numeric Arguments</A></TD></TR>
14182 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX404"><CODE>digit-argument (<KBD>M-0</KBD>, <KBD>M-1</KBD>, &#60;small&#62;...&#60;/small&#62; <KBD>M--</KBD>)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC108">8.4.5 Specifying Numeric Arguments</A></TD></TR>
14183 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX483"><CODE>display-shell-version (C-x C-v)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14184 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX484"><CODE>display-shell-version (C-x C-v)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14185 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX451"><CODE>do-uppercase-version (M-a, M-b, M-<VAR>x</VAR>, &#60;small&#62;...&#60;/small&#62;)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14186 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX452"><CODE>do-uppercase-version (M-a, M-b, M-<VAR>x</VAR>, &#60;small&#62;...&#60;/small&#62;)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14187 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX367"><CODE>downcase-word (M-l)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC106">8.4.3 Commands For Changing Text</A></TD></TR>
14188 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX368"><CODE>downcase-word (M-l)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC106">8.4.3 Commands For Changing Text</A></TD></TR>
14189 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX471"><CODE>dump-functions ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14190 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX472"><CODE>dump-functions ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14191 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX475"><CODE>dump-macros ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14192 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX476"><CODE>dump-macros ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14193 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX473"><CODE>dump-variables ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14194 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX474"><CODE>dump-variables ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14195 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX437"><CODE>dynamic-complete-history (M-<KBD>TAB</KBD>)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.6 Letting Readline Type For You</A></TD></TR>
14196 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX438"><CODE>dynamic-complete-history (M-<KBD>TAB</KBD>)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.6 Letting Readline Type For You</A></TD></TR>
14197 <TR><TD COLSPAN=3> <HR></TD></TR>
14198 <TR><TH><A NAME="fn_E"></A>E</TH><TD></TD><TD></TD></TR>
14199 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX499"><CODE>edit-and-execute-command (C-xC-e)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14200 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX500"><CODE>edit-and-execute-command (C-xC-e)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14201 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX443"><CODE>end-kbd-macro (C-x ))</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.7 Keyboard Macros</A></TD></TR>
14202 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX444"><CODE>end-kbd-macro (C-x ))</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.7 Keyboard Macros</A></TD></TR>
14203 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX333"><CODE>end-of-history (M-&#38;#62;)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC105">8.4.2 Commands For Manipulating The History</A></TD></TR>
14204 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX334"><CODE>end-of-history (M-&#38;#62;)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC105">8.4.2 Commands For Manipulating The History</A></TD></TR>
14205 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX311"><CODE>end-of-line (C-e)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.4.1 Commands For Moving</A></TD></TR>
14206 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX312"><CODE>end-of-line (C-e)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.4.1 Commands For Moving</A></TD></TR>
14207 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX463"><CODE>exchange-point-and-mark (C-x C-x)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14208 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX464"><CODE>exchange-point-and-mark (C-x C-x)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14209 <TR><TD COLSPAN=3> <HR></TD></TR>
14210 <TR><TH><A NAME="fn_F"></A>F</TH><TD></TD><TD></TD></TR>
14211 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX355"><CODE>forward-backward-delete-char ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC106">8.4.3 Commands For Changing Text</A></TD></TR>
14212 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX356"><CODE>forward-backward-delete-char ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC106">8.4.3 Commands For Changing Text</A></TD></TR>
14213 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX313"><CODE>forward-char (C-f)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.4.1 Commands For Moving</A></TD></TR>
14214 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX314"><CODE>forward-char (C-f)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.4.1 Commands For Moving</A></TD></TR>
14215 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX337"><CODE>forward-search-history (C-s)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC105">8.4.2 Commands For Manipulating The History</A></TD></TR>
14216 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX338"><CODE>forward-search-history (C-s)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC105">8.4.2 Commands For Manipulating The History</A></TD></TR>
14217 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX317"><CODE>forward-word (M-f)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.4.1 Commands For Moving</A></TD></TR>
14218 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX318"><CODE>forward-word (M-f)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.4.1 Commands For Moving</A></TD></TR>
14219 <TR><TD COLSPAN=3> <HR></TD></TR>
14220 <TR><TH><A NAME="fn_G"></A>G</TH><TD></TD><TD></TD></TR>
14221 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX477"><CODE>glob-complete-word (M-g)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14222 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX478"><CODE>glob-complete-word (M-g)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14223 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX479"><CODE>glob-expand-word (C-x *)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14224 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX480"><CODE>glob-expand-word (C-x *)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14225 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX481"><CODE>glob-list-expansions (C-x g)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14226 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX482"><CODE>glob-list-expansions (C-x g)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14227 <TR><TD COLSPAN=3> <HR></TD></TR>
14228 <TR><TH><A NAME="fn_H"></A>H</TH><TD></TD><TD></TD></TR>
14229 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX493"><CODE>history-and-alias-expand-line ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14230 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX494"><CODE>history-and-alias-expand-line ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14231 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX487"><CODE>history-expand-line (M-^)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14232 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX488"><CODE>history-expand-line (M-^)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14233 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX345"><CODE>history-search-backward ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC105">8.4.2 Commands For Manipulating The History</A></TD></TR>
14234 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX346"><CODE>history-search-backward ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC105">8.4.2 Commands For Manipulating The History</A></TD></TR>
14235 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX343"><CODE>history-search-forward ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC105">8.4.2 Commands For Manipulating The History</A></TD></TR>
14236 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX344"><CODE>history-search-forward ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC105">8.4.2 Commands For Manipulating The History</A></TD></TR>
14237 <TR><TD COLSPAN=3> <HR></TD></TR>
14238 <TR><TH><A NAME="fn_I"></A>I</TH><TD></TD><TD></TD></TR>
14239 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX469"><CODE>insert-comment (M-#)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14240 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX470"><CODE>insert-comment (M-#)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14241 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX411"><CODE>insert-completions (M-*)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.6 Letting Readline Type For You</A></TD></TR>
14242 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX412"><CODE>insert-completions (M-*)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.6 Letting Readline Type For You</A></TD></TR>
14243 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX495"><CODE>insert-last-argument (M-. or M-_)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14244 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX496"><CODE>insert-last-argument (M-. or M-_)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14245 <TR><TD COLSPAN=3> <HR></TD></TR>
14246 <TR><TH><A NAME="fn_K"></A>K</TH><TD></TD><TD></TD></TR>
14247 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX373"><CODE>kill-line (C-k)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC107">8.4.4 Killing And Yanking</A></TD></TR>
14248 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX374"><CODE>kill-line (C-k)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC107">8.4.4 Killing And Yanking</A></TD></TR>
14249 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX391"><CODE>kill-region ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC107">8.4.4 Killing And Yanking</A></TD></TR>
14250 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX392"><CODE>kill-region ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC107">8.4.4 Killing And Yanking</A></TD></TR>
14251 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX379"><CODE>kill-whole-line ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC107">8.4.4 Killing And Yanking</A></TD></TR>
14252 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX380"><CODE>kill-whole-line ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC107">8.4.4 Killing And Yanking</A></TD></TR>
14253 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX381"><CODE>kill-word (M-d)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC107">8.4.4 Killing And Yanking</A></TD></TR>
14254 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX382"><CODE>kill-word (M-d)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC107">8.4.4 Killing And Yanking</A></TD></TR>
14255 <TR><TD COLSPAN=3> <HR></TD></TR>
14256 <TR><TH><A NAME="fn_M"></A>M</TH><TD></TD><TD></TD></TR>
14257 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX489"><CODE>magic-space ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14258 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX490"><CODE>magic-space ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14259 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX413"><CODE>menu-complete ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.6 Letting Readline Type For You</A></TD></TR>
14260 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX414"><CODE>menu-complete ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.6 Letting Readline Type For You</A></TD></TR>
14261 <TR><TD COLSPAN=3> <HR></TD></TR>
14262 <TR><TH><A NAME="fn_N"></A>N</TH><TD></TD><TD></TD></TR>
14263 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX329"><CODE>next-history (C-n)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC105">8.4.2 Commands For Manipulating The History</A></TD></TR>
14264 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX330"><CODE>next-history (C-n)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC105">8.4.2 Commands For Manipulating The History</A></TD></TR>
14265 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX341"><CODE>non-incremental-forward-search-history (M-n)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC105">8.4.2 Commands For Manipulating The History</A></TD></TR>
14266 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX342"><CODE>non-incremental-forward-search-history (M-n)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC105">8.4.2 Commands For Manipulating The History</A></TD></TR>
14267 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX339"><CODE>non-incremental-reverse-search-history (M-p)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC105">8.4.2 Commands For Manipulating The History</A></TD></TR>
14268 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX340"><CODE>non-incremental-reverse-search-history (M-p)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC105">8.4.2 Commands For Manipulating The History</A></TD></TR>
14269 <TR><TD COLSPAN=3> <HR></TD></TR>
14270 <TR><TH><A NAME="fn_O"></A>O</TH><TD></TD><TD></TD></TR>
14271 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX497"><CODE>operate-and-get-next (C-o)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14272 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX498"><CODE>operate-and-get-next (C-o)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14273 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX371"><CODE>overwrite-mode ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC106">8.4.3 Commands For Changing Text</A></TD></TR>
14274 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX372"><CODE>overwrite-mode ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC106">8.4.3 Commands For Changing Text</A></TD></TR>
14275 <TR><TD COLSPAN=3> <HR></TD></TR>
14276 <TR><TH><A NAME="fn_P"></A>P</TH><TD></TD><TD></TD></TR>
14277 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX435"><CODE>possible-command-completions (C-x !)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.6 Letting Readline Type For You</A></TD></TR>
14278 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX436"><CODE>possible-command-completions (C-x !)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.6 Letting Readline Type For You</A></TD></TR>
14279 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX409"><CODE>possible-completions (M-?)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.6 Letting Readline Type For You</A></TD></TR>
14280 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX410"><CODE>possible-completions (M-?)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.6 Letting Readline Type For You</A></TD></TR>
14281 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX419"><CODE>possible-filename-completions (C-x /)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.6 Letting Readline Type For You</A></TD></TR>
14282 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX420"><CODE>possible-filename-completions (C-x /)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.6 Letting Readline Type For You</A></TD></TR>
14283 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX431"><CODE>possible-hostname-completions (C-x @)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.6 Letting Readline Type For You</A></TD></TR>
14284 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX432"><CODE>possible-hostname-completions (C-x @)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.6 Letting Readline Type For You</A></TD></TR>
14285 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX423"><CODE>possible-username-completions (C-x ~)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.6 Letting Readline Type For You</A></TD></TR>
14286 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX424"><CODE>possible-username-completions (C-x ~)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.6 Letting Readline Type For You</A></TD></TR>
14287 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX427"><CODE>possible-variable-completions (C-x $)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.6 Letting Readline Type For You</A></TD></TR>
14288 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX428"><CODE>possible-variable-completions (C-x $)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.6 Letting Readline Type For You</A></TD></TR>
14289 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX453"><CODE>prefix-meta (<KBD>ESC</KBD>)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14290 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX454"><CODE>prefix-meta (<KBD>ESC</KBD>)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14291 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX327"><CODE>previous-history (C-p)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC105">8.4.2 Commands For Manipulating The History</A></TD></TR>
14292 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX328"><CODE>previous-history (C-p)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC105">8.4.2 Commands For Manipulating The History</A></TD></TR>
14293 <TR><TD COLSPAN=3> <HR></TD></TR>
14294 <TR><TH><A NAME="fn_Q"></A>Q</TH><TD></TD><TD></TD></TR>
14295 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX357"><CODE>quoted-insert (C-q or C-v)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC106">8.4.3 Commands For Changing Text</A></TD></TR>
14296 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX358"><CODE>quoted-insert (C-q or C-v)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC106">8.4.3 Commands For Changing Text</A></TD></TR>
14297 <TR><TD COLSPAN=3> <HR></TD></TR>
14298 <TR><TH><A NAME="fn_R"></A>R</TH><TD></TD><TD></TD></TR>
14299 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX447"><CODE>re-read-init-file (C-x C-r)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14300 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX448"><CODE>re-read-init-file (C-x C-r)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14301 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX323"><CODE>redraw-current-line ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.4.1 Commands For Moving</A></TD></TR>
14302 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX324"><CODE>redraw-current-line ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.4.1 Commands For Moving</A></TD></TR>
14303 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX335"><CODE>reverse-search-history (C-r)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC105">8.4.2 Commands For Manipulating The History</A></TD></TR>
14304 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX336"><CODE>reverse-search-history (C-r)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC105">8.4.2 Commands For Manipulating The History</A></TD></TR>
14305 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX457"><CODE>revert-line (M-r)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14306 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX458"><CODE>revert-line (M-r)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14307 <TR><TD COLSPAN=3> <HR></TD></TR>
14308 <TR><TH><A NAME="fn_S"></A>S</TH><TD></TD><TD></TD></TR>
14309 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX359"><CODE>self-insert (a, b, A, 1, !, &#60;small&#62;...&#60;/small&#62;)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC106">8.4.3 Commands For Changing Text</A></TD></TR>
14310 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX360"><CODE>self-insert (a, b, A, 1, !, &#60;small&#62;...&#60;/small&#62;)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC106">8.4.3 Commands For Changing Text</A></TD></TR>
14311 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX461"><CODE>set-mark (C-@)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14312 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX462"><CODE>set-mark (C-@)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14313 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX485"><CODE>shell-expand-line (M-C-e)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14314 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX486"><CODE>shell-expand-line (M-C-e)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14315 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX441"><CODE>start-kbd-macro (C-x ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.7 Keyboard Macros</A></TD></TR>
14316 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX442"><CODE>start-kbd-macro (C-x ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.7 Keyboard Macros</A></TD></TR>
14317 <TR><TD COLSPAN=3> <HR></TD></TR>
14318 <TR><TH><A NAME="fn_T"></A>T</TH><TD></TD><TD></TD></TR>
14319 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX459"><CODE>tilde-expand (M-&#38;#38;)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14320 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX460"><CODE>tilde-expand (M-&#38;#38;)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14321 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX361"><CODE>transpose-chars (C-t)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC106">8.4.3 Commands For Changing Text</A></TD></TR>
14322 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX362"><CODE>transpose-chars (C-t)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC106">8.4.3 Commands For Changing Text</A></TD></TR>
14323 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX363"><CODE>transpose-words (M-t)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC106">8.4.3 Commands For Changing Text</A></TD></TR>
14324 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX364"><CODE>transpose-words (M-t)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC106">8.4.3 Commands For Changing Text</A></TD></TR>
14325 <TR><TD COLSPAN=3> <HR></TD></TR>
14326 <TR><TH><A NAME="fn_U"></A>U</TH><TD></TD><TD></TD></TR>
14327 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX455"><CODE>undo (C-_ or C-x C-u)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14328 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX456"><CODE>undo (C-_ or C-x C-u)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A></TD></TR>
14329 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX405"><CODE>universal-argument ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC108">8.4.5 Specifying Numeric Arguments</A></TD></TR>
14330 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX406"><CODE>universal-argument ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC108">8.4.5 Specifying Numeric Arguments</A></TD></TR>
14331 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX387"><CODE>unix-filename-rubout ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC107">8.4.4 Killing And Yanking</A></TD></TR>
14332 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX388"><CODE>unix-filename-rubout ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC107">8.4.4 Killing And Yanking</A></TD></TR>
14333 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX377"><CODE>unix-line-discard (C-u)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC107">8.4.4 Killing And Yanking</A></TD></TR>
14334 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX378"><CODE>unix-line-discard (C-u)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC107">8.4.4 Killing And Yanking</A></TD></TR>
14335 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX385"><CODE>unix-word-rubout (C-w)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC107">8.4.4 Killing And Yanking</A></TD></TR>
14336 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX386"><CODE>unix-word-rubout (C-w)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC107">8.4.4 Killing And Yanking</A></TD></TR>
14337 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX365"><CODE>upcase-word (M-u)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC106">8.4.3 Commands For Changing Text</A></TD></TR>
14338 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX366"><CODE>upcase-word (M-u)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC106">8.4.3 Commands For Changing Text</A></TD></TR>
14339 <TR><TD COLSPAN=3> <HR></TD></TR>
14340 <TR><TH><A NAME="fn_Y"></A>Y</TH><TD></TD><TD></TD></TR>
14341 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX399"><CODE>yank (C-y)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC107">8.4.4 Killing And Yanking</A></TD></TR>
14342 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX400"><CODE>yank (C-y)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC107">8.4.4 Killing And Yanking</A></TD></TR>
14343 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX349"><CODE>yank-last-arg (M-. or M-_)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC105">8.4.2 Commands For Manipulating The History</A></TD></TR>
14344 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX350"><CODE>yank-last-arg (M-. or M-_)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC105">8.4.2 Commands For Manipulating The History</A></TD></TR>
14345 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX347"><CODE>yank-nth-arg (M-C-y)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC105">8.4.2 Commands For Manipulating The History</A></TD></TR>
14346 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX348"><CODE>yank-nth-arg (M-C-y)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC105">8.4.2 Commands For Manipulating The History</A></TD></TR>
14347 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX401"><CODE>yank-pop (M-y)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC107">8.4.4 Killing And Yanking</A></TD></TR>
14348 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX402"><CODE>yank-pop (M-y)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC107">8.4.4 Killing And Yanking</A></TD></TR>
14349 <TR><TD COLSPAN=3> <HR></TD></TR>
14350 </TABLE><P></P><table><tr><th valign=top>Jump to: &nbsp; </th><td><A HREF="bashref.html#fn_A" style="text-decoration:none"><b>A</b></A>
14351 &nbsp;
14352 <A HREF="bashref.html#fn_B" style="text-decoration:none"><b>B</b></A>
14353 &nbsp;
14354 <A HREF="bashref.html#fn_C" style="text-decoration:none"><b>C</b></A>
14355 &nbsp;
14356 <A HREF="bashref.html#fn_D" style="text-decoration:none"><b>D</b></A>
14357 &nbsp;
14358 <A HREF="bashref.html#fn_E" style="text-decoration:none"><b>E</b></A>
14359 &nbsp;
14360 <A HREF="bashref.html#fn_F" style="text-decoration:none"><b>F</b></A>
14361 &nbsp;
14362 <A HREF="bashref.html#fn_G" style="text-decoration:none"><b>G</b></A>
14363 &nbsp;
14364 <A HREF="bashref.html#fn_H" style="text-decoration:none"><b>H</b></A>
14365 &nbsp;
14366 <A HREF="bashref.html#fn_I" style="text-decoration:none"><b>I</b></A>
14367 &nbsp;
14368 <A HREF="bashref.html#fn_K" style="text-decoration:none"><b>K</b></A>
14369 &nbsp;
14370 <A HREF="bashref.html#fn_M" style="text-decoration:none"><b>M</b></A>
14371 &nbsp;
14372 <A HREF="bashref.html#fn_N" style="text-decoration:none"><b>N</b></A>
14373 &nbsp;
14374 <A HREF="bashref.html#fn_O" style="text-decoration:none"><b>O</b></A>
14375 &nbsp;
14376 <A HREF="bashref.html#fn_P" style="text-decoration:none"><b>P</b></A>
14377 &nbsp;
14378 <A HREF="bashref.html#fn_Q" style="text-decoration:none"><b>Q</b></A>
14379 &nbsp;
14380 <A HREF="bashref.html#fn_R" style="text-decoration:none"><b>R</b></A>
14381 &nbsp;
14382 <A HREF="bashref.html#fn_S" style="text-decoration:none"><b>S</b></A>
14383 &nbsp;
14384 <A HREF="bashref.html#fn_T" style="text-decoration:none"><b>T</b></A>
14385 &nbsp;
14386 <A HREF="bashref.html#fn_U" style="text-decoration:none"><b>U</b></A>
14387 &nbsp;
14388 <A HREF="bashref.html#fn_Y" style="text-decoration:none"><b>Y</b></A>
14389 &nbsp;
14390 </td></tr></table><br><P>
14391
14392 <A NAME="Concept Index"></A>
14393 <HR SIZE="6">
14394 <A NAME="SEC141"></A>
14395 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
14396 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140"> &lt; </A>]</TD>
14397 <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt; ]</TD>
14398 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
14399 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top"> Up </A>]</TD>
14400 <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
14401 <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
14402 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
14403 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
14404 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
14405 </TR></TABLE>
14406 <H1> Concept Index </H1>
14407 <!--docid::SEC141::-->
14408 <table><tr><th valign=top>Jump to: &nbsp; </th><td><A HREF="bashref.html#cp_A" style="text-decoration:none"><b>A</b></A>
14409 &nbsp;
14410 <A HREF="bashref.html#cp_B" style="text-decoration:none"><b>B</b></A>
14411 &nbsp;
14412 <A HREF="bashref.html#cp_C" style="text-decoration:none"><b>C</b></A>
14413 &nbsp;
14414 <A HREF="bashref.html#cp_D" style="text-decoration:none"><b>D</b></A>
14415 &nbsp;
14416 <A HREF="bashref.html#cp_E" style="text-decoration:none"><b>E</b></A>
14417 &nbsp;
14418 <A HREF="bashref.html#cp_F" style="text-decoration:none"><b>F</b></A>
14419 &nbsp;
14420 <A HREF="bashref.html#cp_H" style="text-decoration:none"><b>H</b></A>
14421 &nbsp;
14422 <A HREF="bashref.html#cp_I" style="text-decoration:none"><b>I</b></A>
14423 &nbsp;
14424 <A HREF="bashref.html#cp_J" style="text-decoration:none"><b>J</b></A>
14425 &nbsp;
14426 <A HREF="bashref.html#cp_K" style="text-decoration:none"><b>K</b></A>
14427 &nbsp;
14428 <A HREF="bashref.html#cp_L" style="text-decoration:none"><b>L</b></A>
14429 &nbsp;
14430 <A HREF="bashref.html#cp_M" style="text-decoration:none"><b>M</b></A>
14431 &nbsp;
14432 <A HREF="bashref.html#cp_N" style="text-decoration:none"><b>N</b></A>
14433 &nbsp;
14434 <A HREF="bashref.html#cp_O" style="text-decoration:none"><b>O</b></A>
14435 &nbsp;
14436 <A HREF="bashref.html#cp_P" style="text-decoration:none"><b>P</b></A>
14437 &nbsp;
14438 <A HREF="bashref.html#cp_Q" style="text-decoration:none"><b>Q</b></A>
14439 &nbsp;
14440 <A HREF="bashref.html#cp_R" style="text-decoration:none"><b>R</b></A>
14441 &nbsp;
14442 <A HREF="bashref.html#cp_S" style="text-decoration:none"><b>S</b></A>
14443 &nbsp;
14444 <A HREF="bashref.html#cp_T" style="text-decoration:none"><b>T</b></A>
14445 &nbsp;
14446 <A HREF="bashref.html#cp_V" style="text-decoration:none"><b>V</b></A>
14447 &nbsp;
14448 <A HREF="bashref.html#cp_W" style="text-decoration:none"><b>W</b></A>
14449 &nbsp;
14450 <A HREF="bashref.html#cp_Y" style="text-decoration:none"><b>Y</b></A>
14451 &nbsp;
14452 </td></tr></table><br><P></P>
14453 <TABLE border=0>
14454 <TR><TD></TD><TH ALIGN=LEFT>Index Entry</TH><TH ALIGN=LEFT> Section</TH></TR>
14455 <TR><TD COLSPAN=3> <HR></TD></TR>
14456 <TR><TH><A NAME="cp_A"></A>A</TH><TD></TD><TD></TD></TR>
14457 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC80">alias expansion</A></TD><TD valign=top><A HREF="bashref.html#SEC80">6.6 Aliases</A></TD></TR>
14458 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC79">arithmetic evaluation</A></TD><TD valign=top><A HREF="bashref.html#SEC79">6.5 Shell Arithmetic</A></TD></TR>
14459 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC32">arithmetic expansion</A></TD><TD valign=top><A HREF="bashref.html#SEC32">3.5.5 Arithmetic Expansion</A></TD></TR>
14460 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC79">arithmetic, shell</A></TD><TD valign=top><A HREF="bashref.html#SEC79">6.5 Shell Arithmetic</A></TD></TR>
14461 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC81">arrays</A></TD><TD valign=top><A HREF="bashref.html#SEC81">6.7 Arrays</A></TD></TR>
14462 <TR><TD COLSPAN=3> <HR></TD></TR>
14463 <TR><TH><A NAME="cp_B"></A>B</TH><TD></TD><TD></TD></TR>
14464 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC88">background</A></TD><TD valign=top><A HREF="bashref.html#SEC88">7.1 Job Control Basics</A></TD></TR>
14465 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC123">Bash configuration</A></TD><TD valign=top><A HREF="bashref.html#SEC123">10.1 Basic Installation</A></TD></TR>
14466 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC123">Bash installation</A></TD><TD valign=top><A HREF="bashref.html#SEC123">10.1 Basic Installation</A></TD></TR>
14467 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC5">Bourne shell</A></TD><TD valign=top><A HREF="bashref.html#SEC5">3. Basic Shell Features</A></TD></TR>
14468 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC28">brace expansion</A></TD><TD valign=top><A HREF="bashref.html#SEC28">3.5.1 Brace Expansion</A></TD></TR>
14469 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX2">builtin</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
14470 <TR><TD COLSPAN=3> <HR></TD></TR>
14471 <TR><TH><A NAME="cp_C"></A>C</TH><TD></TD><TD></TD></TR>
14472 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC94">command editing</A></TD><TD valign=top><A HREF="bashref.html#SEC94">8.2.1 Readline Bare Essentials</A></TD></TR>
14473 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC50">command execution</A></TD><TD valign=top><A HREF="bashref.html#SEC50">3.7.2 Command Search and Execution</A></TD></TR>
14474 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC49">command expansion</A></TD><TD valign=top><A HREF="bashref.html#SEC49">3.7.1 Simple Command Expansion</A></TD></TR>
14475 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC116">command history</A></TD><TD valign=top><A HREF="bashref.html#SEC116">9.1 Bash History Facilities</A></TD></TR>
14476 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC50">command search</A></TD><TD valign=top><A HREF="bashref.html#SEC50">3.7.2 Command Search and Execution</A></TD></TR>
14477 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC31">command substitution</A></TD><TD valign=top><A HREF="bashref.html#SEC31">3.5.4 Command Substitution</A></TD></TR>
14478 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX26">command timing</A></TD><TD valign=top><A HREF="bashref.html#SEC17">3.2.2 Pipelines</A></TD></TR>
14479 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC19">commands, compound</A></TD><TD valign=top><A HREF="bashref.html#SEC19">3.2.4 Compound Commands</A></TD></TR>
14480 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC21">commands, conditional</A></TD><TD valign=top><A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A></TD></TR>
14481 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC22">commands, grouping</A></TD><TD valign=top><A HREF="bashref.html#SEC22">3.2.4.3 Grouping Commands</A></TD></TR>
14482 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC18">commands, lists</A></TD><TD valign=top><A HREF="bashref.html#SEC18">3.2.3 Lists of Commands</A></TD></TR>
14483 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC20">commands, looping</A></TD><TD valign=top><A HREF="bashref.html#SEC20">3.2.4.1 Looping Constructs</A></TD></TR>
14484 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC17">commands, pipelines</A></TD><TD valign=top><A HREF="bashref.html#SEC17">3.2.2 Pipelines</A></TD></TR>
14485 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC15">commands, shell</A></TD><TD valign=top><A HREF="bashref.html#SEC15">3.2 Shell Commands</A></TD></TR>
14486 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC16">commands, simple</A></TD><TD valign=top><A HREF="bashref.html#SEC16">3.2.1 Simple Commands</A></TD></TR>
14487 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC14">comments, shell</A></TD><TD valign=top><A HREF="bashref.html#SEC14">3.1.3 Comments</A></TD></TR>
14488 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC114">completion builtins</A></TD><TD valign=top><A HREF="bashref.html#SEC114">8.7 Programmable Completion Builtins</A></TD></TR>
14489 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC123">configuration</A></TD><TD valign=top><A HREF="bashref.html#SEC123">10.1 Basic Installation</A></TD></TR>
14490 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX3">control operator</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
14491 <TR><TD COLSPAN=3> <HR></TD></TR>
14492 <TR><TH><A NAME="cp_D"></A>D</TH><TD></TD><TD></TD></TR>
14493 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC82">directory stack</A></TD><TD valign=top><A HREF="bashref.html#SEC82">6.8 The Directory Stack</A></TD></TR>
14494 <TR><TD COLSPAN=3> <HR></TD></TR>
14495 <TR><TH><A NAME="cp_E"></A>E</TH><TD></TD><TD></TD></TR>
14496 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC94">editing command lines</A></TD><TD valign=top><A HREF="bashref.html#SEC94">8.2.1 Readline Bare Essentials</A></TD></TR>
14497 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC52">environment</A></TD><TD valign=top><A HREF="bashref.html#SEC52">3.7.4 Environment</A></TD></TR>
14498 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC79">evaluation, arithmetic</A></TD><TD valign=top><A HREF="bashref.html#SEC79">6.5 Shell Arithmetic</A></TD></TR>
14499 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC119">event designators</A></TD><TD valign=top><A HREF="bashref.html#SEC119">9.3.1 Event Designators</A></TD></TR>
14500 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC51">execution environment</A></TD><TD valign=top><A HREF="bashref.html#SEC51">3.7.3 Command Execution Environment</A></TD></TR>
14501 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX4">exit status</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
14502 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC53">exit status</A></TD><TD valign=top><A HREF="bashref.html#SEC53">3.7.5 Exit Status</A></TD></TR>
14503 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC27">expansion</A></TD><TD valign=top><A HREF="bashref.html#SEC27">3.5 Shell Expansions</A></TD></TR>
14504 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC32">expansion, arithmetic</A></TD><TD valign=top><A HREF="bashref.html#SEC32">3.5.5 Arithmetic Expansion</A></TD></TR>
14505 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC28">expansion, brace</A></TD><TD valign=top><A HREF="bashref.html#SEC28">3.5.1 Brace Expansion</A></TD></TR>
14506 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX64">expansion, filename</A></TD><TD valign=top><A HREF="bashref.html#SEC35">3.5.8 Filename Expansion</A></TD></TR>
14507 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC30">expansion, parameter</A></TD><TD valign=top><A HREF="bashref.html#SEC30">3.5.3 Shell Parameter Expansion</A></TD></TR>
14508 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX65">expansion, pathname</A></TD><TD valign=top><A HREF="bashref.html#SEC35">3.5.8 Filename Expansion</A></TD></TR>
14509 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC29">expansion, tilde</A></TD><TD valign=top><A HREF="bashref.html#SEC29">3.5.2 Tilde Expansion</A></TD></TR>
14510 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC79">expressions, arithmetic</A></TD><TD valign=top><A HREF="bashref.html#SEC79">6.5 Shell Arithmetic</A></TD></TR>
14511 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC78">expressions, conditional</A></TD><TD valign=top><A HREF="bashref.html#SEC78">6.4 Bash Conditional Expressions</A></TD></TR>
14512 <TR><TD COLSPAN=3> <HR></TD></TR>
14513 <TR><TH><A NAME="cp_F"></A>F</TH><TD></TD><TD></TD></TR>
14514 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX507">FDL, GNU Free Documentation License</A></TD><TD valign=top><A HREF="bashref.html#SEC135">C.1 GNU Free Documentation License</A></TD></TR>
14515 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX5">field</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
14516 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX6">filename</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
14517 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX66">filename expansion</A></TD><TD valign=top><A HREF="bashref.html#SEC35">3.5.8 Filename Expansion</A></TD></TR>
14518 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC88">foreground</A></TD><TD valign=top><A HREF="bashref.html#SEC88">7.1 Job Control Basics</A></TD></TR>
14519 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC23">functions, shell</A></TD><TD valign=top><A HREF="bashref.html#SEC23">3.3 Shell Functions</A></TD></TR>
14520 <TR><TD COLSPAN=3> <HR></TD></TR>
14521 <TR><TH><A NAME="cp_H"></A>H</TH><TD></TD><TD></TD></TR>
14522 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC117">history builtins</A></TD><TD valign=top><A HREF="bashref.html#SEC117">9.2 Bash History Builtins</A></TD></TR>
14523 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX506">history events</A></TD><TD valign=top><A HREF="bashref.html#SEC119">9.3.1 Event Designators</A></TD></TR>
14524 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC118">history expansion</A></TD><TD valign=top><A HREF="bashref.html#SEC118">9.3 History Expansion</A></TD></TR>
14525 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC116">history list</A></TD><TD valign=top><A HREF="bashref.html#SEC116">9.1 Bash History Facilities</A></TD></TR>
14526 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX503">History, how to use</A></TD><TD valign=top><A HREF="bashref.html#SEC114">8.7 Programmable Completion Builtins</A></TD></TR>
14527 <TR><TD COLSPAN=3> <HR></TD></TR>
14528 <TR><TH><A NAME="cp_I"></A>I</TH><TD></TD><TD></TD></TR>
14529 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX11">identifier</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
14530 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC99">initialization file, readline</A></TD><TD valign=top><A HREF="bashref.html#SEC99">8.3 Readline Init File</A></TD></TR>
14531 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC123">installation</A></TD><TD valign=top><A HREF="bashref.html#SEC123">10.1 Basic Installation</A></TD></TR>
14532 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC93">interaction, readline</A></TD><TD valign=top><A HREF="bashref.html#SEC93">8.2 Readline Interaction</A></TD></TR>
14533 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX269">interactive shell</A></TD><TD valign=top><A HREF="bashref.html#SEC65">6.1 Invoking Bash</A></TD></TR>
14534 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC74">interactive shell</A></TD><TD valign=top><A HREF="bashref.html#SEC74">6.3 Interactive Shells</A></TD></TR>
14535 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC13">internationalization</A></TD><TD valign=top><A HREF="bashref.html#SEC13">3.1.2.5 Locale-Specific Translation</A></TD></TR>
14536 <TR><TD COLSPAN=3> <HR></TD></TR>
14537 <TR><TH><A NAME="cp_J"></A>J</TH><TD></TD><TD></TD></TR>
14538 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX7">job</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
14539 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX8">job control</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
14540 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC88">job control</A></TD><TD valign=top><A HREF="bashref.html#SEC88">7.1 Job Control Basics</A></TD></TR>
14541 <TR><TD COLSPAN=3> <HR></TD></TR>
14542 <TR><TH><A NAME="cp_K"></A>K</TH><TD></TD><TD></TD></TR>
14543 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX285">kill ring</A></TD><TD valign=top><A HREF="bashref.html#SEC96">8.2.3 Readline Killing Commands</A></TD></TR>
14544 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX283">killing text</A></TD><TD valign=top><A HREF="bashref.html#SEC96">8.2.3 Readline Killing Commands</A></TD></TR>
14545 <TR><TD COLSPAN=3> <HR></TD></TR>
14546 <TR><TH><A NAME="cp_L"></A>L</TH><TD></TD><TD></TD></TR>
14547 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC13">localization</A></TD><TD valign=top><A HREF="bashref.html#SEC13">3.1.2.5 Locale-Specific Translation</A></TD></TR>
14548 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX268">login shell</A></TD><TD valign=top><A HREF="bashref.html#SEC65">6.1 Invoking Bash</A></TD></TR>
14549 <TR><TD COLSPAN=3> <HR></TD></TR>
14550 <TR><TH><A NAME="cp_M"></A>M</TH><TD></TD><TD></TD></TR>
14551 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC36">matching, pattern</A></TD><TD valign=top><A HREF="bashref.html#SEC36">3.5.8.1 Pattern Matching</A></TD></TR>
14552 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX9">metacharacter</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
14553 <TR><TD COLSPAN=3> <HR></TD></TR>
14554 <TR><TH><A NAME="cp_N"></A>N</TH><TD></TD><TD></TD></TR>
14555 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX10">name</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
14556 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC13">native languages</A></TD><TD valign=top><A HREF="bashref.html#SEC13">3.1.2.5 Locale-Specific Translation</A></TD></TR>
14557 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC94">notation, readline</A></TD><TD valign=top><A HREF="bashref.html#SEC94">8.2.1 Readline Bare Essentials</A></TD></TR>
14558 <TR><TD COLSPAN=3> <HR></TD></TR>
14559 <TR><TH><A NAME="cp_O"></A>O</TH><TD></TD><TD></TD></TR>
14560 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX12">operator, shell</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
14561 <TR><TD COLSPAN=3> <HR></TD></TR>
14562 <TR><TH><A NAME="cp_P"></A>P</TH><TD></TD><TD></TD></TR>
14563 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC30">parameter expansion</A></TD><TD valign=top><A HREF="bashref.html#SEC30">3.5.3 Shell Parameter Expansion</A></TD></TR>
14564 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC24">parameters</A></TD><TD valign=top><A HREF="bashref.html#SEC24">3.4 Shell Parameters</A></TD></TR>
14565 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC25">parameters, positional</A></TD><TD valign=top><A HREF="bashref.html#SEC25">3.4.1 Positional Parameters</A></TD></TR>
14566 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC26">parameters, special</A></TD><TD valign=top><A HREF="bashref.html#SEC26">3.4.2 Special Parameters</A></TD></TR>
14567 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX67">pathname expansion</A></TD><TD valign=top><A HREF="bashref.html#SEC35">3.5.8 Filename Expansion</A></TD></TR>
14568 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC36">pattern matching</A></TD><TD valign=top><A HREF="bashref.html#SEC36">3.5.8.1 Pattern Matching</A></TD></TR>
14569 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC17">pipeline</A></TD><TD valign=top><A HREF="bashref.html#SEC17">3.2.2 Pipelines</A></TD></TR>
14570 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX1">POSIX</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
14571 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC86">POSIX Mode</A></TD><TD valign=top><A HREF="bashref.html#SEC86">6.11 Bash POSIX Mode</A></TD></TR>
14572 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX13">process group</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
14573 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX14">process group ID</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
14574 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC33">process substitution</A></TD><TD valign=top><A HREF="bashref.html#SEC33">3.5.6 Process Substitution</A></TD></TR>
14575 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC113">programmable completion</A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.6 Programmable Completion</A></TD></TR>
14576 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC84">prompting</A></TD><TD valign=top><A HREF="bashref.html#SEC84">6.9 Controlling the Prompt</A></TD></TR>
14577 <TR><TD COLSPAN=3> <HR></TD></TR>
14578 <TR><TH><A NAME="cp_Q"></A>Q</TH><TD></TD><TD></TD></TR>
14579 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC8">quoting</A></TD><TD valign=top><A HREF="bashref.html#SEC8">3.1.2 Quoting</A></TD></TR>
14580 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC12">quoting, ANSI</A></TD><TD valign=top><A HREF="bashref.html#SEC12">3.1.2.4 ANSI-C Quoting</A></TD></TR>
14581 <TR><TD COLSPAN=3> <HR></TD></TR>
14582 <TR><TH><A NAME="cp_R"></A>R</TH><TD></TD><TD></TD></TR>
14583 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX282">Readline, how to use</A></TD><TD valign=top><A HREF="bashref.html#SEC90">7.3 Job Control Variables</A></TD></TR>
14584 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC38">redirection</A></TD><TD valign=top><A HREF="bashref.html#SEC38">3.6 Redirections</A></TD></TR>
14585 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX15">reserved word</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
14586 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC85">restricted shell</A></TD><TD valign=top><A HREF="bashref.html#SEC85">6.10 The Restricted Shell</A></TD></TR>
14587 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX16">return status</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
14588 <TR><TD COLSPAN=3> <HR></TD></TR>
14589 <TR><TH><A NAME="cp_S"></A>S</TH><TD></TD><TD></TD></TR>
14590 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC79">shell arithmetic</A></TD><TD valign=top><A HREF="bashref.html#SEC79">6.5 Shell Arithmetic</A></TD></TR>
14591 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC23">shell function</A></TD><TD valign=top><A HREF="bashref.html#SEC23">3.3 Shell Functions</A></TD></TR>
14592 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC55">shell script</A></TD><TD valign=top><A HREF="bashref.html#SEC55">3.8 Shell Scripts</A></TD></TR>
14593 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC24">shell variable</A></TD><TD valign=top><A HREF="bashref.html#SEC24">3.4 Shell Parameters</A></TD></TR>
14594 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC74">shell, interactive</A></TD><TD valign=top><A HREF="bashref.html#SEC74">6.3 Interactive Shells</A></TD></TR>
14595 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX17">signal</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
14596 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC54">signal handling</A></TD><TD valign=top><A HREF="bashref.html#SEC54">3.7.6 Signals</A></TD></TR>
14597 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX18">special builtin</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
14598 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC60">special builtin</A></TD><TD valign=top><A HREF="bashref.html#SEC60">4.4 Special Builtins</A></TD></TR>
14599 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC66">startup files</A></TD><TD valign=top><A HREF="bashref.html#SEC66">6.2 Bash Startup Files</A></TD></TR>
14600 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC88">suspending jobs</A></TD><TD valign=top><A HREF="bashref.html#SEC88">7.1 Job Control Basics</A></TD></TR>
14601 <TR><TD COLSPAN=3> <HR></TD></TR>
14602 <TR><TH><A NAME="cp_T"></A>T</TH><TD></TD><TD></TD></TR>
14603 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC29">tilde expansion</A></TD><TD valign=top><A HREF="bashref.html#SEC29">3.5.2 Tilde Expansion</A></TD></TR>
14604 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX19">token</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
14605 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC13">translation, native languages</A></TD><TD valign=top><A HREF="bashref.html#SEC13">3.1.2.5 Locale-Specific Translation</A></TD></TR>
14606 <TR><TD COLSPAN=3> <HR></TD></TR>
14607 <TR><TH><A NAME="cp_V"></A>V</TH><TD></TD><TD></TD></TR>
14608 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC24">variable, shell</A></TD><TD valign=top><A HREF="bashref.html#SEC24">3.4 Shell Parameters</A></TD></TR>
14609 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX286">variables, readline</A></TD><TD valign=top><A HREF="bashref.html#SEC100">8.3.1 Readline Init File Syntax</A></TD></TR>
14610 <TR><TD COLSPAN=3> <HR></TD></TR>
14611 <TR><TH><A NAME="cp_W"></A>W</TH><TD></TD><TD></TD></TR>
14612 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX20">word</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
14613 <TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC34">word splitting</A></TD><TD valign=top><A HREF="bashref.html#SEC34">3.5.7 Word Splitting</A></TD></TR>
14614 <TR><TD COLSPAN=3> <HR></TD></TR>
14615 <TR><TH><A NAME="cp_Y"></A>Y</TH><TD></TD><TD></TD></TR>
14616 <TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX284">yanking text</A></TD><TD valign=top><A HREF="bashref.html#SEC96">8.2.3 Readline Killing Commands</A></TD></TR>
14617 <TR><TD COLSPAN=3> <HR></TD></TR>
14618 </TABLE><P></P><table><tr><th valign=top>Jump to: &nbsp; </th><td><A HREF="bashref.html#cp_A" style="text-decoration:none"><b>A</b></A>
14619 &nbsp;
14620 <A HREF="bashref.html#cp_B" style="text-decoration:none"><b>B</b></A>
14621 &nbsp;
14622 <A HREF="bashref.html#cp_C" style="text-decoration:none"><b>C</b></A>
14623 &nbsp;
14624 <A HREF="bashref.html#cp_D" style="text-decoration:none"><b>D</b></A>
14625 &nbsp;
14626 <A HREF="bashref.html#cp_E" style="text-decoration:none"><b>E</b></A>
14627 &nbsp;
14628 <A HREF="bashref.html#cp_F" style="text-decoration:none"><b>F</b></A>
14629 &nbsp;
14630 <A HREF="bashref.html#cp_H" style="text-decoration:none"><b>H</b></A>
14631 &nbsp;
14632 <A HREF="bashref.html#cp_I" style="text-decoration:none"><b>I</b></A>
14633 &nbsp;
14634 <A HREF="bashref.html#cp_J" style="text-decoration:none"><b>J</b></A>
14635 &nbsp;
14636 <A HREF="bashref.html#cp_K" style="text-decoration:none"><b>K</b></A>
14637 &nbsp;
14638 <A HREF="bashref.html#cp_L" style="text-decoration:none"><b>L</b></A>
14639 &nbsp;
14640 <A HREF="bashref.html#cp_M" style="text-decoration:none"><b>M</b></A>
14641 &nbsp;
14642 <A HREF="bashref.html#cp_N" style="text-decoration:none"><b>N</b></A>
14643 &nbsp;
14644 <A HREF="bashref.html#cp_O" style="text-decoration:none"><b>O</b></A>
14645 &nbsp;
14646 <A HREF="bashref.html#cp_P" style="text-decoration:none"><b>P</b></A>
14647 &nbsp;
14648 <A HREF="bashref.html#cp_Q" style="text-decoration:none"><b>Q</b></A>
14649 &nbsp;
14650 <A HREF="bashref.html#cp_R" style="text-decoration:none"><b>R</b></A>
14651 &nbsp;
14652 <A HREF="bashref.html#cp_S" style="text-decoration:none"><b>S</b></A>
14653 &nbsp;
14654 <A HREF="bashref.html#cp_T" style="text-decoration:none"><b>T</b></A>
14655 &nbsp;
14656 <A HREF="bashref.html#cp_V" style="text-decoration:none"><b>V</b></A>
14657 &nbsp;
14658 <A HREF="bashref.html#cp_W" style="text-decoration:none"><b>W</b></A>
14659 &nbsp;
14660 <A HREF="bashref.html#cp_Y" style="text-decoration:none"><b>Y</b></A>
14661 &nbsp;
14662 </td></tr></table><br><P>
14663
14664 <HR SIZE="6">
14665 <A NAME="SEC_Contents"></A>
14666 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
14667 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
14668 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
14669 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
14670 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
14671 </TR></TABLE>
14672 <H1>Table of Contents</H1>
14673 <UL>
14674 <A NAME="TOC1" HREF="bashref.html#SEC1">1. Introduction</A>
14675 <BR>
14676 <UL>
14677 <A NAME="TOC2" HREF="bashref.html#SEC2">1.1 What is Bash?</A>
14678 <BR>
14679 <A NAME="TOC3" HREF="bashref.html#SEC3">1.2 What is a shell?</A>
14680 <BR>
14681 </UL>
14682 <A NAME="TOC4" HREF="bashref.html#SEC4">2. Definitions</A>
14683 <BR>
14684 <A NAME="TOC5" HREF="bashref.html#SEC5">3. Basic Shell Features</A>
14685 <BR>
14686 <UL>
14687 <A NAME="TOC6" HREF="bashref.html#SEC6">3.1 Shell Syntax</A>
14688 <BR>
14689 <UL>
14690 <A NAME="TOC7" HREF="bashref.html#SEC7">3.1.1 Shell Operation</A>
14691 <BR>
14692 <A NAME="TOC8" HREF="bashref.html#SEC8">3.1.2 Quoting</A>
14693 <BR>
14694 <UL>
14695 <A NAME="TOC9" HREF="bashref.html#SEC9">3.1.2.1 Escape Character</A>
14696 <BR>
14697 <A NAME="TOC10" HREF="bashref.html#SEC10">3.1.2.2 Single Quotes</A>
14698 <BR>
14699 <A NAME="TOC11" HREF="bashref.html#SEC11">3.1.2.3 Double Quotes</A>
14700 <BR>
14701 <A NAME="TOC12" HREF="bashref.html#SEC12">3.1.2.4 ANSI-C Quoting</A>
14702 <BR>
14703 <A NAME="TOC13" HREF="bashref.html#SEC13">3.1.2.5 Locale-Specific Translation</A>
14704 <BR>
14705 </UL>
14706 <A NAME="TOC14" HREF="bashref.html#SEC14">3.1.3 Comments</A>
14707 <BR>
14708 </UL>
14709 <A NAME="TOC15" HREF="bashref.html#SEC15">3.2 Shell Commands</A>
14710 <BR>
14711 <UL>
14712 <A NAME="TOC16" HREF="bashref.html#SEC16">3.2.1 Simple Commands</A>
14713 <BR>
14714 <A NAME="TOC17" HREF="bashref.html#SEC17">3.2.2 Pipelines</A>
14715 <BR>
14716 <A NAME="TOC18" HREF="bashref.html#SEC18">3.2.3 Lists of Commands</A>
14717 <BR>
14718 <A NAME="TOC19" HREF="bashref.html#SEC19">3.2.4 Compound Commands</A>
14719 <BR>
14720 <UL>
14721 <A NAME="TOC20" HREF="bashref.html#SEC20">3.2.4.1 Looping Constructs</A>
14722 <BR>
14723 <A NAME="TOC21" HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A>
14724 <BR>
14725 <A NAME="TOC22" HREF="bashref.html#SEC22">3.2.4.3 Grouping Commands</A>
14726 <BR>
14727 </UL>
14728 </UL>
14729 <A NAME="TOC23" HREF="bashref.html#SEC23">3.3 Shell Functions</A>
14730 <BR>
14731 <A NAME="TOC24" HREF="bashref.html#SEC24">3.4 Shell Parameters</A>
14732 <BR>
14733 <UL>
14734 <A NAME="TOC25" HREF="bashref.html#SEC25">3.4.1 Positional Parameters</A>
14735 <BR>
14736 <A NAME="TOC26" HREF="bashref.html#SEC26">3.4.2 Special Parameters</A>
14737 <BR>
14738 </UL>
14739 <A NAME="TOC27" HREF="bashref.html#SEC27">3.5 Shell Expansions</A>
14740 <BR>
14741 <UL>
14742 <A NAME="TOC28" HREF="bashref.html#SEC28">3.5.1 Brace Expansion</A>
14743 <BR>
14744 <A NAME="TOC29" HREF="bashref.html#SEC29">3.5.2 Tilde Expansion</A>
14745 <BR>
14746 <A NAME="TOC30" HREF="bashref.html#SEC30">3.5.3 Shell Parameter Expansion</A>
14747 <BR>
14748 <A NAME="TOC31" HREF="bashref.html#SEC31">3.5.4 Command Substitution</A>
14749 <BR>
14750 <A NAME="TOC32" HREF="bashref.html#SEC32">3.5.5 Arithmetic Expansion</A>
14751 <BR>
14752 <A NAME="TOC33" HREF="bashref.html#SEC33">3.5.6 Process Substitution</A>
14753 <BR>
14754 <A NAME="TOC34" HREF="bashref.html#SEC34">3.5.7 Word Splitting</A>
14755 <BR>
14756 <A NAME="TOC35" HREF="bashref.html#SEC35">3.5.8 Filename Expansion</A>
14757 <BR>
14758 <UL>
14759 <A NAME="TOC36" HREF="bashref.html#SEC36">3.5.8.1 Pattern Matching</A>
14760 <BR>
14761 </UL>
14762 <A NAME="TOC37" HREF="bashref.html#SEC37">3.5.9 Quote Removal</A>
14763 <BR>
14764 </UL>
14765 <A NAME="TOC38" HREF="bashref.html#SEC38">3.6 Redirections</A>
14766 <BR>
14767 <UL>
14768 <A NAME="TOC39" HREF="bashref.html#SEC39">3.6.1 Redirecting Input</A>
14769 <BR>
14770 <A NAME="TOC40" HREF="bashref.html#SEC40">3.6.2 Redirecting Output</A>
14771 <BR>
14772 <A NAME="TOC41" HREF="bashref.html#SEC41">3.6.3 Appending Redirected Output</A>
14773 <BR>
14774 <A NAME="TOC42" HREF="bashref.html#SEC42">3.6.4 Redirecting Standard Output and Standard Error</A>
14775 <BR>
14776 <A NAME="TOC43" HREF="bashref.html#SEC43">3.6.5 Here Documents</A>
14777 <BR>
14778 <A NAME="TOC44" HREF="bashref.html#SEC44">3.6.6 Here Strings</A>
14779 <BR>
14780 <A NAME="TOC45" HREF="bashref.html#SEC45">3.6.7 Duplicating File Descriptors</A>
14781 <BR>
14782 <A NAME="TOC46" HREF="bashref.html#SEC46">3.6.8 Moving File Descriptors</A>
14783 <BR>
14784 <A NAME="TOC47" HREF="bashref.html#SEC47">3.6.9 Opening File Descriptors for Reading and Writing</A>
14785 <BR>
14786 </UL>
14787 <A NAME="TOC48" HREF="bashref.html#SEC48">3.7 Executing Commands</A>
14788 <BR>
14789 <UL>
14790 <A NAME="TOC49" HREF="bashref.html#SEC49">3.7.1 Simple Command Expansion</A>
14791 <BR>
14792 <A NAME="TOC50" HREF="bashref.html#SEC50">3.7.2 Command Search and Execution</A>
14793 <BR>
14794 <A NAME="TOC51" HREF="bashref.html#SEC51">3.7.3 Command Execution Environment</A>
14795 <BR>
14796 <A NAME="TOC52" HREF="bashref.html#SEC52">3.7.4 Environment</A>
14797 <BR>
14798 <A NAME="TOC53" HREF="bashref.html#SEC53">3.7.5 Exit Status</A>
14799 <BR>
14800 <A NAME="TOC54" HREF="bashref.html#SEC54">3.7.6 Signals</A>
14801 <BR>
14802 </UL>
14803 <A NAME="TOC55" HREF="bashref.html#SEC55">3.8 Shell Scripts</A>
14804 <BR>
14805 </UL>
14806 <A NAME="TOC56" HREF="bashref.html#SEC56">4. Shell Builtin Commands</A>
14807 <BR>
14808 <UL>
14809 <A NAME="TOC57" HREF="bashref.html#SEC57">4.1 Bourne Shell Builtins</A>
14810 <BR>
14811 <A NAME="TOC58" HREF="bashref.html#SEC58">4.2 Bash Builtin Commands</A>
14812 <BR>
14813 <A NAME="TOC59" HREF="bashref.html#SEC59">4.3 The Set Builtin</A>
14814 <BR>
14815 <A NAME="TOC60" HREF="bashref.html#SEC60">4.4 Special Builtins</A>
14816 <BR>
14817 </UL>
14818 <A NAME="TOC61" HREF="bashref.html#SEC61">5. Shell Variables</A>
14819 <BR>
14820 <UL>
14821 <A NAME="TOC62" HREF="bashref.html#SEC62">5.1 Bourne Shell Variables</A>
14822 <BR>
14823 <A NAME="TOC63" HREF="bashref.html#SEC63">5.2 Bash Variables</A>
14824 <BR>
14825 </UL>
14826 <A NAME="TOC64" HREF="bashref.html#SEC64">6. Bash Features</A>
14827 <BR>
14828 <UL>
14829 <A NAME="TOC65" HREF="bashref.html#SEC65">6.1 Invoking Bash</A>
14830 <BR>
14831 <A NAME="TOC66" HREF="bashref.html#SEC66">6.2 Bash Startup Files</A>
14832 <BR>
14833 <A NAME="TOC74" HREF="bashref.html#SEC74">6.3 Interactive Shells</A>
14834 <BR>
14835 <UL>
14836 <A NAME="TOC75" HREF="bashref.html#SEC75">6.3.1 What is an Interactive Shell?</A>
14837 <BR>
14838 <A NAME="TOC76" HREF="bashref.html#SEC76">6.3.2 Is this Shell Interactive?</A>
14839 <BR>
14840 <A NAME="TOC77" HREF="bashref.html#SEC77">6.3.3 Interactive Shell Behavior</A>
14841 <BR>
14842 </UL>
14843 <A NAME="TOC78" HREF="bashref.html#SEC78">6.4 Bash Conditional Expressions</A>
14844 <BR>
14845 <A NAME="TOC79" HREF="bashref.html#SEC79">6.5 Shell Arithmetic</A>
14846 <BR>
14847 <A NAME="TOC80" HREF="bashref.html#SEC80">6.6 Aliases</A>
14848 <BR>
14849 <A NAME="TOC81" HREF="bashref.html#SEC81">6.7 Arrays</A>
14850 <BR>
14851 <A NAME="TOC82" HREF="bashref.html#SEC82">6.8 The Directory Stack</A>
14852 <BR>
14853 <UL>
14854 <A NAME="TOC83" HREF="bashref.html#SEC83">6.8.1 Directory Stack Builtins</A>
14855 <BR>
14856 </UL>
14857 <A NAME="TOC84" HREF="bashref.html#SEC84">6.9 Controlling the Prompt</A>
14858 <BR>
14859 <A NAME="TOC85" HREF="bashref.html#SEC85">6.10 The Restricted Shell</A>
14860 <BR>
14861 <A NAME="TOC86" HREF="bashref.html#SEC86">6.11 Bash POSIX Mode</A>
14862 <BR>
14863 </UL>
14864 <A NAME="TOC87" HREF="bashref.html#SEC87">7. Job Control</A>
14865 <BR>
14866 <UL>
14867 <A NAME="TOC88" HREF="bashref.html#SEC88">7.1 Job Control Basics</A>
14868 <BR>
14869 <A NAME="TOC89" HREF="bashref.html#SEC89">7.2 Job Control Builtins</A>
14870 <BR>
14871 <A NAME="TOC90" HREF="bashref.html#SEC90">7.3 Job Control Variables</A>
14872 <BR>
14873 </UL>
14874 <A NAME="TOC91" HREF="bashref.html#SEC91">8. Command Line Editing</A>
14875 <BR>
14876 <UL>
14877 <A NAME="TOC92" HREF="bashref.html#SEC92">8.1 Introduction to Line Editing</A>
14878 <BR>
14879 <A NAME="TOC93" HREF="bashref.html#SEC93">8.2 Readline Interaction</A>
14880 <BR>
14881 <UL>
14882 <A NAME="TOC94" HREF="bashref.html#SEC94">8.2.1 Readline Bare Essentials</A>
14883 <BR>
14884 <A NAME="TOC95" HREF="bashref.html#SEC95">8.2.2 Readline Movement Commands</A>
14885 <BR>
14886 <A NAME="TOC96" HREF="bashref.html#SEC96">8.2.3 Readline Killing Commands</A>
14887 <BR>
14888 <A NAME="TOC97" HREF="bashref.html#SEC97">8.2.4 Readline Arguments</A>
14889 <BR>
14890 <A NAME="TOC98" HREF="bashref.html#SEC98">8.2.5 Searching for Commands in the History</A>
14891 <BR>
14892 </UL>
14893 <A NAME="TOC99" HREF="bashref.html#SEC99">8.3 Readline Init File</A>
14894 <BR>
14895 <UL>
14896 <A NAME="TOC100" HREF="bashref.html#SEC100">8.3.1 Readline Init File Syntax</A>
14897 <BR>
14898 <A NAME="TOC101" HREF="bashref.html#SEC101">8.3.2 Conditional Init Constructs</A>
14899 <BR>
14900 <A NAME="TOC102" HREF="bashref.html#SEC102">8.3.3 Sample Init File</A>
14901 <BR>
14902 </UL>
14903 <A NAME="TOC103" HREF="bashref.html#SEC103">8.4 Bindable Readline Commands</A>
14904 <BR>
14905 <UL>
14906 <A NAME="TOC104" HREF="bashref.html#SEC104">8.4.1 Commands For Moving</A>
14907 <BR>
14908 <A NAME="TOC105" HREF="bashref.html#SEC105">8.4.2 Commands For Manipulating The History</A>
14909 <BR>
14910 <A NAME="TOC106" HREF="bashref.html#SEC106">8.4.3 Commands For Changing Text</A>
14911 <BR>
14912 <A NAME="TOC107" HREF="bashref.html#SEC107">8.4.4 Killing And Yanking</A>
14913 <BR>
14914 <A NAME="TOC108" HREF="bashref.html#SEC108">8.4.5 Specifying Numeric Arguments</A>
14915 <BR>
14916 <A NAME="TOC109" HREF="bashref.html#SEC109">8.4.6 Letting Readline Type For You</A>
14917 <BR>
14918 <A NAME="TOC110" HREF="bashref.html#SEC110">8.4.7 Keyboard Macros</A>
14919 <BR>
14920 <A NAME="TOC111" HREF="bashref.html#SEC111">8.4.8 Some Miscellaneous Commands</A>
14921 <BR>
14922 </UL>
14923 <A NAME="TOC112" HREF="bashref.html#SEC112">8.5 Readline vi Mode</A>
14924 <BR>
14925 <A NAME="TOC113" HREF="bashref.html#SEC113">8.6 Programmable Completion</A>
14926 <BR>
14927 <A NAME="TOC114" HREF="bashref.html#SEC114">8.7 Programmable Completion Builtins</A>
14928 <BR>
14929 </UL>
14930 <A NAME="TOC115" HREF="bashref.html#SEC115">9. Using History Interactively</A>
14931 <BR>
14932 <UL>
14933 <A NAME="TOC116" HREF="bashref.html#SEC116">9.1 Bash History Facilities</A>
14934 <BR>
14935 <A NAME="TOC117" HREF="bashref.html#SEC117">9.2 Bash History Builtins</A>
14936 <BR>
14937 <A NAME="TOC118" HREF="bashref.html#SEC118">9.3 History Expansion</A>
14938 <BR>
14939 <UL>
14940 <A NAME="TOC119" HREF="bashref.html#SEC119">9.3.1 Event Designators</A>
14941 <BR>
14942 <A NAME="TOC120" HREF="bashref.html#SEC120">9.3.2 Word Designators</A>
14943 <BR>
14944 <A NAME="TOC121" HREF="bashref.html#SEC121">9.3.3 Modifiers</A>
14945 <BR>
14946 </UL>
14947 </UL>
14948 <A NAME="TOC122" HREF="bashref.html#SEC122">10. Installing Bash</A>
14949 <BR>
14950 <UL>
14951 <A NAME="TOC123" HREF="bashref.html#SEC123">10.1 Basic Installation</A>
14952 <BR>
14953 <A NAME="TOC124" HREF="bashref.html#SEC124">10.2 Compilers and Options</A>
14954 <BR>
14955 <A NAME="TOC125" HREF="bashref.html#SEC125">10.3 Compiling For Multiple Architectures</A>
14956 <BR>
14957 <A NAME="TOC126" HREF="bashref.html#SEC126">10.4 Installation Names</A>
14958 <BR>
14959 <A NAME="TOC127" HREF="bashref.html#SEC127">10.5 Specifying the System Type</A>
14960 <BR>
14961 <A NAME="TOC128" HREF="bashref.html#SEC128">10.6 Sharing Defaults</A>
14962 <BR>
14963 <A NAME="TOC129" HREF="bashref.html#SEC129">10.7 Operation Controls</A>
14964 <BR>
14965 <A NAME="TOC130" HREF="bashref.html#SEC130">10.8 Optional Features</A>
14966 <BR>
14967 </UL>
14968 <A NAME="TOC131" HREF="bashref.html#SEC131">A. Reporting Bugs</A>
14969 <BR>
14970 <A NAME="TOC132" HREF="bashref.html#SEC132">B. Major Differences From The Bourne Shell</A>
14971 <BR>
14972 <UL>
14973 <A NAME="TOC133" HREF="bashref.html#SEC133">B.1 Implementation Differences From The SVR4.2 Shell</A>
14974 <BR>
14975 </UL>
14976 <A NAME="TOC134" HREF="bashref.html#SEC134">C. Copying This Manual</A>
14977 <BR>
14978 <UL>
14979 <A NAME="TOC135" HREF="bashref.html#SEC135">C.1 GNU Free Documentation License</A>
14980 <BR>
14981 <UL>
14982 <A NAME="TOC136" HREF="bashref.html#SEC136">C.1.1 ADDENDUM: How to use this License for your documents</A>
14983 <BR>
14984 </UL>
14985 </UL>
14986 <A NAME="TOC137" HREF="bashref.html#SEC137">Index of Shell Builtin Commands</A>
14987 <BR>
14988 <A NAME="TOC138" HREF="bashref.html#SEC138">Index of Shell Reserved Words</A>
14989 <BR>
14990 <A NAME="TOC139" HREF="bashref.html#SEC139">Parameter and Variable Index</A>
14991 <BR>
14992 <A NAME="TOC140" HREF="bashref.html#SEC140">Function Index</A>
14993 <BR>
14994 <A NAME="TOC141" HREF="bashref.html#SEC141">Concept Index</A>
14995 <BR>
14996 </UL>
14997 <HR SIZE=1>
14998 <A NAME="SEC_OVERVIEW"></A>
14999 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
15000 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
15001 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
15002 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
15003 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
15004 </TR></TABLE>
15005 <H1>Short Table of Contents</H1>
15006 <BLOCKQUOTE>
15007 <A NAME="TOC1" HREF="bashref.html#SEC1">1. Introduction</A>
15008 <BR>
15009 <A NAME="TOC4" HREF="bashref.html#SEC4">2. Definitions</A>
15010 <BR>
15011 <A NAME="TOC5" HREF="bashref.html#SEC5">3. Basic Shell Features</A>
15012 <BR>
15013 <A NAME="TOC56" HREF="bashref.html#SEC56">4. Shell Builtin Commands</A>
15014 <BR>
15015 <A NAME="TOC61" HREF="bashref.html#SEC61">5. Shell Variables</A>
15016 <BR>
15017 <A NAME="TOC64" HREF="bashref.html#SEC64">6. Bash Features</A>
15018 <BR>
15019 <A NAME="TOC87" HREF="bashref.html#SEC87">7. Job Control</A>
15020 <BR>
15021 <A NAME="TOC91" HREF="bashref.html#SEC91">8. Command Line Editing</A>
15022 <BR>
15023 <A NAME="TOC115" HREF="bashref.html#SEC115">9. Using History Interactively</A>
15024 <BR>
15025 <A NAME="TOC122" HREF="bashref.html#SEC122">10. Installing Bash</A>
15026 <BR>
15027 <A NAME="TOC131" HREF="bashref.html#SEC131">A. Reporting Bugs</A>
15028 <BR>
15029 <A NAME="TOC132" HREF="bashref.html#SEC132">B. Major Differences From The Bourne Shell</A>
15030 <BR>
15031 <A NAME="TOC134" HREF="bashref.html#SEC134">C. Copying This Manual</A>
15032 <BR>
15033 <A NAME="TOC137" HREF="bashref.html#SEC137">Index of Shell Builtin Commands</A>
15034 <BR>
15035 <A NAME="TOC138" HREF="bashref.html#SEC138">Index of Shell Reserved Words</A>
15036 <BR>
15037 <A NAME="TOC139" HREF="bashref.html#SEC139">Parameter and Variable Index</A>
15038 <BR>
15039 <A NAME="TOC140" HREF="bashref.html#SEC140">Function Index</A>
15040 <BR>
15041 <A NAME="TOC141" HREF="bashref.html#SEC141">Concept Index</A>
15042 <BR>
15043
15044 </BLOCKQUOTE>
15045 <HR SIZE=1>
15046 <A NAME="SEC_About"></A>
15047 <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
15048 <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
15049 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
15050 <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
15051 <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
15052 </TR></TABLE>
15053 <H1>About this document</H1>
15054 This document was generated by <I>Chet Ramey</I> on <I>August, 30 2004</I>
15055 using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
15056 "><I>texi2html</I></A>
15057 <P></P>
15058 The buttons in the navigation panels have the following meaning:
15059 <P></P>
15060 <table border = "1">
15061 <TR>
15062 <TH> Button </TH>
15063 <TH> Name </TH>
15064 <TH> Go to </TH>
15065 <TH> From 1.2.3 go to</TH>
15066 </TR>
15067 <TR>
15068 <TD ALIGN="CENTER">
15069 [ &lt; ] </TD>
15070 <TD ALIGN="CENTER">
15071 Back
15072 </TD>
15073 <TD>
15074 previous section in reading order
15075 </TD>
15076 <TD>
15077 1.2.2
15078 </TD>
15079 </TR>
15080 <TR>
15081 <TD ALIGN="CENTER">
15082 [ &gt; ] </TD>
15083 <TD ALIGN="CENTER">
15084 Forward
15085 </TD>
15086 <TD>
15087 next section in reading order
15088 </TD>
15089 <TD>
15090 1.2.4
15091 </TD>
15092 </TR>
15093 <TR>
15094 <TD ALIGN="CENTER">
15095 [ &lt;&lt; ] </TD>
15096 <TD ALIGN="CENTER">
15097 FastBack
15098 </TD>
15099 <TD>
15100 previous or up-and-previous section
15101 </TD>
15102 <TD>
15103 1.1
15104 </TD>
15105 </TR>
15106 <TR>
15107 <TD ALIGN="CENTER">
15108 [ Up ] </TD>
15109 <TD ALIGN="CENTER">
15110 Up
15111 </TD>
15112 <TD>
15113 up section
15114 </TD>
15115 <TD>
15116 1.2
15117 </TD>
15118 </TR>
15119 <TR>
15120 <TD ALIGN="CENTER">
15121 [ &gt;&gt; ] </TD>
15122 <TD ALIGN="CENTER">
15123 FastForward
15124 </TD>
15125 <TD>
15126 next or up-and-next section
15127 </TD>
15128 <TD>
15129 1.3
15130 </TD>
15131 </TR>
15132 <TR>
15133 <TD ALIGN="CENTER">
15134 [Top] </TD>
15135 <TD ALIGN="CENTER">
15136 Top
15137 </TD>
15138 <TD>
15139 cover (top) of document
15140 </TD>
15141 <TD>
15142 &nbsp;
15143 </TD>
15144 </TR>
15145 <TR>
15146 <TD ALIGN="CENTER">
15147 [Contents] </TD>
15148 <TD ALIGN="CENTER">
15149 Contents
15150 </TD>
15151 <TD>
15152 table of contents
15153 </TD>
15154 <TD>
15155 &nbsp;
15156 </TD>
15157 </TR>
15158 <TR>
15159 <TD ALIGN="CENTER">
15160 [Index] </TD>
15161 <TD ALIGN="CENTER">
15162 Index
15163 </TD>
15164 <TD>
15165 concept index
15166 </TD>
15167 <TD>
15168 &nbsp;
15169 </TD>
15170 </TR>
15171 <TR>
15172 <TD ALIGN="CENTER">
15173 [ ? ] </TD>
15174 <TD ALIGN="CENTER">
15175 About
15176 </TD>
15177 <TD>
15178 this page
15179 </TD>
15180 <TD>
15181 &nbsp;
15182 </TD>
15183 </TR>
15184 </TABLE>
15185 <P></P>
15186 where the <STRONG> Example </STRONG> assumes that the current position
15187 is at <STRONG> Subsubsection One-Two-Three </STRONG> of a document of
15188 the following structure:
15189 <UL>
15190 <LI> 1. Section One </LI>
15191 <UL>
15192 <LI>1.1 Subsection One-One</LI>
15193 <UL>
15194 <LI> ... </LI>
15195 </UL>
15196 <LI>1.2 Subsection One-Two</LI>
15197 <UL>
15198 <LI>1.2.1 Subsubsection One-Two-One
15199 </LI><LI>1.2.2 Subsubsection One-Two-Two
15200 </LI><LI>1.2.3 Subsubsection One-Two-Three &nbsp; &nbsp; <STRONG>
15201 &lt;== Current Position </STRONG>
15202 </LI><LI>1.2.4 Subsubsection One-Two-Four
15203 </LI></UL>
15204 <LI>1.3 Subsection One-Three</LI>
15205 <UL>
15206 <LI> ... </LI>
15207 </UL>
15208 <LI>1.4 Subsection One-Four</LI>
15209 </UL>
15210 </UL>
15211
15212 <HR SIZE=1>
15213 <BR>
15214 <FONT SIZE="-1">
15215 This document was generated
15216 by <I>Chet Ramey</I> on <I>August, 30 2004</I>
15217 using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
15218 "><I>texi2html</I></A>
15219
15220 </BODY>
15221 </HTML>