<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- This text is a brief description of the features that are present in
-the Bash shell (version 5.0, 7 December 2018).
+the Bash shell (version 5.1, 29 October 2020).
-This is Edition 5.0, last updated 7 December 2018,
+This is Edition 5.1, last updated 29 October 2020,
of The GNU Bash Reference Manual,
-for Bash, Version 5.0.
+for Bash, Version 5.1.
-Copyright (C) 1988-2018 Free Software Foundation, Inc.
+Copyright (C) 1988-2020 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the section entitled
"GNU Free Documentation License". -->
-<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
+<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Bash Reference Manual</title>
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
-blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
-blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
-div.smalldisplay {margin-left: 3.2em}
-div.smallexample {margin-left: 3.2em}
-div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
-pre.smalldisplay {font-family: inherit; font-size: smaller}
-pre.smallexample {font-size: smaller}
-pre.smallformat {font-family: inherit; font-size: smaller}
-pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
-<a name="SEC_Contents"></a>
+<span id="SEC_Contents"></span>
<h2 class="contents-heading">Table of Contents</h2>
<div class="contents">
<ul class="no-bullet">
- <li><a name="toc-Introduction-1" href="#Introduction">1 Introduction</a>
+ <li><a id="toc-Introduction-1" href="#Introduction">1 Introduction</a>
<ul class="no-bullet">
- <li><a name="toc-What-is-Bash_003f-1" href="#What-is-Bash_003f">1.1 What is Bash?</a></li>
- <li><a name="toc-What-is-a-shell_003f-1" href="#What-is-a-shell_003f">1.2 What is a shell?</a></li>
+ <li><a id="toc-What-is-Bash_003f-1" href="#What-is-Bash_003f">1.1 What is Bash?</a></li>
+ <li><a id="toc-What-is-a-shell_003f-1" href="#What-is-a-shell_003f">1.2 What is a shell?</a></li>
</ul></li>
- <li><a name="toc-Definitions-1" href="#Definitions">2 Definitions</a></li>
- <li><a name="toc-Basic-Shell-Features-1" href="#Basic-Shell-Features">3 Basic Shell Features</a>
+ <li><a id="toc-Definitions-1" href="#Definitions">2 Definitions</a></li>
+ <li><a id="toc-Basic-Shell-Features-1" href="#Basic-Shell-Features">3 Basic Shell Features</a>
<ul class="no-bullet">
- <li><a name="toc-Shell-Syntax-1" href="#Shell-Syntax">3.1 Shell Syntax</a>
+ <li><a id="toc-Shell-Syntax-1" href="#Shell-Syntax">3.1 Shell Syntax</a>
<ul class="no-bullet">
- <li><a name="toc-Shell-Operation-1" href="#Shell-Operation">3.1.1 Shell Operation</a></li>
- <li><a name="toc-Quoting-1" href="#Quoting">3.1.2 Quoting</a>
+ <li><a id="toc-Shell-Operation-1" href="#Shell-Operation">3.1.1 Shell Operation</a></li>
+ <li><a id="toc-Quoting-1" href="#Quoting">3.1.2 Quoting</a>
<ul class="no-bullet">
- <li><a name="toc-Escape-Character-1" href="#Escape-Character">3.1.2.1 Escape Character</a></li>
- <li><a name="toc-Single-Quotes-1" href="#Single-Quotes">3.1.2.2 Single Quotes</a></li>
- <li><a name="toc-Double-Quotes-1" href="#Double-Quotes">3.1.2.3 Double Quotes</a></li>
- <li><a name="toc-ANSI_002dC-Quoting-1" href="#ANSI_002dC-Quoting">3.1.2.4 ANSI-C Quoting</a></li>
- <li><a name="toc-Locale_002dSpecific-Translation" href="#Locale-Translation">3.1.2.5 Locale-Specific Translation</a></li>
+ <li><a id="toc-Escape-Character-1" href="#Escape-Character">3.1.2.1 Escape Character</a></li>
+ <li><a id="toc-Single-Quotes-1" href="#Single-Quotes">3.1.2.2 Single Quotes</a></li>
+ <li><a id="toc-Double-Quotes-1" href="#Double-Quotes">3.1.2.3 Double Quotes</a></li>
+ <li><a id="toc-ANSI_002dC-Quoting-1" href="#ANSI_002dC-Quoting">3.1.2.4 ANSI-C Quoting</a></li>
+ <li><a id="toc-Locale_002dSpecific-Translation" href="#Locale-Translation">3.1.2.5 Locale-Specific Translation</a></li>
</ul></li>
- <li><a name="toc-Comments-1" href="#Comments">3.1.3 Comments</a></li>
+ <li><a id="toc-Comments-1" href="#Comments">3.1.3 Comments</a></li>
</ul></li>
- <li><a name="toc-Shell-Commands-1" href="#Shell-Commands">3.2 Shell Commands</a>
+ <li><a id="toc-Shell-Commands-1" href="#Shell-Commands">3.2 Shell Commands</a>
<ul class="no-bullet">
- <li><a name="toc-Simple-Commands-1" href="#Simple-Commands">3.2.1 Simple Commands</a></li>
- <li><a name="toc-Pipelines-1" href="#Pipelines">3.2.2 Pipelines</a></li>
- <li><a name="toc-Lists-of-Commands" href="#Lists">3.2.3 Lists of Commands</a></li>
- <li><a name="toc-Compound-Commands-1" href="#Compound-Commands">3.2.4 Compound Commands</a>
+ <li><a id="toc-Reserved-Words-1" href="#Reserved-Words">3.2.1 Reserved Words</a></li>
+ <li><a id="toc-Simple-Commands-1" href="#Simple-Commands">3.2.2 Simple Commands</a></li>
+ <li><a id="toc-Pipelines-1" href="#Pipelines">3.2.3 Pipelines</a></li>
+ <li><a id="toc-Lists-of-Commands" href="#Lists">3.2.4 Lists of Commands</a></li>
+ <li><a id="toc-Compound-Commands-1" href="#Compound-Commands">3.2.5 Compound Commands</a>
<ul class="no-bullet">
- <li><a name="toc-Looping-Constructs-1" href="#Looping-Constructs">3.2.4.1 Looping Constructs</a></li>
- <li><a name="toc-Conditional-Constructs-1" href="#Conditional-Constructs">3.2.4.2 Conditional Constructs</a></li>
- <li><a name="toc-Grouping-Commands" href="#Command-Grouping">3.2.4.3 Grouping Commands</a></li>
+ <li><a id="toc-Looping-Constructs-1" href="#Looping-Constructs">3.2.5.1 Looping Constructs</a></li>
+ <li><a id="toc-Conditional-Constructs-1" href="#Conditional-Constructs">3.2.5.2 Conditional Constructs</a></li>
+ <li><a id="toc-Grouping-Commands" href="#Command-Grouping">3.2.5.3 Grouping Commands</a></li>
</ul></li>
- <li><a name="toc-Coprocesses-1" href="#Coprocesses">3.2.5 Coprocesses</a></li>
- <li><a name="toc-GNU-Parallel-1" href="#GNU-Parallel">3.2.6 GNU Parallel</a></li>
+ <li><a id="toc-Coprocesses-1" href="#Coprocesses">3.2.6 Coprocesses</a></li>
+ <li><a id="toc-GNU-Parallel-1" href="#GNU-Parallel">3.2.7 GNU Parallel</a></li>
</ul></li>
- <li><a name="toc-Shell-Functions-1" href="#Shell-Functions">3.3 Shell Functions</a></li>
- <li><a name="toc-Shell-Parameters-1" href="#Shell-Parameters">3.4 Shell Parameters</a>
+ <li><a id="toc-Shell-Functions-1" href="#Shell-Functions">3.3 Shell Functions</a></li>
+ <li><a id="toc-Shell-Parameters-1" href="#Shell-Parameters">3.4 Shell Parameters</a>
<ul class="no-bullet">
- <li><a name="toc-Positional-Parameters-1" href="#Positional-Parameters">3.4.1 Positional Parameters</a></li>
- <li><a name="toc-Special-Parameters-1" href="#Special-Parameters">3.4.2 Special Parameters</a></li>
+ <li><a id="toc-Positional-Parameters-1" href="#Positional-Parameters">3.4.1 Positional Parameters</a></li>
+ <li><a id="toc-Special-Parameters-1" href="#Special-Parameters">3.4.2 Special Parameters</a></li>
</ul></li>
- <li><a name="toc-Shell-Expansions-1" href="#Shell-Expansions">3.5 Shell Expansions</a>
+ <li><a id="toc-Shell-Expansions-1" href="#Shell-Expansions">3.5 Shell Expansions</a>
<ul class="no-bullet">
- <li><a name="toc-Brace-Expansion-1" href="#Brace-Expansion">3.5.1 Brace Expansion</a></li>
- <li><a name="toc-Tilde-Expansion-1" href="#Tilde-Expansion">3.5.2 Tilde Expansion</a></li>
- <li><a name="toc-Shell-Parameter-Expansion-1" href="#Shell-Parameter-Expansion">3.5.3 Shell Parameter Expansion</a></li>
- <li><a name="toc-Command-Substitution-1" href="#Command-Substitution">3.5.4 Command Substitution</a></li>
- <li><a name="toc-Arithmetic-Expansion-1" href="#Arithmetic-Expansion">3.5.5 Arithmetic Expansion</a></li>
- <li><a name="toc-Process-Substitution-1" href="#Process-Substitution">3.5.6 Process Substitution</a></li>
- <li><a name="toc-Word-Splitting-1" href="#Word-Splitting">3.5.7 Word Splitting</a></li>
- <li><a name="toc-Filename-Expansion-1" href="#Filename-Expansion">3.5.8 Filename Expansion</a>
+ <li><a id="toc-Brace-Expansion-1" href="#Brace-Expansion">3.5.1 Brace Expansion</a></li>
+ <li><a id="toc-Tilde-Expansion-1" href="#Tilde-Expansion">3.5.2 Tilde Expansion</a></li>
+ <li><a id="toc-Shell-Parameter-Expansion-1" href="#Shell-Parameter-Expansion">3.5.3 Shell Parameter Expansion</a></li>
+ <li><a id="toc-Command-Substitution-1" href="#Command-Substitution">3.5.4 Command Substitution</a></li>
+ <li><a id="toc-Arithmetic-Expansion-1" href="#Arithmetic-Expansion">3.5.5 Arithmetic Expansion</a></li>
+ <li><a id="toc-Process-Substitution-1" href="#Process-Substitution">3.5.6 Process Substitution</a></li>
+ <li><a id="toc-Word-Splitting-1" href="#Word-Splitting">3.5.7 Word Splitting</a></li>
+ <li><a id="toc-Filename-Expansion-1" href="#Filename-Expansion">3.5.8 Filename Expansion</a>
<ul class="no-bullet">
- <li><a name="toc-Pattern-Matching-1" href="#Pattern-Matching">3.5.8.1 Pattern Matching</a></li>
+ <li><a id="toc-Pattern-Matching-1" href="#Pattern-Matching">3.5.8.1 Pattern Matching</a></li>
</ul></li>
- <li><a name="toc-Quote-Removal-1" href="#Quote-Removal">3.5.9 Quote Removal</a></li>
+ <li><a id="toc-Quote-Removal-1" href="#Quote-Removal">3.5.9 Quote Removal</a></li>
</ul></li>
- <li><a name="toc-Redirections-1" href="#Redirections">3.6 Redirections</a>
+ <li><a id="toc-Redirections-1" href="#Redirections">3.6 Redirections</a>
<ul class="no-bullet">
- <li><a name="toc-Redirecting-Input" href="#Redirecting-Input">3.6.1 Redirecting Input</a></li>
- <li><a name="toc-Redirecting-Output" href="#Redirecting-Output">3.6.2 Redirecting Output</a></li>
- <li><a name="toc-Appending-Redirected-Output" href="#Appending-Redirected-Output">3.6.3 Appending Redirected Output</a></li>
- <li><a name="toc-Redirecting-Standard-Output-and-Standard-Error" href="#Redirecting-Standard-Output-and-Standard-Error">3.6.4 Redirecting Standard Output and Standard Error</a></li>
- <li><a name="toc-Appending-Standard-Output-and-Standard-Error" href="#Appending-Standard-Output-and-Standard-Error">3.6.5 Appending Standard Output and Standard Error</a></li>
- <li><a name="toc-Here-Documents" href="#Here-Documents">3.6.6 Here Documents</a></li>
- <li><a name="toc-Here-Strings" href="#Here-Strings">3.6.7 Here Strings</a></li>
- <li><a name="toc-Duplicating-File-Descriptors" href="#Duplicating-File-Descriptors">3.6.8 Duplicating File Descriptors</a></li>
- <li><a name="toc-Moving-File-Descriptors" href="#Moving-File-Descriptors">3.6.9 Moving File Descriptors</a></li>
- <li><a name="toc-Opening-File-Descriptors-for-Reading-and-Writing" href="#Opening-File-Descriptors-for-Reading-and-Writing">3.6.10 Opening File Descriptors for Reading and Writing</a></li>
+ <li><a id="toc-Redirecting-Input" href="#Redirecting-Input">3.6.1 Redirecting Input</a></li>
+ <li><a id="toc-Redirecting-Output" href="#Redirecting-Output">3.6.2 Redirecting Output</a></li>
+ <li><a id="toc-Appending-Redirected-Output" href="#Appending-Redirected-Output">3.6.3 Appending Redirected Output</a></li>
+ <li><a id="toc-Redirecting-Standard-Output-and-Standard-Error" href="#Redirecting-Standard-Output-and-Standard-Error">3.6.4 Redirecting Standard Output and Standard Error</a></li>
+ <li><a id="toc-Appending-Standard-Output-and-Standard-Error" href="#Appending-Standard-Output-and-Standard-Error">3.6.5 Appending Standard Output and Standard Error</a></li>
+ <li><a id="toc-Here-Documents" href="#Here-Documents">3.6.6 Here Documents</a></li>
+ <li><a id="toc-Here-Strings" href="#Here-Strings">3.6.7 Here Strings</a></li>
+ <li><a id="toc-Duplicating-File-Descriptors" href="#Duplicating-File-Descriptors">3.6.8 Duplicating File Descriptors</a></li>
+ <li><a id="toc-Moving-File-Descriptors" href="#Moving-File-Descriptors">3.6.9 Moving File Descriptors</a></li>
+ <li><a id="toc-Opening-File-Descriptors-for-Reading-and-Writing" href="#Opening-File-Descriptors-for-Reading-and-Writing">3.6.10 Opening File Descriptors for Reading and Writing</a></li>
</ul></li>
- <li><a name="toc-Executing-Commands-1" href="#Executing-Commands">3.7 Executing Commands</a>
+ <li><a id="toc-Executing-Commands-1" href="#Executing-Commands">3.7 Executing Commands</a>
<ul class="no-bullet">
- <li><a name="toc-Simple-Command-Expansion-1" href="#Simple-Command-Expansion">3.7.1 Simple Command Expansion</a></li>
- <li><a name="toc-Command-Search-and-Execution-1" href="#Command-Search-and-Execution">3.7.2 Command Search and Execution</a></li>
- <li><a name="toc-Command-Execution-Environment-1" href="#Command-Execution-Environment">3.7.3 Command Execution Environment</a></li>
- <li><a name="toc-Environment-1" href="#Environment">3.7.4 Environment</a></li>
- <li><a name="toc-Exit-Status-1" href="#Exit-Status">3.7.5 Exit Status</a></li>
- <li><a name="toc-Signals-1" href="#Signals">3.7.6 Signals</a></li>
+ <li><a id="toc-Simple-Command-Expansion-1" href="#Simple-Command-Expansion">3.7.1 Simple Command Expansion</a></li>
+ <li><a id="toc-Command-Search-and-Execution-1" href="#Command-Search-and-Execution">3.7.2 Command Search and Execution</a></li>
+ <li><a id="toc-Command-Execution-Environment-1" href="#Command-Execution-Environment">3.7.3 Command Execution Environment</a></li>
+ <li><a id="toc-Environment-1" href="#Environment">3.7.4 Environment</a></li>
+ <li><a id="toc-Exit-Status-1" href="#Exit-Status">3.7.5 Exit Status</a></li>
+ <li><a id="toc-Signals-1" href="#Signals">3.7.6 Signals</a></li>
</ul></li>
- <li><a name="toc-Shell-Scripts-1" href="#Shell-Scripts">3.8 Shell Scripts</a></li>
+ <li><a id="toc-Shell-Scripts-1" href="#Shell-Scripts">3.8 Shell Scripts</a></li>
</ul></li>
- <li><a name="toc-Shell-Builtin-Commands-1" href="#Shell-Builtin-Commands">4 Shell Builtin Commands</a>
+ <li><a id="toc-Shell-Builtin-Commands-1" href="#Shell-Builtin-Commands">4 Shell Builtin Commands</a>
<ul class="no-bullet">
- <li><a name="toc-Bourne-Shell-Builtins-1" href="#Bourne-Shell-Builtins">4.1 Bourne Shell Builtins</a></li>
- <li><a name="toc-Bash-Builtin-Commands" href="#Bash-Builtins">4.2 Bash Builtin Commands</a></li>
- <li><a name="toc-Modifying-Shell-Behavior-1" href="#Modifying-Shell-Behavior">4.3 Modifying Shell Behavior</a>
+ <li><a id="toc-Bourne-Shell-Builtins-1" href="#Bourne-Shell-Builtins">4.1 Bourne Shell Builtins</a></li>
+ <li><a id="toc-Bash-Builtin-Commands" href="#Bash-Builtins">4.2 Bash Builtin Commands</a></li>
+ <li><a id="toc-Modifying-Shell-Behavior-1" href="#Modifying-Shell-Behavior">4.3 Modifying Shell Behavior</a>
<ul class="no-bullet">
- <li><a name="toc-The-Set-Builtin-1" href="#The-Set-Builtin">4.3.1 The Set Builtin</a></li>
- <li><a name="toc-The-Shopt-Builtin-1" href="#The-Shopt-Builtin">4.3.2 The Shopt Builtin</a></li>
+ <li><a id="toc-The-Set-Builtin-1" href="#The-Set-Builtin">4.3.1 The Set Builtin</a></li>
+ <li><a id="toc-The-Shopt-Builtin-1" href="#The-Shopt-Builtin">4.3.2 The Shopt Builtin</a></li>
</ul></li>
- <li><a name="toc-Special-Builtins-1" href="#Special-Builtins">4.4 Special Builtins</a></li>
+ <li><a id="toc-Special-Builtins-1" href="#Special-Builtins">4.4 Special Builtins</a></li>
</ul></li>
- <li><a name="toc-Shell-Variables-1" href="#Shell-Variables">5 Shell Variables</a>
+ <li><a id="toc-Shell-Variables-1" href="#Shell-Variables">5 Shell Variables</a>
<ul class="no-bullet">
- <li><a name="toc-Bourne-Shell-Variables-1" href="#Bourne-Shell-Variables">5.1 Bourne Shell Variables</a></li>
- <li><a name="toc-Bash-Variables-1" href="#Bash-Variables">5.2 Bash Variables</a></li>
+ <li><a id="toc-Bourne-Shell-Variables-1" href="#Bourne-Shell-Variables">5.1 Bourne Shell Variables</a></li>
+ <li><a id="toc-Bash-Variables-1" href="#Bash-Variables">5.2 Bash Variables</a></li>
</ul></li>
- <li><a name="toc-Bash-Features-2" href="#Bash-Features">6 Bash Features</a>
+ <li><a id="toc-Bash-Features-2" href="#Bash-Features">6 Bash Features</a>
<ul class="no-bullet">
- <li><a name="toc-Invoking-Bash-1" href="#Invoking-Bash">6.1 Invoking Bash</a></li>
- <li><a name="toc-Bash-Startup-Files-1" href="#Bash-Startup-Files">6.2 Bash Startup Files</a></li>
- <li><a name="toc-Interactive-Shells-1" href="#Interactive-Shells">6.3 Interactive Shells</a>
+ <li><a id="toc-Invoking-Bash-1" href="#Invoking-Bash">6.1 Invoking Bash</a></li>
+ <li><a id="toc-Bash-Startup-Files-1" href="#Bash-Startup-Files">6.2 Bash Startup Files</a></li>
+ <li><a id="toc-Interactive-Shells-1" href="#Interactive-Shells">6.3 Interactive Shells</a>
<ul class="no-bullet">
- <li><a name="toc-What-is-an-Interactive-Shell_003f-1" href="#What-is-an-Interactive-Shell_003f">6.3.1 What is an Interactive Shell?</a></li>
- <li><a name="toc-Is-this-Shell-Interactive_003f-1" href="#Is-this-Shell-Interactive_003f">6.3.2 Is this Shell Interactive?</a></li>
- <li><a name="toc-Interactive-Shell-Behavior-1" href="#Interactive-Shell-Behavior">6.3.3 Interactive Shell Behavior</a></li>
+ <li><a id="toc-What-is-an-Interactive-Shell_003f-1" href="#What-is-an-Interactive-Shell_003f">6.3.1 What is an Interactive Shell?</a></li>
+ <li><a id="toc-Is-this-Shell-Interactive_003f-1" href="#Is-this-Shell-Interactive_003f">6.3.2 Is this Shell Interactive?</a></li>
+ <li><a id="toc-Interactive-Shell-Behavior-1" href="#Interactive-Shell-Behavior">6.3.3 Interactive Shell Behavior</a></li>
</ul></li>
- <li><a name="toc-Bash-Conditional-Expressions-1" href="#Bash-Conditional-Expressions">6.4 Bash Conditional Expressions</a></li>
- <li><a name="toc-Shell-Arithmetic-1" href="#Shell-Arithmetic">6.5 Shell Arithmetic</a></li>
- <li><a name="toc-Aliases-1" href="#Aliases">6.6 Aliases</a></li>
- <li><a name="toc-Arrays-1" href="#Arrays">6.7 Arrays</a></li>
- <li><a name="toc-The-Directory-Stack-1" href="#The-Directory-Stack">6.8 The Directory Stack</a>
+ <li><a id="toc-Bash-Conditional-Expressions-1" href="#Bash-Conditional-Expressions">6.4 Bash Conditional Expressions</a></li>
+ <li><a id="toc-Shell-Arithmetic-1" href="#Shell-Arithmetic">6.5 Shell Arithmetic</a></li>
+ <li><a id="toc-Aliases-1" href="#Aliases">6.6 Aliases</a></li>
+ <li><a id="toc-Arrays-1" href="#Arrays">6.7 Arrays</a></li>
+ <li><a id="toc-The-Directory-Stack-1" href="#The-Directory-Stack">6.8 The Directory Stack</a>
<ul class="no-bullet">
- <li><a name="toc-Directory-Stack-Builtins-1" href="#Directory-Stack-Builtins">6.8.1 Directory Stack Builtins</a></li>
+ <li><a id="toc-Directory-Stack-Builtins-1" href="#Directory-Stack-Builtins">6.8.1 Directory Stack Builtins</a></li>
</ul></li>
- <li><a name="toc-Controlling-the-Prompt-1" href="#Controlling-the-Prompt">6.9 Controlling the Prompt</a></li>
- <li><a name="toc-The-Restricted-Shell-1" href="#The-Restricted-Shell">6.10 The Restricted Shell</a></li>
- <li><a name="toc-Bash-POSIX-Mode-1" href="#Bash-POSIX-Mode">6.11 Bash POSIX Mode</a></li>
+ <li><a id="toc-Controlling-the-Prompt-1" href="#Controlling-the-Prompt">6.9 Controlling the Prompt</a></li>
+ <li><a id="toc-The-Restricted-Shell-1" href="#The-Restricted-Shell">6.10 The Restricted Shell</a></li>
+ <li><a id="toc-Bash-POSIX-Mode-1" href="#Bash-POSIX-Mode">6.11 Bash POSIX Mode</a></li>
+ <li><a id="toc-Shell-Compatibility-Mode-1" href="#Shell-Compatibility-Mode">6.12 Shell Compatibility Mode</a></li>
</ul></li>
- <li><a name="toc-Job-Control-1" href="#Job-Control">7 Job Control</a>
+ <li><a id="toc-Job-Control-1" href="#Job-Control">7 Job Control</a>
<ul class="no-bullet">
- <li><a name="toc-Job-Control-Basics-1" href="#Job-Control-Basics">7.1 Job Control Basics</a></li>
- <li><a name="toc-Job-Control-Builtins-1" href="#Job-Control-Builtins">7.2 Job Control Builtins</a></li>
- <li><a name="toc-Job-Control-Variables-1" href="#Job-Control-Variables">7.3 Job Control Variables</a></li>
+ <li><a id="toc-Job-Control-Basics-1" href="#Job-Control-Basics">7.1 Job Control Basics</a></li>
+ <li><a id="toc-Job-Control-Builtins-1" href="#Job-Control-Builtins">7.2 Job Control Builtins</a></li>
+ <li><a id="toc-Job-Control-Variables-1" href="#Job-Control-Variables">7.3 Job Control Variables</a></li>
</ul></li>
- <li><a name="toc-Command-Line-Editing-1" href="#Command-Line-Editing">8 Command Line Editing</a>
+ <li><a id="toc-Command-Line-Editing-1" href="#Command-Line-Editing">8 Command Line Editing</a>
<ul class="no-bullet">
- <li><a name="toc-Introduction-to-Line-Editing" href="#Introduction-and-Notation">8.1 Introduction to Line Editing</a></li>
- <li><a name="toc-Readline-Interaction-1" href="#Readline-Interaction">8.2 Readline Interaction</a>
+ <li><a id="toc-Introduction-to-Line-Editing" href="#Introduction-and-Notation">8.1 Introduction to Line Editing</a></li>
+ <li><a id="toc-Readline-Interaction-1" href="#Readline-Interaction">8.2 Readline Interaction</a>
<ul class="no-bullet">
- <li><a name="toc-Readline-Bare-Essentials-1" href="#Readline-Bare-Essentials">8.2.1 Readline Bare Essentials</a></li>
- <li><a name="toc-Readline-Movement-Commands-1" href="#Readline-Movement-Commands">8.2.2 Readline Movement Commands</a></li>
- <li><a name="toc-Readline-Killing-Commands-1" href="#Readline-Killing-Commands">8.2.3 Readline Killing Commands</a></li>
- <li><a name="toc-Readline-Arguments-1" href="#Readline-Arguments">8.2.4 Readline Arguments</a></li>
- <li><a name="toc-Searching-for-Commands-in-the-History" href="#Searching">8.2.5 Searching for Commands in the History</a></li>
+ <li><a id="toc-Readline-Bare-Essentials-1" href="#Readline-Bare-Essentials">8.2.1 Readline Bare Essentials</a></li>
+ <li><a id="toc-Readline-Movement-Commands-1" href="#Readline-Movement-Commands">8.2.2 Readline Movement Commands</a></li>
+ <li><a id="toc-Readline-Killing-Commands-1" href="#Readline-Killing-Commands">8.2.3 Readline Killing Commands</a></li>
+ <li><a id="toc-Readline-Arguments-1" href="#Readline-Arguments">8.2.4 Readline Arguments</a></li>
+ <li><a id="toc-Searching-for-Commands-in-the-History" href="#Searching">8.2.5 Searching for Commands in the History</a></li>
</ul></li>
- <li><a name="toc-Readline-Init-File-1" href="#Readline-Init-File">8.3 Readline Init File</a>
+ <li><a id="toc-Readline-Init-File-1" href="#Readline-Init-File">8.3 Readline Init File</a>
<ul class="no-bullet">
- <li><a name="toc-Readline-Init-File-Syntax-1" href="#Readline-Init-File-Syntax">8.3.1 Readline Init File Syntax</a></li>
- <li><a name="toc-Conditional-Init-Constructs-1" href="#Conditional-Init-Constructs">8.3.2 Conditional Init Constructs</a></li>
- <li><a name="toc-Sample-Init-File-1" href="#Sample-Init-File">8.3.3 Sample Init File</a></li>
+ <li><a id="toc-Readline-Init-File-Syntax-1" href="#Readline-Init-File-Syntax">8.3.1 Readline Init File Syntax</a></li>
+ <li><a id="toc-Conditional-Init-Constructs-1" href="#Conditional-Init-Constructs">8.3.2 Conditional Init Constructs</a></li>
+ <li><a id="toc-Sample-Init-File-1" href="#Sample-Init-File">8.3.3 Sample Init File</a></li>
</ul></li>
- <li><a name="toc-Bindable-Readline-Commands-1" href="#Bindable-Readline-Commands">8.4 Bindable Readline Commands</a>
+ <li><a id="toc-Bindable-Readline-Commands-1" href="#Bindable-Readline-Commands">8.4 Bindable Readline Commands</a>
<ul class="no-bullet">
- <li><a name="toc-Commands-For-Moving-1" href="#Commands-For-Moving">8.4.1 Commands For Moving</a></li>
- <li><a name="toc-Commands-For-Manipulating-The-History" href="#Commands-For-History">8.4.2 Commands For Manipulating The History</a></li>
- <li><a name="toc-Commands-For-Changing-Text" href="#Commands-For-Text">8.4.3 Commands For Changing Text</a></li>
- <li><a name="toc-Killing-And-Yanking" href="#Commands-For-Killing">8.4.4 Killing And Yanking</a></li>
- <li><a name="toc-Specifying-Numeric-Arguments" href="#Numeric-Arguments">8.4.5 Specifying Numeric Arguments</a></li>
- <li><a name="toc-Letting-Readline-Type-For-You" href="#Commands-For-Completion">8.4.6 Letting Readline Type For You</a></li>
- <li><a name="toc-Keyboard-Macros-1" href="#Keyboard-Macros">8.4.7 Keyboard Macros</a></li>
- <li><a name="toc-Some-Miscellaneous-Commands" href="#Miscellaneous-Commands">8.4.8 Some Miscellaneous Commands</a></li>
+ <li><a id="toc-Commands-For-Moving-1" href="#Commands-For-Moving">8.4.1 Commands For Moving</a></li>
+ <li><a id="toc-Commands-For-Manipulating-The-History" href="#Commands-For-History">8.4.2 Commands For Manipulating The History</a></li>
+ <li><a id="toc-Commands-For-Changing-Text" href="#Commands-For-Text">8.4.3 Commands For Changing Text</a></li>
+ <li><a id="toc-Killing-And-Yanking" href="#Commands-For-Killing">8.4.4 Killing And Yanking</a></li>
+ <li><a id="toc-Specifying-Numeric-Arguments" href="#Numeric-Arguments">8.4.5 Specifying Numeric Arguments</a></li>
+ <li><a id="toc-Letting-Readline-Type-For-You" href="#Commands-For-Completion">8.4.6 Letting Readline Type For You</a></li>
+ <li><a id="toc-Keyboard-Macros-1" href="#Keyboard-Macros">8.4.7 Keyboard Macros</a></li>
+ <li><a id="toc-Some-Miscellaneous-Commands" href="#Miscellaneous-Commands">8.4.8 Some Miscellaneous Commands</a></li>
</ul></li>
- <li><a name="toc-Readline-vi-Mode-1" href="#Readline-vi-Mode">8.5 Readline vi Mode</a></li>
- <li><a name="toc-Programmable-Completion-1" href="#Programmable-Completion">8.6 Programmable Completion</a></li>
- <li><a name="toc-Programmable-Completion-Builtins-1" href="#Programmable-Completion-Builtins">8.7 Programmable Completion Builtins</a></li>
- <li><a name="toc-A-Programmable-Completion-Example-1" href="#A-Programmable-Completion-Example">8.8 A Programmable Completion Example</a></li>
+ <li><a id="toc-Readline-vi-Mode-1" href="#Readline-vi-Mode">8.5 Readline vi Mode</a></li>
+ <li><a id="toc-Programmable-Completion-1" href="#Programmable-Completion">8.6 Programmable Completion</a></li>
+ <li><a id="toc-Programmable-Completion-Builtins-1" href="#Programmable-Completion-Builtins">8.7 Programmable Completion Builtins</a></li>
+ <li><a id="toc-A-Programmable-Completion-Example-1" href="#A-Programmable-Completion-Example">8.8 A Programmable Completion Example</a></li>
</ul></li>
- <li><a name="toc-Using-History-Interactively-1" href="#Using-History-Interactively">9 Using History Interactively</a>
+ <li><a id="toc-Using-History-Interactively-1" href="#Using-History-Interactively">9 Using History Interactively</a>
<ul class="no-bullet">
- <li><a name="toc-Bash-History-Facilities-1" href="#Bash-History-Facilities">9.1 Bash History Facilities</a></li>
- <li><a name="toc-Bash-History-Builtins-1" href="#Bash-History-Builtins">9.2 Bash History Builtins</a></li>
- <li><a name="toc-History-Expansion" href="#History-Interaction">9.3 History Expansion</a>
+ <li><a id="toc-Bash-History-Facilities-1" href="#Bash-History-Facilities">9.1 Bash History Facilities</a></li>
+ <li><a id="toc-Bash-History-Builtins-1" href="#Bash-History-Builtins">9.2 Bash History Builtins</a></li>
+ <li><a id="toc-History-Expansion" href="#History-Interaction">9.3 History Expansion</a>
<ul class="no-bullet">
- <li><a name="toc-Event-Designators-1" href="#Event-Designators">9.3.1 Event Designators</a></li>
- <li><a name="toc-Word-Designators-1" href="#Word-Designators">9.3.2 Word Designators</a></li>
- <li><a name="toc-Modifiers-1" href="#Modifiers">9.3.3 Modifiers</a></li>
+ <li><a id="toc-Event-Designators-1" href="#Event-Designators">9.3.1 Event Designators</a></li>
+ <li><a id="toc-Word-Designators-1" href="#Word-Designators">9.3.2 Word Designators</a></li>
+ <li><a id="toc-Modifiers-1" href="#Modifiers">9.3.3 Modifiers</a></li>
</ul></li>
</ul></li>
- <li><a name="toc-Installing-Bash-1" href="#Installing-Bash">10 Installing Bash</a>
+ <li><a id="toc-Installing-Bash-1" href="#Installing-Bash">10 Installing Bash</a>
<ul class="no-bullet">
- <li><a name="toc-Basic-Installation-1" href="#Basic-Installation">10.1 Basic Installation</a></li>
- <li><a name="toc-Compilers-and-Options-1" href="#Compilers-and-Options">10.2 Compilers and Options</a></li>
- <li><a name="toc-Compiling-For-Multiple-Architectures-1" href="#Compiling-For-Multiple-Architectures">10.3 Compiling For Multiple Architectures</a></li>
- <li><a name="toc-Installation-Names-1" href="#Installation-Names">10.4 Installation Names</a></li>
- <li><a name="toc-Specifying-the-System-Type-1" href="#Specifying-the-System-Type">10.5 Specifying the System Type</a></li>
- <li><a name="toc-Sharing-Defaults-1" href="#Sharing-Defaults">10.6 Sharing Defaults</a></li>
- <li><a name="toc-Operation-Controls-1" href="#Operation-Controls">10.7 Operation Controls</a></li>
- <li><a name="toc-Optional-Features-1" href="#Optional-Features">10.8 Optional Features</a></li>
+ <li><a id="toc-Basic-Installation-1" href="#Basic-Installation">10.1 Basic Installation</a></li>
+ <li><a id="toc-Compilers-and-Options-1" href="#Compilers-and-Options">10.2 Compilers and Options</a></li>
+ <li><a id="toc-Compiling-For-Multiple-Architectures-1" href="#Compiling-For-Multiple-Architectures">10.3 Compiling For Multiple Architectures</a></li>
+ <li><a id="toc-Installation-Names-1" href="#Installation-Names">10.4 Installation Names</a></li>
+ <li><a id="toc-Specifying-the-System-Type-1" href="#Specifying-the-System-Type">10.5 Specifying the System Type</a></li>
+ <li><a id="toc-Sharing-Defaults-1" href="#Sharing-Defaults">10.6 Sharing Defaults</a></li>
+ <li><a id="toc-Operation-Controls-1" href="#Operation-Controls">10.7 Operation Controls</a></li>
+ <li><a id="toc-Optional-Features-1" href="#Optional-Features">10.8 Optional Features</a></li>
</ul></li>
- <li><a name="toc-Reporting-Bugs-1" href="#Reporting-Bugs">Appendix A Reporting Bugs</a></li>
- <li><a name="toc-Major-Differences-From-The-Bourne-Shell-1" href="#Major-Differences-From-The-Bourne-Shell">Appendix B Major Differences From The Bourne Shell</a>
+ <li><a id="toc-Reporting-Bugs-1" href="#Reporting-Bugs">Appendix A Reporting Bugs</a></li>
+ <li><a id="toc-Major-Differences-From-The-Bourne-Shell-1" href="#Major-Differences-From-The-Bourne-Shell">Appendix B Major Differences From The Bourne Shell</a>
<ul class="no-bullet">
- <li><a name="toc-Implementation-Differences-From-The-SVR4_002e2-Shell" href="#Implementation-Differences-From-The-SVR4_002e2-Shell">B.1 Implementation Differences From The SVR4.2 Shell</a></li>
+ <li><a id="toc-Implementation-Differences-From-The-SVR4_002e2-Shell" href="#Implementation-Differences-From-The-SVR4_002e2-Shell">B.1 Implementation Differences From The SVR4.2 Shell</a></li>
</ul></li>
- <li><a name="toc-GNU-Free-Documentation-License-1" href="#GNU-Free-Documentation-License">Appendix C GNU Free Documentation License</a></li>
- <li><a name="toc-Indexes-1" href="#Indexes">Appendix D Indexes</a>
+ <li><a id="toc-GNU-Free-Documentation-License-1" href="#GNU-Free-Documentation-License">Appendix C GNU Free Documentation License</a></li>
+ <li><a id="toc-Indexes-1" href="#Indexes">Appendix D Indexes</a>
<ul class="no-bullet">
- <li><a name="toc-Index-of-Shell-Builtin-Commands" href="#Builtin-Index">D.1 Index of Shell Builtin Commands</a></li>
- <li><a name="toc-Index-of-Shell-Reserved-Words" href="#Reserved-Word-Index">D.2 Index of Shell Reserved Words</a></li>
- <li><a name="toc-Parameter-and-Variable-Index" href="#Variable-Index">D.3 Parameter and Variable Index</a></li>
- <li><a name="toc-Function-Index-1" href="#Function-Index">D.4 Function Index</a></li>
- <li><a name="toc-Concept-Index-1" href="#Concept-Index">D.5 Concept Index</a></li>
+ <li><a id="toc-Index-of-Shell-Builtin-Commands" href="#Builtin-Index" rel="index">D.1 Index of Shell Builtin Commands</a></li>
+ <li><a id="toc-Index-of-Shell-Reserved-Words" href="#Reserved-Word-Index" rel="index">D.2 Index of Shell Reserved Words</a></li>
+ <li><a id="toc-Parameter-and-Variable-Index" href="#Variable-Index" rel="index">D.3 Parameter and Variable Index</a></li>
+ <li><a id="toc-Function-Index-1" href="#Function-Index" rel="index">D.4 Function Index</a></li>
+ <li><a id="toc-Concept-Index-1" href="#Concept-Index" rel="index">D.5 Concept Index</a></li>
</ul></li>
</ul>
</div>
-<a name="Top"></a>
-<div class="header">
+<span id="Top"></span><div class="header">
<p>
Next: <a href="#Introduction" accesskey="n" rel="next">Introduction</a>, Previous: <a href="dir.html#Top" accesskey="p" rel="prev">(dir)</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Bash-Features-1"></a>
-<h1 class="top">Bash Features</h1>
+<span id="Bash-Features-1"></span><h1 class="top">Bash Features</h1>
<p>This text is a brief description of the features that are present in
-the Bash shell (version 5.0, 7 December 2018).
+the Bash shell (version 5.1, 29 October 2020).
The Bash home page is <a href="http://www.gnu.org/software/bash/">http://www.gnu.org/software/bash/</a>.
</p>
-<p>This is Edition 5.0, last updated 7 December 2018,
+<p>This is Edition 5.1, last updated 29 October 2020,
of <cite>The GNU Bash Reference Manual</cite>,
-for <code>Bash</code>, Version 5.0.
+for <code>Bash</code>, Version 5.1.
</p>
<p>Bash contains features that appear in other popular shells, and some
features that only appear in Bash. Some of the shells that Bash has
reference on shell behavior.
</p>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Introduction" accesskey="1">Introduction</a>:</td><td> </td><td align="left" valign="top">An introduction to the shell.
+<tr><td align="left" valign="top">• <a href="#Introduction" accesskey="1">Introduction</a></td><td> </td><td align="left" valign="top">An introduction to the shell.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Definitions" accesskey="2">Definitions</a>:</td><td> </td><td align="left" valign="top">Some definitions used in the rest of this
+<tr><td align="left" valign="top">• <a href="#Definitions" accesskey="2">Definitions</a></td><td> </td><td align="left" valign="top">Some definitions used in the rest of this
manual.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Basic-Shell-Features" accesskey="3">Basic Shell Features</a>:</td><td> </td><td align="left" valign="top">The shell "building blocks".
+<tr><td align="left" valign="top">• <a href="#Basic-Shell-Features" accesskey="3">Basic Shell Features</a></td><td> </td><td align="left" valign="top">The shell "building blocks".
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Shell-Builtin-Commands" accesskey="4">Shell Builtin Commands</a>:</td><td> </td><td align="left" valign="top">Commands that are a part of the shell.
+<tr><td align="left" valign="top">• <a href="#Shell-Builtin-Commands" accesskey="4">Shell Builtin Commands</a></td><td> </td><td align="left" valign="top">Commands that are a part of the shell.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Shell-Variables" accesskey="5">Shell Variables</a>:</td><td> </td><td align="left" valign="top">Variables used or set by Bash.
+<tr><td align="left" valign="top">• <a href="#Shell-Variables" accesskey="5">Shell Variables</a></td><td> </td><td align="left" valign="top">Variables used or set by Bash.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Bash-Features" accesskey="6">Bash Features</a>:</td><td> </td><td align="left" valign="top">Features found only in Bash.
+<tr><td align="left" valign="top">• <a href="#Bash-Features" accesskey="6">Bash Features</a></td><td> </td><td align="left" valign="top">Features found only in Bash.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Job-Control" accesskey="7">Job Control</a>:</td><td> </td><td align="left" valign="top">What job control is and how Bash allows you
+<tr><td align="left" valign="top">• <a href="#Job-Control" accesskey="7">Job Control</a></td><td> </td><td align="left" valign="top">What job control is and how Bash allows you
to use it.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Command-Line-Editing" accesskey="8">Command Line Editing</a>:</td><td> </td><td align="left" valign="top">Chapter describing the command line
+<tr><td align="left" valign="top">• <a href="#Command-Line-Editing" accesskey="8">Command Line Editing</a></td><td> </td><td align="left" valign="top">Chapter describing the command line
editing features.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Using-History-Interactively" accesskey="9">Using History Interactively</a>:</td><td> </td><td align="left" valign="top">Command History Expansion
+<tr><td align="left" valign="top">• <a href="#Using-History-Interactively" accesskey="9">Using History Interactively</a></td><td> </td><td align="left" valign="top">Command History Expansion
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Installing-Bash">Installing Bash</a>:</td><td> </td><td align="left" valign="top">How to build and install Bash on your system.
+<tr><td align="left" valign="top">• <a href="#Installing-Bash">Installing Bash</a></td><td> </td><td align="left" valign="top">How to build and install Bash on your system.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Reporting-Bugs">Reporting Bugs</a>:</td><td> </td><td align="left" valign="top">How to report bugs in Bash.
+<tr><td align="left" valign="top">• <a href="#Reporting-Bugs">Reporting Bugs</a></td><td> </td><td align="left" valign="top">How to report bugs in Bash.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Major-Differences-From-The-Bourne-Shell">Major Differences From The Bourne Shell</a>:</td><td> </td><td align="left" valign="top">A terse list of the differences
+<tr><td align="left" valign="top">• <a href="#Major-Differences-From-The-Bourne-Shell">Major Differences From The Bourne Shell</a></td><td> </td><td align="left" valign="top">A terse list of the differences
between Bash and historical
versions of /bin/sh.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#GNU-Free-Documentation-License">GNU Free Documentation License</a>:</td><td> </td><td align="left" valign="top">Copying and sharing this documentation.
+<tr><td align="left" valign="top">• <a href="#GNU-Free-Documentation-License">GNU Free Documentation License</a></td><td> </td><td align="left" valign="top">Copying and sharing this documentation.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Indexes">Indexes</a>:</td><td> </td><td align="left" valign="top">Various indexes for this manual.
+<tr><td align="left" valign="top">• <a href="#Indexes">Indexes</a></td><td> </td><td align="left" valign="top">Various indexes for this manual.
</td></tr>
</table>
<hr>
-<a name="Introduction"></a>
-<div class="header">
+<span id="Introduction"></span><div class="header">
<p>
Next: <a href="#Definitions" accesskey="n" rel="next">Definitions</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Introduction-1"></a>
-<h2 class="chapter">1 Introduction</h2>
+<span id="Introduction-1"></span><h2 class="chapter">1 Introduction</h2>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#What-is-Bash_003f" accesskey="1">What is Bash?</a>:</td><td> </td><td align="left" valign="top">A short description of Bash.
+<tr><td align="left" valign="top">• <a href="#What-is-Bash_003f" accesskey="1">What is Bash?</a></td><td> </td><td align="left" valign="top">A short description of Bash.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#What-is-a-shell_003f" accesskey="2">What is a shell?</a>:</td><td> </td><td align="left" valign="top">A brief introduction to shells.
+<tr><td align="left" valign="top">• <a href="#What-is-a-shell_003f" accesskey="2">What is a shell?</a></td><td> </td><td align="left" valign="top">A brief introduction to shells.
</td></tr>
</table>
<hr>
-<a name="What-is-Bash_003f"></a>
-<div class="header">
+<span id="What-is-Bash_003f"></span><div class="header">
<p>
Next: <a href="#What-is-a-shell_003f" accesskey="n" rel="next">What is a shell?</a>, Up: <a href="#Introduction" accesskey="u" rel="up">Introduction</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="What-is-Bash_003f-1"></a>
-<h3 class="section">1.1 What is Bash?</h3>
+<span id="What-is-Bash_003f-1"></span><h3 class="section">1.1 What is Bash?</h3>
<p>Bash is the shell, or command language interpreter,
for the <small>GNU</small> operating system.
and Windows platforms.
</p>
<hr>
-<a name="What-is-a-shell_003f"></a>
-<div class="header">
+<span id="What-is-a-shell_003f"></span><div class="header">
<p>
Previous: <a href="#What-is-Bash_003f" accesskey="p" rel="prev">What is Bash?</a>, Up: <a href="#Introduction" accesskey="u" rel="up">Introduction</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="What-is-a-shell_003f-1"></a>
-<h3 class="section">1.2 What is a shell?</h3>
+<span id="What-is-a-shell_003f-1"></span><h3 class="section">1.2 What is a shell?</h3>
<p>At its base, a shell is simply a macro processor that executes
commands. The term macro processor means functionality where text
described in this manual.
</p>
<hr>
-<a name="Definitions"></a>
-<div class="header">
+<span id="Definitions"></span><div class="header">
<p>
Next: <a href="#Basic-Shell-Features" accesskey="n" rel="next">Basic Shell Features</a>, Previous: <a href="#Introduction" accesskey="p" rel="prev">Introduction</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Definitions-1"></a>
-<h2 class="chapter">2 Definitions</h2>
+<span id="Definitions-1"></span><h2 class="chapter">2 Definitions</h2>
<p>These definitions are used throughout the remainder of this manual.
</p>
<dl compact="compact">
<dt><code>POSIX</code></dt>
-<dd><a name="index-POSIX"></a>
+<dd><span id="index-POSIX"></span>
<p>A family of open system standards based on Unix. Bash
is primarily concerned with the Shell and Utilities portion of the
<small>POSIX</small> 1003.1 standard.
</p>
</dd>
<dt><code>builtin</code></dt>
-<dd><a name="index-builtin-1"></a>
+<dd><span id="index-builtin-1"></span>
<p>A command that is implemented internally by the shell itself, rather
than by an executable program somewhere in the file system.
</p>
</dd>
<dt><code>control operator</code></dt>
-<dd><a name="index-control-operator"></a>
+<dd><span id="index-control-operator"></span>
<p>A <code>token</code> that performs a control function. It is a <code>newline</code>
or one of the following:
‘<samp>||</samp>’, ‘<samp>&&</samp>’, ‘<samp>&</samp>’, ‘<samp>;</samp>’, ‘<samp>;;</samp>’, ‘<samp>;&</samp>’, ‘<samp>;;&</samp>’,
</p>
</dd>
<dt><code>exit status</code></dt>
-<dd><a name="index-exit-status"></a>
+<dd><span id="index-exit-status"></span>
<p>The value returned by a command to its caller. The value is restricted
to eight bits, so the maximum value is 255.
</p>
</dd>
<dt><code>field</code></dt>
-<dd><a name="index-field"></a>
+<dd><span id="index-field"></span>
<p>A unit of text that is the result of one of the shell expansions. After
expansion, when executing a command, the resulting fields are used as
the command name and arguments.
</p>
</dd>
<dt><code>filename</code></dt>
-<dd><a name="index-filename"></a>
+<dd><span id="index-filename"></span>
<p>A string of characters used to identify a file.
</p>
</dd>
<dt><code>job</code></dt>
-<dd><a name="index-job"></a>
+<dd><span id="index-job"></span>
<p>A set of processes comprising a pipeline, and any processes descended
from it, that are all in the same process group.
</p>
</dd>
<dt><code>job control</code></dt>
-<dd><a name="index-job-control"></a>
+<dd><span id="index-job-control"></span>
<p>A mechanism by which users can selectively stop (suspend) and restart
(resume) execution of processes.
</p>
</dd>
<dt><code>metacharacter</code></dt>
-<dd><a name="index-metacharacter"></a>
+<dd><span id="index-metacharacter"></span>
<p>A character that, when unquoted, separates words. A metacharacter is
a <code>space</code>, <code>tab</code>, <code>newline</code>, or one of the following characters:
‘<samp>|</samp>’, ‘<samp>&</samp>’, ‘<samp>;</samp>’, ‘<samp>(</samp>’, ‘<samp>)</samp>’, ‘<samp><</samp>’, or
</p>
</dd>
<dt><code>name</code></dt>
-<dd><a name="index-name"></a>
-<a name="index-identifier"></a>
+<dd><span id="index-name"></span>
+<span id="index-identifier"></span>
<p>A <code>word</code> consisting solely of letters, numbers, and underscores,
and beginning with a letter or underscore. <code>Name</code>s are used as
shell variable and function names.
</p>
</dd>
<dt><code>operator</code></dt>
-<dd><a name="index-operator_002c-shell"></a>
+<dd><span id="index-operator_002c-shell"></span>
<p>A <code>control operator</code> or a <code>redirection operator</code>.
See <a href="#Redirections">Redirections</a>, for a list of redirection operators.
Operators contain at least one unquoted <code>metacharacter</code>.
</p>
</dd>
<dt><code>process group</code></dt>
-<dd><a name="index-process-group"></a>
+<dd><span id="index-process-group"></span>
<p>A collection of related processes each having the same process
group <small>ID</small>.
</p>
</dd>
<dt><code>process group ID</code></dt>
-<dd><a name="index-process-group-ID"></a>
+<dd><span id="index-process-group-ID"></span>
<p>A unique identifier that represents a <code>process group</code>
during its lifetime.
</p>
</dd>
<dt><code>reserved word</code></dt>
-<dd><a name="index-reserved-word"></a>
+<dd><span id="index-reserved-word"></span>
<p>A <code>word</code> that has a special meaning to the shell. Most reserved
words introduce shell flow control constructs, such as <code>for</code> and
<code>while</code>.
</p>
</dd>
<dt><code>return status</code></dt>
-<dd><a name="index-return-status"></a>
+<dd><span id="index-return-status"></span>
<p>A synonym for <code>exit status</code>.
</p>
</dd>
<dt><code>signal</code></dt>
-<dd><a name="index-signal"></a>
+<dd><span id="index-signal"></span>
<p>A mechanism by which a process may be notified by the kernel
of an event occurring in the system.
</p>
</dd>
<dt><code>special builtin</code></dt>
-<dd><a name="index-special-builtin"></a>
+<dd><span id="index-special-builtin"></span>
<p>A shell builtin command that has been classified as special by the
<small>POSIX</small> standard.
</p>
</dd>
<dt><code>token</code></dt>
-<dd><a name="index-token"></a>
+<dd><span id="index-token"></span>
<p>A sequence of characters considered a single unit by the shell.
It is either a <code>word</code> or an <code>operator</code>.
</p>
</dd>
<dt><code>word</code></dt>
-<dd><a name="index-word"></a>
+<dd><span id="index-word"></span>
<p>A sequence of characters treated as a unit by the shell.
Words may not include unquoted <code>metacharacters</code>.
</p></dd>
</dl>
<hr>
-<a name="Basic-Shell-Features"></a>
-<div class="header">
+<span id="Basic-Shell-Features"></span><div class="header">
<p>
Next: <a href="#Shell-Builtin-Commands" accesskey="n" rel="next">Shell Builtin Commands</a>, Previous: <a href="#Definitions" accesskey="p" rel="prev">Definitions</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Basic-Shell-Features-1"></a>
-<h2 class="chapter">3 Basic Shell Features</h2>
-<a name="index-Bourne-shell"></a>
+<span id="Basic-Shell-Features-1"></span><h2 class="chapter">3 Basic Shell Features</h2>
+<span id="index-Bourne-shell"></span>
<p>Bash is an acronym for ‘<samp>Bourne-Again SHell</samp>’.
The Bourne shell is
and to named files, and how the shell executes commands.
</p>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Shell-Syntax" accesskey="1">Shell Syntax</a>:</td><td> </td><td align="left" valign="top">What your input means to the shell.
+<tr><td align="left" valign="top">• <a href="#Shell-Syntax" accesskey="1">Shell Syntax</a></td><td> </td><td align="left" valign="top">What your input means to the shell.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Shell-Commands" accesskey="2">Shell Commands</a>:</td><td> </td><td align="left" valign="top">The types of commands you can use.
+<tr><td align="left" valign="top">• <a href="#Shell-Commands" accesskey="2">Shell Commands</a></td><td> </td><td align="left" valign="top">The types of commands you can use.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Shell-Functions" accesskey="3">Shell Functions</a>:</td><td> </td><td align="left" valign="top">Grouping commands by name.
+<tr><td align="left" valign="top">• <a href="#Shell-Functions" accesskey="3">Shell Functions</a></td><td> </td><td align="left" valign="top">Grouping commands by name.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Shell-Parameters" accesskey="4">Shell Parameters</a>:</td><td> </td><td align="left" valign="top">How the shell stores values.
+<tr><td align="left" valign="top">• <a href="#Shell-Parameters" accesskey="4">Shell Parameters</a></td><td> </td><td align="left" valign="top">How the shell stores values.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Shell-Expansions" accesskey="5">Shell Expansions</a>:</td><td> </td><td align="left" valign="top">How Bash expands parameters and the various
+<tr><td align="left" valign="top">• <a href="#Shell-Expansions" accesskey="5">Shell Expansions</a></td><td> </td><td align="left" valign="top">How Bash expands parameters and the various
expansions available.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Redirections" accesskey="6">Redirections</a>:</td><td> </td><td align="left" valign="top">A way to control where input and output go.
+<tr><td align="left" valign="top">• <a href="#Redirections" accesskey="6">Redirections</a></td><td> </td><td align="left" valign="top">A way to control where input and output go.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Executing-Commands" accesskey="7">Executing Commands</a>:</td><td> </td><td align="left" valign="top">What happens when you run a command.
+<tr><td align="left" valign="top">• <a href="#Executing-Commands" accesskey="7">Executing Commands</a></td><td> </td><td align="left" valign="top">What happens when you run a command.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Shell-Scripts" accesskey="8">Shell Scripts</a>:</td><td> </td><td align="left" valign="top">Executing files of shell commands.
+<tr><td align="left" valign="top">• <a href="#Shell-Scripts" accesskey="8">Shell Scripts</a></td><td> </td><td align="left" valign="top">Executing files of shell commands.
</td></tr>
</table>
<hr>
-<a name="Shell-Syntax"></a>
-<div class="header">
+<span id="Shell-Syntax"></span><div class="header">
<p>
Next: <a href="#Shell-Commands" accesskey="n" rel="next">Shell Commands</a>, Up: <a href="#Basic-Shell-Features" accesskey="u" rel="up">Basic Shell Features</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Shell-Syntax-1"></a>
-<h3 class="section">3.1 Shell Syntax</h3>
+<span id="Shell-Syntax-1"></span><h3 class="section">3.1 Shell Syntax</h3>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Shell-Operation" accesskey="1">Shell Operation</a>:</td><td> </td><td align="left" valign="top">The basic operation of the shell.
+<tr><td align="left" valign="top">• <a href="#Shell-Operation" accesskey="1">Shell Operation</a></td><td> </td><td align="left" valign="top">The basic operation of the shell.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Quoting" accesskey="2">Quoting</a>:</td><td> </td><td align="left" valign="top">How to remove the special meaning from characters.
+<tr><td align="left" valign="top">• <a href="#Quoting" accesskey="2">Quoting</a></td><td> </td><td align="left" valign="top">How to remove the special meaning from characters.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Comments" accesskey="3">Comments</a>:</td><td> </td><td align="left" valign="top">How to specify comments.
+<tr><td align="left" valign="top">• <a href="#Comments" accesskey="3">Comments</a></td><td> </td><td align="left" valign="top">How to specify comments.
</td></tr>
</table>
available for further inspection or processing.
</p>
<hr>
-<a name="Shell-Operation"></a>
-<div class="header">
+<span id="Shell-Operation"></span><div class="header">
<p>
Next: <a href="#Quoting" accesskey="n" rel="next">Quoting</a>, Up: <a href="#Shell-Syntax" accesskey="u" rel="up">Shell Syntax</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Shell-Operation-1"></a>
-<h4 class="subsection">3.1.1 Shell Operation</h4>
+<span id="Shell-Operation-1"></span><h4 class="subsection">3.1.1 Shell Operation</h4>
<p>The following is a brief description of the shell’s operation when it
reads and executes a command. Basically, the shell does the
</li></ol>
<hr>
-<a name="Quoting"></a>
-<div class="header">
+<span id="Quoting"></span><div class="header">
<p>
Next: <a href="#Comments" accesskey="n" rel="next">Comments</a>, Previous: <a href="#Shell-Operation" accesskey="p" rel="prev">Shell Operation</a>, Up: <a href="#Shell-Syntax" accesskey="u" rel="up">Shell Syntax</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Quoting-1"></a>
-<h4 class="subsection">3.1.2 Quoting</h4>
-<a name="index-quoting"></a>
+<span id="Quoting-1"></span><h4 class="subsection">3.1.2 Quoting</h4>
+<span id="index-quoting"></span>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Escape-Character" accesskey="1">Escape Character</a>:</td><td> </td><td align="left" valign="top">How to remove the special meaning from a single
+<tr><td align="left" valign="top">• <a href="#Escape-Character" accesskey="1">Escape Character</a></td><td> </td><td align="left" valign="top">How to remove the special meaning from a single
character.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Single-Quotes" accesskey="2">Single Quotes</a>:</td><td> </td><td align="left" valign="top">How to inhibit all interpretation of a sequence
+<tr><td align="left" valign="top">• <a href="#Single-Quotes" accesskey="2">Single Quotes</a></td><td> </td><td align="left" valign="top">How to inhibit all interpretation of a sequence
of characters.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Double-Quotes" accesskey="3">Double Quotes</a>:</td><td> </td><td align="left" valign="top">How to suppress most of the interpretation of a
+<tr><td align="left" valign="top">• <a href="#Double-Quotes" accesskey="3">Double Quotes</a></td><td> </td><td align="left" valign="top">How to suppress most of the interpretation of a
sequence of characters.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#ANSI_002dC-Quoting" accesskey="4">ANSI-C Quoting</a>:</td><td> </td><td align="left" valign="top">How to expand ANSI-C sequences in quoted strings.
+<tr><td align="left" valign="top">• <a href="#ANSI_002dC-Quoting" accesskey="4">ANSI-C Quoting</a></td><td> </td><td align="left" valign="top">How to expand ANSI-C sequences in quoted strings.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Locale-Translation" accesskey="5">Locale Translation</a>:</td><td> </td><td align="left" valign="top">How to translate strings into different languages.
+<tr><td align="left" valign="top">• <a href="#Locale-Translation" accesskey="5">Locale Translation</a></td><td> </td><td align="left" valign="top">How to translate strings into different languages.
</td></tr>
</table>
<var>escape character</var>, single quotes, and double quotes.
</p>
<hr>
-<a name="Escape-Character"></a>
-<div class="header">
+<span id="Escape-Character"></span><div class="header">
<p>
Next: <a href="#Single-Quotes" accesskey="n" rel="next">Single Quotes</a>, Up: <a href="#Quoting" accesskey="u" rel="up">Quoting</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Escape-Character-1"></a>
-<h4 class="subsubsection">3.1.2.1 Escape Character</h4>
+<span id="Escape-Character-1"></span><h4 class="subsubsection">3.1.2.1 Escape Character</h4>
<p>A non-quoted backslash ‘<samp>\</samp>’ is the Bash escape character.
It preserves the literal value of the next character that follows,
with the exception of <code>newline</code>. If a <code>\newline</code> pair
the input stream and effectively ignored).
</p>
<hr>
-<a name="Single-Quotes"></a>
-<div class="header">
+<span id="Single-Quotes"></span><div class="header">
<p>
Next: <a href="#Double-Quotes" accesskey="n" rel="next">Double Quotes</a>, Previous: <a href="#Escape-Character" accesskey="p" rel="prev">Escape Character</a>, Up: <a href="#Quoting" accesskey="u" rel="up">Quoting</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Single-Quotes-1"></a>
-<h4 class="subsubsection">3.1.2.2 Single Quotes</h4>
+<span id="Single-Quotes-1"></span><h4 class="subsubsection">3.1.2.2 Single Quotes</h4>
<p>Enclosing characters in single quotes (‘<samp>'</samp>’) preserves the literal value
of each character within the quotes. A single quote may not occur
between single quotes, even when preceded by a backslash.
</p>
<hr>
-<a name="Double-Quotes"></a>
-<div class="header">
+<span id="Double-Quotes"></span><div class="header">
<p>
Next: <a href="#ANSI_002dC-Quoting" accesskey="n" rel="next">ANSI-C Quoting</a>, Previous: <a href="#Single-Quotes" accesskey="p" rel="prev">Single Quotes</a>, Up: <a href="#Quoting" accesskey="u" rel="up">Quoting</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Double-Quotes-1"></a>
-<h4 class="subsubsection">3.1.2.3 Double Quotes</h4>
+<span id="Double-Quotes-1"></span><h4 class="subsubsection">3.1.2.3 Double Quotes</h4>
<p>Enclosing characters in double quotes (‘<samp>"</samp>’) preserves the literal value
of all characters within the quotes, with the exception of
when in double quotes (see <a href="#Shell-Parameter-Expansion">Shell Parameter Expansion</a>).
</p>
<hr>
-<a name="ANSI_002dC-Quoting"></a>
-<div class="header">
+<span id="ANSI_002dC-Quoting"></span><div class="header">
<p>
Next: <a href="#Locale-Translation" accesskey="n" rel="next">Locale Translation</a>, Previous: <a href="#Double-Quotes" accesskey="p" rel="prev">Double Quotes</a>, Up: <a href="#Quoting" accesskey="u" rel="up">Quoting</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="ANSI_002dC-Quoting-1"></a>
-<h4 class="subsubsection">3.1.2.4 ANSI-C Quoting</h4>
-<a name="index-quoting_002c-ANSI"></a>
+<span id="ANSI_002dC-Quoting-1"></span><h4 class="subsubsection">3.1.2.4 ANSI-C Quoting</h4>
+<span id="index-quoting_002c-ANSI"></span>
<p>Words of the form <code>$'<var>string</var>'</code> are treated specially. The
word expands to <var>string</var>, with backslash-escaped characters replaced
been present.
</p>
<hr>
-<a name="Locale-Translation"></a>
-<div class="header">
+<span id="Locale-Translation"></span><div class="header">
<p>
Previous: <a href="#ANSI_002dC-Quoting" accesskey="p" rel="prev">ANSI-C Quoting</a>, Up: <a href="#Quoting" accesskey="u" rel="up">Quoting</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Locale_002dSpecific-Translation"></a>
-<h4 class="subsubsection">3.1.2.5 Locale-Specific Translation</h4>
-<a name="index-localization"></a>
-<a name="index-internationalization"></a>
-<a name="index-native-languages"></a>
-<a name="index-translation_002c-native-languages"></a>
-
-<p>A double-quoted string preceded by a dollar sign (‘<samp>$</samp>’) will cause
-the string to be translated according to the current locale.
-If the current locale is <code>C</code> or <code>POSIX</code>, the dollar sign
-is ignored.
+<span id="Locale_002dSpecific-Translation"></span><h4 class="subsubsection">3.1.2.5 Locale-Specific Translation</h4>
+<span id="index-localization"></span>
+<span id="index-internationalization"></span>
+<span id="index-native-languages"></span>
+<span id="index-translation_002c-native-languages"></span>
+
+<p>A double-quoted string preceded by a dollar sign (‘<samp>$</samp>’)
+will cause the string to be translated according to the current locale.
+The <var>gettext</var> infrastructure performs the message catalog lookup and
+translation, using the <code>LC_MESSAGES</code> and <code>TEXTDOMAIN</code> shell
+variables, as explained below. See the gettext documentation for additional
+details.
+If the current locale is <code>C</code> or <code>POSIX</code>,
+or if there are no translations available,
+the dollar sign is ignored.
If the string is translated and replaced, the replacement is
double-quoted.
</p>
-<a name="index-LC_005fMESSAGES"></a>
-<a name="index-TEXTDOMAIN"></a>
-<a name="index-TEXTDOMAINDIR"></a>
+<span id="index-LC_005fMESSAGES"></span>
+<span id="index-TEXTDOMAIN"></span>
+<span id="index-TEXTDOMAINDIR"></span>
<p>Some systems use the message catalog selected by the <code>LC_MESSAGES</code>
shell variable. Others create the name of the message catalog from the
value of the <code>TEXTDOMAIN</code> shell variable, possibly adding a
<code>TEXTDOMAINDIR</code>/<code>LC_MESSAGES</code>/LC_MESSAGES/<code>TEXTDOMAIN</code>.mo.
</p>
<hr>
-<a name="Comments"></a>
-<div class="header">
+<span id="Comments"></span><div class="header">
<p>
Previous: <a href="#Quoting" accesskey="p" rel="prev">Quoting</a>, Up: <a href="#Shell-Syntax" accesskey="u" rel="up">Shell Syntax</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Comments-1"></a>
-<h4 class="subsection">3.1.3 Comments</h4>
-<a name="index-comments_002c-shell"></a>
+<span id="Comments-1"></span><h4 class="subsection">3.1.3 Comments</h4>
+<span id="index-comments_002c-shell"></span>
<p>In a non-interactive shell, or an interactive shell in which the
<code>interactive_comments</code> option to the <code>shopt</code>
a shell interactive.
</p>
<hr>
-<a name="Shell-Commands"></a>
-<div class="header">
+<span id="Shell-Commands"></span><div class="header">
<p>
Next: <a href="#Shell-Functions" accesskey="n" rel="next">Shell Functions</a>, Previous: <a href="#Shell-Syntax" accesskey="p" rel="prev">Shell Syntax</a>, Up: <a href="#Basic-Shell-Features" accesskey="u" rel="up">Basic Shell Features</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Shell-Commands-1"></a>
-<h3 class="section">3.2 Shell Commands</h3>
-<a name="index-commands_002c-shell"></a>
+<span id="Shell-Commands-1"></span><h3 class="section">3.2 Shell Commands</h3>
+<span id="index-commands_002c-shell"></span>
<p>A simple shell command such as <code>echo a b c</code> consists of the command
itself followed by arguments, separated by spaces.
some other grouping.
</p>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Simple-Commands" accesskey="1">Simple Commands</a>:</td><td> </td><td align="left" valign="top">The most common type of command.
+<tr><td align="left" valign="top">• <a href="#Reserved-Words" accesskey="1">Reserved Words</a></td><td> </td><td align="left" valign="top">Words that have special meaning to the shell.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Pipelines" accesskey="2">Pipelines</a>:</td><td> </td><td align="left" valign="top">Connecting the input and output of several
+<tr><td align="left" valign="top">• <a href="#Simple-Commands" accesskey="2">Simple Commands</a></td><td> </td><td align="left" valign="top">The most common type of command.
+</td></tr>
+<tr><td align="left" valign="top">• <a href="#Pipelines" accesskey="3">Pipelines</a></td><td> </td><td align="left" valign="top">Connecting the input and output of several
commands.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Lists" accesskey="3">Lists</a>:</td><td> </td><td align="left" valign="top">How to execute commands sequentially.
+<tr><td align="left" valign="top">• <a href="#Lists" accesskey="4">Lists</a></td><td> </td><td align="left" valign="top">How to execute commands sequentially.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Compound-Commands" accesskey="4">Compound Commands</a>:</td><td> </td><td align="left" valign="top">Shell commands for control flow.
+<tr><td align="left" valign="top">• <a href="#Compound-Commands" accesskey="5">Compound Commands</a></td><td> </td><td align="left" valign="top">Shell commands for control flow.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Coprocesses" accesskey="5">Coprocesses</a>:</td><td> </td><td align="left" valign="top">Two-way communication between commands.
+<tr><td align="left" valign="top">• <a href="#Coprocesses" accesskey="6">Coprocesses</a></td><td> </td><td align="left" valign="top">Two-way communication between commands.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#GNU-Parallel" accesskey="6">GNU Parallel</a>:</td><td> </td><td align="left" valign="top">Running commands in parallel.
+<tr><td align="left" valign="top">• <a href="#GNU-Parallel" accesskey="7">GNU Parallel</a></td><td> </td><td align="left" valign="top">Running commands in parallel.
</td></tr>
</table>
<hr>
-<a name="Simple-Commands"></a>
-<div class="header">
+<span id="Reserved-Words"></span><div class="header">
+<p>
+Next: <a href="#Simple-Commands" accesskey="n" rel="next">Simple Commands</a>, Up: <a href="#Shell-Commands" accesskey="u" rel="up">Shell Commands</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
+</div>
+<span id="Reserved-Words-1"></span><h4 class="subsection">3.2.1 Reserved Words</h4>
+<span id="index-reserved-words"></span>
+
+<p>Reserved words are words that have special meaning to the shell.
+They are used to begin and end the shell’s compound commands.
+</p>
+<p>The following words are recognized as reserved when unquoted and
+the first word of a command (see below for exceptions):
+</p>
+<table>
+<tr><td width="10%"><code>if</code></td><td width="10%"><code>then</code></td><td width="10%"><code>elif</code></td><td width="10%"><code>else</code></td><td width="12%"><code>fi</code></td><td width="10%"><code>time</code></td></tr>
+<tr><td width="10%"><code>for</code></td><td width="10%"><code>in</code></td><td width="10%"><code>until</code></td><td width="10%"><code>while</code></td><td width="12%"><code>do</code></td><td width="10%"><code>done</code></td></tr>
+<tr><td width="10%"><code>case</code></td><td width="10%"><code>esac</code></td><td width="10%"><code>coproc</code></td><td width="10%"><code>select</code></td><td width="12%"><code>function</code></td></tr>
+<tr><td width="10%"><code>{</code></td><td width="10%"><code>}</code></td><td width="10%"><code>[[</code></td><td width="10%"><code>]]</code></td><td width="12%"><code>!</code></td></tr>
+</table>
+
+<p><code>in</code> is recognized as a reserved word if it is the third word of a
+<code>case</code> or <code>select</code> command.
+<code>in</code> and <code>do</code> are recognized as reserved
+words if they are the third word in a <code>for</code> command.
+</p>
+<hr>
+<span id="Simple-Commands"></span><div class="header">
<p>
-Next: <a href="#Pipelines" accesskey="n" rel="next">Pipelines</a>, Up: <a href="#Shell-Commands" accesskey="u" rel="up">Shell Commands</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
+Next: <a href="#Pipelines" accesskey="n" rel="next">Pipelines</a>, Previous: <a href="#Reserved-Words" accesskey="p" rel="prev">Reserved Words</a>, Up: <a href="#Shell-Commands" accesskey="u" rel="up">Shell Commands</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Simple-Commands-1"></a>
-<h4 class="subsection">3.2.1 Simple Commands</h4>
-<a name="index-commands_002c-simple"></a>
+<span id="Simple-Commands-1"></span><h4 class="subsection">3.2.2 Simple Commands</h4>
+<span id="index-commands_002c-simple"></span>
<p>A simple command is the kind of command encountered most often.
It’s just a sequence of words separated by <code>blank</code>s, terminated
the command was terminated by signal <var>n</var>.
</p>
<hr>
-<a name="Pipelines"></a>
-<div class="header">
+<span id="Pipelines"></span><div class="header">
<p>
Next: <a href="#Lists" accesskey="n" rel="next">Lists</a>, Previous: <a href="#Simple-Commands" accesskey="p" rel="prev">Simple Commands</a>, Up: <a href="#Shell-Commands" accesskey="u" rel="up">Shell Commands</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Pipelines-1"></a>
-<h4 class="subsection">3.2.2 Pipelines</h4>
-<a name="index-pipeline"></a>
-<a name="index-commands_002c-pipelines"></a>
+<span id="Pipelines-1"></span><h4 class="subsection">3.2.3 Pipelines</h4>
+<span id="index-pipeline"></span>
+<span id="index-commands_002c-pipelines"></span>
<p>A <code>pipeline</code> is a sequence of one or more commands separated by
one of the control operators ‘<samp>|</samp>’ or ‘<samp>|&</samp>’.
</p>
-<a name="index-time"></a>
-<a name="index-_0021"></a>
-<a name="index-command-timing"></a>
+<span id="index-time"></span>
+<span id="index-_0021"></span>
+<span id="index-command-timing"></span>
<p>The format for a pipeline is
</p><div class="example">
<pre class="example">[time [-p]] [!] <var>command1</var> [ | or |& <var>command2</var> ] …
returning a value.
</p>
<hr>
-<a name="Lists"></a>
-<div class="header">
+<span id="Lists"></span><div class="header">
<p>
Next: <a href="#Compound-Commands" accesskey="n" rel="next">Compound Commands</a>, Previous: <a href="#Pipelines" accesskey="p" rel="prev">Pipelines</a>, Up: <a href="#Shell-Commands" accesskey="u" rel="up">Shell Commands</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Lists-of-Commands"></a>
-<h4 class="subsection">3.2.3 Lists of Commands</h4>
-<a name="index-commands_002c-lists"></a>
+<span id="Lists-of-Commands"></span><h4 class="subsection">3.2.4 Lists of Commands</h4>
+<span id="index-commands_002c-lists"></span>
<p>A <code>list</code> is a sequence of one or more pipelines separated by one
of the operators ‘<samp>;</samp>’, ‘<samp>&</samp>’, ‘<samp>&&</samp>’, or ‘<samp>||</samp>’,
executed in the list.
</p>
<hr>
-<a name="Compound-Commands"></a>
-<div class="header">
+<span id="Compound-Commands"></span><div class="header">
<p>
Next: <a href="#Coprocesses" accesskey="n" rel="next">Coprocesses</a>, Previous: <a href="#Lists" accesskey="p" rel="prev">Lists</a>, Up: <a href="#Shell-Commands" accesskey="u" rel="up">Shell Commands</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Compound-Commands-1"></a>
-<h4 class="subsection">3.2.4 Compound Commands</h4>
-<a name="index-commands_002c-compound"></a>
+<span id="Compound-Commands-1"></span><h4 class="subsection">3.2.5 Compound Commands</h4>
+<span id="index-commands_002c-compound"></span>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Looping-Constructs" accesskey="1">Looping Constructs</a>:</td><td> </td><td align="left" valign="top">Shell commands for iterative action.
+<tr><td align="left" valign="top">• <a href="#Looping-Constructs" accesskey="1">Looping Constructs</a></td><td> </td><td align="left" valign="top">Shell commands for iterative action.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Conditional-Constructs" accesskey="2">Conditional Constructs</a>:</td><td> </td><td align="left" valign="top">Shell commands for conditional execution.
+<tr><td align="left" valign="top">• <a href="#Conditional-Constructs" accesskey="2">Conditional Constructs</a></td><td> </td><td align="left" valign="top">Shell commands for conditional execution.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Command-Grouping" accesskey="3">Command Grouping</a>:</td><td> </td><td align="left" valign="top">Ways to group commands.
+<tr><td align="left" valign="top">• <a href="#Command-Grouping" accesskey="3">Command Grouping</a></td><td> </td><td align="left" valign="top">Ways to group commands.
</td></tr>
</table>
to group commands and execute them as a unit.
</p>
<hr>
-<a name="Looping-Constructs"></a>
-<div class="header">
+<span id="Looping-Constructs"></span><div class="header">
<p>
Next: <a href="#Conditional-Constructs" accesskey="n" rel="next">Conditional Constructs</a>, Up: <a href="#Compound-Commands" accesskey="u" rel="up">Compound Commands</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Looping-Constructs-1"></a>
-<h4 class="subsubsection">3.2.4.1 Looping Constructs</h4>
-<a name="index-commands_002c-looping"></a>
+<span id="Looping-Constructs-1"></span><h4 class="subsubsection">3.2.5.1 Looping Constructs</h4>
+<span id="index-commands_002c-looping"></span>
<p>Bash supports the following looping constructs.
</p>
</p>
<dl compact="compact">
<dt><code>until</code></dt>
-<dd><a name="index-until"></a>
-<a name="index-do"></a>
-<a name="index-done"></a>
+<dd><span id="index-until"></span>
+<span id="index-do"></span>
+<span id="index-done"></span>
<p>The syntax of the <code>until</code> command is:
</p>
<div class="example">
</p>
</dd>
<dt><code>while</code></dt>
-<dd><a name="index-while"></a>
+<dd><span id="index-while"></span>
<p>The syntax of the <code>while</code> command is:
</p>
<div class="example">
</p>
</dd>
<dt><code>for</code></dt>
-<dd><a name="index-for"></a>
+<dd><span id="index-for"></span>
<p>The syntax of the <code>for</code> command is:
</p>
<div class="example">
may be used to control loop execution.
</p>
<hr>
-<a name="Conditional-Constructs"></a>
-<div class="header">
+<span id="Conditional-Constructs"></span><div class="header">
<p>
Next: <a href="#Command-Grouping" accesskey="n" rel="next">Command Grouping</a>, Previous: <a href="#Looping-Constructs" accesskey="p" rel="prev">Looping Constructs</a>, Up: <a href="#Compound-Commands" accesskey="u" rel="up">Compound Commands</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Conditional-Constructs-1"></a>
-<h4 class="subsubsection">3.2.4.2 Conditional Constructs</h4>
-<a name="index-commands_002c-conditional"></a>
+<span id="Conditional-Constructs-1"></span><h4 class="subsubsection">3.2.5.2 Conditional Constructs</h4>
+<span id="index-commands_002c-conditional"></span>
<dl compact="compact">
<dt><code>if</code></dt>
-<dd><a name="index-if"></a>
-<a name="index-then"></a>
-<a name="index-else"></a>
-<a name="index-elif"></a>
-<a name="index-fi"></a>
+<dd><span id="index-if"></span>
+<span id="index-then"></span>
+<span id="index-else"></span>
+<span id="index-elif"></span>
+<span id="index-fi"></span>
<p>The syntax of the <code>if</code> command is:
</p>
<div class="example">
</p>
</dd>
<dt><code>case</code></dt>
-<dd><a name="index-case"></a>
-<a name="index-in"></a>
-<a name="index-esac"></a>
+<dd><span id="index-case"></span>
+<span id="index-in"></span>
+<span id="index-esac"></span>
<p>The syntax of the <code>case</code> command is:
</p>
<div class="example">
the <var>command-list</var> associated with the next clause, if any.
Using ‘<samp>;;&</samp>’ in place of ‘<samp>;;</samp>’ causes the shell to test the patterns
in the next clause, if any, and execute any associated <var>command-list</var>
-on a successful match.
+on a successful match,
+continuing the case statement execution as if the pattern list had not matched.
</p>
<p>The return status is zero if no <var>pattern</var> is matched. Otherwise, the
return status is the exit status of the <var>command-list</var> executed.
</p>
</dd>
<dt><code>select</code></dt>
-<dd><a name="index-select"></a>
+<dd><span id="index-select"></span>
<p>The <code>select</code> construct allows the easy generation of menus.
It has almost the same syntax as the <code>for</code> command:
</p>
</dd>
<dt><code>[[…]]</code></dt>
-<dd><a name="index-_005b_005b"></a>
-<a name="index-_005d_005d"></a>
+<dd><span id="index-_005b_005b"></span>
+<span id="index-_005d_005d"></span>
<div class="example">
<pre class="example">[[ <var>expression</var> ]]
</pre></div>
precedence as ‘<samp>==</samp>’ and ‘<samp>!=</samp>’.
When it is used, the string to the right of the operator is considered
a <small>POSIX</small> extended regular expression and matched accordingly
-(as in <i>regex</i>3)).
+(using the <small>POSIX</small> <code>regcomp</code> and <code>regexec</code> interfaces
+usually described in <i>regex</i>(3)).
The return value is 0 if the string matches
the pattern, and 1 otherwise.
If the regular expression is syntactically incorrect, the conditional
since normal quoting characters lose their meanings between brackets.
If the pattern is stored in a shell variable, quoting the variable
expansion forces the entire pattern to be matched as a string.
+</p>
+<p>The pattern will match if it matches any part of the string.
+Anchor the pattern using the ‘<samp>^</samp>’ and ‘<samp>$</samp>’ regular expression
+operators to force it to match the entire string.
+The array variable <code>BASH_REMATCH</code> records which parts of the string
+matched the pattern.
+The element of <code>BASH_REMATCH</code> with index 0 contains the portion of
+the string matching the entire regular expression.
Substrings matched by parenthesized subexpressions within the regular
-expression are saved in the array variable <code>BASH_REMATCH</code>.
-The element of <code>BASH_REMATCH</code> with index 0 is the portion of the string
-matching the entire regular expression.
+expression are saved in the remaining <code>BASH_REMATCH</code> indices.
The element of <code>BASH_REMATCH</code> with index <var>n</var> is the portion of the
string matching the <var>n</var>th parenthesized subexpression.
</p>
<p>For example, the following will match a line
(stored in the shell variable <var>line</var>)
-if there is a sequence of characters in the value consisting of
+if there is a sequence of characters anywhere in the value consisting of
any number, including zero, of
-space characters, zero or one instances of ‘<samp>a</samp>’, then a ‘<samp>b</samp>’:
+characters in the <code>space</code> character class,
+zero or one instances of ‘<samp>a</samp>’, then a ‘<samp>b</samp>’:
</p><div class="example">
-<pre class="example">[[ $line =~ [[:space:]]*?(a)b ]]
+<pre class="example">[[ $line =~ [[:space:]]*(a)?b ]]
</pre></div>
<p>That means values like ‘<samp>aab</samp>’ and ‘<samp> aaaaaab</samp>’ will match, as
Using a shell variable to store the pattern decreases these problems.
For example, the following is equivalent to the above:
</p><div class="example">
-<pre class="example">pattern='[[:space:]]*?(a)b'
+<pre class="example">pattern='[[:space:]]*(a)?b'
[[ $line =~ $pattern ]]
</pre></div>
</dl>
<hr>
-<a name="Command-Grouping"></a>
-<div class="header">
+<span id="Command-Grouping"></span><div class="header">
<p>
Previous: <a href="#Conditional-Constructs" accesskey="p" rel="prev">Conditional Constructs</a>, Up: <a href="#Compound-Commands" accesskey="u" rel="up">Compound Commands</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Grouping-Commands"></a>
-<h4 class="subsubsection">3.2.4.3 Grouping Commands</h4>
-<a name="index-commands_002c-grouping"></a>
+<span id="Grouping-Commands"></span><h4 class="subsubsection">3.2.5.3 Grouping Commands</h4>
+<span id="index-commands_002c-grouping"></span>
<p>Bash provides two ways to group a list of commands to be executed
as a unit. When commands are grouped, redirections may be applied
</p>
</dd>
<dt><code>{}</code></dt>
-<dd><a name="index-_007b"></a>
-<a name="index-_007d"></a>
+<dd><span id="index-_007b"></span>
+<span id="index-_007d"></span>
<div class="example">
<pre class="example">{ <var>list</var>; }
</pre></div>
<var>list</var>.
</p>
<hr>
-<a name="Coprocesses"></a>
-<div class="header">
+<span id="Coprocesses"></span><div class="header">
<p>
Next: <a href="#GNU-Parallel" accesskey="n" rel="next">GNU Parallel</a>, Previous: <a href="#Compound-Commands" accesskey="p" rel="prev">Compound Commands</a>, Up: <a href="#Shell-Commands" accesskey="u" rel="up">Shell Commands</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Coprocesses-1"></a>
-<h4 class="subsection">3.2.5 Coprocesses</h4>
-<a name="index-coprocess"></a>
+<span id="Coprocesses-1"></span><h4 class="subsection">3.2.6 Coprocesses</h4>
+<span id="index-coprocess"></span>
<p>A <code>coprocess</code> is a shell command preceded by the <code>coproc</code>
reserved word.
The return status of a coprocess is the exit status of <var>command</var>.
</p>
<hr>
-<a name="GNU-Parallel"></a>
-<div class="header">
+<span id="GNU-Parallel"></span><div class="header">
<p>
Previous: <a href="#Coprocesses" accesskey="p" rel="prev">Coprocesses</a>, Up: <a href="#Shell-Commands" accesskey="u" rel="up">Shell Commands</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="GNU-Parallel-1"></a>
-<h4 class="subsection">3.2.6 GNU Parallel</h4>
+<span id="GNU-Parallel-1"></span><h4 class="subsection">3.2.7 GNU Parallel</h4>
<p>There are ways to run commands in parallel that are not built into Bash.
GNU Parallel is a tool to do just that.
<p>You can use Parallel to move files from the current directory when the
number of files is too large to process with one <code>mv</code> invocation:
</p><div class="example">
-<pre class="example">ls | parallel mv {} destdir
+<pre class="example">printf '%s\n' * | parallel mv {} destdir
</pre></div>
<p>As you can see, the {} is replaced with each line read from standard input.
While using <code>ls</code> will work in most instances, it is not sufficient to
-deal with all filenames.
+deal with all filenames. <code>printf</code> is a shell builtin, and therefore is
+not subject to the kernel’s limit on the number of arguments to a program,
+so you can use ‘<samp>*</samp>’ (but see below about the <code>dotglob</code> shell option).
If you need to accommodate special characters in filenames, you can use
</p>
<div class="example">
-<pre class="example">find . -depth 1 \! -name '.*' -print0 | parallel -0 mv {} destdir
+<pre class="example">printf '%s\0' * | parallel -0 mv {} destdir
</pre></div>
<p>as alluded to above.
directory.
You can emulate a parallel <code>xargs</code> by adding the <samp>-X</samp> option:
</p><div class="example">
-<pre class="example">find . -depth 1 \! -name '.*' -print0 | parallel -0 -X mv {} destdir
+<pre class="example">printf '%s\0' * | parallel -0 -X mv {} destdir
</pre></div>
+<p>(You may have to modify the pattern if you have the <code>dotglob</code> option
+enabled.)
+</p>
<p>GNU Parallel can replace certain common idioms that operate on lines read
from a file (in this case, filenames listed one per line):
</p><div class="example">
supplied as an argument), in blocks of ten shell jobs at a time.
</p>
<hr>
-<a name="Shell-Functions"></a>
-<div class="header">
+<span id="Shell-Functions"></span><div class="header">
<p>
Next: <a href="#Shell-Parameters" accesskey="n" rel="next">Shell Parameters</a>, Previous: <a href="#Shell-Commands" accesskey="p" rel="prev">Shell Commands</a>, Up: <a href="#Basic-Shell-Features" accesskey="u" rel="up">Basic Shell Features</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Shell-Functions-1"></a>
-<h3 class="section">3.3 Shell Functions</h3>
-<a name="index-shell-function"></a>
-<a name="index-functions_002c-shell"></a>
+<span id="Shell-Functions-1"></span><h3 class="section">3.3 Shell Functions</h3>
+<span id="index-shell-function"></span>
+<span id="index-functions_002c-shell"></span>
<p>Shell functions are a way to group commands for later execution
using a single name for the group. They are executed just like
shell context; no new process is created to interpret them.
</p>
<p>Functions are declared using this syntax:
-<a name="index-function"></a>
+<span id="index-function"></span>
</p><div class="example">
-<pre class="example"><var>name</var> () <var>compound-command</var> [ <var>redirections</var> ]
+<pre class="example"><var>fname</var> () <var>compound-command</var> [ <var>redirections</var> ]
</pre></div>
<p>or
</p>
<div class="example">
-<pre class="example">function <var>name</var> [()] <var>compound-command</var> [ <var>redirections</var> ]
+<pre class="example">function <var>fname</var> [()] <var>compound-command</var> [ <var>redirections</var> ]
</pre></div>
-<p>This defines a shell function named <var>name</var>. The reserved
+<p>This defines a shell function named <var>fname</var>. The reserved
word <code>function</code> is optional.
If the <code>function</code> reserved
word is supplied, the parentheses are optional.
may be any compound command listed above,
with one exception: If the <code>function</code> reserved word is used, but the
parentheses are not supplied, the braces are required.
-<var>compound-command</var> is executed whenever <var>name</var> is specified as the
+<var>compound-command</var> is executed whenever <var>fname</var> is specified as the
name of a command.
When the shell is in <small>POSIX</small> mode (see <a href="#Bash-POSIX-Mode">Bash POSIX Mode</a>),
-<var>name</var> may not be the same as one of the special builtins
+<var>fname</var> must be a valid shell <var>name</var> and
+may not be the same as one of the special builtins
(see <a href="#Special-Builtins">Special Builtins</a>).
+In default mode, a function name can be any unquoted shell word that does
+not contain ‘<samp>$</samp>’.
Any redirections (see <a href="#Redirections">Redirections</a>) associated with the shell function
are performed when the function is executed.
-</p>
-<p>A function definition may be deleted using the <samp>-f</samp> option to the
+A function definition may be deleted using the <samp>-f</samp> option to the
<code>unset</code> builtin (see <a href="#Bourne-Shell-Builtins">Bourne Shell Builtins</a>).
</p>
<p>The exit status of a function definition is zero unless a syntax error
By default, no limit is placed on the number of recursive calls.
</p>
<hr>
-<a name="Shell-Parameters"></a>
-<div class="header">
+<span id="Shell-Parameters"></span><div class="header">
<p>
Next: <a href="#Shell-Expansions" accesskey="n" rel="next">Shell Expansions</a>, Previous: <a href="#Shell-Functions" accesskey="p" rel="prev">Shell Functions</a>, Up: <a href="#Basic-Shell-Features" accesskey="u" rel="up">Basic Shell Features</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Shell-Parameters-1"></a>
-<h3 class="section">3.4 Shell Parameters</h3>
-<a name="index-parameters"></a>
-<a name="index-variable_002c-shell"></a>
-<a name="index-shell-variable"></a>
+<span id="Shell-Parameters-1"></span><h3 class="section">3.4 Shell Parameters</h3>
+<span id="index-parameters"></span>
+<span id="index-variable_002c-shell"></span>
+<span id="index-shell-variable"></span>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Positional-Parameters" accesskey="1">Positional Parameters</a>:</td><td> </td><td align="left" valign="top">The shell’s command-line arguments.
+<tr><td align="left" valign="top">• <a href="#Positional-Parameters" accesskey="1">Positional Parameters</a></td><td> </td><td align="left" valign="top">The shell’s command-line arguments.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Special-Parameters" accesskey="2">Special Parameters</a>:</td><td> </td><td align="left" valign="top">Parameters denoted by special characters.
+<tr><td align="left" valign="top">• <a href="#Special-Parameters" accesskey="2">Special Parameters</a></td><td> </td><td align="left" valign="top">Parameters denoted by special characters.
</td></tr>
</table>
as an argument, the variable referenced by the nameref variable will be unset.
</p>
<hr>
-<a name="Positional-Parameters"></a>
-<div class="header">
+<span id="Positional-Parameters"></span><div class="header">
<p>
Next: <a href="#Special-Parameters" accesskey="n" rel="next">Special Parameters</a>, Up: <a href="#Shell-Parameters" accesskey="u" rel="up">Shell Parameters</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Positional-Parameters-1"></a>
-<h4 class="subsection">3.4.1 Positional Parameters</h4>
-<a name="index-parameters_002c-positional"></a>
+<span id="Positional-Parameters-1"></span><h4 class="subsection">3.4.1 Positional Parameters</h4>
+<span id="index-parameters_002c-positional"></span>
<p>A <var>positional parameter</var> is a parameter denoted by one or more
digits, other than the single digit <code>0</code>. Positional parameters are
digit is expanded, it must be enclosed in braces.
</p>
<hr>
-<a name="Special-Parameters"></a>
-<div class="header">
+<span id="Special-Parameters"></span><div class="header">
<p>
Previous: <a href="#Positional-Parameters" accesskey="p" rel="prev">Positional Parameters</a>, Up: <a href="#Shell-Parameters" accesskey="u" rel="up">Shell Parameters</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Special-Parameters-1"></a>
-<h4 class="subsection">3.4.2 Special Parameters</h4>
-<a name="index-parameters_002c-special"></a>
+<span id="Special-Parameters-1"></span><h4 class="subsection">3.4.2 Special Parameters</h4>
+<span id="index-parameters_002c-special"></span>
<p>The shell treats several parameters specially. These parameters may
only be referenced; assignment to them is not allowed.
</p>
<dl compact="compact">
<dt><code>*</code>
-<a name="index-_002a"></a>
+<span id="index-_002a"></span>
</dt>
-<dd><a name="index-_0024_002a"></a>
+<dd><span id="index-_0024_002a"></span>
<p>($*) Expands to the positional parameters, starting from one.
When the expansion is not within double quotes, each positional parameter
expands to a separate word.
In contexts where it is performed, those words
-are subject to further word splitting and pathname expansion.
+are subject to further word splitting and filename expansion.
When the expansion occurs within double quotes, it expands to a single word
with the value of each parameter separated by the first character of the
<code>IFS</code> special variable. That is, <code>"$*"</code> is equivalent
</p>
</dd>
<dt><code>@</code>
-<a name="index-_0040"></a>
+<span id="index-_0040"></span>
</dt>
-<dd><a name="index-_0024_0040"></a>
+<dd><span id="index-_0024_0040"></span>
<p>($@) Expands to the positional parameters, starting from one.
In contexts where word splitting is performed, this expands each
positional parameter to a separate word; if not within double
</p>
</dd>
<dt><code>#</code>
-<a name="index-_0023"></a>
+<span id="index-_0023"></span>
</dt>
-<dd><a name="index-_0024_0023"></a>
+<dd><span id="index-_0024_0023"></span>
<p>($#) Expands to the number of positional parameters in decimal.
</p>
</dd>
<dt><code>?</code>
-<a name="index-_003f"></a>
+<span id="index-_003f"></span>
</dt>
-<dd><a name="index-_0024_003f"></a>
+<dd><span id="index-_0024_003f"></span>
<p>($?) Expands to the exit status of the most recently executed foreground
pipeline.
</p>
</dd>
<dt><code>-</code>
-<a name="index-_002d"></a>
+<span id="index-_002d"></span>
</dt>
-<dd><a name="index-_0024_002d"></a>
+<dd><span id="index-_0024_002d"></span>
<p>($-, a hyphen.) Expands to the current option flags as specified upon
invocation, by the <code>set</code>
builtin command, or those set by the shell itself
</p>
</dd>
<dt><code>$</code>
-<a name="index-_0024"></a>
+<span id="index-_0024"></span>
</dt>
-<dd><a name="index-_0024_0024"></a>
+<dd><span id="index-_0024_0024"></span>
<p>($$) Expands to the process <small>ID</small> of the shell. In a <code>()</code> subshell, it
expands to the process <small>ID</small> of the invoking shell, not the subshell.
</p>
</dd>
<dt><code>!</code>
-<a name="index-_0021-1"></a>
+<span id="index-_0021-1"></span>
</dt>
-<dd><a name="index-_0024_0021"></a>
+<dd><span id="index-_0024_0021"></span>
<p>($!) Expands to the process <small>ID</small> of the job most recently placed into the
background, whether executed as an asynchronous command or using
the <code>bg</code> builtin (see <a href="#Job-Control-Builtins">Job Control Builtins</a>).
</p>
</dd>
<dt><code>0</code>
-<a name="index-0"></a>
+<span id="index-0"></span>
</dt>
-<dd><a name="index-_00240"></a>
+<dd><span id="index-_00240"></span>
<p>($0) Expands to the name of the shell or shell script. This is set at
shell initialization. If Bash is invoked with a file of commands
(see <a href="#Shell-Scripts">Shell Scripts</a>), <code>$0</code> is set to the name of that file.
then <code>$0</code> is set to the first argument after the string to be
executed, if one is present. Otherwise, it is set
to the filename used to invoke Bash, as given by argument zero.
-</p>
-</dd>
-<dt><code>_</code>
-<a name="index-_005f"></a>
-</dt>
-<dd><a name="index-_0024_005f"></a>
-<p>($_, an underscore.)
-At shell startup, set to the absolute pathname used to invoke the
-shell or shell script being executed as passed in the environment
-or argument list.
-Subsequently, expands to the last argument to the previous simple
-command executed in the foreground, after expansion.
-Also set to the full pathname used to invoke each command executed
-and placed in the environment exported to that command.
-When checking mail, this parameter holds the name of the mail file.
</p></dd>
</dl>
<hr>
-<a name="Shell-Expansions"></a>
-<div class="header">
+<span id="Shell-Expansions"></span><div class="header">
<p>
Next: <a href="#Redirections" accesskey="n" rel="next">Redirections</a>, Previous: <a href="#Shell-Parameters" accesskey="p" rel="prev">Shell Parameters</a>, Up: <a href="#Basic-Shell-Features" accesskey="u" rel="up">Basic Shell Features</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Shell-Expansions-1"></a>
-<h3 class="section">3.5 Shell Expansions</h3>
-<a name="index-expansion"></a>
+<span id="Shell-Expansions-1"></span><h3 class="section">3.5 Shell Expansions</h3>
+<span id="index-expansion"></span>
<p>Expansion is performed on the command line after it has been split into
<code>token</code>s. There are seven kinds of expansion performed:
</li></ul>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Brace-Expansion" accesskey="1">Brace Expansion</a>:</td><td> </td><td align="left" valign="top">Expansion of expressions within braces.
+<tr><td align="left" valign="top">• <a href="#Brace-Expansion" accesskey="1">Brace Expansion</a></td><td> </td><td align="left" valign="top">Expansion of expressions within braces.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Tilde-Expansion" accesskey="2">Tilde Expansion</a>:</td><td> </td><td align="left" valign="top">Expansion of the ~ character.
+<tr><td align="left" valign="top">• <a href="#Tilde-Expansion" accesskey="2">Tilde Expansion</a></td><td> </td><td align="left" valign="top">Expansion of the ~ character.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Shell-Parameter-Expansion" accesskey="3">Shell Parameter Expansion</a>:</td><td> </td><td align="left" valign="top">How Bash expands variables to their values.
+<tr><td align="left" valign="top">• <a href="#Shell-Parameter-Expansion" accesskey="3">Shell Parameter Expansion</a></td><td> </td><td align="left" valign="top">How Bash expands variables to their values.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Command-Substitution" accesskey="4">Command Substitution</a>:</td><td> </td><td align="left" valign="top">Using the output of a command as an argument.
+<tr><td align="left" valign="top">• <a href="#Command-Substitution" accesskey="4">Command Substitution</a></td><td> </td><td align="left" valign="top">Using the output of a command as an argument.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Arithmetic-Expansion" accesskey="5">Arithmetic Expansion</a>:</td><td> </td><td align="left" valign="top">How to use arithmetic in shell expansions.
+<tr><td align="left" valign="top">• <a href="#Arithmetic-Expansion" accesskey="5">Arithmetic Expansion</a></td><td> </td><td align="left" valign="top">How to use arithmetic in shell expansions.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Process-Substitution" accesskey="6">Process Substitution</a>:</td><td> </td><td align="left" valign="top">A way to write and read to and from a
+<tr><td align="left" valign="top">• <a href="#Process-Substitution" accesskey="6">Process Substitution</a></td><td> </td><td align="left" valign="top">A way to write and read to and from a
command.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Word-Splitting" accesskey="7">Word Splitting</a>:</td><td> </td><td align="left" valign="top">How the results of expansion are split into separate
+<tr><td align="left" valign="top">• <a href="#Word-Splitting" accesskey="7">Word Splitting</a></td><td> </td><td align="left" valign="top">How the results of expansion are split into separate
arguments.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Filename-Expansion" accesskey="8">Filename Expansion</a>:</td><td> </td><td align="left" valign="top">A shorthand for specifying filenames matching patterns.
+<tr><td align="left" valign="top">• <a href="#Filename-Expansion" accesskey="8">Filename Expansion</a></td><td> </td><td align="left" valign="top">A shorthand for specifying filenames matching patterns.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Quote-Removal" accesskey="9">Quote Removal</a>:</td><td> </td><td align="left" valign="top">How and when quote characters are removed from
+<tr><td align="left" valign="top">• <a href="#Quote-Removal" accesskey="9">Quote Removal</a></td><td> </td><td align="left" valign="top">How and when quote characters are removed from
words.
</td></tr>
</table>
is performed.
</p>
<hr>
-<a name="Brace-Expansion"></a>
-<div class="header">
+<span id="Brace-Expansion"></span><div class="header">
<p>
Next: <a href="#Tilde-Expansion" accesskey="n" rel="next">Tilde Expansion</a>, Up: <a href="#Shell-Expansions" accesskey="u" rel="up">Shell Expansions</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Brace-Expansion-1"></a>
-<h4 class="subsection">3.5.1 Brace Expansion</h4>
-<a name="index-brace-expansion"></a>
-<a name="index-expansion_002c-brace"></a>
+<span id="Brace-Expansion-1"></span><h4 class="subsection">3.5.1 Brace Expansion</h4>
+<span id="index-brace-expansion"></span>
+<span id="index-expansion_002c-brace"></span>
<p>Brace expansion is a mechanism by which arbitrary strings may be generated.
This mechanism is similar to
being considered part of a brace expression.
To avoid conflicts with parameter expansion, the string ‘<samp>${</samp>’
is not considered eligible for brace expansion,
-and inhibits brace expansion until the closing ‘<samp>}</samp>’..
+and inhibits brace expansion until the closing ‘<samp>}</samp>’.
</p>
<p>This construct is typically used as shorthand when the common
prefix of the strings to be generated is longer than in the
</pre></div>
<hr>
-<a name="Tilde-Expansion"></a>
-<div class="header">
+<span id="Tilde-Expansion"></span><div class="header">
<p>
Next: <a href="#Shell-Parameter-Expansion" accesskey="n" rel="next">Shell Parameter Expansion</a>, Previous: <a href="#Brace-Expansion" accesskey="p" rel="prev">Brace Expansion</a>, Up: <a href="#Shell-Expansions" accesskey="u" rel="up">Shell Expansions</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Tilde-Expansion-1"></a>
-<h4 class="subsection">3.5.2 Tilde Expansion</h4>
-<a name="index-tilde-expansion"></a>
-<a name="index-expansion_002c-tilde"></a>
+<span id="Tilde-Expansion-1"></span><h4 class="subsection">3.5.2 Tilde Expansion</h4>
+<span id="index-tilde-expansion"></span>
+<span id="index-expansion_002c-tilde"></span>
<p>If a word begins with an unquoted tilde character (‘<samp>~</samp>’), all of the
characters up to the first unquoted slash (or all characters,
above, when in <small>POSIX</small> mode.
</p>
<hr>
-<a name="Shell-Parameter-Expansion"></a>
-<div class="header">
+<span id="Shell-Parameter-Expansion"></span><div class="header">
<p>
Next: <a href="#Command-Substitution" accesskey="n" rel="next">Command Substitution</a>, Previous: <a href="#Tilde-Expansion" accesskey="p" rel="prev">Tilde Expansion</a>, Up: <a href="#Shell-Expansions" accesskey="u" rel="up">Shell Expansions</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Shell-Parameter-Expansion-1"></a>
-<h4 class="subsection">3.5.3 Shell Parameter Expansion</h4>
-<a name="index-parameter-expansion"></a>
-<a name="index-expansion_002c-parameter"></a>
+<span id="Shell-Parameter-Expansion-1"></span><h4 class="subsection">3.5.3 Shell Parameter Expansion</h4>
+<span id="index-parameter-expansion"></span>
+<span id="index-expansion_002c-parameter"></span>
<p>The ‘<samp>$</samp>’ character introduces parameter expansion,
command substitution, or arithmetic expansion. The parameter name
</p>
<p>Substring indexing is zero-based unless the positional parameters
are used, in which case the indexing starts at 1 by default.
-If <var>offset</var> is 0, and the positional parameters are used, <code>$@</code> is
+If <var>offset</var> is 0, and the positional parameters are used, <code>$0</code> is
prefixed to the list.
</p>
</dd>
<dt><code>${<var>parameter</var>%%<var>word</var>}</code></dt>
<dd><p>The <var>word</var>
is expanded to produce a pattern and matched according to the rules
-described below (see <a href="#Pattern-Matching">Pattern Matching</a>). If the pattern matches
+described below (see <a href="#Pattern-Matching">Pattern Matching</a>).
If the pattern matches a trailing portion of the expanded value of
<var>parameter</var>, then the result of the expansion is the value of
<var>parameter</var> with the shortest matching pattern (the ‘<samp>%</samp>’ case)
<var>operator</var>. Each <var>operator</var> is a single letter:
</p>
<dl compact="compact">
+<dt><code>U</code></dt>
+<dd><p>The expansion is a string that is the value of <var>parameter</var> with lowercase
+alphabetic characters converted to uppercase.
+</p></dd>
+<dt><code>u</code></dt>
+<dd><p>The expansion is a string that is the value of <var>parameter</var> with the first
+character converted to uppercase, if it is alphabetic.
+</p></dd>
+<dt><code>L</code></dt>
+<dd><p>The expansion is a string that is the value of <var>parameter</var> with uppercase
+alphabetic characters converted to lowercase.
+</p></dd>
<dt><code>Q</code></dt>
<dd><p>The expansion is a string that is the value of <var>parameter</var> quoted in a
format that can be reused as input.
an assignment statement or <code>declare</code> command that, if
evaluated, will recreate <var>parameter</var> with its attributes and value.
</p></dd>
+<dt><code>K</code></dt>
+<dd><p>Produces a possibly-quoted version of the value of <var>parameter</var>,
+except that it prints the values of
+indexed and associative arrays as a sequence of quoted key-value pairs
+(see <a href="#Arrays">Arrays</a>).
+</p></dd>
<dt><code>a</code></dt>
<dd><p>The expansion is a string consisting of flag values representing
<var>parameter</var>’s attributes.
the operation is applied to each member of the
array in turn, and the expansion is the resultant list.
</p>
-<p>The result of the expansion is subject to word splitting and pathname
+<p>The result of the expansion is subject to word splitting and filename
expansion as described below.
</p></dd>
</dl>
<hr>
-<a name="Command-Substitution"></a>
-<div class="header">
+<span id="Command-Substitution"></span><div class="header">
<p>
Next: <a href="#Arithmetic-Expansion" accesskey="n" rel="next">Arithmetic Expansion</a>, Previous: <a href="#Shell-Parameter-Expansion" accesskey="p" rel="prev">Shell Parameter Expansion</a>, Up: <a href="#Shell-Expansions" accesskey="u" rel="up">Shell Expansions</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Command-Substitution-1"></a>
-<h4 class="subsection">3.5.4 Command Substitution</h4>
-<a name="index-command-substitution"></a>
+<span id="Command-Substitution-1"></span><h4 class="subsection">3.5.4 Command Substitution</h4>
+<span id="index-command-substitution"></span>
<p>Command substitution allows the output of a command to replace
the command itself.
filename expansion are not performed on the results.
</p>
<hr>
-<a name="Arithmetic-Expansion"></a>
-<div class="header">
+<span id="Arithmetic-Expansion"></span><div class="header">
<p>
Next: <a href="#Process-Substitution" accesskey="n" rel="next">Process Substitution</a>, Previous: <a href="#Command-Substitution" accesskey="p" rel="prev">Command Substitution</a>, Up: <a href="#Shell-Expansions" accesskey="u" rel="up">Shell Expansions</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Arithmetic-Expansion-1"></a>
-<h4 class="subsection">3.5.5 Arithmetic Expansion</h4>
-<a name="index-expansion_002c-arithmetic"></a>
-<a name="index-arithmetic-expansion"></a>
+<span id="Arithmetic-Expansion-1"></span><h4 class="subsection">3.5.5 Arithmetic Expansion</h4>
+<span id="index-expansion_002c-arithmetic"></span>
+<span id="index-arithmetic-expansion"></span>
<p>Arithmetic expansion allows the evaluation of an arithmetic expression
and the substitution of the result. The format for arithmetic expansion is:
failure to the standard error and no substitution occurs.
</p>
<hr>
-<a name="Process-Substitution"></a>
-<div class="header">
+<span id="Process-Substitution"></span><div class="header">
<p>
Next: <a href="#Word-Splitting" accesskey="n" rel="next">Word Splitting</a>, Previous: <a href="#Arithmetic-Expansion" accesskey="p" rel="prev">Arithmetic Expansion</a>, Up: <a href="#Shell-Expansions" accesskey="u" rel="up">Shell Expansions</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Process-Substitution-1"></a>
-<h4 class="subsection">3.5.6 Process Substitution</h4>
-<a name="index-process-substitution"></a>
+<span id="Process-Substitution-1"></span><h4 class="subsection">3.5.6 Process Substitution</h4>
+<span id="index-process-substitution"></span>
<p>Process substitution allows a process’s input or output to be
referred to using a filename.
expansion.
</p>
<hr>
-<a name="Word-Splitting"></a>
-<div class="header">
+<span id="Word-Splitting"></span><div class="header">
<p>
Next: <a href="#Filename-Expansion" accesskey="n" rel="next">Filename Expansion</a>, Previous: <a href="#Process-Substitution" accesskey="p" rel="prev">Process Substitution</a>, Up: <a href="#Shell-Expansions" accesskey="u" rel="up">Shell Expansions</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Word-Splitting-1"></a>
-<h4 class="subsection">3.5.7 Word Splitting</h4>
-<a name="index-word-splitting"></a>
+<span id="Word-Splitting-1"></span><h4 class="subsection">3.5.7 Word Splitting</h4>
+<span id="index-word-splitting"></span>
<p>The shell scans the results of parameter expansion, command substitution,
and arithmetic expansion that did not occur within double quotes for
is performed.
</p>
<hr>
-<a name="Filename-Expansion"></a>
-<div class="header">
+<span id="Filename-Expansion"></span><div class="header">
<p>
Next: <a href="#Quote-Removal" accesskey="n" rel="next">Quote Removal</a>, Previous: <a href="#Word-Splitting" accesskey="p" rel="prev">Word Splitting</a>, Up: <a href="#Shell-Expansions" accesskey="u" rel="up">Shell Expansions</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Filename-Expansion-1"></a>
-<h4 class="subsection">3.5.8 Filename Expansion</h4>
+<span id="Filename-Expansion-1"></span><h4 class="subsection">3.5.8 Filename Expansion</h4>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Pattern-Matching" accesskey="1">Pattern Matching</a>:</td><td> </td><td align="left" valign="top">How the shell matches patterns.
+<tr><td align="left" valign="top">• <a href="#Pattern-Matching" accesskey="1">Pattern Matching</a></td><td> </td><td align="left" valign="top">How the shell matches patterns.
</td></tr>
</table>
-<a name="index-expansion_002c-filename"></a>
-<a name="index-expansion_002c-pathname"></a>
-<a name="index-filename-expansion"></a>
-<a name="index-pathname-expansion"></a>
+<span id="index-expansion_002c-filename"></span>
+<span id="index-expansion_002c-pathname"></span>
+<span id="index-filename-expansion"></span>
+<span id="index-pathname-expansion"></span>
<p>After word splitting, unless the <samp>-f</samp> option has been set
(see <a href="#The-Set-Builtin">The Set Builtin</a>), Bash scans each word for the characters
‘<samp>*</samp>’, ‘<samp>?</samp>’, and ‘<samp>[</samp>’.
-If one of these characters appears, then the word is
+If one of these characters appears, and is not quoted, then the word is
regarded as a <var>pattern</var>,
and replaced with an alphabetically sorted list of
filenames matching the pattern (see <a href="#Pattern-Matching">Pattern Matching</a>).
is unset.
</p>
<hr>
-<a name="Pattern-Matching"></a>
-<div class="header">
+<span id="Pattern-Matching"></span><div class="header">
<p>
Up: <a href="#Filename-Expansion" accesskey="u" rel="up">Filename Expansion</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Pattern-Matching-1"></a>
-<h4 class="subsubsection">3.5.8.1 Pattern Matching</h4>
-<a name="index-pattern-matching"></a>
-<a name="index-matching_002c-pattern"></a>
+<span id="Pattern-Matching-1"></span><h4 class="subsubsection">3.5.8.1 Pattern Matching</h4>
+<span id="index-pattern-matching"></span>
+<span id="index-matching_002c-pattern"></span>
<p>Any character that appears in a pattern, other than the special pattern
characters described below, matches itself.
strings instead of a single long string, may be faster.
</p>
<hr>
-<a name="Quote-Removal"></a>
-<div class="header">
+<span id="Quote-Removal"></span><div class="header">
<p>
Previous: <a href="#Filename-Expansion" accesskey="p" rel="prev">Filename Expansion</a>, Up: <a href="#Shell-Expansions" accesskey="u" rel="up">Shell Expansions</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Quote-Removal-1"></a>
-<h4 class="subsection">3.5.9 Quote Removal</h4>
+<span id="Quote-Removal-1"></span><h4 class="subsection">3.5.9 Quote Removal</h4>
<p>After the preceding expansions, all unquoted occurrences of the
characters ‘<samp>\</samp>’, ‘<samp>'</samp>’, and ‘<samp>"</samp>’ that did not
result from one of the above expansions are removed.
</p>
<hr>
-<a name="Redirections"></a>
-<div class="header">
+<span id="Redirections"></span><div class="header">
<p>
Next: <a href="#Executing-Commands" accesskey="n" rel="next">Executing Commands</a>, Previous: <a href="#Shell-Expansions" accesskey="p" rel="prev">Shell Expansions</a>, Up: <a href="#Basic-Shell-Features" accesskey="u" rel="up">Basic Shell Features</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Redirections-1"></a>
-<h3 class="section">3.6 Redirections</h3>
-<a name="index-redirection"></a>
+<span id="Redirections-1"></span><h3 class="section">3.6 Redirections</h3>
+<span id="index-redirection"></span>
<p>Before a command is executed, its input and output
may be <var>redirected</var>
descriptor to close.
If {<var>varname</var>} is supplied, the redirection persists beyond
the scope of the command, allowing the shell programmer to manage
-the file descriptor himself.
+the file descriptor’s lifetime manually.
</p>
<p>In the following descriptions, if the file descriptor number is
omitted, and the first character of the redirection operator is
care, as they may conflict with file descriptors the shell uses
internally.
</p>
-<a name="Redirecting-Input"></a>
-<h4 class="subsection">3.6.1 Redirecting Input</h4>
+<span id="Redirecting-Input"></span><h4 class="subsection">3.6.1 Redirecting Input</h4>
<p>Redirection of input causes the file whose name results from
the expansion of <var>word</var>
to be opened for reading on file descriptor <code>n</code>,
<pre class="example">[<var>n</var>]<<var>word</var>
</pre></div>
-<a name="Redirecting-Output"></a>
-<h4 class="subsection">3.6.2 Redirecting Output</h4>
+<span id="Redirecting-Output"></span><h4 class="subsection">3.6.2 Redirecting Output</h4>
<p>Redirection of output causes the file whose name results from
the expansion of <var>word</var>
to be opened for writing on file descriptor <var>n</var>,
‘<samp>></samp>’ and the <code>noclobber</code> option is not enabled, the redirection
is attempted even if the file named by <var>word</var> exists.
</p>
-<a name="Appending-Redirected-Output"></a>
-<h4 class="subsection">3.6.3 Appending Redirected Output</h4>
+<span id="Appending-Redirected-Output"></span><h4 class="subsection">3.6.3 Appending Redirected Output</h4>
<p>Redirection of output in this fashion
causes the file whose name results from
the expansion of <var>word</var>
<pre class="example">[<var>n</var>]>><var>word</var>
</pre></div>
-<a name="Redirecting-Standard-Output-and-Standard-Error"></a>
-<h4 class="subsection">3.6.4 Redirecting Standard Output and Standard Error</h4>
+<span id="Redirecting-Standard-Output-and-Standard-Error"></span><h4 class="subsection">3.6.4 Redirecting Standard Output and Standard Error</h4>
<p>This construct allows both the
standard output (file descriptor 1) and
the standard error output (file descriptor 2)
‘<samp>-</samp>’. If it does, other redirection operators apply
(see Duplicating File Descriptors below) for compatibility reasons.
</p>
-<a name="Appending-Standard-Output-and-Standard-Error"></a>
-<h4 class="subsection">3.6.5 Appending Standard Output and Standard Error</h4>
+<span id="Appending-Standard-Output-and-Standard-Error"></span><h4 class="subsection">3.6.5 Appending Standard Output and Standard Error</h4>
<p>This construct allows both the
standard output (file descriptor 1) and
the standard error output (file descriptor 2)
</pre></div>
<p>(see Duplicating File Descriptors below).
</p>
-<a name="Here-Documents"></a>
-<h4 class="subsection">3.6.6 Here Documents</h4>
+<span id="Here-Documents"></span><h4 class="subsection">3.6.6 Here Documents</h4>
<p>This type of redirection instructs the shell to read input from the
current source until a line containing only <var>word</var>
(with no trailing blanks) is seen. All of
This allows here-documents within shell scripts to be indented in a
natural fashion.
</p>
-<a name="Here-Strings"></a>
-<h4 class="subsection">3.6.7 Here Strings</h4>
+<span id="Here-Strings"></span><h4 class="subsection">3.6.7 Here Strings</h4>
<p>A variant of here documents, the format is:
</p><div class="example">
<pre class="example">[<var>n</var>]<<< <var>word</var>
<p>The <var>word</var> undergoes
tilde expansion, parameter and variable expansion,
command substitution, arithmetic expansion, and quote removal.
-Pathname expansion and word splitting are not performed.
+Filename expansion and word splitting are not performed.
The result is supplied as a single string,
with a newline appended,
to the command on its
standard input (or file descriptor <var>n</var> if <var>n</var> is specified).
</p>
-<a name="Duplicating-File-Descriptors"></a>
-<h4 class="subsection">3.6.8 Duplicating File Descriptors</h4>
+<span id="Duplicating-File-Descriptors"></span><h4 class="subsection">3.6.8 Duplicating File Descriptors</h4>
<p>The redirection operator
</p><div class="example">
<pre class="example">[<var>n</var>]<&<var>word</var>
expand to one or more digits or ‘<samp>-</samp>’, the standard output and standard
error are redirected as described previously.
</p>
-<a name="Moving-File-Descriptors"></a>
-<h4 class="subsection">3.6.9 Moving File Descriptors</h4>
+<span id="Moving-File-Descriptors"></span><h4 class="subsection">3.6.9 Moving File Descriptors</h4>
<p>The redirection operator
</p><div class="example">
<pre class="example">[<var>n</var>]<&<var>digit</var>-
<p>moves the file descriptor <var>digit</var> to file descriptor <var>n</var>,
or the standard output (file descriptor 1) if <var>n</var> is not specified.
</p>
-<a name="Opening-File-Descriptors-for-Reading-and-Writing"></a>
-<h4 class="subsection">3.6.10 Opening File Descriptors for Reading and Writing</h4>
+<span id="Opening-File-Descriptors-for-Reading-and-Writing"></span><h4 class="subsection">3.6.10 Opening File Descriptors for Reading and Writing</h4>
<p>The redirection operator
</p><div class="example">
<pre class="example">[<var>n</var>]<><var>word</var>
is not specified. If the file does not exist, it is created.
</p>
<hr>
-<a name="Executing-Commands"></a>
-<div class="header">
+<span id="Executing-Commands"></span><div class="header">
<p>
Next: <a href="#Shell-Scripts" accesskey="n" rel="next">Shell Scripts</a>, Previous: <a href="#Redirections" accesskey="p" rel="prev">Redirections</a>, Up: <a href="#Basic-Shell-Features" accesskey="u" rel="up">Basic Shell Features</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Executing-Commands-1"></a>
-<h3 class="section">3.7 Executing Commands</h3>
+<span id="Executing-Commands-1"></span><h3 class="section">3.7 Executing Commands</h3>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Simple-Command-Expansion" accesskey="1">Simple Command Expansion</a>:</td><td> </td><td align="left" valign="top">How Bash expands simple commands before
+<tr><td align="left" valign="top">• <a href="#Simple-Command-Expansion" accesskey="1">Simple Command Expansion</a></td><td> </td><td align="left" valign="top">How Bash expands simple commands before
executing them.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Command-Search-and-Execution" accesskey="2">Command Search and Execution</a>:</td><td> </td><td align="left" valign="top">How Bash finds commands and runs them.
+<tr><td align="left" valign="top">• <a href="#Command-Search-and-Execution" accesskey="2">Command Search and Execution</a></td><td> </td><td align="left" valign="top">How Bash finds commands and runs them.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Command-Execution-Environment" accesskey="3">Command Execution Environment</a>:</td><td> </td><td align="left" valign="top">The environment in which Bash
+<tr><td align="left" valign="top">• <a href="#Command-Execution-Environment" accesskey="3">Command Execution Environment</a></td><td> </td><td align="left" valign="top">The environment in which Bash
executes commands that are not
shell builtins.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Environment" accesskey="4">Environment</a>:</td><td> </td><td align="left" valign="top">The environment given to a command.
+<tr><td align="left" valign="top">• <a href="#Environment" accesskey="4">Environment</a></td><td> </td><td align="left" valign="top">The environment given to a command.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Exit-Status" accesskey="5">Exit Status</a>:</td><td> </td><td align="left" valign="top">The status returned by commands and how Bash
+<tr><td align="left" valign="top">• <a href="#Exit-Status" accesskey="5">Exit Status</a></td><td> </td><td align="left" valign="top">The status returned by commands and how Bash
interprets it.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Signals" accesskey="6">Signals</a>:</td><td> </td><td align="left" valign="top">What happens when Bash or a command it runs
+<tr><td align="left" valign="top">• <a href="#Signals" accesskey="6">Signals</a></td><td> </td><td align="left" valign="top">What happens when Bash or a command it runs
receives a signal.
</td></tr>
</table>
<hr>
-<a name="Simple-Command-Expansion"></a>
-<div class="header">
+<span id="Simple-Command-Expansion"></span><div class="header">
<p>
Next: <a href="#Command-Search-and-Execution" accesskey="n" rel="next">Command Search and Execution</a>, Up: <a href="#Executing-Commands" accesskey="u" rel="up">Executing Commands</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Simple-Command-Expansion-1"></a>
-<h4 class="subsection">3.7.1 Simple Command Expansion</h4>
-<a name="index-command-expansion"></a>
+<span id="Simple-Command-Expansion-1"></span><h4 class="subsection">3.7.1 Simple Command Expansion</h4>
+<span id="index-command-expansion"></span>
<p>When a simple command is executed, the shell performs the following
-expansions, assignments, and redirections, from left to right.
+expansions, assignments, and redirections, from left to right, in
+the following order.
</p>
<ol>
<li> The words that the parser has marked as variable assignments (those
were no command substitutions, the command exits with a status of zero.
</p>
<hr>
-<a name="Command-Search-and-Execution"></a>
-<div class="header">
+<span id="Command-Search-and-Execution"></span><div class="header">
<p>
Next: <a href="#Command-Execution-Environment" accesskey="n" rel="next">Command Execution Environment</a>, Previous: <a href="#Simple-Command-Expansion" accesskey="p" rel="prev">Simple Command Expansion</a>, Up: <a href="#Executing-Commands" accesskey="u" rel="up">Executing Commands</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Command-Search-and-Execution-1"></a>
-<h4 class="subsection">3.7.2 Command Search and Execution</h4>
-<a name="index-command-execution"></a>
-<a name="index-command-search"></a>
+<span id="Command-Search-and-Execution-1"></span><h4 class="subsection">3.7.2 Command Search and Execution</h4>
+<span id="index-command-execution"></span>
+<span id="index-command-search"></span>
<p>After a command has been split into words, if it results in a
simple command and an optional list of arguments, the following
</li></ol>
<hr>
-<a name="Command-Execution-Environment"></a>
-<div class="header">
+<span id="Command-Execution-Environment"></span><div class="header">
<p>
Next: <a href="#Environment" accesskey="n" rel="next">Environment</a>, Previous: <a href="#Command-Search-and-Execution" accesskey="p" rel="prev">Command Search and Execution</a>, Up: <a href="#Executing-Commands" accesskey="u" rel="up">Executing Commands</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Command-Execution-Environment-1"></a>
-<h4 class="subsection">3.7.3 Command Execution Environment</h4>
-<a name="index-execution-environment"></a>
+<span id="Command-Execution-Environment-1"></span><h4 class="subsection">3.7.3 Command Execution Environment</h4>
+<span id="index-execution-environment"></span>
<p>The shell has an <var>execution environment</var>, which consists of the
following:
shell as modified by redirections.
</p>
<hr>
-<a name="Environment"></a>
-<div class="header">
+<span id="Environment"></span><div class="header">
<p>
Next: <a href="#Exit-Status" accesskey="n" rel="next">Exit Status</a>, Previous: <a href="#Command-Execution-Environment" accesskey="p" rel="prev">Command Execution Environment</a>, Up: <a href="#Executing-Commands" accesskey="u" rel="up">Executing Commands</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Environment-1"></a>
-<h4 class="subsection">3.7.4 Environment</h4>
-<a name="index-environment"></a>
+<span id="Environment-1"></span><h4 class="subsection">3.7.4 Environment</h4>
+<span id="index-environment"></span>
<p>When a program is invoked it is given an array of strings
called the <var>environment</var>.
command in its environment.
</p>
<hr>
-<a name="Exit-Status"></a>
-<div class="header">
+<span id="Exit-Status"></span><div class="header">
<p>
Next: <a href="#Signals" accesskey="n" rel="next">Signals</a>, Previous: <a href="#Environment" accesskey="p" rel="prev">Environment</a>, Up: <a href="#Executing-Commands" accesskey="u" rel="up">Executing Commands</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Exit-Status-1"></a>
-<h4 class="subsection">3.7.5 Exit Status</h4>
-<a name="index-exit-status-1"></a>
+<span id="Exit-Status-1"></span><h4 class="subsection">3.7.5 Exit Status</h4>
+<span id="index-exit-status-1"></span>
<p>The exit status of an executed command is the value returned by the
<var>waitpid</var> system call or equivalent function. Exit statuses
generally invalid options or missing arguments.
</p>
<hr>
-<a name="Signals"></a>
-<div class="header">
+<span id="Signals"></span><div class="header">
<p>
Previous: <a href="#Exit-Status" accesskey="p" rel="prev">Exit Status</a>, Up: <a href="#Executing-Commands" accesskey="u" rel="up">Executing Commands</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Signals-1"></a>
-<h4 class="subsection">3.7.6 Signals</h4>
-<a name="index-signal-handling"></a>
+<span id="Signals-1"></span><h4 class="subsection">3.7.6 Signals</h4>
+<span id="index-signal-handling"></span>
<p>When Bash is interactive, in the absence of any traps, it ignores
<code>SIGTERM</code> (so that ‘<samp>kill 0</samp>’ does not kill an interactive shell),
which the trap is executed.
</p>
<hr>
-<a name="Shell-Scripts"></a>
-<div class="header">
+<span id="Shell-Scripts"></span><div class="header">
<p>
Previous: <a href="#Executing-Commands" accesskey="p" rel="prev">Executing Commands</a>, Up: <a href="#Basic-Shell-Features" accesskey="u" rel="up">Basic Shell Features</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Shell-Scripts-1"></a>
-<h3 class="section">3.8 Shell Scripts</h3>
-<a name="index-shell-script"></a>
+<span id="Shell-Scripts-1"></span><h3 class="section">3.8 Shell Scripts</h3>
+<span id="index-shell-script"></span>
<p>A shell script is a text file containing shell commands. When such
a file is used as the first non-option argument when invoking Bash,
<p>Most versions of Unix make this a part of the operating system’s command
execution mechanism. If the first line of a script begins with
the two characters ‘<samp>#!</samp>’, the remainder of the line specifies
-an interpreter for the program.
+an interpreter for the program and, depending on the operating system, one
+or more optional arguments for that interpreter.
Thus, you can specify Bash, <code>awk</code>, Perl, or some other
interpreter and write the rest of the script file in that language.
</p>
<p>The arguments to the interpreter
-consist of a single optional argument following the interpreter
+consist of one or more optional arguments following the interpreter
name on the first line of the script file, followed by the name of
-the script file, followed by the rest of the arguments. Bash
-will perform this action on operating systems that do not handle it
-themselves. Note that some older versions of Unix limit the interpreter
-name and argument to a maximum of 32 characters.
+the script file, followed by the rest of the arguments supplied to the
+script.
+The details of how the interpreter line is split into an interpreter name
+and a set of arguments vary across systems.
+Bash will perform this action on operating systems that do not handle it
+themselves.
+Note that some older versions of Unix limit the interpreter
+name and a single argument to a maximum of 32 characters, so it’s not
+portable to assume that using more than one argument will work.
</p>
<p>Bash scripts often begin with <code>#! /bin/bash</code> (assuming that
Bash has been installed in <samp>/bin</samp>), since this ensures that
Bash will be used to interpret the script, even if it is executed
-under another shell.
+under another shell. It’s a common idiom to use <code>env</code> to find
+<code>bash</code> even if it’s been installed in another directory:
+<code>#!/usr/bin/env bash</code> will find the first occurrence of <code>bash</code>
+in <code>$PATH</code>.
</p>
<hr>
-<a name="Shell-Builtin-Commands"></a>
-<div class="header">
+<span id="Shell-Builtin-Commands"></span><div class="header">
<p>
Next: <a href="#Shell-Variables" accesskey="n" rel="next">Shell Variables</a>, Previous: <a href="#Basic-Shell-Features" accesskey="p" rel="prev">Basic Shell Features</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Shell-Builtin-Commands-1"></a>
-<h2 class="chapter">4 Shell Builtin Commands</h2>
+<span id="Shell-Builtin-Commands-1"></span><h2 class="chapter">4 Shell Builtin Commands</h2>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Bourne-Shell-Builtins" accesskey="1">Bourne Shell Builtins</a>:</td><td> </td><td align="left" valign="top">Builtin commands inherited from the Bourne
+<tr><td align="left" valign="top">• <a href="#Bourne-Shell-Builtins" accesskey="1">Bourne Shell Builtins</a></td><td> </td><td align="left" valign="top">Builtin commands inherited from the Bourne
Shell.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Bash-Builtins" accesskey="2">Bash Builtins</a>:</td><td> </td><td align="left" valign="top">Table of builtins specific to Bash.
+<tr><td align="left" valign="top">• <a href="#Bash-Builtins" accesskey="2">Bash Builtins</a></td><td> </td><td align="left" valign="top">Table of builtins specific to Bash.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Modifying-Shell-Behavior" accesskey="3">Modifying Shell Behavior</a>:</td><td> </td><td align="left" valign="top">Builtins to modify shell attributes and
+<tr><td align="left" valign="top">• <a href="#Modifying-Shell-Behavior" accesskey="3">Modifying Shell Behavior</a></td><td> </td><td align="left" valign="top">Builtins to modify shell attributes and
optional behavior.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Special-Builtins" accesskey="4">Special Builtins</a>:</td><td> </td><td align="left" valign="top">Builtin commands classified specially by
+<tr><td align="left" valign="top">• <a href="#Special-Builtins" accesskey="4">Special Builtins</a></td><td> </td><td align="left" valign="top">Builtin commands classified specially by
POSIX.
</td></tr>
</table>
require ‘<samp>--</samp>’ to prevent this interpretation.
</p>
<hr>
-<a name="Bourne-Shell-Builtins"></a>
-<div class="header">
+<span id="Bourne-Shell-Builtins"></span><div class="header">
<p>
Next: <a href="#Bash-Builtins" accesskey="n" rel="next">Bash Builtins</a>, Up: <a href="#Shell-Builtin-Commands" accesskey="u" rel="up">Shell Builtin Commands</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Bourne-Shell-Builtins-1"></a>
-<h3 class="section">4.1 Bourne Shell Builtins</h3>
+<span id="Bourne-Shell-Builtins-1"></span><h3 class="section">4.1 Bourne Shell Builtins</h3>
<p>The following shell builtin commands are inherited from the Bourne Shell.
These commands are implemented as specified by the <small>POSIX</small> standard.
</p>
<dl compact="compact">
<dt><code>: <span class="roman">(a colon)</span></code></dt>
-<dd><a name="index-_003a"></a>
+<dd><span id="index-_003a"></span>
<div class="example">
<pre class="example">: [<var>arguments</var>]
</pre></div>
</p>
</dd>
<dt><code>. <span class="roman">(a period)</span></code></dt>
-<dd><a name="index-_002e"></a>
+<dd><span id="index-_002e"></span>
<div class="example">
<pre class="example">. <var>filename</var> [<var>arguments</var>]
</pre></div>
</p>
</dd>
<dt><code>break</code></dt>
-<dd><a name="index-break"></a>
+<dd><span id="index-break"></span>
<div class="example">
<pre class="example">break [<var>n</var>]
</pre></div>
</p>
</dd>
<dt><code>cd</code></dt>
-<dd><a name="index-cd"></a>
+<dd><span id="index-cd"></span>
<div class="example">
<pre class="example">cd [-L|[-P [-e]] [-@] [<var>directory</var>]
</pre></div>
</p>
</dd>
<dt><code>continue</code></dt>
-<dd><a name="index-continue"></a>
+<dd><span id="index-continue"></span>
<div class="example">
<pre class="example">continue [<var>n</var>]
</pre></div>
</p>
</dd>
<dt><code>eval</code></dt>
-<dd><a name="index-eval"></a>
+<dd><span id="index-eval"></span>
<div class="example">
<pre class="example">eval [<var>arguments</var>]
</pre></div>
</p>
</dd>
<dt><code>exec</code></dt>
-<dd><a name="index-exec"></a>
+<dd><span id="index-exec"></span>
<div class="example">
<pre class="example">exec [-cl] [-a <var>name</var>] [<var>command</var> [<var>arguments</var>]]
</pre></div>
</p>
</dd>
<dt><code>exit</code></dt>
-<dd><a name="index-exit"></a>
+<dd><span id="index-exit"></span>
<div class="example">
<pre class="example">exit [<var>n</var>]
</pre></div>
</p>
</dd>
<dt><code>export</code></dt>
-<dd><a name="index-export"></a>
+<dd><span id="index-export"></span>
<div class="example">
<pre class="example">export [-fn] [-p] [<var>name</var>[=<var>value</var>]]
</pre></div>
</p>
</dd>
<dt><code>getopts</code></dt>
-<dd><a name="index-getopts"></a>
+<dd><span id="index-getopts"></span>
<div class="example">
-<pre class="example">getopts <var>optstring</var> <var>name</var> [<var>args</var>]
+<pre class="example">getopts <var>optstring</var> <var>name</var> [<var>arg</var> …]
</pre></div>
<p><code>getopts</code> is used by shell scripts to parse positional parameters.
</p>
<p><code>getopts</code>
normally parses the positional parameters, but if more arguments are
-given in <var>args</var>, <code>getopts</code> parses those instead.
+supplied as <var>arg</var> values, <code>getopts</code> parses those instead.
</p>
<p><code>getopts</code> can report errors in two ways. If the first character of
<var>optstring</var> is a colon, <var>silent</var>
</p>
</dd>
<dt><code>hash</code></dt>
-<dd><a name="index-hash"></a>
+<dd><span id="index-hash"></span>
<div class="example">
<pre class="example">hash [-r] [-p <var>filename</var>] [-dt] [<var>name</var>]
</pre></div>
</p>
</dd>
<dt><code>pwd</code></dt>
-<dd><a name="index-pwd"></a>
+<dd><span id="index-pwd"></span>
<div class="example">
<pre class="example">pwd [-LP]
</pre></div>
</p>
</dd>
<dt><code>readonly</code></dt>
-<dd><a name="index-readonly"></a>
+<dd><span id="index-readonly"></span>
<div class="example">
<pre class="example">readonly [-aAf] [-p] [<var>name</var>[=<var>value</var>]] …
</pre></div>
</p>
</dd>
<dt><code>return</code></dt>
-<dd><a name="index-return"></a>
+<dd><span id="index-return"></span>
<div class="example">
<pre class="example">return [<var>n</var>]
</pre></div>
</p>
</dd>
<dt><code>shift</code></dt>
-<dd><a name="index-shift"></a>
+<dd><span id="index-shift"></span>
<div class="example">
<pre class="example">shift [<var>n</var>]
</pre></div>
<p>Shift the positional parameters to the left by <var>n</var>.
The positional parameters from <var>n</var>+1 … <code>$#</code> are
renamed to <code>$1</code> … <code>$#</code>-<var>n</var>.
-Parameters represented by the numbers <code>$#</code> to <code>$#</code>-<var>n</var>+1
+Parameters represented by the numbers <code>$#</code> down to <code>$#</code>-<var>n</var>+1
are unset.
<var>n</var> must be a non-negative number less than or equal to <code>$#</code>.
If <var>n</var> is zero or greater than <code>$#</code>, the positional parameters
</dd>
<dt><code>test</code></dt>
<dt><code>[</code></dt>
-<dd><a name="index-test"></a>
-<a name="index-_005b"></a>
+<dd><span id="index-test"></span>
+<span id="index-_005b"></span>
<div class="example">
<pre class="example">test <var>expr</var>
</pre></div>
</p>
</dd>
<dt><code>times</code></dt>
-<dd><a name="index-times"></a>
+<dd><span id="index-times"></span>
<div class="example">
<pre class="example">times
</pre></div>
</p>
</dd>
<dt><code>trap</code></dt>
-<dd><a name="index-trap"></a>
+<dd><span id="index-trap"></span>
<div class="example">
<pre class="example">trap [-lp] [<var>arg</var>] [<var>sigspec</var> …]
</pre></div>
</p>
</dd>
<dt><code>umask</code></dt>
-<dd><a name="index-umask"></a>
+<dd><span id="index-umask"></span>
<div class="example">
<pre class="example">umask [-p] [-S] [<var>mode</var>]
</pre></div>
</p>
</dd>
<dt><code>unset</code></dt>
-<dd><a name="index-unset"></a>
+<dd><span id="index-unset"></span>
<div class="example">
<pre class="example">unset [-fnv] [<var>name</var>]
</pre></div>
variable it references.
<samp>-n</samp> has no effect if the <samp>-f</samp> option is supplied.
If no options are supplied, each <var>name</var> refers to a variable; if
-there is no variable by that name, any function with that name is
+there is no variable by that name, a function with that name, if any, is
unset.
Readonly variables and functions may not be unset.
+Some shell variables lose their special behavior if they are unset; such
+behavior is noted in the description of the individual variables.
The return status is zero unless a <var>name</var> is readonly.
</p></dd>
</dl>
<hr>
-<a name="Bash-Builtins"></a>
-<div class="header">
+<span id="Bash-Builtins"></span><div class="header">
<p>
Next: <a href="#Modifying-Shell-Behavior" accesskey="n" rel="next">Modifying Shell Behavior</a>, Previous: <a href="#Bourne-Shell-Builtins" accesskey="p" rel="prev">Bourne Shell Builtins</a>, Up: <a href="#Shell-Builtin-Commands" accesskey="u" rel="up">Shell Builtin Commands</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Bash-Builtin-Commands"></a>
-<h3 class="section">4.2 Bash Builtin Commands</h3>
+<span id="Bash-Builtin-Commands"></span><h3 class="section">4.2 Bash Builtin Commands</h3>
<p>This section describes builtin commands which are unique to
or have been extended in Bash.
</p>
<dl compact="compact">
<dt><code>alias</code></dt>
-<dd><a name="index-alias"></a>
+<dd><span id="index-alias"></span>
<div class="example">
<pre class="example">alias [-p] [<var>name</var>[=<var>value</var>] …]
</pre></div>
</p>
</dd>
<dt><code>bind</code></dt>
-<dd><a name="index-bind"></a>
+<dd><span id="index-bind"></span>
<div class="example">
<pre class="example">bind [-m <var>keymap</var>] [-lpsvPSVX]
bind [-m <var>keymap</var>] [-q <var>function</var>] [-u <var>function</var>] [-r <var>keyseq</var>]
entered.
When <var>shell-command</var> is executed, the shell sets the
<code>READLINE_LINE</code> variable to the contents of the Readline line
-buffer and the <code>READLINE_POINT</code> variable to the current location
-of the insertion point.
-If the executed command changes the value of <code>READLINE_LINE</code> or
-<code>READLINE_POINT</code>, those new values will be reflected in the
-editing state.
+buffer and the <code>READLINE_POINT</code> and <code>READLINE_MARK</code> variables
+to the current location of the insertion point and the saved insertion
+point (the <var>mark</var>), respectively.
+If the executed command changes the value of any of <code>READLINE_LINE</code>,
+<code>READLINE_POINT</code>, or <code>READLINE_MARK</code>, those new values will be
+reflected in the editing state.
</p>
</dd>
<dt><code>-X</code></dt>
</p>
</dd>
<dt><code>builtin</code></dt>
-<dd><a name="index-builtin"></a>
+<dd><span id="index-builtin"></span>
<div class="example">
<pre class="example">builtin [<var>shell-builtin</var> [<var>args</var>]]
</pre></div>
</p>
</dd>
<dt><code>caller</code></dt>
-<dd><a name="index-caller"></a>
+<dd><span id="index-caller"></span>
<div class="example">
<pre class="example">caller [<var>expr</var>]
</pre></div>
</p>
</dd>
<dt><code>command</code></dt>
-<dd><a name="index-command"></a>
+<dd><span id="index-command"></span>
<div class="example">
<pre class="example">command [-pVv] <var>command</var> [<var>arguments</var> …]
</pre></div>
</p>
</dd>
<dt><code>declare</code></dt>
-<dd><a name="index-declare"></a>
+<dd><span id="index-declare"></span>
<div class="example">
-<pre class="example">declare [-aAfFgilnrtux] [-p] [<var>name</var>[=<var>value</var>] …]
+<pre class="example">declare [-aAfFgiIlnrtux] [-p] [<var>name</var>[=<var>value</var>] …]
</pre></div>
<p>Declare variables and give them attributes. If no <var>name</var>s
the global scope, even when <code>declare</code> is executed in a shell function.
It is ignored in all other cases.
</p>
+<p>The <samp>-I</samp> option causes local variables to inherit the attributes
+(except the <var>nameref</var> attribute)
+and value of any existing variable with the same
+<var>name</var> at a surrounding scope.
+If there is no existing variable, the local variable is initially unset.
+</p>
<p>The following options can be used to restrict output to variables with
the specified attributes or to give variables attributes:
</p>
</p>
</dd>
<dt><code>echo</code></dt>
-<dd><a name="index-echo"></a>
+<dd><span id="index-echo"></span>
<div class="example">
<pre class="example">echo [-neE] [<var>arg</var> …]
</pre></div>
</dd>
<dt><code>enable</code></dt>
-<dd><a name="index-enable"></a>
+<dd><span id="index-enable"></span>
<div class="example">
<pre class="example">enable [-a] [-dnps] [-f <var>filename</var>] [<var>name</var> …]
</pre></div>
</p>
</dd>
<dt><code>help</code></dt>
-<dd><a name="index-help"></a>
+<dd><span id="index-help"></span>
<div class="example">
<pre class="example">help [-dms] [<var>pattern</var>]
</pre></div>
</p>
</dd>
<dt><code>let</code></dt>
-<dd><a name="index-let"></a>
+<dd><span id="index-let"></span>
<div class="example">
<pre class="example">let <var>expression</var> [<var>expression</var> …]
</pre></div>
</p>
</dd>
<dt><code>local</code></dt>
-<dd><a name="index-local"></a>
+<dd><span id="index-local"></span>
<div class="example">
<pre class="example">local [<var>option</var>] <var>name</var>[=<var>value</var>] …
</pre></div>
function in which <code>local</code> is invoked: shell options changed using
the <code>set</code> builtin inside the function are restored to their original
values when the function returns.
+The restore is effected as if a series of <code>set</code> commands were executed
+to restore the values that were in place before the function.
The return status is zero unless <code>local</code> is used outside
a function, an invalid <var>name</var> is supplied, or <var>name</var> is a
readonly variable.
</p>
</dd>
<dt><code>logout</code></dt>
-<dd><a name="index-logout"></a>
+<dd><span id="index-logout"></span>
<div class="example">
<pre class="example">logout [<var>n</var>]
</pre></div>
</p>
</dd>
<dt><code>mapfile</code></dt>
-<dd><a name="index-mapfile"></a>
+<dd><span id="index-mapfile"></span>
<div class="example">
<pre class="example">mapfile [-d <var>delim</var>] [-n <var>count</var>] [-O <var>origin</var>] [-s <var>count</var>]
[-t] [-u <var>fd</var>] [-C <var>callback</var>] [-c <var>quantum</var>] [<var>array</var>]
</p>
</dd>
<dt><code>printf</code></dt>
-<dd><a name="index-printf"></a>
+<dd><span id="index-printf"></span>
<div class="example">
<pre class="example">printf [-v <var>var</var>] <var>format</var> [<var>arguments</var>]
</pre></div>
</p></dd>
</dl>
+<p>The %b, %q, and %T directives all use the field width and precision
+arguments from the format specification and write that many bytes from
+(or use that wide a field for) the expanded argument, which usually
+contains more characters than the original.
+</p>
<p>Arguments to non-string format specifiers are treated as C language constants,
except that a leading plus or minus sign is allowed, and if the leading
character is a single or double quote, the value is the ASCII value of
</p>
</dd>
<dt><code>read</code></dt>
-<dd><a name="index-read"></a>
+<dd><span id="index-read"></span>
<div class="example">
<pre class="example">read [-ers] [-a <var>aname</var>] [-d <var>delim</var>] [-i <var>text</var>] [-n <var>nchars</var>]
[-N <var>nchars</var>] [-p <var>prompt</var>] [-t <var>timeout</var>] [-u <var>fd</var>] [<var>name</var> …]
uses for expansion (described above in <a href="#Word-Splitting">Word Splitting</a>).
The backslash character ‘<samp>\</samp>’ may be used to remove any special
meaning for the next character read and for line continuation.
-If no names are supplied, the line read is assigned to the
-variable <code>REPLY</code>.
-The exit status is zero, unless end-of-file is encountered, <code>read</code>
-times out (in which case the status is greater than 128),
-a variable assignment error (such as assigning to a readonly variable) occurs,
-or an invalid file descriptor is supplied as the argument to <samp>-u</samp>.
</p>
<p>Options, if supplied, have the following meanings:
</p>
If <code>read</code> times out, <code>read</code> saves any partial input read into
the specified variable <var>name</var>.
If <var>timeout</var> is 0, <code>read</code> returns immediately, without trying to
-read and data. The exit status is 0 if input is available on
+read any data. The exit status is 0 if input is available on
the specified file descriptor, non-zero otherwise.
The exit status is greater than 128 if the timeout is exceeded.
</p>
</p></dd>
</dl>
+<p>If no <var>name</var>s are supplied, the line read,
+without the ending delimiter but otherwise unmodified,
+is assigned to the
+variable <code>REPLY</code>.
+The exit status is zero, unless end-of-file is encountered, <code>read</code>
+times out (in which case the status is greater than 128),
+a variable assignment error (such as assigning to a readonly variable) occurs,
+or an invalid file descriptor is supplied as the argument to <samp>-u</samp>.
+</p>
</dd>
<dt><code>readarray</code></dt>
-<dd><a name="index-readarray"></a>
+<dd><span id="index-readarray"></span>
<div class="example">
<pre class="example">readarray [-d <var>delim</var>] [-n <var>count</var>] [-O <var>origin</var>] [-s <var>count</var>]
[-t] [-u <var>fd</var>] [-C <var>callback</var>] [-c <var>quantum</var>] [<var>array</var>]
</p>
</dd>
<dt><code>source</code></dt>
-<dd><a name="index-source"></a>
+<dd><span id="index-source"></span>
<div class="example">
<pre class="example">source <var>filename</var>
</pre></div>
</p>
</dd>
<dt><code>type</code></dt>
-<dd><a name="index-type"></a>
+<dd><span id="index-type"></span>
<div class="example">
<pre class="example">type [-afptP] [<var>name</var> …]
</pre></div>
</p>
</dd>
<dt><code>typeset</code></dt>
-<dd><a name="index-typeset"></a>
+<dd><span id="index-typeset"></span>
<div class="example">
<pre class="example">typeset [-afFgrxilnrtux] [-p] [<var>name</var>[=<var>value</var>] …]
</pre></div>
</p>
</dd>
<dt><code>ulimit</code></dt>
-<dd><a name="index-ulimit"></a>
+<dd><span id="index-ulimit"></span>
<div class="example">
-<pre class="example">ulimit [-HSabcdefiklmnpqrstuvxPT] [<var>limit</var>]
+<pre class="example">ulimit [-HS] -a
+ulimit [-HS] [-bcdefiklmnpqrstuvxPRT] [<var>limit</var>]
</pre></div>
<p><code>ulimit</code> provides control over the resources available to processes
</p>
</dd>
<dt><code>-a</code></dt>
-<dd><p>All current limits are reported.
+<dd><p>All current limits are reported; no limits are set.
</p>
</dd>
<dt><code>-b</code></dt>
</p>
</dd>
<dt><code>-q</code></dt>
-<dd><p>The maximum number of bytes in POSIX message queues.
+<dd><p>The maximum number of bytes in <small>POSIX</small> message queues.
</p>
</dd>
<dt><code>-r</code></dt>
<dd><p>The maximum number of pseudoterminals.
</p>
</dd>
+<dt><code>-R</code></dt>
+<dd><p>The maximum time a real-time process can run before blocking, in microseconds.
+</p>
+</dd>
<dt><code>-T</code></dt>
<dd><p>The maximum number of threads.
</p></dd>
a soft limit may be increased up to the value of the hard limit.
Otherwise, the current value of the soft limit for the specified resource
is printed, unless the <samp>-H</samp> option is supplied.
+When more than one
+resource is specified, the limit name and unit, if appropriate,
+are printed before the value.
When setting new limits, if neither <samp>-H</samp> nor <samp>-S</samp> is supplied,
both the hard and soft limits are set.
If no option is given, then <samp>-f</samp> is assumed. Values are in 1024-byte
-increments, except for <samp>-t</samp>, which is in seconds; <samp>-p</samp>,
-which is in units of 512-byte blocks;
+increments, except for
+<samp>-t</samp>, which is in seconds;
+<samp>-R</samp>, which is in microseconds;
+<samp>-p</samp>, which is in units of 512-byte blocks;
<samp>-P</samp>,
<samp>-T</samp>,
<samp>-b</samp>,
</p>
</dd>
<dt><code>unalias</code></dt>
-<dd><a name="index-unalias"></a>
+<dd><span id="index-unalias"></span>
<div class="example">
<pre class="example">unalias [-a] [<var>name</var> … ]
</pre></div>
</dl>
<hr>
-<a name="Modifying-Shell-Behavior"></a>
-<div class="header">
+<span id="Modifying-Shell-Behavior"></span><div class="header">
<p>
Next: <a href="#Special-Builtins" accesskey="n" rel="next">Special Builtins</a>, Previous: <a href="#Bash-Builtins" accesskey="p" rel="prev">Bash Builtins</a>, Up: <a href="#Shell-Builtin-Commands" accesskey="u" rel="up">Shell Builtin Commands</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Modifying-Shell-Behavior-1"></a>
-<h3 class="section">4.3 Modifying Shell Behavior</h3>
+<span id="Modifying-Shell-Behavior-1"></span><h3 class="section">4.3 Modifying Shell Behavior</h3>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#The-Set-Builtin" accesskey="1">The Set Builtin</a>:</td><td> </td><td align="left" valign="top">Change the values of shell attributes and
+<tr><td align="left" valign="top">• <a href="#The-Set-Builtin" accesskey="1">The Set Builtin</a></td><td> </td><td align="left" valign="top">Change the values of shell attributes and
positional parameters.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#The-Shopt-Builtin" accesskey="2">The Shopt Builtin</a>:</td><td> </td><td align="left" valign="top">Modify shell optional behavior.
+<tr><td align="left" valign="top">• <a href="#The-Shopt-Builtin" accesskey="2">The Shopt Builtin</a></td><td> </td><td align="left" valign="top">Modify shell optional behavior.
</td></tr>
</table>
<hr>
-<a name="The-Set-Builtin"></a>
-<div class="header">
+<span id="The-Set-Builtin"></span><div class="header">
<p>
Next: <a href="#The-Shopt-Builtin" accesskey="n" rel="next">The Shopt Builtin</a>, Up: <a href="#Modifying-Shell-Behavior" accesskey="u" rel="up">Modifying Shell Behavior</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="The-Set-Builtin-1"></a>
-<h4 class="subsection">4.3.1 The Set Builtin</h4>
+<span id="The-Set-Builtin-1"></span><h4 class="subsection">4.3.1 The Set Builtin</h4>
<p>This builtin is so complicated that it deserves its own section. <code>set</code>
allows you to change the values of shell options and set the positional
</p>
<dl compact="compact">
<dt><code>set</code></dt>
-<dd><a name="index-set"></a>
+<dd><span id="index-set"></span>
<div class="example">
<pre class="example">set [--abefhkmnptuvxBCEHPT] [-o <var>option-name</var>] [<var>argument</var> …]
set [+abefhkmnptuvxBCEHPT] [+o <var>option-name</var>] [<var>argument</var> …]
</dl>
<hr>
-<a name="The-Shopt-Builtin"></a>
-<div class="header">
+<span id="The-Shopt-Builtin"></span><div class="header">
<p>
Previous: <a href="#The-Set-Builtin" accesskey="p" rel="prev">The Set Builtin</a>, Up: <a href="#Modifying-Shell-Behavior" accesskey="u" rel="up">Modifying Shell Behavior</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="The-Shopt-Builtin-1"></a>
-<h4 class="subsection">4.3.2 The Shopt Builtin</h4>
+<span id="The-Shopt-Builtin-1"></span><h4 class="subsection">4.3.2 The Shopt Builtin</h4>
<p>This builtin allows you to change additional shell optional behavior.
</p>
<dl compact="compact">
<dt><code>shopt</code></dt>
-<dd><a name="index-shopt"></a>
+<dd><span id="index-shopt"></span>
<div class="example">
<pre class="example">shopt [-pqsu] [-o] [<var>optname</var> …]
</pre></div>
</p>
</dd>
<dt><code>compat31</code></dt>
-<dd><p>If set, Bash
-changes its behavior to that of version 3.1 with respect to quoted
-arguments to the conditional command’s ‘<samp>=~</samp>’ operator
-and with respect to locale-specific
-string comparison when using the <code>[[</code>
-conditional command’s ‘<samp><</samp>’ and ‘<samp>></samp>’ operators.
-Bash versions prior to bash-4.1 use ASCII collation and strcmp(3);
-bash-4.1 and later use the current locale’s collation sequence and strcoll(3).
-</p>
-</dd>
<dt><code>compat32</code></dt>
-<dd><p>If set, Bash
-changes its behavior to that of version 3.2 with respect to locale-specific
-string comparison when using the <code>[[</code>
-conditional command’s ‘<samp><</samp>’ and ‘<samp>></samp>’ operators (see previous item)
-and the effect of interrupting a command list.
-Bash versions 3.2 and earlier continue with the next command in the list
-after one terminates due to an interrupt.
-</p>
-</dd>
<dt><code>compat40</code></dt>
-<dd><p>If set, Bash
-changes its behavior to that of version 4.0 with respect to locale-specific
-string comparison when using the <code>[[</code>
-conditional command’s ‘<samp><</samp>’ and ‘<samp>></samp>’ operators (see description
-of <code>compat31</code>)
-and the effect of interrupting a command list.
-Bash versions 4.0 and later interrupt the list as if the shell received the
-interrupt; previous versions continue with the next command in the list.
-</p>
-</dd>
<dt><code>compat41</code></dt>
-<dd><p>If set, Bash, when in <small>POSIX</small> mode, treats a single quote in a double-quoted
-parameter expansion as a special character. The single quotes must match
-(an even number) and the characters between the single quotes are considered
-quoted. This is the behavior of <small>POSIX</small> mode through version 4.1.
-The default Bash behavior remains as in previous versions.
-</p>
-</dd>
<dt><code>compat42</code></dt>
-<dd><p>If set, Bash
-does not process the replacement string in the pattern substitution word
-expansion using quote removal.
-</p>
-</dd>
<dt><code>compat43</code></dt>
-<dd><p>If set, Bash
-does not print a warning message if an attempt is made to use a quoted compound
-array assignment as an argument to <code>declare</code>,
-makes word expansion errors
-non-fatal errors that cause the current command to fail (the default behavior is
-to make them fatal errors that cause the shell to exit),
-and does not reset the
-loop state when a shell function is executed (this allows <code>break</code> or
-<code>continue</code> in a shell function to affect loops in the caller’s context).
-</p>
-</dd>
<dt><code>compat44</code></dt>
-<dd><p>If set, Bash
-saves the positional parameters to BASH_ARGV and BASH_ARGC before they are
-used, regardless of whether or not extended debugging mode is enabled.
+<dd><p>These control aspects of the shell’s compatibility mode
+(see <a href="#Shell-Compatibility-Mode">Shell Compatibility Mode</a>).
</p>
</dd>
<dt><code>complete_fullquote</code></dt>
</p>
</dd>
<dt><code>extdebug</code></dt>
-<dd><p>If set at shell invocation, arrange to execute the debugger profile
+<dd><p>If set at shell invocation,
+or in a shell startup file,
+arrange to execute the debugger profile
before the shell starts, identical to the <samp>--debugger</samp> option.
If set after invocation, behavior intended for use by debuggers is enabled:
</p>
</p>
</dd>
</dl>
-
-<p>The return status when listing options is zero if all <var>optnames</var>
-are enabled, non-zero otherwise.
-When setting or unsetting options, the return status is zero unless an
-<var>optname</var> is not a valid shell option.
-</p></dd>
+</dd>
</dl>
<hr>
-<a name="Special-Builtins"></a>
-<div class="header">
+<span id="Special-Builtins"></span><div class="header">
<p>
Previous: <a href="#Modifying-Shell-Behavior" accesskey="p" rel="prev">Modifying Shell Behavior</a>, Up: <a href="#Shell-Builtin-Commands" accesskey="u" rel="up">Shell Builtin Commands</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Special-Builtins-1"></a>
-<h3 class="section">4.4 Special Builtins</h3>
-<a name="index-special-builtin-1"></a>
+<span id="Special-Builtins-1"></span><h3 class="section">4.4 Special Builtins</h3>
+<span id="index-special-builtin-1"></span>
<p>For historical reasons, the <small>POSIX</small> standard has classified
several builtin commands as <em>special</em>.
</pre></div>
<hr>
-<a name="Shell-Variables"></a>
-<div class="header">
+<span id="Shell-Variables"></span><div class="header">
<p>
Next: <a href="#Bash-Features" accesskey="n" rel="next">Bash Features</a>, Previous: <a href="#Shell-Builtin-Commands" accesskey="p" rel="prev">Shell Builtin Commands</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Shell-Variables-1"></a>
-<h2 class="chapter">5 Shell Variables</h2>
+<span id="Shell-Variables-1"></span><h2 class="chapter">5 Shell Variables</h2>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Bourne-Shell-Variables" accesskey="1">Bourne Shell Variables</a>:</td><td> </td><td align="left" valign="top">Variables which Bash uses in the same way
+<tr><td align="left" valign="top">• <a href="#Bourne-Shell-Variables" accesskey="1">Bourne Shell Variables</a></td><td> </td><td align="left" valign="top">Variables which Bash uses in the same way
as the Bourne Shell.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Bash-Variables" accesskey="2">Bash Variables</a>:</td><td> </td><td align="left" valign="top">List of variables that exist in Bash.
+<tr><td align="left" valign="top">• <a href="#Bash-Variables" accesskey="2">Bash Variables</a></td><td> </td><td align="left" valign="top">List of variables that exist in Bash.
</td></tr>
</table>
Bash automatically assigns default values to a number of variables.
</p>
<hr>
-<a name="Bourne-Shell-Variables"></a>
-<div class="header">
+<span id="Bourne-Shell-Variables"></span><div class="header">
<p>
Next: <a href="#Bash-Variables" accesskey="n" rel="next">Bash Variables</a>, Up: <a href="#Shell-Variables" accesskey="u" rel="up">Shell Variables</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Bourne-Shell-Variables-1"></a>
-<h3 class="section">5.1 Bourne Shell Variables</h3>
+<span id="Bourne-Shell-Variables-1"></span><h3 class="section">5.1 Bourne Shell Variables</h3>
<p>Bash uses certain shell variables in the same way as the Bourne shell.
In some cases, Bash assigns a default value to the variable.
</p>
<dl compact="compact">
<dt><code>CDPATH</code>
-<a name="index-CDPATH"></a>
+<span id="index-CDPATH"></span>
</dt>
<dd><p>A colon-separated list of directories used as a search path for
the <code>cd</code> builtin command.
</p>
</dd>
<dt><code>HOME</code>
-<a name="index-HOME"></a>
+<span id="index-HOME"></span>
</dt>
<dd><p>The current user’s home directory; the default for the <code>cd</code> builtin
command.
</p>
</dd>
<dt><code>IFS</code>
-<a name="index-IFS"></a>
+<span id="index-IFS"></span>
</dt>
<dd><p>A list of characters that separate fields; used when the shell splits
words as part of expansion.
</p>
</dd>
<dt><code>MAIL</code>
-<a name="index-MAIL"></a>
+<span id="index-MAIL"></span>
</dt>
<dd><p>If this parameter is set to a filename or directory name
and the <code>MAILPATH</code> variable
</p>
</dd>
<dt><code>MAILPATH</code>
-<a name="index-MAILPATH"></a>
+<span id="index-MAILPATH"></span>
</dt>
<dd><p>A colon-separated list of filenames which the shell periodically checks
for new mail.
</p>
</dd>
<dt><code>OPTARG</code>
-<a name="index-OPTARG"></a>
+<span id="index-OPTARG"></span>
</dt>
<dd><p>The value of the last option argument processed by the <code>getopts</code> builtin.
</p>
</dd>
<dt><code>OPTIND</code>
-<a name="index-OPTIND"></a>
+<span id="index-OPTIND"></span>
</dt>
<dd><p>The index of the last option argument processed by the <code>getopts</code> builtin.
</p>
</dd>
<dt><code>PATH</code>
-<a name="index-PATH"></a>
+<span id="index-PATH"></span>
</dt>
<dd><p>A colon-separated list of directories in which the shell looks for
commands.
</p>
</dd>
<dt><code>PS1</code>
-<a name="index-PS1"></a>
+<span id="index-PS1"></span>
</dt>
<dd><p>The primary prompt string. The default value is ‘<samp>\s-\v\$ </samp>’.
See <a href="#Controlling-the-Prompt">Controlling the Prompt</a>, for the complete list of escape
</p>
</dd>
<dt><code>PS2</code>
-<a name="index-PS2"></a>
+<span id="index-PS2"></span>
</dt>
<dd><p>The secondary prompt string. The default value is ‘<samp>> </samp>’.
<code>PS2</code> is expanded in the same way as <code>PS1</code> before being
</dl>
<hr>
-<a name="Bash-Variables"></a>
-<div class="header">
+<span id="Bash-Variables"></span><div class="header">
<p>
Previous: <a href="#Bourne-Shell-Variables" accesskey="p" rel="prev">Bourne Shell Variables</a>, Up: <a href="#Shell-Variables" accesskey="u" rel="up">Shell Variables</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Bash-Variables-1"></a>
-<h3 class="section">5.2 Bash Variables</h3>
+<span id="Bash-Variables-1"></span><h3 class="section">5.2 Bash Variables</h3>
<p>These variables are set or used by Bash, but other shells
do not normally treat them specially.
(see <a href="#Job-Control-Variables">Job Control Variables</a>).
</p>
<dl compact="compact">
+<dt><code>_</code>
+<span id="index-_005f"></span>
+</dt>
+<dd><span id="index-_0024_005f"></span>
+<p>($_, an underscore.)
+At shell startup, set to the pathname used to invoke the
+shell or shell script being executed as passed in the environment
+or argument list.
+Subsequently, expands to the last argument to the previous simple
+command executed in the foreground, after expansion.
+Also set to the full pathname used to invoke each command executed
+and placed in the environment exported to that command.
+When checking mail, this parameter holds the name of the mail file.
+</p>
+</dd>
<dt><code>BASH</code>
-<a name="index-BASH"></a>
+<span id="index-BASH"></span>
</dt>
<dd><p>The full pathname used to execute the current instance of Bash.
</p>
</dd>
<dt><code>BASHOPTS</code>
-<a name="index-BASHOPTS"></a>
+<span id="index-BASHOPTS"></span>
</dt>
<dd><p>A colon-separated list of enabled shell options. Each word in
the list is a valid argument for the <samp>-s</samp> option to the
</p>
</dd>
<dt><code>BASHPID</code>
-<a name="index-BASHPID"></a>
+<span id="index-BASHPID"></span>
</dt>
<dd><p>Expands to the process ID of the current Bash process.
This differs from <code>$$</code> under certain circumstances, such as subshells
</p>
</dd>
<dt><code>BASH_ALIASES</code>
-<a name="index-BASH_005fALIASES"></a>
+<span id="index-BASH_005fALIASES"></span>
</dt>
<dd><p>An associative array variable whose members correspond to the internal
list of aliases as maintained by the <code>alias</code> builtin.
</p>
</dd>
<dt><code>BASH_ARGC</code>
-<a name="index-BASH_005fARGC"></a>
+<span id="index-BASH_005fARGC"></span>
</dt>
<dd><p>An array variable whose values are the number of parameters in each
frame of the current bash execution call stack. The number of
</p>
</dd>
<dt><code>BASH_ARGV</code>
-<a name="index-BASH_005fARGV"></a>
+<span id="index-BASH_005fARGV"></span>
</dt>
<dd><p>An array variable containing all of the parameters in the current bash
execution call stack. The final parameter of the last subroutine call
</p>
</dd>
<dt><code>BASH_ARGV0</code>
-<a name="index-BASH_005fARGV0"></a>
+<span id="index-BASH_005fARGV0"></span>
</dt>
<dd><p>When referenced, this variable expands to the name of the shell or shell
script (identical to <code>$0</code>; See <a href="#Special-Parameters">Special Parameters</a>,
</p>
</dd>
<dt><code>BASH_CMDS</code>
-<a name="index-BASH_005fCMDS"></a>
+<span id="index-BASH_005fCMDS"></span>
</dt>
<dd><p>An associative array variable whose members correspond to the internal
hash table of commands as maintained by the <code>hash</code> builtin
</p>
</dd>
<dt><code>BASH_COMMAND</code>
-<a name="index-BASH_005fCOMMAND"></a>
+<span id="index-BASH_005fCOMMAND"></span>
</dt>
<dd><p>The command currently being executed or about to be executed, unless the
shell is executing a command as the result of a trap,
in which case it is the command executing at the time of the trap.
+If <code>BASH_COMMAND</code>
+is unset, it loses its special properties, even if it is
+subsequently reset.
</p>
</dd>
<dt><code>BASH_COMPAT</code>
-<a name="index-BASH_005fCOMPAT"></a>
+<span id="index-BASH_005fCOMPAT"></span>
</dt>
<dd><p>The value is used to set the shell’s compatibility level.
-See <a href="#The-Shopt-Builtin">The Shopt Builtin</a>, for a description of the various compatibility
-levels and their effects.
+See <a href="#Shell-Compatibility-Mode">Shell Compatibility Mode</a>, for a description of the various
+compatibility levels and their effects.
The value may be a decimal number (e.g., 4.2) or an integer (e.g., 42)
corresponding to the desired compatibility level.
If <code>BASH_COMPAT</code> is unset or set to the empty string, the compatibility
If <code>BASH_COMPAT</code> is set to a value that is not one of the valid
compatibility levels, the shell prints an error message and sets the
compatibility level to the default for the current version.
-The valid compatibility levels correspond to the compatibility options
-accepted by the <code>shopt</code> builtin described above (for example,
-<var>compat42</var> means that 4.2 and 42 are valid values).
+The valid values correspond to the compatibility levels
+described below (see <a href="#Shell-Compatibility-Mode">Shell Compatibility Mode</a>).
+For example, 4.2 and 42 are valid values that correspond
+to the <code>compat42</code> <code>shopt</code> option
+and set the compatibility level to 42.
The current version is also a valid value.
</p>
</dd>
<dt><code>BASH_ENV</code>
-<a name="index-BASH_005fENV"></a>
+<span id="index-BASH_005fENV"></span>
</dt>
<dd><p>If this variable is set when Bash is invoked to execute a shell
script, its value is expanded and used as the name of a startup file
</p>
</dd>
<dt><code>BASH_EXECUTION_STRING</code>
-<a name="index-BASH_005fEXECUTION_005fSTRING"></a>
+<span id="index-BASH_005fEXECUTION_005fSTRING"></span>
</dt>
<dd><p>The command argument to the <samp>-c</samp> invocation option.
</p>
</dd>
<dt><code>BASH_LINENO</code>
-<a name="index-BASH_005fLINENO"></a>
+<span id="index-BASH_005fLINENO"></span>
</dt>
<dd><p>An array variable whose members are the line numbers in source files
where each corresponding member of <var>FUNCNAME</var> was invoked.
</p>
</dd>
<dt><code>BASH_LOADABLES_PATH</code>
-<a name="index-BASH_005fLOADABLES_005fPATH"></a>
+<span id="index-BASH_005fLOADABLES_005fPATH"></span>
</dt>
<dd><p>A colon-separated list of directories in which the shell looks for
dynamically loadable builtins specified by the
</p>
</dd>
<dt><code>BASH_REMATCH</code>
-<a name="index-BASH_005fREMATCH"></a>
+<span id="index-BASH_005fREMATCH"></span>
</dt>
<dd><p>An array variable whose members are assigned by the ‘<samp>=~</samp>’ binary
operator to the <code>[[</code> conditional command
matching the entire regular expression.
The element with index <var>n</var> is the portion of the
string matching the <var>n</var>th parenthesized subexpression.
-This variable is read-only.
</p>
</dd>
<dt><code>BASH_SOURCE</code>
-<a name="index-BASH_005fSOURCE"></a>
+<span id="index-BASH_005fSOURCE"></span>
</dt>
<dd><p>An array variable whose members are the source filenames where the
corresponding shell function names in the <code>FUNCNAME</code> array
</p>
</dd>
<dt><code>BASH_SUBSHELL</code>
-<a name="index-BASH_005fSUBSHELL"></a>
+<span id="index-BASH_005fSUBSHELL"></span>
</dt>
<dd><p>Incremented by one within each subshell or subshell environment when
the shell begins executing in that environment.
The initial value is 0.
+If <code>BASH_SUBSHELL</code>
+is unset, it loses its special properties, even if it is
+subsequently reset.
</p>
</dd>
<dt><code>BASH_VERSINFO</code>
-<a name="index-BASH_005fVERSINFO"></a>
+<span id="index-BASH_005fVERSINFO"></span>
</dt>
<dd><p>A readonly array variable (see <a href="#Arrays">Arrays</a>)
whose members hold version information for this instance of Bash.
</dd>
<dt><code>BASH_VERSION</code>
-<a name="index-BASH_005fVERSION"></a>
+<span id="index-BASH_005fVERSION"></span>
</dt>
<dd><p>The version number of the current instance of Bash.
</p>
</dd>
<dt><code>BASH_XTRACEFD</code>
-<a name="index-BASH_005fXTRACEFD"></a>
+<span id="index-BASH_005fXTRACEFD"></span>
</dt>
<dd><p>If set to an integer corresponding to a valid file descriptor, Bash
will write the trace output generated when ‘<samp>set -x</samp>’
</p>
</dd>
<dt><code>CHILD_MAX</code>
-<a name="index-CHILD_005fMAX"></a>
+<span id="index-CHILD_005fMAX"></span>
</dt>
<dd><p>Set the number of exited child status values for the shell to remember.
Bash will not allow this value to be decreased below a <small>POSIX</small>-mandated
</p>
</dd>
<dt><code>COLUMNS</code>
-<a name="index-COLUMNS"></a>
+<span id="index-COLUMNS"></span>
</dt>
<dd><p>Used by the <code>select</code> command to determine the terminal width
when printing selection lists.
</p>
</dd>
<dt><code>COMP_CWORD</code>
-<a name="index-COMP_005fCWORD"></a>
+<span id="index-COMP_005fCWORD"></span>
</dt>
<dd><p>An index into <code>${COMP_WORDS}</code> of the word containing the current
cursor position.
</p>
</dd>
<dt><code>COMP_LINE</code>
-<a name="index-COMP_005fLINE"></a>
+<span id="index-COMP_005fLINE"></span>
</dt>
<dd><p>The current command line.
This variable is available only in shell functions and external
</p>
</dd>
<dt><code>COMP_POINT</code>
-<a name="index-COMP_005fPOINT"></a>
+<span id="index-COMP_005fPOINT"></span>
</dt>
<dd><p>The index of the current cursor position relative to the beginning of
the current command.
</p>
</dd>
<dt><code>COMP_TYPE</code>
-<a name="index-COMP_005fTYPE"></a>
+<span id="index-COMP_005fTYPE"></span>
</dt>
<dd><p>Set to an integer value corresponding to the type of completion attempted
that caused a completion function to be called:
</p>
</dd>
<dt><code>COMP_KEY</code>
-<a name="index-COMP_005fKEY"></a>
+<span id="index-COMP_005fKEY"></span>
</dt>
<dd><p>The key (or final key of a key sequence) used to invoke the current
completion function.
</p>
</dd>
<dt><code>COMP_WORDBREAKS</code>
-<a name="index-COMP_005fWORDBREAKS"></a>
+<span id="index-COMP_005fWORDBREAKS"></span>
</dt>
<dd><p>The set of characters that the Readline library treats as word
separators when performing word completion.
-If <code>COMP_WORDBREAKS</code> is unset, it loses its special properties,
+If <code>COMP_WORDBREAKS</code>
+is unset, it loses its special properties,
even if it is subsequently reset.
</p>
</dd>
<dt><code>COMP_WORDS</code>
-<a name="index-COMP_005fWORDS"></a>
+<span id="index-COMP_005fWORDS"></span>
</dt>
<dd><p>An array variable consisting of the individual
words in the current command line.
</p>
</dd>
<dt><code>COMPREPLY</code>
-<a name="index-COMPREPLY"></a>
+<span id="index-COMPREPLY"></span>
</dt>
<dd><p>An array variable from which Bash reads the possible completions
generated by a shell function invoked by the programmable completion
</p>
</dd>
<dt><code>COPROC</code>
-<a name="index-COPROC"></a>
+<span id="index-COPROC"></span>
</dt>
<dd><p>An array variable created to hold the file descriptors
for output from and input to an unnamed coprocess (see <a href="#Coprocesses">Coprocesses</a>).
</p>
</dd>
<dt><code>DIRSTACK</code>
-<a name="index-DIRSTACK"></a>
+<span id="index-DIRSTACK"></span>
</dt>
<dd><p>An array variable containing the current contents of the directory stack.
Directories appear in the stack in the order they are displayed by the
directories already in the stack, but the <code>pushd</code> and <code>popd</code>
builtins must be used to add and remove directories.
Assignment to this variable will not change the current directory.
-If <code>DIRSTACK</code> is unset, it loses its special properties, even if
+If <code>DIRSTACK</code>
+is unset, it loses its special properties, even if
it is subsequently reset.
</p>
</dd>
<dt><code>EMACS</code>
-<a name="index-EMACS"></a>
+<span id="index-EMACS"></span>
</dt>
<dd><p>If Bash finds this variable in the environment when the shell
starts with value ‘<samp>t</samp>’, it assumes that the shell is running in an
</p>
</dd>
<dt><code>ENV</code>
-<a name="index-ENV"></a>
+<span id="index-ENV"></span>
</dt>
-<dd><p>Similar to <code>BASH_ENV</code>; used when the shell is invoked in
+<dd><p>Expanded and executed similarlty to <code>BASH_ENV</code>
+(see <a href="#Bash-Startup-Files">Bash Startup Files</a>)
+when an interactive shell is invoked in
<small>POSIX</small> Mode (see <a href="#Bash-POSIX-Mode">Bash POSIX Mode</a>).
</p>
</dd>
<dt><code>EPOCHREALTIME</code>
-<a name="index-EPOCHREALTIME"></a>
+<span id="index-EPOCHREALTIME"></span>
</dt>
<dd><p>Each time this parameter is referenced, it expands to the number of seconds
since the Unix Epoch as a floating point value with micro-second granularity
(see the documentation for the C library function <var>time</var> for the
definition of Epoch).
Assignments to <code>EPOCHREALTIME</code> are ignored.
-If <code>EPOCHREALTIME</code> is unset, it loses its special properties, even if
+If <code>EPOCHREALTIME</code>
+is unset, it loses its special properties, even if
it is subsequently reset.
</p>
</dd>
<dt><code>EPOCHSECONDS</code>
-<a name="index-EPOCHSECONDS"></a>
+<span id="index-EPOCHSECONDS"></span>
</dt>
<dd><p>Each time this parameter is referenced, it expands to the number of seconds
since the Unix Epoch (see the documentation for the C library function
<var>time</var> for the definition of Epoch).
Assignments to <code>EPOCHSECONDS</code> are ignored.
-If <code>EPOCHSECONDS</code> is unset, it loses its special properties, even if
+If <code>EPOCHSECONDS</code>
+is unset, it loses its special properties, even if
it is subsequently reset.
</p>
</dd>
<dt><code>EUID</code>
-<a name="index-EUID"></a>
+<span id="index-EUID"></span>
</dt>
<dd><p>The numeric effective user id of the current user. This variable
is readonly.
</p>
</dd>
<dt><code>EXECIGNORE</code>
-<a name="index-EXECIGNORE"></a>
+<span id="index-EXECIGNORE"></span>
</dt>
<dd><p>A colon-separated list of shell patterns (see <a href="#Pattern-Matching">Pattern Matching</a>)
defining the list of filenames to be ignored by command search using
</p>
</dd>
<dt><code>FCEDIT</code>
-<a name="index-FCEDIT"></a>
+<span id="index-FCEDIT"></span>
</dt>
<dd><p>The editor used as a default by the <samp>-e</samp> option to the <code>fc</code>
builtin command.
</p>
</dd>
<dt><code>FIGNORE</code>
-<a name="index-FIGNORE"></a>
+<span id="index-FIGNORE"></span>
</dt>
<dd><p>A colon-separated list of suffixes to ignore when performing
filename completion.
</p>
</dd>
<dt><code>FUNCNAME</code>
-<a name="index-FUNCNAME"></a>
+<span id="index-FUNCNAME"></span>
</dt>
<dd><p>An array variable containing the names of all shell functions
currently in the execution call stack.
is <code>"main"</code>.
This variable exists only when a shell function is executing.
Assignments to <code>FUNCNAME</code> have no effect.
-If <code>FUNCNAME</code> is unset, it loses its special properties, even if
+If <code>FUNCNAME</code>
+is unset, it loses its special properties, even if
it is subsequently reset.
</p>
<p>This variable can be used with <code>BASH_LINENO</code> and <code>BASH_SOURCE</code>.
</p>
</dd>
<dt><code>FUNCNEST</code>
-<a name="index-FUNCNEST"></a>
+<span id="index-FUNCNEST"></span>
</dt>
<dd><p>If set to a numeric value greater than 0, defines a maximum function
nesting level. Function invocations that exceed this nesting level
</p>
</dd>
<dt><code>GLOBIGNORE</code>
-<a name="index-GLOBIGNORE"></a>
+<span id="index-GLOBIGNORE"></span>
</dt>
<dd><p>A colon-separated list of patterns defining the set of file names to
be ignored by filename expansion.
</p>
</dd>
<dt><code>GROUPS</code>
-<a name="index-GROUPS"></a>
+<span id="index-GROUPS"></span>
</dt>
<dd><p>An array variable containing the list of groups of which the current
user is a member.
Assignments to <code>GROUPS</code> have no effect.
-If <code>GROUPS</code> is unset, it loses its special properties, even if it is
+If <code>GROUPS</code>
+is unset, it loses its special properties, even if it is
subsequently reset.
</p>
</dd>
<dt><code>histchars</code>
-<a name="index-histchars"></a>
+<span id="index-histchars"></span>
</dt>
<dd><p>Up to three characters which control history expansion, quick
substitution, and tokenization (see <a href="#History-Interaction">History Interaction</a>).
</p>
</dd>
<dt><code>HISTCMD</code>
-<a name="index-HISTCMD"></a>
+<span id="index-HISTCMD"></span>
</dt>
<dd><p>The history number, or index in the history list, of the current
-command. If <code>HISTCMD</code> is unset, it loses its special properties,
+command.
+Assignments to <code>HISTCMD</code> are ignored.
+If <code>HISTCMD</code>
+is unset, it loses its special properties,
even if it is subsequently reset.
</p>
</dd>
<dt><code>HISTCONTROL</code>
-<a name="index-HISTCONTROL"></a>
+<span id="index-HISTCONTROL"></span>
</dt>
<dd><p>A colon-separated list of values controlling how commands are saved on
the history list.
</p>
</dd>
<dt><code>HISTFILE</code>
-<a name="index-HISTFILE"></a>
+<span id="index-HISTFILE"></span>
</dt>
<dd><p>The name of the file to which the command history is saved. The
default value is <samp>~/.bash_history</samp>.
</p>
</dd>
<dt><code>HISTFILESIZE</code>
-<a name="index-HISTFILESIZE"></a>
+<span id="index-HISTFILESIZE"></span>
</dt>
<dd><p>The maximum number of lines contained in the history file.
When this variable is assigned a value, the history file is truncated,
</p>
</dd>
<dt><code>HISTIGNORE</code>
-<a name="index-HISTIGNORE"></a>
+<span id="index-HISTIGNORE"></span>
</dt>
<dd><p>A colon-separated list of patterns used to decide which command
lines should be saved on the history list. Each pattern is
</p>
</dd>
<dt><code>HISTSIZE</code>
-<a name="index-HISTSIZE"></a>
+<span id="index-HISTSIZE"></span>
</dt>
<dd><p>The maximum number of commands to remember on the history list.
If the value is 0, commands are not saved in the history list.
</p>
</dd>
<dt><code>HISTTIMEFORMAT</code>
-<a name="index-HISTTIMEFORMAT"></a>
+<span id="index-HISTTIMEFORMAT"></span>
</dt>
<dd><p>If this variable is set and not null, its value is used as a format string
for <var>strftime</var> to print the time stamp associated with each history
</p>
</dd>
<dt><code>HOSTFILE</code>
-<a name="index-HOSTFILE"></a>
+<span id="index-HOSTFILE"></span>
</dt>
<dd><p>Contains the name of a file in the same format as <samp>/etc/hosts</samp> that
should be read when the shell needs to complete a hostname.
</p>
</dd>
<dt><code>HOSTNAME</code>
-<a name="index-HOSTNAME"></a>
+<span id="index-HOSTNAME"></span>
</dt>
<dd><p>The name of the current host.
</p>
</dd>
<dt><code>HOSTTYPE</code>
-<a name="index-HOSTTYPE"></a>
+<span id="index-HOSTTYPE"></span>
</dt>
<dd><p>A string describing the machine Bash is running on.
</p>
</dd>
<dt><code>IGNOREEOF</code>
-<a name="index-IGNOREEOF"></a>
+<span id="index-IGNOREEOF"></span>
</dt>
<dd><p>Controls the action of the shell on receipt of an <code>EOF</code> character
as the sole input. If set, the value denotes the number
</p>
</dd>
<dt><code>INPUTRC</code>
-<a name="index-INPUTRC"></a>
+<span id="index-INPUTRC"></span>
</dt>
<dd><p>The name of the Readline initialization file, overriding the default
of <samp>~/.inputrc</samp>.
</p>
</dd>
<dt><code>INSIDE_EMACS</code>
-<a name="index-INSIDE_005fEMACS"></a>
+<span id="index-INSIDE_005fEMACS"></span>
</dt>
<dd><p>If Bash finds this variable in the environment when the shell
starts, it assumes that the shell is running in an Emacs shell buffer
</p>
</dd>
<dt><code>LANG</code>
-<a name="index-LANG"></a>
+<span id="index-LANG"></span>
</dt>
<dd><p>Used to determine the locale category for any category not specifically
selected with a variable starting with <code>LC_</code>.
</p>
</dd>
<dt><code>LC_ALL</code>
-<a name="index-LC_005fALL"></a>
+<span id="index-LC_005fALL"></span>
</dt>
<dd><p>This variable overrides the value of <code>LANG</code> and any other
<code>LC_</code> variable specifying a locale category.
</p>
</dd>
<dt><code>LC_COLLATE</code>
-<a name="index-LC_005fCOLLATE"></a>
+<span id="index-LC_005fCOLLATE"></span>
</dt>
<dd><p>This variable determines the collation order used when sorting the
results of filename expansion, and
</p>
</dd>
<dt><code>LC_CTYPE</code>
-<a name="index-LC_005fCTYPE"></a>
+<span id="index-LC_005fCTYPE"></span>
</dt>
<dd><p>This variable determines the interpretation of characters and the
behavior of character classes within filename expansion and pattern
</p>
</dd>
<dt><code>LC_MESSAGES</code>
-<a name="index-LC_005fMESSAGES-1"></a>
+<span id="index-LC_005fMESSAGES-1"></span>
</dt>
<dd><p>This variable determines the locale used to translate double-quoted
strings preceded by a ‘<samp>$</samp>’ (see <a href="#Locale-Translation">Locale Translation</a>).
</p>
</dd>
<dt><code>LC_NUMERIC</code>
-<a name="index-LC_005fNUMERIC"></a>
+<span id="index-LC_005fNUMERIC"></span>
</dt>
<dd><p>This variable determines the locale category used for number formatting.
</p>
</dd>
<dt><code>LC_TIME</code>
-<a name="index-LC_005fTIME"></a>
+<span id="index-LC_005fTIME"></span>
</dt>
<dd><p>This variable determines the locale category used for data and time
formatting.
</p>
</dd>
<dt><code>LINENO</code>
-<a name="index-LINENO"></a>
+<span id="index-LINENO"></span>
</dt>
<dd><p>The line number in the script or shell function currently executing.
+If <code>LINENO</code>
+is unset, it loses its special properties, even if it is
+subsequently reset.
</p>
</dd>
<dt><code>LINES</code>
-<a name="index-LINES"></a>
+<span id="index-LINES"></span>
</dt>
<dd><p>Used by the <code>select</code> command to determine the column length
for printing selection lists.
</p>
</dd>
<dt><code>MACHTYPE</code>
-<a name="index-MACHTYPE"></a>
+<span id="index-MACHTYPE"></span>
</dt>
<dd><p>A string that fully describes the system type on which Bash
is executing, in the standard <small>GNU</small> <var>cpu-company-system</var> format.
</p>
</dd>
<dt><code>MAILCHECK</code>
-<a name="index-MAILCHECK"></a>
+<span id="index-MAILCHECK"></span>
</dt>
<dd><p>How often (in seconds) that the shell should check for mail in the
files specified in the <code>MAILPATH</code> or <code>MAIL</code> variables.
</p>
</dd>
<dt><code>MAPFILE</code>
-<a name="index-MAPFILE"></a>
+<span id="index-MAPFILE"></span>
</dt>
<dd><p>An array variable created to hold the text read by the
<code>mapfile</code> builtin when no variable name is supplied.
</p>
</dd>
<dt><code>OLDPWD</code>
-<a name="index-OLDPWD"></a>
+<span id="index-OLDPWD"></span>
</dt>
<dd><p>The previous working directory as set by the <code>cd</code> builtin.
</p>
</dd>
<dt><code>OPTERR</code>
-<a name="index-OPTERR"></a>
+<span id="index-OPTERR"></span>
</dt>
<dd><p>If set to the value 1, Bash displays error messages
generated by the <code>getopts</code> builtin command.
</p>
</dd>
<dt><code>OSTYPE</code>
-<a name="index-OSTYPE"></a>
+<span id="index-OSTYPE"></span>
</dt>
<dd><p>A string describing the operating system Bash is running on.
</p>
</dd>
<dt><code>PIPESTATUS</code>
-<a name="index-PIPESTATUS"></a>
+<span id="index-PIPESTATUS"></span>
</dt>
<dd><p>An array variable (see <a href="#Arrays">Arrays</a>)
containing a list of exit status values from the processes
</p>
</dd>
<dt><code>POSIXLY_CORRECT</code>
-<a name="index-POSIXLY_005fCORRECT"></a>
+<span id="index-POSIXLY_005fCORRECT"></span>
</dt>
<dd><p>If this variable is in the environment when Bash starts, the shell
enters <small>POSIX</small> mode (see <a href="#Bash-POSIX-Mode">Bash POSIX Mode</a>) before reading the
</p>
</dd>
<dt><code>PPID</code>
-<a name="index-PPID"></a>
+<span id="index-PPID"></span>
</dt>
<dd><p>The process <small>ID</small> of the shell’s parent process. This variable
is readonly.
</p>
</dd>
<dt><code>PROMPT_COMMAND</code>
-<a name="index-PROMPT_005fCOMMAND"></a>
+<span id="index-PROMPT_005fCOMMAND"></span>
</dt>
-<dd><p>If set, the value is interpreted as a command to execute
-before the printing of each primary prompt (<code>$PS1</code>).
+<dd><p>If this variable is set, and is an array,
+the value of each set element is interpreted as a command to execute
+before printing the primary prompt (<code>$PS1</code>).
+If this is set but not an array variable,
+its value is used as a command to execute instead.
</p>
</dd>
<dt><code>PROMPT_DIRTRIM</code>
-<a name="index-PROMPT_005fDIRTRIM"></a>
+<span id="index-PROMPT_005fDIRTRIM"></span>
</dt>
<dd><p>If set to a number greater than zero, the value is used as the number of
trailing directory components to retain when expanding the <code>\w</code> and
</p>
</dd>
<dt><code>PS0</code>
-<a name="index-PS0"></a>
+<span id="index-PS0"></span>
</dt>
-<dd><p>The value of this parameter is expanded like <var>PS1</var>
+<dd><p>The value of this parameter is expanded like <code>PS1</code>
and displayed by interactive shells after reading a command
and before the command is executed.
</p>
</dd>
<dt><code>PS3</code>
-<a name="index-PS3"></a>
+<span id="index-PS3"></span>
</dt>
<dd><p>The value of this variable is used as the prompt for the
<code>select</code> command. If this variable is not set, the
</p>
</dd>
<dt><code>PS4</code>
-<a name="index-PS4"></a>
+<span id="index-PS4"></span>
</dt>
<dd><p>The value of this parameter is expanded like <var>PS1</var>
and the expanded value is the prompt printed before the command line
</p>
</dd>
<dt><code>PWD</code>
-<a name="index-PWD"></a>
+<span id="index-PWD"></span>
</dt>
<dd><p>The current working directory as set by the <code>cd</code> builtin.
</p>
</dd>
<dt><code>RANDOM</code>
-<a name="index-RANDOM"></a>
+<span id="index-RANDOM"></span>
</dt>
-<dd><p>Each time this parameter is referenced, a random integer
-between 0 and 32767 is generated. Assigning a value to this
+<dd><p>Each time this parameter is referenced, it expands to a random integer
+between 0 and 32767. Assigning a value to this
variable seeds the random number generator.
+If <code>RANDOM</code>
+is unset, it loses its special properties, even if it is
+subsequently reset.
</p>
</dd>
<dt><code>READLINE_LINE</code>
-<a name="index-READLINE_005fLINE"></a>
+<span id="index-READLINE_005fLINE"></span>
</dt>
<dd><p>The contents of the Readline line buffer, for use
with ‘<samp>bind -x</samp>’ (see <a href="#Bash-Builtins">Bash Builtins</a>).
</p>
</dd>
+<dt><code>READLINE_MARK</code>
+<span id="index-READLINE_005fMARK"></span>
+</dt>
+<dd><p>The position of the <var>mark</var> (saved insertion point) in the
+Readline line buffer, for use
+with ‘<samp>bind -x</samp>’ (see <a href="#Bash-Builtins">Bash Builtins</a>).
+The characters between the insertion point and the mark are often
+called the <var>region</var>.
+</p>
+</dd>
<dt><code>READLINE_POINT</code>
-<a name="index-READLINE_005fPOINT"></a>
+<span id="index-READLINE_005fPOINT"></span>
</dt>
<dd><p>The position of the insertion point in the Readline line buffer, for use
with ‘<samp>bind -x</samp>’ (see <a href="#Bash-Builtins">Bash Builtins</a>).
</p>
</dd>
<dt><code>REPLY</code>
-<a name="index-REPLY"></a>
+<span id="index-REPLY"></span>
</dt>
<dd><p>The default variable for the <code>read</code> builtin.
</p>
</dd>
<dt><code>SECONDS</code>
-<a name="index-SECONDS"></a>
+<span id="index-SECONDS"></span>
</dt>
<dd><p>This variable expands to the number of seconds since the
shell was started. Assignment to this variable resets
the count to the value assigned, and the expanded value
becomes the value assigned plus the number of seconds
since the assignment.
+The number of seconds at shell invocation and the current time is always
+determined by querying the system clock.
+If <code>SECONDS</code>
+is unset, it loses its special properties,
+even if it is subsequently reset.
</p>
</dd>
<dt><code>SHELL</code>
-<a name="index-SHELL"></a>
+<span id="index-SHELL"></span>
</dt>
-<dd><p>The full pathname to the shell is kept in this environment variable.
+<dd><p>This environment variable expands to the full pathname to the shell.
If it is not set when the shell starts,
Bash assigns to it the full pathname of the current user’s login shell.
</p>
</dd>
<dt><code>SHELLOPTS</code>
-<a name="index-SHELLOPTS"></a>
+<span id="index-SHELLOPTS"></span>
</dt>
<dd><p>A colon-separated list of enabled shell options. Each word in
the list is a valid argument for the <samp>-o</samp> option to the
</p>
</dd>
<dt><code>SHLVL</code>
-<a name="index-SHLVL"></a>
+<span id="index-SHLVL"></span>
</dt>
<dd><p>Incremented by one each time a new instance of Bash is started. This is
intended to be a count of how deeply your Bash shells are nested.
</p>
</dd>
+<dt><code>SRANDOM</code>
+<span id="index-SRANDOM"></span>
+</dt>
+<dd><p>This variable expands to a 32-bit pseudo-random number each time it is
+referenced. The random number generator is not linear on systems that
+support <samp>/dev/urandom</samp> or <code>arc4random</code>, so each returned number
+has no relationship to the numbers preceding it.
+The random number generator cannot be seeded, so assignments to this
+variable have no effect.
+If <code>SRANDOM</code>
+is unset, it loses its special properties,
+even if it is subsequently reset.
+</p>
+</dd>
<dt><code>TIMEFORMAT</code>
-<a name="index-TIMEFORMAT"></a>
+<span id="index-TIMEFORMAT"></span>
</dt>
<dd><p>The value of this parameter is used as a format string specifying
how the timing information for pipelines prefixed with the <code>time</code>
</p>
</dd>
<dt><code>TMOUT</code>
-<a name="index-TMOUT"></a>
+<span id="index-TMOUT"></span>
</dt>
<dd><p>If set to a value greater than zero, <code>TMOUT</code> is treated as the
default timeout for the <code>read</code> builtin (see <a href="#Bash-Builtins">Bash Builtins</a>).
</p>
</dd>
<dt><code>TMPDIR</code>
-<a name="index-TMPDIR"></a>
+<span id="index-TMPDIR"></span>
</dt>
<dd><p>If set, Bash uses its value as the name of a directory in which
Bash creates temporary files for the shell’s use.
</p>
</dd>
<dt><code>UID</code>
-<a name="index-UID"></a>
+<span id="index-UID"></span>
</dt>
<dd><p>The numeric real user id of the current user. This variable is readonly.
</p>
</dl>
<hr>
-<a name="Bash-Features"></a>
-<div class="header">
+<span id="Bash-Features"></span><div class="header">
<p>
Next: <a href="#Job-Control" accesskey="n" rel="next">Job Control</a>, Previous: <a href="#Shell-Variables" accesskey="p" rel="prev">Shell Variables</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Bash-Features-2"></a>
-<h2 class="chapter">6 Bash Features</h2>
+<span id="Bash-Features-2"></span><h2 class="chapter">6 Bash Features</h2>
<p>This chapter describes features unique to Bash.
</p>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Invoking-Bash" accesskey="1">Invoking Bash</a>:</td><td> </td><td align="left" valign="top">Command line options that you can give
+<tr><td align="left" valign="top">• <a href="#Invoking-Bash" accesskey="1">Invoking Bash</a></td><td> </td><td align="left" valign="top">Command line options that you can give
to Bash.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Bash-Startup-Files" accesskey="2">Bash Startup Files</a>:</td><td> </td><td align="left" valign="top">When and how Bash executes scripts.
+<tr><td align="left" valign="top">• <a href="#Bash-Startup-Files" accesskey="2">Bash Startup Files</a></td><td> </td><td align="left" valign="top">When and how Bash executes scripts.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Interactive-Shells" accesskey="3">Interactive Shells</a>:</td><td> </td><td align="left" valign="top">What an interactive shell is.
+<tr><td align="left" valign="top">• <a href="#Interactive-Shells" accesskey="3">Interactive Shells</a></td><td> </td><td align="left" valign="top">What an interactive shell is.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Bash-Conditional-Expressions" accesskey="4">Bash Conditional Expressions</a>:</td><td> </td><td align="left" valign="top">Primitives used in composing expressions for
+<tr><td align="left" valign="top">• <a href="#Bash-Conditional-Expressions" accesskey="4">Bash Conditional Expressions</a></td><td> </td><td align="left" valign="top">Primitives used in composing expressions for
the <code>test</code> builtin.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Shell-Arithmetic" accesskey="5">Shell Arithmetic</a>:</td><td> </td><td align="left" valign="top">Arithmetic on shell variables.
+<tr><td align="left" valign="top">• <a href="#Shell-Arithmetic" accesskey="5">Shell Arithmetic</a></td><td> </td><td align="left" valign="top">Arithmetic on shell variables.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Aliases" accesskey="6">Aliases</a>:</td><td> </td><td align="left" valign="top">Substituting one command for another.
+<tr><td align="left" valign="top">• <a href="#Aliases" accesskey="6">Aliases</a></td><td> </td><td align="left" valign="top">Substituting one command for another.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Arrays" accesskey="7">Arrays</a>:</td><td> </td><td align="left" valign="top">Array Variables.
+<tr><td align="left" valign="top">• <a href="#Arrays" accesskey="7">Arrays</a></td><td> </td><td align="left" valign="top">Array Variables.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#The-Directory-Stack" accesskey="8">The Directory Stack</a>:</td><td> </td><td align="left" valign="top">History of visited directories.
+<tr><td align="left" valign="top">• <a href="#The-Directory-Stack" accesskey="8">The Directory Stack</a></td><td> </td><td align="left" valign="top">History of visited directories.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Controlling-the-Prompt" accesskey="9">Controlling the Prompt</a>:</td><td> </td><td align="left" valign="top">Customizing the various prompt strings.
+<tr><td align="left" valign="top">• <a href="#Controlling-the-Prompt" accesskey="9">Controlling the Prompt</a></td><td> </td><td align="left" valign="top">Customizing the various prompt strings.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#The-Restricted-Shell">The Restricted Shell</a>:</td><td> </td><td align="left" valign="top">A more controlled mode of shell execution.
+<tr><td align="left" valign="top">• <a href="#The-Restricted-Shell">The Restricted Shell</a></td><td> </td><td align="left" valign="top">A more controlled mode of shell execution.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Bash-POSIX-Mode">Bash POSIX Mode</a>:</td><td> </td><td align="left" valign="top">Making Bash behave more closely to what
+<tr><td align="left" valign="top">• <a href="#Bash-POSIX-Mode">Bash POSIX Mode</a></td><td> </td><td align="left" valign="top">Making Bash behave more closely to what
the POSIX standard specifies.
</td></tr>
+<tr><td align="left" valign="top">• <a href="#Shell-Compatibility-Mode">Shell Compatibility Mode</a></td><td> </td><td align="left" valign="top">How Bash supports behavior that was present
+ in earlier versions and has changed.
+</td></tr>
</table>
<hr>
-<a name="Invoking-Bash"></a>
-<div class="header">
+<span id="Invoking-Bash"></span><div class="header">
<p>
Next: <a href="#Bash-Startup-Files" accesskey="n" rel="next">Bash Startup Files</a>, Up: <a href="#Bash-Features" accesskey="u" rel="up">Bash Features</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Invoking-Bash-1"></a>
-<h3 class="section">6.1 Invoking Bash</h3>
+<span id="Invoking-Bash-1"></span><h3 class="section">6.1 Invoking Bash</h3>
<div class="example">
<pre class="example">bash [long-opt] [-ir] [-abefhkmnptuvxdBCDHP] [-o <var>option</var>]
</p></dd>
</dl>
-<a name="index-login-shell"></a>
+<span id="index-login-shell"></span>
<p>A <em>login</em> shell is one whose first character of argument zero is
‘<samp>-</samp>’, or one invoked with the <samp>--login</samp> option.
</p>
-<a name="index-interactive-shell"></a>
+<span id="index-interactive-shell"></span>
<p>An <em>interactive</em> shell is one started without non-option arguments,
unless <samp>-s</samp> is specified,
without specifying the <samp>-c</samp> option, and whose input and output are both
in the script. If no commands are executed, the exit status is 0.
</p>
<hr>
-<a name="Bash-Startup-Files"></a>
-<div class="header">
+<span id="Bash-Startup-Files"></span><div class="header">
<p>
Next: <a href="#Interactive-Shells" accesskey="n" rel="next">Interactive Shells</a>, Previous: <a href="#Invoking-Bash" accesskey="p" rel="prev">Invoking Bash</a>, Up: <a href="#Bash-Features" accesskey="u" rel="up">Bash Features</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Bash-Startup-Files-1"></a>
-<h3 class="section">6.2 Bash Startup Files</h3>
-<a name="index-startup-files"></a>
+<span id="Bash-Startup-Files-1"></span><h3 class="section">6.2 Bash Startup Files</h3>
+<span id="index-startup-files"></span>
<p>This section describes how Bash executes its startup files.
If any of the files exist but cannot be read, Bash reports an error.
</p>
<p>Interactive shells are described in <a href="#Interactive-Shells">Interactive Shells</a>.
</p>
-<a name="Invoked-as-an-interactive-login-shell_002c-or-with-_002d_002dlogin"></a>
-<h4 class="subsubheading">Invoked as an interactive login shell, or with <samp>--login</samp></h4>
+<span id="Invoked-as-an-interactive-login-shell_002c-or-with-_002d_002dlogin"></span><h4 class="subsubheading">Invoked as an interactive login shell, or with <samp>--login</samp></h4>
<p>When Bash is invoked as an interactive login shell, or as a
non-interactive shell with the <samp>--login</samp> option, it first reads and
Bash reads and executes commands from
the file <samp>~/.bash_logout</samp>, if it exists.
</p>
-<a name="Invoked-as-an-interactive-non_002dlogin-shell"></a>
-<h4 class="subsubheading">Invoked as an interactive non-login shell</h4>
+<span id="Invoked-as-an-interactive-non_002dlogin-shell"></span><h4 class="subsubheading">Invoked as an interactive non-login shell</h4>
<p>When an interactive shell that is not a login shell is started, Bash
reads and executes commands from <samp>~/.bashrc</samp>, if that file exists.
</pre></div>
<p>after (or before) any login-specific initializations.
</p>
-<a name="Invoked-non_002dinteractively"></a>
-<h4 class="subsubheading">Invoked non-interactively</h4>
+<span id="Invoked-non_002dinteractively"></span><h4 class="subsubheading">Invoked non-interactively</h4>
<p>When Bash is started non-interactively, to run a shell script,
for example, it looks for the variable <code>BASH_ENV</code> in the environment,
<samp>--login</samp> option, Bash attempts to read and execute commands from the
login shell startup files.
</p>
-<a name="Invoked-with-name-sh"></a>
-<h4 class="subsubheading">Invoked with name <code>sh</code></h4>
+<span id="Invoked-with-name-sh"></span><h4 class="subsubheading">Invoked with name <code>sh</code></h4>
<p>If Bash is invoked with the name <code>sh</code>, it tries to mimic the
startup behavior of historical versions of <code>sh</code> as closely as
<p>When invoked as <code>sh</code>, Bash enters <small>POSIX</small> mode after
the startup files are read.
</p>
-<a name="Invoked-in-POSIX-mode"></a>
-<h4 class="subsubheading">Invoked in <small>POSIX</small> mode</h4>
+<span id="Invoked-in-POSIX-mode"></span><h4 class="subsubheading">Invoked in <small>POSIX</small> mode</h4>
<p>When Bash is started in <small>POSIX</small> mode, as with the
<samp>--posix</samp> command line option, it follows the <small>POSIX</small> standard
expanded value.
No other startup files are read.
</p>
-<a name="Invoked-by-remote-shell-daemon"></a>
-<h4 class="subsubheading">Invoked by remote shell daemon</h4>
+<span id="Invoked-by-remote-shell-daemon"></span><h4 class="subsubheading">Invoked by remote shell daemon</h4>
<p>Bash attempts to determine when it is being run with its standard input
connected to a network connection, as when executed by the remote shell
neither <code>rshd</code> nor <code>sshd</code> generally invoke the shell with those
options or allow them to be specified.
</p>
-<a name="Invoked-with-unequal-effective-and-real-UID_002fGIDs"></a>
-<h4 class="subsubheading">Invoked with unequal effective and real <small>UID/GID</small>s</h4>
+<span id="Invoked-with-unequal-effective-and-real-UID_002fGIDs"></span><h4 class="subsubheading">Invoked with unequal effective and real <small>UID/GID</small>s</h4>
<p>If Bash is started with the effective user (group) id not equal to the
real user (group) id, and the <samp>-p</samp> option is not supplied, no startup
the same, but the effective user id is not reset.
</p>
<hr>
-<a name="Interactive-Shells"></a>
-<div class="header">
+<span id="Interactive-Shells"></span><div class="header">
<p>
Next: <a href="#Bash-Conditional-Expressions" accesskey="n" rel="next">Bash Conditional Expressions</a>, Previous: <a href="#Bash-Startup-Files" accesskey="p" rel="prev">Bash Startup Files</a>, Up: <a href="#Bash-Features" accesskey="u" rel="up">Bash Features</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Interactive-Shells-1"></a>
-<h3 class="section">6.3 Interactive Shells</h3>
-<a name="index-interactive-shell-1"></a>
-<a name="index-shell_002c-interactive"></a>
+<span id="Interactive-Shells-1"></span><h3 class="section">6.3 Interactive Shells</h3>
+<span id="index-interactive-shell-1"></span>
+<span id="index-shell_002c-interactive"></span>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#What-is-an-Interactive-Shell_003f" accesskey="1">What is an Interactive Shell?</a>:</td><td> </td><td align="left" valign="top">What determines whether a shell is Interactive.
+<tr><td align="left" valign="top">• <a href="#What-is-an-Interactive-Shell_003f" accesskey="1">What is an Interactive Shell?</a></td><td> </td><td align="left" valign="top">What determines whether a shell is Interactive.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Is-this-Shell-Interactive_003f" accesskey="2">Is this Shell Interactive?</a>:</td><td> </td><td align="left" valign="top">How to tell if a shell is interactive.
+<tr><td align="left" valign="top">• <a href="#Is-this-Shell-Interactive_003f" accesskey="2">Is this Shell Interactive?</a></td><td> </td><td align="left" valign="top">How to tell if a shell is interactive.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Interactive-Shell-Behavior" accesskey="3">Interactive Shell Behavior</a>:</td><td> </td><td align="left" valign="top">What changes in a interactive shell?
+<tr><td align="left" valign="top">• <a href="#Interactive-Shell-Behavior" accesskey="3">Interactive Shell Behavior</a></td><td> </td><td align="left" valign="top">What changes in a interactive shell?
</td></tr>
</table>
<hr>
-<a name="What-is-an-Interactive-Shell_003f"></a>
-<div class="header">
+<span id="What-is-an-Interactive-Shell_003f"></span><div class="header">
<p>
Next: <a href="#Is-this-Shell-Interactive_003f" accesskey="n" rel="next">Is this Shell Interactive?</a>, Up: <a href="#Interactive-Shells" accesskey="u" rel="up">Interactive Shells</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="What-is-an-Interactive-Shell_003f-1"></a>
-<h4 class="subsection">6.3.1 What is an Interactive Shell?</h4>
+<span id="What-is-an-Interactive-Shell_003f-1"></span><h4 class="subsection">6.3.1 What is an Interactive Shell?</h4>
<p>An interactive shell
is one started without non-option arguments, unless <samp>-s</samp> is
when an interactive shell is started.
</p>
<hr>
-<a name="Is-this-Shell-Interactive_003f"></a>
-<div class="header">
+<span id="Is-this-Shell-Interactive_003f"></span><div class="header">
<p>
Next: <a href="#Interactive-Shell-Behavior" accesskey="n" rel="next">Interactive Shell Behavior</a>, Previous: <a href="#What-is-an-Interactive-Shell_003f" accesskey="p" rel="prev">What is an Interactive Shell?</a>, Up: <a href="#Interactive-Shells" accesskey="u" rel="up">Interactive Shells</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Is-this-Shell-Interactive_003f-1"></a>
-<h4 class="subsection">6.3.2 Is this Shell Interactive?</h4>
+<span id="Is-this-Shell-Interactive_003f-1"></span><h4 class="subsection">6.3.2 Is this Shell Interactive?</h4>
<p>To determine within a startup script whether or not Bash is
running interactively,
</pre></div>
<hr>
-<a name="Interactive-Shell-Behavior"></a>
-<div class="header">
+<span id="Interactive-Shell-Behavior"></span><div class="header">
<p>
Previous: <a href="#Is-this-Shell-Interactive_003f" accesskey="p" rel="prev">Is this Shell Interactive?</a>, Up: <a href="#Interactive-Shells" accesskey="u" rel="up">Interactive Shells</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Interactive-Shell-Behavior-1"></a>
-<h4 class="subsection">6.3.3 Interactive Shell Behavior</h4>
+<span id="Interactive-Shell-Behavior-1"></span><h4 class="subsection">6.3.3 Interactive Shell Behavior</h4>
<p>When the shell is running interactively, it changes its behavior in
several ways.
See <a href="#Controlling-the-Prompt">Controlling the Prompt</a>, for a complete list of prompt
string escape sequences.
-</li><li> Bash executes the value of the <code>PROMPT_COMMAND</code> variable as a command
-before printing the primary prompt, <code>$PS1</code>
+</li><li> Bash executes the values of the set elements of the <code>PROMPT_COMMANDS</code>
+array variable as commands before printing the primary prompt, <code>$PS1</code>
(see <a href="#Bash-Variables">Bash Variables</a>).
</li><li> Readline (see <a href="#Command-Line-Editing">Command Line Editing</a>) is used to read commands from
</li></ol>
<hr>
-<a name="Bash-Conditional-Expressions"></a>
-<div class="header">
+<span id="Bash-Conditional-Expressions"></span><div class="header">
<p>
Next: <a href="#Shell-Arithmetic" accesskey="n" rel="next">Shell Arithmetic</a>, Previous: <a href="#Interactive-Shells" accesskey="p" rel="prev">Interactive Shells</a>, Up: <a href="#Bash-Features" accesskey="u" rel="up">Bash Features</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Bash-Conditional-Expressions-1"></a>
-<h3 class="section">6.4 Bash Conditional Expressions</h3>
-<a name="index-expressions_002c-conditional"></a>
+<span id="Bash-Conditional-Expressions-1"></span><h3 class="section">6.4 Bash Conditional Expressions</h3>
+<span id="index-expressions_002c-conditional"></span>
<p>Conditional expressions are used by the <code>[[</code> compound command
and the <code>test</code> and <code>[</code> builtin commands. The <code>test</code>
</dl>
<hr>
-<a name="Shell-Arithmetic"></a>
-<div class="header">
+<span id="Shell-Arithmetic"></span><div class="header">
<p>
Next: <a href="#Aliases" accesskey="n" rel="next">Aliases</a>, Previous: <a href="#Bash-Conditional-Expressions" accesskey="p" rel="prev">Bash Conditional Expressions</a>, Up: <a href="#Bash-Features" accesskey="u" rel="up">Bash Features</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Shell-Arithmetic-1"></a>
-<h3 class="section">6.5 Shell Arithmetic</h3>
-<a name="index-arithmetic_002c-shell"></a>
-<a name="index-shell-arithmetic"></a>
-<a name="index-expressions_002c-arithmetic"></a>
-<a name="index-evaluation_002c-arithmetic"></a>
-<a name="index-arithmetic-evaluation"></a>
+<span id="Shell-Arithmetic-1"></span><h3 class="section">6.5 Shell Arithmetic</h3>
+<span id="index-arithmetic_002c-shell"></span>
+<span id="index-shell-arithmetic"></span>
+<span id="index-expressions_002c-arithmetic"></span>
+<span id="index-evaluation_002c-arithmetic"></span>
+<span id="index-arithmetic-evaluation"></span>
<p>The shell allows arithmetic expressions to be evaluated, as one of
the shell expansions or by using the <code>((</code> compound command, the
A shell variable need not have its <var>integer</var> attribute turned on
to be used in an expression.
</p>
-<p>Constants with a leading 0 are interpreted as octal numbers.
+<p>Integer constants follow the C language definition, without suffixes or
+character constants.
+Constants with a leading 0 are interpreted as octal numbers.
A leading ‘<samp>0x</samp>’ or ‘<samp>0X</samp>’ denotes hexadecimal. Otherwise,
numbers take the form [<var>base</var><code>#</code>]<var>n</var>, where the optional <var>base</var>
is a decimal number between 2 and 64 representing the arithmetic
base, and <var>n</var> is a number in that base.
If <var>base</var><code>#</code> is omitted, then base 10 is used.
When specifying <var>n</var>,
+if a non-digit is required,
the digits greater than 9 are represented by the lowercase letters,
the uppercase letters, ‘<samp>@</samp>’, and ‘<samp>_</samp>’, in that order.
If <var>base</var> is less than or equal to 36, lowercase and uppercase
rules above.
</p>
<hr>
-<a name="Aliases"></a>
-<div class="header">
+<span id="Aliases"></span><div class="header">
<p>
Next: <a href="#Arrays" accesskey="n" rel="next">Arrays</a>, Previous: <a href="#Shell-Arithmetic" accesskey="p" rel="prev">Shell Arithmetic</a>, Up: <a href="#Bash-Features" accesskey="u" rel="up">Bash Features</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Aliases-1"></a>
-<h3 class="section">6.6 Aliases</h3>
-<a name="index-alias-expansion"></a>
+<span id="Aliases-1"></span><h3 class="section">6.6 Aliases</h3>
+<span id="index-alias-expansion"></span>
<p><var>Aliases</var> allow a string to be substituted for a word when it is used
as the first word of a simple command.
<p>For almost every purpose, shell functions are preferred over aliases.
</p>
<hr>
-<a name="Arrays"></a>
-<div class="header">
+<span id="Arrays"></span><div class="header">
<p>
Next: <a href="#The-Directory-Stack" accesskey="n" rel="next">The Directory Stack</a>, Previous: <a href="#Aliases" accesskey="p" rel="prev">Aliases</a>, Up: <a href="#Bash-Features" accesskey="u" rel="up">Bash Features</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Arrays-1"></a>
-<h3 class="section">6.7 Arrays</h3>
-<a name="index-arrays"></a>
+<span id="Arrays-1"></span><h3 class="section">6.7 Arrays</h3>
+<span id="index-arrays"></span>
<p>Bash provides one-dimensional indexed and associative array variables.
Any variable may be used as an indexed array;
</p>
<p>Associative arrays are created using
</p><div class="example">
-<pre class="example">declare -A <var>name</var>.
+<pre class="example">declare -A <var>name</var>
</pre></div>
<p>Attributes may be
<pre class="example"><var>name</var>=(<var>value1</var> <var>value2</var> … )
</pre></div>
<p>where each
-<var>value</var> is of the form <code>[<var>subscript</var>]=</code><var>string</var>.
+<var>value</var> may be of the form <code>[<var>subscript</var>]=</code><var>string</var>.
Indexed array assignments do not require anything but <var>string</var>.
When assigning to indexed arrays, if
the optional subscript is supplied, that index is assigned to;
otherwise the index of the element assigned is the last index assigned
to by the statement plus one. Indexing starts at zero.
</p>
-<p>When assigning to an associative array, the subscript is required.
+<p>Each <var>value</var> in the list undergoes all the shell expansions
+described above (see <a href="#Shell-Expansions">Shell Expansions</a>).
+</p>
+<p>When assigning to an associative array, the words in a compound assignment
+may be either assignment statements, for which the subscript is required,
+or a list of words that is interpreted as a sequence of alternating keys
+and values:
+<var>name</var>=(<var>key1</var> <var>value1</var> <var>key2</var> <var>value2</var> … ).
+These are treated identically to
+<var>name</var>=( [<var>key1</var>]=<var>value1</var> [<var>key2</var>]=<var>value2</var> … ).
+The first word in the list determines how the remaining words
+are interpreted; all assignments in a list must be of the same type.
+When using key/value pairs, the keys may not be missing or empty;
+a final missing value is treated like the empty string.
</p>
<p>This syntax is also accepted by the <code>declare</code>
builtin. Individual array elements may be assigned to using the
reused as input.
</p>
<hr>
-<a name="The-Directory-Stack"></a>
-<div class="header">
+<span id="The-Directory-Stack"></span><div class="header">
<p>
Next: <a href="#Controlling-the-Prompt" accesskey="n" rel="next">Controlling the Prompt</a>, Previous: <a href="#Arrays" accesskey="p" rel="prev">Arrays</a>, Up: <a href="#Bash-Features" accesskey="u" rel="up">Bash Features</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="The-Directory-Stack-1"></a>
-<h3 class="section">6.8 The Directory Stack</h3>
-<a name="index-directory-stack"></a>
+<span id="The-Directory-Stack-1"></span><h3 class="section">6.8 The Directory Stack</h3>
+<span id="index-directory-stack"></span>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Directory-Stack-Builtins" accesskey="1">Directory Stack Builtins</a>:</td><td> </td><td align="left" valign="top">Bash builtin commands to manipulate
+<tr><td align="left" valign="top">• <a href="#Directory-Stack-Builtins" accesskey="1">Directory Stack Builtins</a></td><td> </td><td align="left" valign="top">Bash builtin commands to manipulate
the directory stack.
</td></tr>
</table>
as the value of the <code>DIRSTACK</code> shell variable.
</p>
<hr>
-<a name="Directory-Stack-Builtins"></a>
-<div class="header">
+<span id="Directory-Stack-Builtins"></span><div class="header">
<p>
Up: <a href="#The-Directory-Stack" accesskey="u" rel="up">The Directory Stack</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Directory-Stack-Builtins-1"></a>
-<h4 class="subsection">6.8.1 Directory Stack Builtins</h4>
+<span id="Directory-Stack-Builtins-1"></span><h4 class="subsection">6.8.1 Directory Stack Builtins</h4>
<dl compact="compact">
<dt><code>dirs</code></dt>
-<dd><a name="index-dirs"></a>
+<dd><span id="index-dirs"></span>
<div class="example">
<pre class="example">dirs [-clpv] [+<var>N</var> | -<var>N</var>]
</pre></div>
</dd>
<dt><code>popd</code></dt>
-<dd><a name="index-popd"></a>
+<dd><span id="index-popd"></span>
<div class="example">
<pre class="example">popd [-n] [+<var>N</var> | -<var>N</var>]
</pre></div>
</p></dd>
</dl>
-<a name="index-pushd"></a>
+<span id="index-pushd"></span>
</dd>
<dt><code>pushd</code></dt>
<dd><div class="example">
</dl>
<hr>
-<a name="Controlling-the-Prompt"></a>
-<div class="header">
+<span id="Controlling-the-Prompt"></span><div class="header">
<p>
Next: <a href="#The-Restricted-Shell" accesskey="n" rel="next">The Restricted Shell</a>, Previous: <a href="#The-Directory-Stack" accesskey="p" rel="prev">The Directory Stack</a>, Up: <a href="#Bash-Features" accesskey="u" rel="up">Bash Features</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Controlling-the-Prompt-1"></a>
-<h3 class="section">6.9 Controlling the Prompt</h3>
-<a name="index-prompting"></a>
+<span id="Controlling-the-Prompt-1"></span><h3 class="section">6.9 Controlling the Prompt</h3>
+<span id="index-prompting"></span>
-<p>The value of the variable <code>PROMPT_COMMAND</code> is examined just before
-Bash prints each primary prompt. If <code>PROMPT_COMMAND</code> is set and
-has a non-null value, then the
-value is executed just as if it had been typed on the command line.
+<p>Bash examines the value of the array variable <code>PROMPT_COMMANDS</code> just before
+printing each primary prompt.
+If any elements in <code>PROMPT_COMMANDS</code> are set and non-null, Bash
+executes each value, in numeric order,
+just as if it had been typed on the command line.
</p>
<p>In addition, the following table describes the special characters which
can appear in the prompt variables <code>PS0</code>, <code>PS1</code>, <code>PS2</code>, and
parameter expansion, command substitution, arithmetic
expansion, and quote removal, subject to the value of the
<code>promptvars</code> shell option (see <a href="#The-Shopt-Builtin">The Shopt Builtin</a>).
+This can have unwanted side effects if escaped portions of the string
+appear within command substitution or contain characters special to
+word expansion.
</p>
<hr>
-<a name="The-Restricted-Shell"></a>
-<div class="header">
+<span id="The-Restricted-Shell"></span><div class="header">
<p>
Next: <a href="#Bash-POSIX-Mode" accesskey="n" rel="next">Bash POSIX Mode</a>, Previous: <a href="#Controlling-the-Prompt" accesskey="p" rel="prev">Controlling the Prompt</a>, Up: <a href="#Bash-Features" accesskey="u" rel="up">Bash Features</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="The-Restricted-Shell-1"></a>
-<h3 class="section">6.10 The Restricted Shell</h3>
-<a name="index-restricted-shell"></a>
+<span id="The-Restricted-Shell-1"></span><h3 class="section">6.10 The Restricted Shell</h3>
+<span id="index-restricted-shell"></span>
<p>If Bash is started with the name <code>rbash</code>, or the
<samp>--restricted</samp>
<ul>
<li> Changing directories with the <code>cd</code> builtin.
</li><li> Setting or unsetting the values of the <code>SHELL</code>, <code>PATH</code>,
+<code>HISTFILE</code>,
<code>ENV</code>, or <code>BASH_ENV</code> variables.
</li><li> Specifying command names containing slashes.
</li><li> Specifying a filename containing a slash as an argument to the <code>.</code>
builtin command.
+</li><li> Specifying a filename containing a slash as an argument to the <code>history</code>
+builtin command.
</li><li> Specifying a filename containing a slash as an argument to the <samp>-p</samp>
option to the <code>hash</code> builtin command.
</li><li> Importing function definitions from the shell environment at startup.
(see <a href="#Shell-Scripts">Shell Scripts</a>), <code>rbash</code> turns off any restrictions in
the shell spawned to execute the script.
</p>
+<p>The restricted shell mode is only one component of a useful restricted
+environment. It should be accompanied by setting <code>PATH</code> to a value
+that allows execution of only a few verified commands (commands that
+allow shell escapes are particularly vulnerable), leaving the user
+in a non-writable directory other than his home directory after login,
+not allowing the restricted shell to execute shell scripts, and cleaning
+the environment of variables that cause some commands to modify their
+behavior (e.g., <code>VISUAL</code> or <code>PAGER</code>).
+</p>
+<p>Modern systems provide more secure ways to implement a restricted environment,
+such as <code>jails</code>, <code>zones</code>, or <code>containers</code>.
+</p>
+
<hr>
-<a name="Bash-POSIX-Mode"></a>
-<div class="header">
+<span id="Bash-POSIX-Mode"></span><div class="header">
<p>
-Previous: <a href="#The-Restricted-Shell" accesskey="p" rel="prev">The Restricted Shell</a>, Up: <a href="#Bash-Features" accesskey="u" rel="up">Bash Features</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
+Next: <a href="#Shell-Compatibility-Mode" accesskey="n" rel="next">Shell Compatibility Mode</a>, Previous: <a href="#The-Restricted-Shell" accesskey="p" rel="prev">The Restricted Shell</a>, Up: <a href="#Bash-Features" accesskey="u" rel="up">Bash Features</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Bash-POSIX-Mode-1"></a>
-<h3 class="section">6.11 Bash POSIX Mode</h3>
-<a name="index-POSIX-Mode"></a>
+<span id="Bash-POSIX-Mode-1"></span><h3 class="section">6.11 Bash POSIX Mode</h3>
+<span id="index-POSIX-Mode"></span>
<p>Starting Bash with the <samp>--posix</samp> command-line option or executing
‘<samp>set -o posix</samp>’ while Bash is running will cause Bash to conform more
<code>$PATH</code> to find the new location. This is also available with
‘<samp>shopt -s checkhash</samp>’.
+</li><li> Bash will not insert a command without the execute bit set into the
+command hash table, even if it returns it as a (last-ditch) result
+from a <code>$PATH</code> search.
+
</li><li> The message printed by the job control code and builtins when a job
exits with a non-zero status is ‘Done(status)’.
</li><li> The parser does not recognize <code>time</code> as a reserved word if the next
token begins with a ‘<samp>-</samp>’.
+
</li><li> The ‘<samp>!</samp>’ character does not introduce history expansion within a
double-quoted string, even if the <code>histexpand</code> option is enabled.
with the <code>.</code> or <code>source</code> builtins, or in a string processed by
the <code>eval</code> builtin.
-</li><li> Process substitution is not available.
-
</li><li> While variable indirection is available, it may not be applied to the
‘<samp>#</samp>’ and ‘<samp>?</samp>’ special parameters.
</li><li> Assignment statements preceding <small>POSIX</small> special builtins
persist in the shell environment after the builtin completes.
-</li><li> Assignment statements preceding shell function calls persist in the
-shell environment after the function returns, as if a <small>POSIX</small>
-special builtin command had been executed.
-
</li><li> The <code>command</code> builtin does not prevent builtins that take assignment
statements as arguments from expanding them as assignment statements;
when not in <small>POSIX</small> mode, assignment builtins lose their assignment
signal to the original disposition, they should use ‘<samp>-</samp>’ as the
first argument.
+</li><li> <code>trap -p</code> displays signals whose dispositions are set to SIG_DFL and
+those that were ignored when the shell started.
+
</li><li> The <code>.</code> and <code>source</code> builtins do not search the current directory
for the filename argument if it is not found by searching <code>PATH</code>.
(see <a href="#Optional-Features">Optional Features</a>).
</p>
<hr>
-<a name="Job-Control"></a>
-<div class="header">
+<span id="Shell-Compatibility-Mode"></span><div class="header">
+<p>
+Previous: <a href="#Bash-POSIX-Mode" accesskey="p" rel="prev">Bash POSIX Mode</a>, Up: <a href="#Bash-Features" accesskey="u" rel="up">Bash Features</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
+</div>
+<span id="Shell-Compatibility-Mode-1"></span><h3 class="section">6.12 Shell Compatibility Mode</h3>
+<span id="index-Compatibility-Level"></span>
+<span id="index-Compatibility-Mode"></span>
+
+<p>Bash-4.0 introduced the concept of a ‘shell compatibility level’, specified
+as a set of options to the shopt builtin
+(<code>compat31</code>,
+<code>compat32</code>,
+<code>compat40</code>,
+<code>compat41</code>,
+and so on).
+There is only one current
+compatibility level – each option is mutually exclusive.
+The compatibility level is intended to allow users to select behavior
+from previous versions that is incompatible with newer versions
+while they migrate scripts to use current features and
+behavior. It’s intended to be a temporary solution.
+</p>
+<p>This section does not mention behavior that is standard for a particular
+version (e.g., setting <code>compat32</code> means that quoting the rhs of the regexp
+matching operator quotes special regexp characters in the word, which is
+default behavior in bash-3.2 and above).
+</p>
+<p>If a user enables, say, <code>compat32</code>, it may affect the behavior of other
+compatibility levels up to and including the current compatibility level.
+The idea is that each compatibility level controls behavior that changed
+in that version of Bash,
+but that behavior may have been present in earlier versions.
+For instance, the change to use locale-based comparisons with the <code>[[</code>
+command came in bash-4.1, and earlier versions used ASCII-based comparisons,
+so enabling <code>compat32</code> will enable ASCII-based comparisons as well.
+That granularity may not be sufficient for
+all uses, and as a result users should employ compatibility levels carefully.
+Read the documentation for a particular feature to find out the
+current behavior.
+</p>
+<p>Bash-4.3 introduced a new shell variable: <code>BASH_COMPAT</code>.
+The value assigned
+to this variable (a decimal version number like 4.2, or an integer
+corresponding to the <code>compat</code><var>NN</var> option, like 42) determines the
+compatibility level.
+</p>
+<p>Starting with bash-4.4, Bash has begun deprecating older compatibility
+levels.
+Eventually, the options will be removed in favor of <code>BASH_COMPAT</code>.
+</p>
+<p>Bash-5.0 is the final version for which there will be an individual shopt
+option for the previous version. Users should use <code>BASH_COMPAT</code>
+on bash-5.0 and later versions.
+</p>
+<p>The following table describes the behavior changes controlled by each
+compatibility level setting.
+The <code>compat</code><var>NN</var> tag is used as shorthand for setting the
+compatibility level
+to <var>NN</var> using one of the following mechanisms.
+For versions prior to bash-5.0, the compatibility level may be set using
+the corresponding <code>compat</code><var>NN</var> shopt option.
+For bash-4.3 and later versions, the <code>BASH_COMPAT</code> variable is preferred,
+and it is required for bash-5.1 and later versions.
+</p>
+<dl compact="compact">
+<dt><code>compat31</code></dt>
+<dd><ul>
+<li> quoting the rhs of the <code>[[</code> command’s regexp matching operator (=~)
+has no special effect
+</li></ul>
+
+</dd>
+<dt><code>compat32</code></dt>
+<dd><ul>
+<li> interrupting a command list such as "a ; b ; c" causes the execution
+of the next command in the list (in bash-4.0 and later versions,
+the shell acts as if it received the interrupt, so
+interrupting one command in a list aborts the execution of the
+entire list)
+</li></ul>
+
+</dd>
+<dt><code>compat40</code></dt>
+<dd><ul>
+<li> the ‘<samp><</samp>’ and ‘<samp>></samp>’ operators to the <code>[[</code> command do not
+consider the current locale when comparing strings; they use ASCII
+ordering.
+Bash versions prior to bash-4.1 use ASCII collation and strcmp(3);
+bash-4.1 and later use the current locale’s collation sequence and
+strcoll(3).
+</li></ul>
+
+</dd>
+<dt><code>compat41</code></dt>
+<dd><ul>
+<li> in posix mode, <code>time</code> may be followed by options and still be
+recognized as a reserved word (this is <small>POSIX</small> interpretation 267)
+</li><li> in posix mode, the parser requires that an even number of single
+quotes occur in the <var>word</var> portion of a double-quoted ${…}
+parameter expansion and treats them specially, so that characters within
+the single quotes are considered quoted
+(this is <small>POSIX</small> interpretation 221)
+</li></ul>
+
+</dd>
+<dt><code>compat42</code></dt>
+<dd><ul>
+<li> the replacement string in double-quoted pattern substitution does not
+undergo quote removal, as it does in versions after bash-4.2
+</li><li> in posix mode, single quotes are considered special when expanding
+the <var>word</var> portion of a double-quoted ${…} parameter expansion
+and can be used to quote a closing brace or other special character
+(this is part of <small>POSIX</small> interpretation 221);
+in later versions, single quotes
+are not special within double-quoted word expansions
+</li></ul>
+
+</dd>
+<dt><code>compat43</code></dt>
+<dd><ul>
+<li> the shell does not print a warning message if an attempt is made to
+use a quoted compound assignment as an argument to declare
+(declare -a foo=’(1 2)’). Later versions warn that this usage is
+deprecated
+</li><li> word expansion errors are considered non-fatal errors that cause the
+current command to fail, even in posix mode
+(the default behavior is to make them fatal errors that cause the shell
+to exit)
+</li><li> when executing a shell function, the loop state (while/until/etc.)
+is not reset, so <code>break</code> or <code>continue</code> in that function will break
+or continue loops in the calling context. Bash-4.4 and later reset
+the loop state to prevent this
+</li></ul>
+
+</dd>
+<dt><code>compat44</code></dt>
+<dd><ul>
+<li> the shell sets up the values used by <code>BASH_ARGV</code> and <code>BASH_ARGC</code>
+so they can expand to the shell’s positional parameters even if extended
+debugging mode is not enabled
+</li><li> a subshell inherits loops from its parent context, so <code>break</code>
+or <code>continue</code> will cause the subshell to exit.
+Bash-5.0 and later reset the loop state to prevent the exit
+</li><li> variable assignments preceding builtins like <code>export</code> and <code>readonly</code>
+that set attributes continue to affect variables with the same
+name in the calling environment even if the shell is not in posix
+mode
+</li></ul>
+
+</dd>
+<dt><code>compat50 (set using BASH_COMPAT)</code></dt>
+<dd><ul>
+<li> Bash-5.1 changed the way <code>$RANDOM</code> is generated to introduce slightly
+more randomness. If the shell compatibility level is set to 50 or
+lower, it reverts to the method from bash-5.0 and previous versions,
+so seeding the random number generator by assigning a value to
+<code>RANDOM</code> will produce the same sequence as in bash-5.0
+</li><li> If the command hash table is empty, Bash versions prior to bash-5.1
+printed an informational message to that effect, even when producing
+output that can be reused as input. Bash-5.1 suppresses that message
+when the <samp>-l</samp> option is supplied.
+</li></ul>
+</dd>
+</dl>
+
+<hr>
+<span id="Job-Control"></span><div class="header">
<p>
Next: <a href="#Command-Line-Editing" accesskey="n" rel="next">Command Line Editing</a>, Previous: <a href="#Bash-Features" accesskey="p" rel="prev">Bash Features</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Job-Control-1"></a>
-<h2 class="chapter">7 Job Control</h2>
+<span id="Job-Control-1"></span><h2 class="chapter">7 Job Control</h2>
<p>This chapter discusses what job control is, how it works, and how
Bash allows you to access its facilities.
</p>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Job-Control-Basics" accesskey="1">Job Control Basics</a>:</td><td> </td><td align="left" valign="top">How job control works.
+<tr><td align="left" valign="top">• <a href="#Job-Control-Basics" accesskey="1">Job Control Basics</a></td><td> </td><td align="left" valign="top">How job control works.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Job-Control-Builtins" accesskey="2">Job Control Builtins</a>:</td><td> </td><td align="left" valign="top">Bash builtin commands used to interact
+<tr><td align="left" valign="top">• <a href="#Job-Control-Builtins" accesskey="2">Job Control Builtins</a></td><td> </td><td align="left" valign="top">Bash builtin commands used to interact
with job control.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Job-Control-Variables" accesskey="3">Job Control Variables</a>:</td><td> </td><td align="left" valign="top">Variables Bash uses to customize job
+<tr><td align="left" valign="top">• <a href="#Job-Control-Variables" accesskey="3">Job Control Variables</a></td><td> </td><td align="left" valign="top">Variables Bash uses to customize job
control.
</td></tr>
</table>
<hr>
-<a name="Job-Control-Basics"></a>
-<div class="header">
+<span id="Job-Control-Basics"></span><div class="header">
<p>
Next: <a href="#Job-Control-Builtins" accesskey="n" rel="next">Job Control Builtins</a>, Up: <a href="#Job-Control" accesskey="u" rel="up">Job Control</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Job-Control-Basics-1"></a>
-<h3 class="section">7.1 Job Control Basics</h3>
-<a name="index-job-control-1"></a>
-<a name="index-foreground"></a>
-<a name="index-background"></a>
-<a name="index-suspending-jobs"></a>
+<span id="Job-Control-Basics-1"></span><h3 class="section">7.1 Job Control Basics</h3>
+<span id="index-job-control-1"></span>
+<span id="index-foreground"></span>
+<span id="index-background"></span>
+<span id="index-suspending-jobs"></span>
<p>Job control
refers to the ability to selectively stop (suspend)
<p>A job may also be referred to
using a prefix of the name used to start it, or using a substring
that appears in its command line. For example, ‘<samp>%ce</samp>’ refers
-to a stopped <code>ce</code> job. Using ‘<samp>%?ce</samp>’, on the
+to a stopped job whose command name begins with ‘<samp>ce</samp>’.
+Using ‘<samp>%?ce</samp>’, on the
other hand, refers to any job containing the string ‘<samp>ce</samp>’ in
its command line. If the prefix or substring matches more than one job,
Bash reports an error.
</p>
<p>When the shell is waiting for a job or process using the <code>wait</code>
builtin, and job control is enabled, <code>wait</code> will return when the
-job changes state. The <samp>-f</samp> option will force <code>wait</code> to wait
+job changes state. The <samp>-f</samp> option causes <code>wait</code> to wait
until the job or process terminates before returning.
</p>
<hr>
-<a name="Job-Control-Builtins"></a>
-<div class="header">
+<span id="Job-Control-Builtins"></span><div class="header">
<p>
Next: <a href="#Job-Control-Variables" accesskey="n" rel="next">Job Control Variables</a>, Previous: <a href="#Job-Control-Basics" accesskey="p" rel="prev">Job Control Basics</a>, Up: <a href="#Job-Control" accesskey="u" rel="up">Job Control</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Job-Control-Builtins-1"></a>
-<h3 class="section">7.2 Job Control Builtins</h3>
+<span id="Job-Control-Builtins-1"></span><h3 class="section">7.2 Job Control Builtins</h3>
<dl compact="compact">
<dt><code>bg</code></dt>
-<dd><a name="index-bg"></a>
+<dd><span id="index-bg"></span>
<div class="example">
<pre class="example">bg [<var>jobspec</var> …]
</pre></div>
</p>
</dd>
<dt><code>fg</code></dt>
-<dd><a name="index-fg"></a>
+<dd><span id="index-fg"></span>
<div class="example">
<pre class="example">fg [<var>jobspec</var>]
</pre></div>
</p>
</dd>
<dt><code>jobs</code></dt>
-<dd><a name="index-jobs"></a>
+<dd><span id="index-jobs"></span>
<div class="example">
<pre class="example">jobs [-lnprs] [<var>jobspec</var>]
jobs -x <var>command</var> [<var>arguments</var>]
</p>
</dd>
<dt><code>kill</code></dt>
-<dd><a name="index-kill"></a>
+<dd><span id="index-kill"></span>
<div class="example">
<pre class="example">kill [-s <var>sigspec</var>] [-n <var>signum</var>] [-<var>sigspec</var>] <var>jobspec</var> or <var>pid</var>
kill -l|-L [<var>exit_status</var>]
</p>
</dd>
<dt><code>wait</code></dt>
-<dd><a name="index-wait"></a>
+<dd><span id="index-wait"></span>
<div class="example">
-<pre class="example">wait [-fn] [<var>jobspec</var> or <var>pid</var> …]
+<pre class="example">wait [-fn] [-p <var>varname</var>] [<var>jobspec</var> or <var>pid</var> …]
</pre></div>
<p>Wait until the child process specified by each process <small>ID</small> <var>pid</var>
or job specification <var>jobspec</var> exits and return the exit status of the
last command waited for.
If a job spec is given, all processes in the job are waited for.
-If no arguments are given, all currently active child processes are
-waited for, and the return status is zero.
-If the <samp>-n</samp> option is supplied, <code>wait</code> waits for any job to
-terminate and returns its exit status.
-If the <samp>-f</samp> option is supplied, and job control is enabled,
-<code>wait</code> forces each <var>pid</var> or <var>jobspec</var> to terminate before
-returning its status, intead of returning when it changes status.
+If no arguments are given,
+<code>wait</code> waits for all running background jobs and
+the last-executed process substitution, if its process id is the same as
+<var>$!</var>,
+and the return status is zero.
+If the <samp>-n</samp> option is supplied, <code>wait</code> waits for a single job
+from the list of <var>pids</var> or <var>jobspecs</var> or, if no arguments are
+supplied, any job,
+to complete and returns its exit status.
+If none of the supplied arguments is a child of the shell, or if no arguments
+are supplied and the shell has no unwaited-for children, the exit status
+is 127.
+If the <samp>-p</samp> option is supplied, the process or job identifier of the job
+for which the exit status is returned is assigned to the variable
+<var>varname</var> named by the option argument.
+The variable will be unset initially, before any assignment.
+This is useful only when the <samp>-n</samp> option is supplied.
+Supplying the <samp>-f</samp> option, when job control is enabled,
+forces <code>wait</code> to wait for each <var>pid</var> or <var>jobspec</var> to
+terminate before returning its status, intead of returning when it changes
+status.
If neither <var>jobspec</var> nor <var>pid</var> specifies an active child process
of the shell, the return status is 127.
</p>
</dd>
<dt><code>disown</code></dt>
-<dd><a name="index-disown"></a>
+<dd><span id="index-disown"></span>
<div class="example">
<pre class="example">disown [-ar] [-h] [<var>jobspec</var> … | <var>pid</var> … ]
</pre></div>
</p>
</dd>
<dt><code>suspend</code></dt>
-<dd><a name="index-suspend"></a>
+<dd><span id="index-suspend"></span>
<div class="example">
<pre class="example">suspend [-f]
</pre></div>
supplied process <small>ID</small>s.
</p>
<hr>
-<a name="Job-Control-Variables"></a>
-<div class="header">
+<span id="Job-Control-Variables"></span><div class="header">
<p>
Previous: <a href="#Job-Control-Builtins" accesskey="p" rel="prev">Job Control Builtins</a>, Up: <a href="#Job-Control" accesskey="u" rel="up">Job Control</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Job-Control-Variables-1"></a>
-<h3 class="section">7.3 Job Control Variables</h3>
+<span id="Job-Control-Variables-1"></span><h3 class="section">7.3 Job Control Variables</h3>
<dl compact="compact">
<dt><code>auto_resume</code>
-<a name="index-auto_005fresume"></a>
+<span id="index-auto_005fresume"></span>
</dt>
<dd><p>This variable controls how the shell interacts with the user and
job control. If this variable exists then single word simple
</dd>
</dl>
-<a name="index-Readline_002c-how-to-use"></a>
+<span id="index-Readline_002c-how-to-use"></span>
<hr>
-<a name="Command-Line-Editing"></a>
-<div class="header">
+<span id="Command-Line-Editing"></span><div class="header">
<p>
Next: <a href="#Using-History-Interactively" accesskey="n" rel="next">Using History Interactively</a>, Previous: <a href="#Job-Control" accesskey="p" rel="prev">Job Control</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Command-Line-Editing-1"></a>
-<h2 class="chapter">8 Command Line Editing</h2>
+<span id="Command-Line-Editing-1"></span><h2 class="chapter">8 Command Line Editing</h2>
<p>This chapter describes the basic features of the <small>GNU</small>
command line editing interface.
<samp>+o vi</samp> options to <code>set</code>.
</p>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Introduction-and-Notation" accesskey="1">Introduction and Notation</a>:</td><td> </td><td align="left" valign="top">Notation used in this text.
+<tr><td align="left" valign="top">• <a href="#Introduction-and-Notation" accesskey="1">Introduction and Notation</a></td><td> </td><td align="left" valign="top">Notation used in this text.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Readline-Interaction" accesskey="2">Readline Interaction</a>:</td><td> </td><td align="left" valign="top">The minimum set of commands for editing a line.
+<tr><td align="left" valign="top">• <a href="#Readline-Interaction" accesskey="2">Readline Interaction</a></td><td> </td><td align="left" valign="top">The minimum set of commands for editing a line.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Readline-Init-File" accesskey="3">Readline Init File</a>:</td><td> </td><td align="left" valign="top">Customizing Readline from a user’s view.
+<tr><td align="left" valign="top">• <a href="#Readline-Init-File" accesskey="3">Readline Init File</a></td><td> </td><td align="left" valign="top">Customizing Readline from a user’s view.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Bindable-Readline-Commands" accesskey="4">Bindable Readline Commands</a>:</td><td> </td><td align="left" valign="top">A description of most of the Readline commands
+<tr><td align="left" valign="top">• <a href="#Bindable-Readline-Commands" accesskey="4">Bindable Readline Commands</a></td><td> </td><td align="left" valign="top">A description of most of the Readline commands
available for binding
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Readline-vi-Mode" accesskey="5">Readline vi Mode</a>:</td><td> </td><td align="left" valign="top">A short description of how to make Readline
+<tr><td align="left" valign="top">• <a href="#Readline-vi-Mode" accesskey="5">Readline vi Mode</a></td><td> </td><td align="left" valign="top">A short description of how to make Readline
behave like the vi editor.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Programmable-Completion" accesskey="6">Programmable Completion</a>:</td><td> </td><td align="left" valign="top">How to specify the possible completions for
+<tr><td align="left" valign="top">• <a href="#Programmable-Completion" accesskey="6">Programmable Completion</a></td><td> </td><td align="left" valign="top">How to specify the possible completions for
a specific command.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Programmable-Completion-Builtins" accesskey="7">Programmable Completion Builtins</a>:</td><td> </td><td align="left" valign="top">Builtin commands to specify how to
+<tr><td align="left" valign="top">• <a href="#Programmable-Completion-Builtins" accesskey="7">Programmable Completion Builtins</a></td><td> </td><td align="left" valign="top">Builtin commands to specify how to
complete arguments for a particular command.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#A-Programmable-Completion-Example" accesskey="8">A Programmable Completion Example</a>:</td><td> </td><td align="left" valign="top">An example shell function for
+<tr><td align="left" valign="top">• <a href="#A-Programmable-Completion-Example" accesskey="8">A Programmable Completion Example</a></td><td> </td><td align="left" valign="top">An example shell function for
generating possible completions.
</td></tr>
</table>
<hr>
-<a name="Introduction-and-Notation"></a>
-<div class="header">
+<span id="Introduction-and-Notation"></span><div class="header">
<p>
Next: <a href="#Readline-Interaction" accesskey="n" rel="next">Readline Interaction</a>, Up: <a href="#Command-Line-Editing" accesskey="u" rel="up">Command Line Editing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Introduction-to-Line-Editing"></a>
-<h3 class="section">8.1 Introduction to Line Editing</h3>
+<span id="Introduction-to-Line-Editing"></span><h3 class="section">8.1 Introduction to Line Editing</h3>
<p>The following paragraphs describe the notation used to represent
keystrokes.
some keyboards.
</p>
<hr>
-<a name="Readline-Interaction"></a>
-<div class="header">
+<span id="Readline-Interaction"></span><div class="header">
<p>
Next: <a href="#Readline-Init-File" accesskey="n" rel="next">Readline Init File</a>, Previous: <a href="#Introduction-and-Notation" accesskey="p" rel="prev">Introduction and Notation</a>, Up: <a href="#Command-Line-Editing" accesskey="u" rel="up">Command Line Editing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Readline-Interaction-1"></a>
-<h3 class="section">8.2 Readline Interaction</h3>
-<a name="index-interaction_002c-readline"></a>
+<span id="Readline-Interaction-1"></span><h3 class="section">8.2 Readline Interaction</h3>
+<span id="index-interaction_002c-readline"></span>
<p>Often during an interactive session you type in a long line of text,
only to notice that the first word on the line is misspelled. The
regardless of the location of the cursor within the line.
</p>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Readline-Bare-Essentials" accesskey="1">Readline Bare Essentials</a>:</td><td> </td><td align="left" valign="top">The least you need to know about Readline.
+<tr><td align="left" valign="top">• <a href="#Readline-Bare-Essentials" accesskey="1">Readline Bare Essentials</a></td><td> </td><td align="left" valign="top">The least you need to know about Readline.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Readline-Movement-Commands" accesskey="2">Readline Movement Commands</a>:</td><td> </td><td align="left" valign="top">Moving about the input line.
+<tr><td align="left" valign="top">• <a href="#Readline-Movement-Commands" accesskey="2">Readline Movement Commands</a></td><td> </td><td align="left" valign="top">Moving about the input line.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Readline-Killing-Commands" accesskey="3">Readline Killing Commands</a>:</td><td> </td><td align="left" valign="top">How to delete text, and how to get it back!
+<tr><td align="left" valign="top">• <a href="#Readline-Killing-Commands" accesskey="3">Readline Killing Commands</a></td><td> </td><td align="left" valign="top">How to delete text, and how to get it back!
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Readline-Arguments" accesskey="4">Readline Arguments</a>:</td><td> </td><td align="left" valign="top">Giving numeric arguments to commands.
+<tr><td align="left" valign="top">• <a href="#Readline-Arguments" accesskey="4">Readline Arguments</a></td><td> </td><td align="left" valign="top">Giving numeric arguments to commands.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Searching" accesskey="5">Searching</a>:</td><td> </td><td align="left" valign="top">Searching through previous lines.
+<tr><td align="left" valign="top">• <a href="#Searching" accesskey="5">Searching</a></td><td> </td><td align="left" valign="top">Searching through previous lines.
</td></tr>
</table>
<hr>
-<a name="Readline-Bare-Essentials"></a>
-<div class="header">
+<span id="Readline-Bare-Essentials"></span><div class="header">
<p>
Next: <a href="#Readline-Movement-Commands" accesskey="n" rel="next">Readline Movement Commands</a>, Up: <a href="#Readline-Interaction" accesskey="u" rel="up">Readline Interaction</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Readline-Bare-Essentials-1"></a>
-<h4 class="subsection">8.2.1 Readline Bare Essentials</h4>
-<a name="index-notation_002c-readline"></a>
-<a name="index-command-editing"></a>
-<a name="index-editing-command-lines"></a>
+<span id="Readline-Bare-Essentials-1"></span><h4 class="subsection">8.2.1 Readline Bare Essentials</h4>
+<span id="index-notation_002c-readline"></span>
+<span id="index-command-editing"></span>
+<span id="index-editing-command-lines"></span>
<p>In order to enter characters into the line, simply type them. The typed
character appears where the cursor was, and then the cursor moves one
than the character to the left of the cursor.)
</p>
<hr>
-<a name="Readline-Movement-Commands"></a>
-<div class="header">
+<span id="Readline-Movement-Commands"></span><div class="header">
<p>
Next: <a href="#Readline-Killing-Commands" accesskey="n" rel="next">Readline Killing Commands</a>, Previous: <a href="#Readline-Bare-Essentials" accesskey="p" rel="prev">Readline Bare Essentials</a>, Up: <a href="#Readline-Interaction" accesskey="u" rel="up">Readline Interaction</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Readline-Movement-Commands-1"></a>
-<h4 class="subsection">8.2.2 Readline Movement Commands</h4>
+<span id="Readline-Movement-Commands-1"></span><h4 class="subsection">8.2.2 Readline Movement Commands</h4>
<p>The above table describes the most basic keystrokes that you need
operate on characters while meta keystrokes operate on words.
</p>
<hr>
-<a name="Readline-Killing-Commands"></a>
-<div class="header">
+<span id="Readline-Killing-Commands"></span><div class="header">
<p>
Next: <a href="#Readline-Arguments" accesskey="n" rel="next">Readline Arguments</a>, Previous: <a href="#Readline-Movement-Commands" accesskey="p" rel="prev">Readline Movement Commands</a>, Up: <a href="#Readline-Interaction" accesskey="u" rel="up">Readline Interaction</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Readline-Killing-Commands-1"></a>
-<h4 class="subsection">8.2.3 Readline Killing Commands</h4>
+<span id="Readline-Killing-Commands-1"></span><h4 class="subsection">8.2.3 Readline Killing Commands</h4>
-<a name="index-killing-text"></a>
-<a name="index-yanking-text"></a>
+<span id="index-killing-text"></span>
+<span id="index-yanking-text"></span>
<p><em>Killing</em> text means to delete the text from the line, but to save
it away for later use, usually by <em>yanking</em> (re-inserting)
ring is not line specific; the text that you killed on a previously
typed line is available to be yanked back later, when you are typing
another line.
-<a name="index-kill-ring"></a>
+<span id="index-kill-ring"></span>
</p>
<p>Here is the list of commands for killing text.
</p>
</dl>
<hr>
-<a name="Readline-Arguments"></a>
-<div class="header">
+<span id="Readline-Arguments"></span><div class="header">
<p>
Next: <a href="#Searching" accesskey="n" rel="next">Searching</a>, Previous: <a href="#Readline-Killing-Commands" accesskey="p" rel="prev">Readline Killing Commands</a>, Up: <a href="#Readline-Interaction" accesskey="u" rel="up">Readline Interaction</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Readline-Arguments-1"></a>
-<h4 class="subsection">8.2.4 Readline Arguments</h4>
+<span id="Readline-Arguments-1"></span><h4 class="subsection">8.2.4 Readline Arguments</h4>
<p>You can pass numeric arguments to Readline commands. Sometimes the
argument acts as a repeat count, other times it is the <i>sign</i> of the
which will delete the next ten characters on the input line.
</p>
<hr>
-<a name="Searching"></a>
-<div class="header">
+<span id="Searching"></span><div class="header">
<p>
Previous: <a href="#Readline-Arguments" accesskey="p" rel="prev">Readline Arguments</a>, Up: <a href="#Readline-Interaction" accesskey="u" rel="up">Readline Interaction</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Searching-for-Commands-in-the-History"></a>
-<h4 class="subsection">8.2.5 Searching for Commands in the History</h4>
+<span id="Searching-for-Commands-in-the-History"></span><h4 class="subsection">8.2.5 Searching for Commands in the History</h4>
<p>Readline provides commands for searching through the command history
(see <a href="#Bash-History-Facilities">Bash History Facilities</a>)
typed by the user or be part of the contents of the current line.
</p>
<hr>
-<a name="Readline-Init-File"></a>
-<div class="header">
+<span id="Readline-Init-File"></span><div class="header">
<p>
Next: <a href="#Bindable-Readline-Commands" accesskey="n" rel="next">Bindable Readline Commands</a>, Previous: <a href="#Readline-Interaction" accesskey="p" rel="prev">Readline Interaction</a>, Up: <a href="#Command-Line-Editing" accesskey="u" rel="up">Command Line Editing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Readline-Init-File-1"></a>
-<h3 class="section">8.3 Readline Init File</h3>
-<a name="index-initialization-file_002c-readline"></a>
+<span id="Readline-Init-File-1"></span><h3 class="section">8.3 Readline Init File</h3>
+<span id="index-initialization-file_002c-readline"></span>
<p>Although the Readline library comes with a set of Emacs-like
keybindings installed by default, it is possible to use a different set
that variable is unset, the default is <samp>~/.inputrc</samp>. If that
file does not exist or cannot be read, the ultimate default is
<samp>/etc/inputrc</samp>.
+The <code>bind</code><!-- /@w --> builtin command can also be used to set Readline
+keybindings and variables.
+See <a href="#Bash-Builtins">Bash Builtins</a>.
</p>
<p>When a program which uses the Readline library starts up, the
init file is read, and the key bindings are set.
incorporating any changes that you might have made to it.
</p>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Readline-Init-File-Syntax" accesskey="1">Readline Init File Syntax</a>:</td><td> </td><td align="left" valign="top">Syntax for the commands in the inputrc file.
+<tr><td align="left" valign="top">• <a href="#Readline-Init-File-Syntax" accesskey="1">Readline Init File Syntax</a></td><td> </td><td align="left" valign="top">Syntax for the commands in the inputrc file.
</td></tr>
<tr><th colspan="3" align="left" valign="top"><pre class="menu-comment">
-</pre></th></tr><tr><td align="left" valign="top">• <a href="#Conditional-Init-Constructs" accesskey="2">Conditional Init Constructs</a>:</td><td> </td><td align="left" valign="top">Conditional key bindings in the inputrc file.
+</pre></th></tr><tr><td align="left" valign="top">• <a href="#Conditional-Init-Constructs" accesskey="2">Conditional Init Constructs</a></td><td> </td><td align="left" valign="top">Conditional key bindings in the inputrc file.
</td></tr>
<tr><th colspan="3" align="left" valign="top"><pre class="menu-comment">
-</pre></th></tr><tr><td align="left" valign="top">• <a href="#Sample-Init-File" accesskey="3">Sample Init File</a>:</td><td> </td><td align="left" valign="top">An example inputrc file.
+</pre></th></tr><tr><td align="left" valign="top">• <a href="#Sample-Init-File" accesskey="3">Sample Init File</a></td><td> </td><td align="left" valign="top">An example inputrc file.
</td></tr>
</table>
<hr>
-<a name="Readline-Init-File-Syntax"></a>
-<div class="header">
+<span id="Readline-Init-File-Syntax"></span><div class="header">
<p>
Next: <a href="#Conditional-Init-Constructs" accesskey="n" rel="next">Conditional Init Constructs</a>, Up: <a href="#Readline-Init-File" accesskey="u" rel="up">Readline Init File</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Readline-Init-File-Syntax-1"></a>
-<h4 class="subsection">8.3.1 Readline Init File Syntax</h4>
+<span id="Readline-Init-File-Syntax-1"></span><h4 class="subsection">8.3.1 Readline Init File Syntax</h4>
<p>There are only a few basic constructs allowed in the
Readline init file. Blank lines are ignored.
<p>A great deal of run-time behavior is changeable with the following
variables.
</p>
-<a name="index-variables_002c-readline"></a>
+<span id="index-variables_002c-readline"></span>
<dl compact="compact">
<dt><code>bell-style</code></dt>
-<dd><a name="index-bell_002dstyle"></a>
+<dd><span id="index-bell_002dstyle"></span>
<p>Controls what happens when Readline wants to ring the terminal bell.
If set to ‘<samp>none</samp>’, Readline never rings the bell. If set to
‘<samp>visible</samp>’, Readline uses a visible bell if one is available.
</p>
</dd>
<dt><code>bind-tty-special-chars</code></dt>
-<dd><a name="index-bind_002dtty_002dspecial_002dchars"></a>
+<dd><span id="index-bind_002dtty_002dspecial_002dchars"></span>
<p>If set to ‘<samp>on</samp>’ (the default), Readline attempts to bind the control
characters treated specially by the kernel’s terminal driver to their
Readline equivalents.
</p>
</dd>
<dt><code>blink-matching-paren</code></dt>
-<dd><a name="index-blink_002dmatching_002dparen"></a>
+<dd><span id="index-blink_002dmatching_002dparen"></span>
<p>If set to ‘<samp>on</samp>’, Readline attempts to briefly move the cursor to an
opening parenthesis when a closing parenthesis is inserted. The default
is ‘<samp>off</samp>’.
</p>
</dd>
<dt><code>colored-completion-prefix</code></dt>
-<dd><a name="index-colored_002dcompletion_002dprefix"></a>
+<dd><span id="index-colored_002dcompletion_002dprefix"></span>
<p>If set to ‘<samp>on</samp>’, when listing completions, Readline displays the
common prefix of the set of possible completions using a different color.
The color definitions are taken from the value of the <code>LS_COLORS</code>
</p>
</dd>
<dt><code>colored-stats</code></dt>
-<dd><a name="index-colored_002dstats"></a>
+<dd><span id="index-colored_002dstats"></span>
<p>If set to ‘<samp>on</samp>’, Readline displays possible completions using different
colors to indicate their file type.
The color definitions are taken from the value of the <code>LS_COLORS</code>
</p>
</dd>
<dt><code>comment-begin</code></dt>
-<dd><a name="index-comment_002dbegin"></a>
+<dd><span id="index-comment_002dbegin"></span>
<p>The string to insert at the beginning of the line when the
<code>insert-comment</code> command is executed. The default value
is <code>"#"</code>.
</p>
</dd>
<dt><code>completion-display-width</code></dt>
-<dd><a name="index-completion_002ddisplay_002dwidth"></a>
+<dd><span id="index-completion_002ddisplay_002dwidth"></span>
<p>The number of screen columns used to display possible matches
when performing completion.
The value is ignored if it is less than 0 or greater than the terminal
</p>
</dd>
<dt><code>completion-ignore-case</code></dt>
-<dd><a name="index-completion_002dignore_002dcase"></a>
+<dd><span id="index-completion_002dignore_002dcase"></span>
<p>If set to ‘<samp>on</samp>’, Readline performs filename matching and completion
in a case-insensitive fashion.
The default value is ‘<samp>off</samp>’.
</p>
</dd>
<dt><code>completion-map-case</code></dt>
-<dd><a name="index-completion_002dmap_002dcase"></a>
+<dd><span id="index-completion_002dmap_002dcase"></span>
<p>If set to ‘<samp>on</samp>’, and <var>completion-ignore-case</var> is enabled, Readline
treats hyphens (‘<samp>-</samp>’) and underscores (‘<samp>_</samp>’) as equivalent when
performing case-insensitive filename matching and completion.
</p>
</dd>
<dt><code>completion-prefix-display-length</code></dt>
-<dd><a name="index-completion_002dprefix_002ddisplay_002dlength"></a>
+<dd><span id="index-completion_002dprefix_002ddisplay_002dlength"></span>
<p>The length in characters of the common prefix of a list of possible
completions that is displayed without modification. When set to a
value greater than zero, common prefixes longer than this value are
</p>
</dd>
<dt><code>completion-query-items</code></dt>
-<dd><a name="index-completion_002dquery_002ditems"></a>
+<dd><span id="index-completion_002dquery_002ditems"></span>
<p>The number of possible completions that determines when the user is
asked whether the list of possibilities should be displayed.
-If the number of possible completions is greater than this value,
-Readline will ask the user whether or not he wishes to view
-them; otherwise, they are simply listed.
+If the number of possible completions is greater than or equal to this value,
+Readline will ask whether or not the user wishes to view them;
+otherwise, they are simply listed.
This variable must be set to an integer value greater than or equal to 0.
A negative value means Readline should never ask.
The default limit is <code>100</code>.
</p>
</dd>
<dt><code>convert-meta</code></dt>
-<dd><a name="index-convert_002dmeta"></a>
+<dd><span id="index-convert_002dmeta"></span>
<p>If set to ‘<samp>on</samp>’, Readline will convert characters with the
eighth bit set to an <small>ASCII</small> key sequence by stripping the eighth
bit and prefixing an <tt class="key">ESC</tt> character, converting them to a
</p>
</dd>
<dt><code>disable-completion</code></dt>
-<dd><a name="index-disable_002dcompletion"></a>
+<dd><span id="index-disable_002dcompletion"></span>
<p>If set to ‘<samp>On</samp>’, Readline will inhibit word completion.
Completion characters will be inserted into the line as if they had
been mapped to <code>self-insert</code>. The default is ‘<samp>off</samp>’.
</p>
</dd>
<dt><code>echo-control-characters</code></dt>
-<dd><a name="index-echo_002dcontrol_002dcharacters"></a>
+<dd><span id="index-echo_002dcontrol_002dcharacters"></span>
<p>When set to ‘<samp>on</samp>’, on operating systems that indicate they support it,
readline echoes a character corresponding to a signal generated from the
keyboard. The default is ‘<samp>on</samp>’.
</p>
</dd>
<dt><code>editing-mode</code></dt>
-<dd><a name="index-editing_002dmode"></a>
+<dd><span id="index-editing_002dmode"></span>
<p>The <code>editing-mode</code> variable controls which default set of
key bindings is used. By default, Readline starts up in Emacs editing
mode, where the keystrokes are most similar to Emacs. This variable can be
</p>
</dd>
<dt><code>emacs-mode-string</code></dt>
-<dd><a name="index-emacs_002dmode_002dstring"></a>
+<dd><span id="index-emacs_002dmode_002dstring"></span>
<p>If the <var>show-mode-in-prompt</var> variable is enabled,
this string is displayed immediately before the last line of the primary
prompt when emacs editing mode is active. The value is expanded like a
</p>
</dd>
<dt><code>enable-bracketed-paste</code></dt>
-<dd><a name="index-enable_002dbracketed_002dpaste"></a>
+<dd><span id="index-enable_002dbracketed_002dpaste"></span>
<p>When set to ‘<samp>On</samp>’, Readline will configure the terminal in a way
that will enable it to insert each paste into the editing buffer as a
single string of characters, instead of treating each character as if
it had been read from the keyboard. This can prevent pasted characters
-from being interpreted as editing commands. The default is ‘<samp>off</samp>’.
+from being interpreted as editing commands. The default is ‘<samp>On</samp>’.
</p>
</dd>
<dt><code>enable-keypad</code></dt>
-<dd><a name="index-enable_002dkeypad"></a>
+<dd><span id="index-enable_002dkeypad"></span>
<p>When set to ‘<samp>on</samp>’, Readline will try to enable the application
keypad when it is called. Some systems need this to enable the
arrow keys. The default is ‘<samp>off</samp>’.
</p>
</dd>
<dt><code>expand-tilde</code></dt>
-<dd><a name="index-expand_002dtilde"></a>
+<dd><span id="index-expand_002dtilde"></span>
<p>If set to ‘<samp>on</samp>’, tilde expansion is performed when Readline
attempts word completion. The default is ‘<samp>off</samp>’.
</p>
</dd>
<dt><code>history-preserve-point</code></dt>
-<dd><a name="index-history_002dpreserve_002dpoint"></a>
+<dd><span id="index-history_002dpreserve_002dpoint"></span>
<p>If set to ‘<samp>on</samp>’, the history code attempts to place the point (the
current cursor position) at the
same location on each history line retrieved with <code>previous-history</code>
</p>
</dd>
<dt><code>history-size</code></dt>
-<dd><a name="index-history_002dsize"></a>
+<dd><span id="index-history_002dsize"></span>
<p>Set the maximum number of history entries saved in the history list.
If set to zero, any existing history entries are deleted and no new entries
are saved.
</p>
</dd>
<dt><code>horizontal-scroll-mode</code></dt>
-<dd><a name="index-horizontal_002dscroll_002dmode"></a>
+<dd><span id="index-horizontal_002dscroll_002dmode"></span>
<p>This variable can be set to either ‘<samp>on</samp>’ or ‘<samp>off</samp>’. Setting it
to ‘<samp>on</samp>’ means that the text of the lines being edited will scroll
horizontally on a single screen line when they are longer than the width
-of the screen, instead of wrapping onto a new screen line. By default,
-this variable is set to ‘<samp>off</samp>’.
+of the screen, instead of wrapping onto a new screen line.
+This variable is automatically set to ‘<samp>on</samp>’ for terminals of height 1.
+By default, this variable is set to ‘<samp>off</samp>’.
</p>
</dd>
<dt><code>input-meta</code></dt>
-<dd><a name="index-input_002dmeta"></a>
-<a name="index-meta_002dflag"></a>
+<dd><span id="index-input_002dmeta"></span>
+<span id="index-meta_002dflag"></span>
<p>If set to ‘<samp>on</samp>’, Readline will enable eight-bit input (it
will not clear the eighth bit in the characters it reads),
regardless of what the terminal claims it can support. The
</p>
</dd>
<dt><code>isearch-terminators</code></dt>
-<dd><a name="index-isearch_002dterminators"></a>
+<dd><span id="index-isearch_002dterminators"></span>
<p>The string of characters that should terminate an incremental search without
subsequently executing the character as a command (see <a href="#Searching">Searching</a>).
If this variable has not been given a value, the characters <tt class="key">ESC</tt> and
</p>
</dd>
<dt><code>keymap</code></dt>
-<dd><a name="index-keymap"></a>
+<dd><span id="index-keymap"></span>
<p>Sets Readline’s idea of the current keymap for key binding commands.
Built-in <code>keymap</code> names are
<code>emacs</code>,
</p>
</dd>
<dt><code>mark-modified-lines</code></dt>
-<dd><a name="index-mark_002dmodified_002dlines"></a>
+<dd><span id="index-mark_002dmodified_002dlines"></span>
<p>This variable, when set to ‘<samp>on</samp>’, causes Readline to display an
asterisk (‘<samp>*</samp>’) at the start of history lines which have been modified.
This variable is ‘<samp>off</samp>’ by default.
</p>
</dd>
<dt><code>mark-symlinked-directories</code></dt>
-<dd><a name="index-mark_002dsymlinked_002ddirectories"></a>
+<dd><span id="index-mark_002dsymlinked_002ddirectories"></span>
<p>If set to ‘<samp>on</samp>’, completed names which are symbolic links
to directories have a slash appended (subject to the value of
<code>mark-directories</code>).
</p>
</dd>
<dt><code>match-hidden-files</code></dt>
-<dd><a name="index-match_002dhidden_002dfiles"></a>
+<dd><span id="index-match_002dhidden_002dfiles"></span>
<p>This variable, when set to ‘<samp>on</samp>’, causes Readline to match files whose
names begin with a ‘<samp>.</samp>’ (hidden files) when performing filename
completion.
</p>
</dd>
<dt><code>menu-complete-display-prefix</code></dt>
-<dd><a name="index-menu_002dcomplete_002ddisplay_002dprefix"></a>
+<dd><span id="index-menu_002dcomplete_002ddisplay_002dprefix"></span>
<p>If set to ‘<samp>on</samp>’, menu completion displays the common prefix of the
list of possible completions (which may be empty) before cycling through
the list. The default is ‘<samp>off</samp>’.
</p>
</dd>
<dt><code>output-meta</code></dt>
-<dd><a name="index-output_002dmeta"></a>
+<dd><span id="index-output_002dmeta"></span>
<p>If set to ‘<samp>on</samp>’, Readline will display characters with the
eighth bit set directly rather than as a meta-prefixed escape
sequence.
</p>
</dd>
<dt><code>page-completions</code></dt>
-<dd><a name="index-page_002dcompletions"></a>
+<dd><span id="index-page_002dcompletions"></span>
<p>If set to ‘<samp>on</samp>’, Readline uses an internal <code>more</code>-like pager
to display a screenful of possible completions at a time.
This variable is ‘<samp>on</samp>’ by default.
</p>
</dd>
<dt><code>revert-all-at-newline</code></dt>
-<dd><a name="index-revert_002dall_002dat_002dnewline"></a>
+<dd><span id="index-revert_002dall_002dat_002dnewline"></span>
<p>If set to ‘<samp>on</samp>’, Readline will undo all changes to history lines
before returning when <code>accept-line</code> is executed. By default,
history lines may be modified and retain individual undo lists across
</p>
</dd>
<dt><code>show-all-if-ambiguous</code></dt>
-<dd><a name="index-show_002dall_002dif_002dambiguous"></a>
+<dd><span id="index-show_002dall_002dif_002dambiguous"></span>
<p>This alters the default behavior of the completion functions. If
set to ‘<samp>on</samp>’,
words which have more than one possible completion cause the
</p>
</dd>
<dt><code>show-all-if-unmodified</code></dt>
-<dd><a name="index-show_002dall_002dif_002dunmodified"></a>
+<dd><span id="index-show_002dall_002dif_002dunmodified"></span>
<p>This alters the default behavior of the completion functions in
a fashion similar to <var>show-all-if-ambiguous</var>.
If set to ‘<samp>on</samp>’,
</p>
</dd>
<dt><code>show-mode-in-prompt</code></dt>
-<dd><a name="index-show_002dmode_002din_002dprompt"></a>
+<dd><span id="index-show_002dmode_002din_002dprompt"></span>
<p>If set to ‘<samp>on</samp>’, add a string to the beginning of the prompt
indicating the editing mode: emacs, vi command, or vi insertion.
The mode strings are user-settable (e.g., <var>emacs-mode-string</var>).
</p>
</dd>
<dt><code>skip-completed-text</code></dt>
-<dd><a name="index-skip_002dcompleted_002dtext"></a>
+<dd><span id="index-skip_002dcompleted_002dtext"></span>
<p>If set to ‘<samp>on</samp>’, this alters the default completion behavior when
inserting a single match into the line. It’s only active when
performing completion in the middle of a word. If enabled, readline
</p>
</dd>
<dt><code>vi-cmd-mode-string</code></dt>
-<dd><a name="index-vi_002dcmd_002dmode_002dstring"></a>
+<dd><span id="index-vi_002dcmd_002dmode_002dstring"></span>
<p>If the <var>show-mode-in-prompt</var> variable is enabled,
this string is displayed immediately before the last line of the primary
prompt when vi editing mode is active and in command mode.
</p>
</dd>
<dt><code>vi-ins-mode-string</code></dt>
-<dd><a name="index-vi_002dins_002dmode_002dstring"></a>
+<dd><span id="index-vi_002dins_002dmode_002dstring"></span>
<p>If the <var>show-mode-in-prompt</var> variable is enabled,
this string is displayed immediately before the last line of the primary
prompt when vi editing mode is active and in insertion mode.
</p>
</dd>
<dt><code>visible-stats</code></dt>
-<dd><a name="index-visible_002dstats"></a>
+<dd><span id="index-visible_002dstats"></span>
<p>If set to ‘<samp>on</samp>’, a character denoting a file’s type
is appended to the filename when listing possible
completions. The default is ‘<samp>off</samp>’.
</dl>
<hr>
-<a name="Conditional-Init-Constructs"></a>
-<div class="header">
+<span id="Conditional-Init-Constructs"></span><div class="header">
<p>
Next: <a href="#Sample-Init-File" accesskey="n" rel="next">Sample Init File</a>, Previous: <a href="#Readline-Init-File-Syntax" accesskey="p" rel="prev">Readline Init File Syntax</a>, Up: <a href="#Readline-Init-File" accesskey="u" rel="up">Readline Init File</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Conditional-Init-Constructs-1"></a>
-<h4 class="subsection">8.3.2 Conditional Init Constructs</h4>
+<span id="Conditional-Init-Constructs-1"></span><h4 class="subsection">8.3.2 Conditional Init Constructs</h4>
<p>Readline implements a facility similar in spirit to the conditional
compilation features of the C preprocessor which allows key
</dl>
<hr>
-<a name="Sample-Init-File"></a>
-<div class="header">
+<span id="Sample-Init-File"></span><div class="header">
<p>
Previous: <a href="#Conditional-Init-Constructs" accesskey="p" rel="prev">Conditional Init Constructs</a>, Up: <a href="#Readline-Init-File" accesskey="u" rel="up">Readline Init File</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Sample-Init-File-1"></a>
-<h4 class="subsection">8.3.3 Sample Init File</h4>
+<span id="Sample-Init-File-1"></span><h4 class="subsection">8.3.3 Sample Init File</h4>
<p>Here is an example of an <var>inputrc</var> file. This illustrates key
binding, variable assignment, and conditional syntax.
# rather than as meta-prefixed characters
set output-meta on
-# if there are more than 150 possible completions for
-# a word, ask the user if he wants to see all of them
+# if there are 150 or more possible completions for a word,
+# ask whether or not the user wants to see all of them
set completion-query-items 150
# For FTP
</pre></div>
<hr>
-<a name="Bindable-Readline-Commands"></a>
-<div class="header">
+<span id="Bindable-Readline-Commands"></span><div class="header">
<p>
Next: <a href="#Readline-vi-Mode" accesskey="n" rel="next">Readline vi Mode</a>, Previous: <a href="#Readline-Init-File" accesskey="p" rel="prev">Readline Init File</a>, Up: <a href="#Command-Line-Editing" accesskey="u" rel="up">Command Line Editing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Bindable-Readline-Commands-1"></a>
-<h3 class="section">8.4 Bindable Readline Commands</h3>
+<span id="Bindable-Readline-Commands-1"></span><h3 class="section">8.4 Bindable Readline Commands</h3>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Commands-For-Moving" accesskey="1">Commands For Moving</a>:</td><td> </td><td align="left" valign="top">Moving about the line.
+<tr><td align="left" valign="top">• <a href="#Commands-For-Moving" accesskey="1">Commands For Moving</a></td><td> </td><td align="left" valign="top">Moving about the line.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Commands-For-History" accesskey="2">Commands For History</a>:</td><td> </td><td align="left" valign="top">Getting at previous lines.
+<tr><td align="left" valign="top">• <a href="#Commands-For-History" accesskey="2">Commands For History</a></td><td> </td><td align="left" valign="top">Getting at previous lines.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Commands-For-Text" accesskey="3">Commands For Text</a>:</td><td> </td><td align="left" valign="top">Commands for changing text.
+<tr><td align="left" valign="top">• <a href="#Commands-For-Text" accesskey="3">Commands For Text</a></td><td> </td><td align="left" valign="top">Commands for changing text.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Commands-For-Killing" accesskey="4">Commands For Killing</a>:</td><td> </td><td align="left" valign="top">Commands for killing and yanking.
+<tr><td align="left" valign="top">• <a href="#Commands-For-Killing" accesskey="4">Commands For Killing</a></td><td> </td><td align="left" valign="top">Commands for killing and yanking.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Numeric-Arguments" accesskey="5">Numeric Arguments</a>:</td><td> </td><td align="left" valign="top">Specifying numeric arguments, repeat counts.
+<tr><td align="left" valign="top">• <a href="#Numeric-Arguments" accesskey="5">Numeric Arguments</a></td><td> </td><td align="left" valign="top">Specifying numeric arguments, repeat counts.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Commands-For-Completion" accesskey="6">Commands For Completion</a>:</td><td> </td><td align="left" valign="top">Getting Readline to do the typing for you.
+<tr><td align="left" valign="top">• <a href="#Commands-For-Completion" accesskey="6">Commands For Completion</a></td><td> </td><td align="left" valign="top">Getting Readline to do the typing for you.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Keyboard-Macros" accesskey="7">Keyboard Macros</a>:</td><td> </td><td align="left" valign="top">Saving and re-executing typed characters
+<tr><td align="left" valign="top">• <a href="#Keyboard-Macros" accesskey="7">Keyboard Macros</a></td><td> </td><td align="left" valign="top">Saving and re-executing typed characters
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Miscellaneous-Commands" accesskey="8">Miscellaneous Commands</a>:</td><td> </td><td align="left" valign="top">Other miscellaneous commands.
+<tr><td align="left" valign="top">• <a href="#Miscellaneous-Commands" accesskey="8">Miscellaneous Commands</a></td><td> </td><td align="left" valign="top">Other miscellaneous commands.
</td></tr>
</table>
The text between the point and mark is referred to as the <em>region</em>.
</p>
<hr>
-<a name="Commands-For-Moving"></a>
-<div class="header">
+<span id="Commands-For-Moving"></span><div class="header">
<p>
Next: <a href="#Commands-For-History" accesskey="n" rel="next">Commands For History</a>, Up: <a href="#Bindable-Readline-Commands" accesskey="u" rel="up">Bindable Readline Commands</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Commands-For-Moving-1"></a>
-<h4 class="subsection">8.4.1 Commands For Moving</h4>
+<span id="Commands-For-Moving-1"></span><h4 class="subsection">8.4.1 Commands For Moving</h4>
<dl compact="compact">
<dt><code>beginning-of-line (C-a)</code>
-<a name="index-beginning_002dof_002dline-_0028C_002da_0029"></a>
+<span id="index-beginning_002dof_002dline-_0028C_002da_0029"></span>
</dt>
<dd><p>Move to the start of the current line.
</p>
</dd>
<dt><code>end-of-line (C-e)</code>
-<a name="index-end_002dof_002dline-_0028C_002de_0029"></a>
+<span id="index-end_002dof_002dline-_0028C_002de_0029"></span>
</dt>
<dd><p>Move to the end of the line.
</p>
</dd>
<dt><code>forward-char (C-f)</code>
-<a name="index-forward_002dchar-_0028C_002df_0029"></a>
+<span id="index-forward_002dchar-_0028C_002df_0029"></span>
</dt>
<dd><p>Move forward a character.
</p>
</dd>
<dt><code>backward-char (C-b)</code>
-<a name="index-backward_002dchar-_0028C_002db_0029"></a>
+<span id="index-backward_002dchar-_0028C_002db_0029"></span>
</dt>
<dd><p>Move back a character.
</p>
</dd>
<dt><code>forward-word (M-f)</code>
-<a name="index-forward_002dword-_0028M_002df_0029"></a>
+<span id="index-forward_002dword-_0028M_002df_0029"></span>
</dt>
<dd><p>Move forward to the end of the next word.
Words are composed of letters and digits.
</p>
</dd>
<dt><code>backward-word (M-b)</code>
-<a name="index-backward_002dword-_0028M_002db_0029"></a>
+<span id="index-backward_002dword-_0028M_002db_0029"></span>
</dt>
<dd><p>Move back to the start of the current or previous word.
Words are composed of letters and digits.
</p>
</dd>
-<dt><code>shell-forward-word ()</code>
-<a name="index-shell_002dforward_002dword-_0028_0029"></a>
+<dt><code>shell-forward-word (M-C-f)</code>
+<span id="index-shell_002dforward_002dword-_0028M_002dC_002df_0029"></span>
</dt>
<dd><p>Move forward to the end of the next word.
Words are delimited by non-quoted shell metacharacters.
</p>
</dd>
-<dt><code>shell-backward-word ()</code>
-<a name="index-shell_002dbackward_002dword-_0028_0029"></a>
+<dt><code>shell-backward-word (M-C-b)</code>
+<span id="index-shell_002dbackward_002dword-_0028M_002dC_002db_0029"></span>
</dt>
<dd><p>Move back to the start of the current or previous word.
Words are delimited by non-quoted shell metacharacters.
</p>
</dd>
<dt><code>previous-screen-line ()</code>
-<a name="index-previous_002dscreen_002dline-_0028_0029"></a>
+<span id="index-previous_002dscreen_002dline-_0028_0029"></span>
</dt>
<dd><p>Attempt to move point to the same physical screen column on the previous
physical screen line. This will not have the desired effect if the current
</p>
</dd>
<dt><code>next-screen-line ()</code>
-<a name="index-next_002dscreen_002dline-_0028_0029"></a>
+<span id="index-next_002dscreen_002dline-_0028_0029"></span>
</dt>
<dd><p>Attempt to move point to the same physical screen column on the next
physical screen line. This will not have the desired effect if the current
plus the screen width.
</p>
</dd>
+<dt><code>clear-display (M-C-l)</code>
+<span id="index-clear_002ddisplay-_0028M_002dC_002dl_0029"></span>
+</dt>
+<dd><p>Clear the screen and, if possible, the terminal’s scrollback buffer,
+then redraw the current line,
+leaving the current line at the top of the screen.
+</p>
+</dd>
<dt><code>clear-screen (C-l)</code>
-<a name="index-clear_002dscreen-_0028C_002dl_0029"></a>
+<span id="index-clear_002dscreen-_0028C_002dl_0029"></span>
</dt>
-<dd><p>Clear the screen and redraw the current line,
+<dd><p>Clear the screen,
+then redraw the current line,
leaving the current line at the top of the screen.
</p>
</dd>
<dt><code>redraw-current-line ()</code>
-<a name="index-redraw_002dcurrent_002dline-_0028_0029"></a>
+<span id="index-redraw_002dcurrent_002dline-_0028_0029"></span>
</dt>
<dd><p>Refresh the current line. By default, this is unbound.
</p>
</dl>
<hr>
-<a name="Commands-For-History"></a>
-<div class="header">
+<span id="Commands-For-History"></span><div class="header">
<p>
Next: <a href="#Commands-For-Text" accesskey="n" rel="next">Commands For Text</a>, Previous: <a href="#Commands-For-Moving" accesskey="p" rel="prev">Commands For Moving</a>, Up: <a href="#Bindable-Readline-Commands" accesskey="u" rel="up">Bindable Readline Commands</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Commands-For-Manipulating-The-History"></a>
-<h4 class="subsection">8.4.2 Commands For Manipulating The History</h4>
+<span id="Commands-For-Manipulating-The-History"></span><h4 class="subsection">8.4.2 Commands For Manipulating The History</h4>
<dl compact="compact">
<dt><code>accept-line (Newline or Return)</code>
-<a name="index-accept_002dline-_0028Newline-or-Return_0029"></a>
+<span id="index-accept_002dline-_0028Newline-or-Return_0029"></span>
</dt>
<dd><p>Accept the line regardless of where the cursor is.
If this line is
</p>
</dd>
<dt><code>previous-history (C-p)</code>
-<a name="index-previous_002dhistory-_0028C_002dp_0029"></a>
+<span id="index-previous_002dhistory-_0028C_002dp_0029"></span>
</dt>
<dd><p>Move ‘back’ through the history list, fetching the previous command.
</p>
</dd>
<dt><code>next-history (C-n)</code>
-<a name="index-next_002dhistory-_0028C_002dn_0029"></a>
+<span id="index-next_002dhistory-_0028C_002dn_0029"></span>
</dt>
<dd><p>Move ‘forward’ through the history list, fetching the next command.
</p>
</dd>
<dt><code>beginning-of-history (M-<)</code>
-<a name="index-beginning_002dof_002dhistory-_0028M_002d_003c_0029"></a>
+<span id="index-beginning_002dof_002dhistory-_0028M_002d_003c_0029"></span>
</dt>
<dd><p>Move to the first line in the history.
</p>
</dd>
<dt><code>end-of-history (M->)</code>
-<a name="index-end_002dof_002dhistory-_0028M_002d_003e_0029"></a>
+<span id="index-end_002dof_002dhistory-_0028M_002d_003e_0029"></span>
</dt>
<dd><p>Move to the end of the input history, i.e., the line currently
being entered.
</p>
</dd>
<dt><code>reverse-search-history (C-r)</code>
-<a name="index-reverse_002dsearch_002dhistory-_0028C_002dr_0029"></a>
+<span id="index-reverse_002dsearch_002dhistory-_0028C_002dr_0029"></span>
</dt>
<dd><p>Search backward starting at the current line and moving ‘up’ through
the history as necessary. This is an incremental search.
+This command sets the region to the matched text and activates the mark.
</p>
</dd>
<dt><code>forward-search-history (C-s)</code>
-<a name="index-forward_002dsearch_002dhistory-_0028C_002ds_0029"></a>
+<span id="index-forward_002dsearch_002dhistory-_0028C_002ds_0029"></span>
</dt>
<dd><p>Search forward starting at the current line and moving ‘down’ through
the history as necessary. This is an incremental search.
+This command sets the region to the matched text and activates the mark.
</p>
</dd>
<dt><code>non-incremental-reverse-search-history (M-p)</code>
-<a name="index-non_002dincremental_002dreverse_002dsearch_002dhistory-_0028M_002dp_0029"></a>
+<span id="index-non_002dincremental_002dreverse_002dsearch_002dhistory-_0028M_002dp_0029"></span>
</dt>
<dd><p>Search backward starting at the current line and moving ‘up’
through the history as necessary using a non-incremental search
</p>
</dd>
<dt><code>non-incremental-forward-search-history (M-n)</code>
-<a name="index-non_002dincremental_002dforward_002dsearch_002dhistory-_0028M_002dn_0029"></a>
+<span id="index-non_002dincremental_002dforward_002dsearch_002dhistory-_0028M_002dn_0029"></span>
</dt>
<dd><p>Search forward starting at the current line and moving ‘down’
through the history as necessary using a non-incremental search
</p>
</dd>
<dt><code>history-search-forward ()</code>
-<a name="index-history_002dsearch_002dforward-_0028_0029"></a>
+<span id="index-history_002dsearch_002dforward-_0028_0029"></span>
</dt>
<dd><p>Search forward through the history for the string of characters
between the start of the current line and the point.
</p>
</dd>
<dt><code>history-search-backward ()</code>
-<a name="index-history_002dsearch_002dbackward-_0028_0029"></a>
+<span id="index-history_002dsearch_002dbackward-_0028_0029"></span>
</dt>
<dd><p>Search backward through the history for the string of characters
between the start of the current line and the point.
</p>
</dd>
<dt><code>history-substring-search-forward ()</code>
-<a name="index-history_002dsubstring_002dsearch_002dforward-_0028_0029"></a>
+<span id="index-history_002dsubstring_002dsearch_002dforward-_0028_0029"></span>
</dt>
<dd><p>Search forward through the history for the string of characters
between the start of the current line and the point.
</p>
</dd>
<dt><code>history-substring-search-backward ()</code>
-<a name="index-history_002dsubstring_002dsearch_002dbackward-_0028_0029"></a>
+<span id="index-history_002dsubstring_002dsearch_002dbackward-_0028_0029"></span>
</dt>
<dd><p>Search backward through the history for the string of characters
between the start of the current line and the point.
</p>
</dd>
<dt><code>yank-nth-arg (M-C-y)</code>
-<a name="index-yank_002dnth_002darg-_0028M_002dC_002dy_0029"></a>
+<span id="index-yank_002dnth_002darg-_0028M_002dC_002dy_0029"></span>
</dt>
<dd><p>Insert the first argument to the previous command (usually
the second word on the previous line) at point.
</p>
</dd>
<dt><code>yank-last-arg (M-. or M-_)</code>
-<a name="index-yank_002dlast_002darg-_0028M_002d_002e-or-M_002d_005f_0029"></a>
+<span id="index-yank_002dlast_002darg-_0028M_002d_002e-or-M_002d_005f_0029"></span>
</dt>
<dd><p>Insert last argument to the previous command (the last word of the
previous history entry).
as if the ‘<samp>!$</samp>’ history expansion had been specified.
</p>
</dd>
+<dt><code>operate-and-get-next (C-o)</code>
+<span id="index-operate_002dand_002dget_002dnext-_0028C_002do_0029"></span>
+</dt>
+<dd><p>Accept the current line for return to the calling application as if a
+newline had been entered,
+and fetch the next line relative to the current line from the history
+for editing.
+A numeric argument, if supplied, specifies the history entry to use instead
+of the current line.
+</p>
+</dd>
</dl>
<hr>
-<a name="Commands-For-Text"></a>
-<div class="header">
+<span id="Commands-For-Text"></span><div class="header">
<p>
Next: <a href="#Commands-For-Killing" accesskey="n" rel="next">Commands For Killing</a>, Previous: <a href="#Commands-For-History" accesskey="p" rel="prev">Commands For History</a>, Up: <a href="#Bindable-Readline-Commands" accesskey="u" rel="up">Bindable Readline Commands</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Commands-For-Changing-Text"></a>
-<h4 class="subsection">8.4.3 Commands For Changing Text</h4>
+<span id="Commands-For-Changing-Text"></span><h4 class="subsection">8.4.3 Commands For Changing Text</h4>
<dl compact="compact">
<dt><code><i>end-of-file</i> (usually C-d)</code>
-<a name="index-end_002dof_002dfile-_0028usually-C_002dd_0029"></a>
+<span id="index-end_002dof_002dfile-_0028usually-C_002dd_0029"></span>
</dt>
<dd><p>The character indicating end-of-file as set, for example, by
<code>stty</code>. If this character is read when there are no characters
</p>
</dd>
<dt><code>delete-char (C-d)</code>
-<a name="index-delete_002dchar-_0028C_002dd_0029"></a>
+<span id="index-delete_002dchar-_0028C_002dd_0029"></span>
</dt>
<dd><p>Delete the character at point. If this function is bound to the
same character as the tty <small>EOF</small> character, as <kbd>C-d</kbd>
</p>
</dd>
<dt><code>backward-delete-char (Rubout)</code>
-<a name="index-backward_002ddelete_002dchar-_0028Rubout_0029"></a>
+<span id="index-backward_002ddelete_002dchar-_0028Rubout_0029"></span>
</dt>
<dd><p>Delete the character behind the cursor. A numeric argument means
to kill the characters instead of deleting them.
</p>
</dd>
<dt><code>forward-backward-delete-char ()</code>
-<a name="index-forward_002dbackward_002ddelete_002dchar-_0028_0029"></a>
+<span id="index-forward_002dbackward_002ddelete_002dchar-_0028_0029"></span>
</dt>
<dd><p>Delete the character under the cursor, unless the cursor is at the
end of the line, in which case the character behind the cursor is
</p>
</dd>
<dt><code>quoted-insert (C-q or C-v)</code>
-<a name="index-quoted_002dinsert-_0028C_002dq-or-C_002dv_0029"></a>
+<span id="index-quoted_002dinsert-_0028C_002dq-or-C_002dv_0029"></span>
</dt>
<dd><p>Add the next character typed to the line verbatim. This is
how to insert key sequences like <kbd>C-q</kbd>, for example.
</dd>
<dt><code>self-insert (a, b, A, 1, !, …)</code>
-<a name="index-self_002dinsert-_0028a_002c-b_002c-A_002c-1_002c-_0021_002c-_2026_0029"></a>
+<span id="index-self_002dinsert-_0028a_002c-b_002c-A_002c-1_002c-_0021_002c-_2026_0029"></span>
</dt>
<dd><p>Insert yourself.
</p>
</dd>
<dt><code>bracketed-paste-begin ()</code>
-<a name="index-bracketed_002dpaste_002dbegin-_0028_0029"></a>
+<span id="index-bracketed_002dpaste_002dbegin-_0028_0029"></span>
</dt>
<dd><p>This function is intended to be bound to the "bracketed paste" escape
sequence sent by some terminals, and such a binding is assigned by default.
are inserted as if each one was bound to <code>self-insert</code> instead of
executing any editing commands.
</p>
+<p>Bracketed paste sets the region (the characters between point and the mark)
+to the inserted text. It uses the concept of an <em>active mark</em>: when the
+mark is active, Readline redisplay uses the terminal’s standout mode to
+denote the region.
+</p>
</dd>
<dt><code>transpose-chars (C-t)</code>
-<a name="index-transpose_002dchars-_0028C_002dt_0029"></a>
+<span id="index-transpose_002dchars-_0028C_002dt_0029"></span>
</dt>
<dd><p>Drag the character before the cursor forward over
the character at the cursor, moving the
</p>
</dd>
<dt><code>transpose-words (M-t)</code>
-<a name="index-transpose_002dwords-_0028M_002dt_0029"></a>
+<span id="index-transpose_002dwords-_0028M_002dt_0029"></span>
</dt>
<dd><p>Drag the word before point past the word after point,
moving point past that word as well.
</p>
</dd>
<dt><code>upcase-word (M-u)</code>
-<a name="index-upcase_002dword-_0028M_002du_0029"></a>
+<span id="index-upcase_002dword-_0028M_002du_0029"></span>
</dt>
<dd><p>Uppercase the current (or following) word. With a negative argument,
uppercase the previous word, but do not move the cursor.
</p>
</dd>
<dt><code>downcase-word (M-l)</code>
-<a name="index-downcase_002dword-_0028M_002dl_0029"></a>
+<span id="index-downcase_002dword-_0028M_002dl_0029"></span>
</dt>
<dd><p>Lowercase the current (or following) word. With a negative argument,
lowercase the previous word, but do not move the cursor.
</p>
</dd>
<dt><code>capitalize-word (M-c)</code>
-<a name="index-capitalize_002dword-_0028M_002dc_0029"></a>
+<span id="index-capitalize_002dword-_0028M_002dc_0029"></span>
</dt>
<dd><p>Capitalize the current (or following) word. With a negative argument,
capitalize the previous word, but do not move the cursor.
</p>
</dd>
<dt><code>overwrite-mode ()</code>
-<a name="index-overwrite_002dmode-_0028_0029"></a>
+<span id="index-overwrite_002dmode-_0028_0029"></span>
</dt>
<dd><p>Toggle overwrite mode. With an explicit positive numeric argument,
switches to overwrite mode. With an explicit non-positive numeric
</dl>
<hr>
-<a name="Commands-For-Killing"></a>
-<div class="header">
+<span id="Commands-For-Killing"></span><div class="header">
<p>
Next: <a href="#Numeric-Arguments" accesskey="n" rel="next">Numeric Arguments</a>, Previous: <a href="#Commands-For-Text" accesskey="p" rel="prev">Commands For Text</a>, Up: <a href="#Bindable-Readline-Commands" accesskey="u" rel="up">Bindable Readline Commands</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Killing-And-Yanking"></a>
-<h4 class="subsection">8.4.4 Killing And Yanking</h4>
+<span id="Killing-And-Yanking"></span><h4 class="subsection">8.4.4 Killing And Yanking</h4>
<dl compact="compact">
<dt><code>kill-line (C-k)</code>
-<a name="index-kill_002dline-_0028C_002dk_0029"></a>
+<span id="index-kill_002dline-_0028C_002dk_0029"></span>
</dt>
<dd><p>Kill the text from point to the end of the line.
+With a negative numeric argument, kill backward from the cursor to the
+beginning of the current line.
</p>
</dd>
<dt><code>backward-kill-line (C-x Rubout)</code>
-<a name="index-backward_002dkill_002dline-_0028C_002dx-Rubout_0029"></a>
+<span id="index-backward_002dkill_002dline-_0028C_002dx-Rubout_0029"></span>
</dt>
<dd><p>Kill backward from the cursor to the beginning of the current line.
+With a negative numeric argument, kill forward from the cursor to the
+end of the current line.
</p>
</dd>
<dt><code>unix-line-discard (C-u)</code>
-<a name="index-unix_002dline_002ddiscard-_0028C_002du_0029"></a>
+<span id="index-unix_002dline_002ddiscard-_0028C_002du_0029"></span>
</dt>
<dd><p>Kill backward from the cursor to the beginning of the current line.
</p>
</dd>
<dt><code>kill-whole-line ()</code>
-<a name="index-kill_002dwhole_002dline-_0028_0029"></a>
+<span id="index-kill_002dwhole_002dline-_0028_0029"></span>
</dt>
<dd><p>Kill all characters on the current line, no matter where point is.
By default, this is unbound.
</p>
</dd>
<dt><code>kill-word (M-d)</code>
-<a name="index-kill_002dword-_0028M_002dd_0029"></a>
+<span id="index-kill_002dword-_0028M_002dd_0029"></span>
</dt>
<dd><p>Kill from point to the end of the current word, or if between
words, to the end of the next word.
</p>
</dd>
<dt><code>backward-kill-word (M-<span class="key">DEL</span>)</code>
-<a name="index-backward_002dkill_002dword-_0028M_002dDEL_0029"></a>
+<span id="index-backward_002dkill_002dword-_0028M_002dDEL_0029"></span>
</dt>
<dd><p>Kill the word behind point.
Word boundaries are the same as <code>backward-word</code>.
</p>
</dd>
-<dt><code>shell-kill-word ()</code>
-<a name="index-shell_002dkill_002dword-_0028_0029"></a>
+<dt><code>shell-kill-word (M-C-d)</code>
+<span id="index-shell_002dkill_002dword-_0028M_002dC_002dd_0029"></span>
</dt>
<dd><p>Kill from point to the end of the current word, or if between
words, to the end of the next word.
</p>
</dd>
<dt><code>shell-backward-kill-word ()</code>
-<a name="index-shell_002dbackward_002dkill_002dword-_0028_0029"></a>
+<span id="index-shell_002dbackward_002dkill_002dword-_0028_0029"></span>
</dt>
<dd><p>Kill the word behind point.
Word boundaries are the same as <code>shell-backward-word</code>.
</p>
</dd>
+<dt><code>shell-transpose-words (M-C-t)</code>
+<span id="index-shell_002dtranspose_002dwords-_0028M_002dC_002dt_0029"></span>
+</dt>
+<dd><p>Drag the word before point past the word after point,
+moving point past that word as well.
+If the insertion point is at the end of the line, this transposes
+the last two words on the line.
+Word boundaries are the same as <code>shell-forward-word</code> and
+<code>shell-backward-word</code>.
+</p>
+</dd>
<dt><code>unix-word-rubout (C-w)</code>
-<a name="index-unix_002dword_002drubout-_0028C_002dw_0029"></a>
+<span id="index-unix_002dword_002drubout-_0028C_002dw_0029"></span>
</dt>
<dd><p>Kill the word behind point, using white space as a word boundary.
The killed text is saved on the kill-ring.
</p>
</dd>
<dt><code>unix-filename-rubout ()</code>
-<a name="index-unix_002dfilename_002drubout-_0028_0029"></a>
+<span id="index-unix_002dfilename_002drubout-_0028_0029"></span>
</dt>
<dd><p>Kill the word behind point, using white space and the slash character
as the word boundaries.
</p>
</dd>
<dt><code>delete-horizontal-space ()</code>
-<a name="index-delete_002dhorizontal_002dspace-_0028_0029"></a>
+<span id="index-delete_002dhorizontal_002dspace-_0028_0029"></span>
</dt>
<dd><p>Delete all spaces and tabs around point. By default, this is unbound.
</p>
</dd>
<dt><code>kill-region ()</code>
-<a name="index-kill_002dregion-_0028_0029"></a>
+<span id="index-kill_002dregion-_0028_0029"></span>
</dt>
<dd><p>Kill the text in the current region.
By default, this command is unbound.
</p>
</dd>
<dt><code>copy-region-as-kill ()</code>
-<a name="index-copy_002dregion_002das_002dkill-_0028_0029"></a>
+<span id="index-copy_002dregion_002das_002dkill-_0028_0029"></span>
</dt>
<dd><p>Copy the text in the region to the kill buffer, so it can be yanked
right away. By default, this command is unbound.
</p>
</dd>
<dt><code>copy-backward-word ()</code>
-<a name="index-copy_002dbackward_002dword-_0028_0029"></a>
+<span id="index-copy_002dbackward_002dword-_0028_0029"></span>
</dt>
<dd><p>Copy the word before point to the kill buffer.
The word boundaries are the same as <code>backward-word</code>.
</p>
</dd>
<dt><code>copy-forward-word ()</code>
-<a name="index-copy_002dforward_002dword-_0028_0029"></a>
+<span id="index-copy_002dforward_002dword-_0028_0029"></span>
</dt>
<dd><p>Copy the word following point to the kill buffer.
The word boundaries are the same as <code>forward-word</code>.
</p>
</dd>
<dt><code>yank (C-y)</code>
-<a name="index-yank-_0028C_002dy_0029"></a>
+<span id="index-yank-_0028C_002dy_0029"></span>
</dt>
<dd><p>Yank the top of the kill ring into the buffer at point.
</p>
</dd>
<dt><code>yank-pop (M-y)</code>
-<a name="index-yank_002dpop-_0028M_002dy_0029"></a>
+<span id="index-yank_002dpop-_0028M_002dy_0029"></span>
</dt>
<dd><p>Rotate the kill-ring, and yank the new top. You can only do this if
the prior command is <code>yank</code> or <code>yank-pop</code>.
</dl>
<hr>
-<a name="Numeric-Arguments"></a>
-<div class="header">
+<span id="Numeric-Arguments"></span><div class="header">
<p>
Next: <a href="#Commands-For-Completion" accesskey="n" rel="next">Commands For Completion</a>, Previous: <a href="#Commands-For-Killing" accesskey="p" rel="prev">Commands For Killing</a>, Up: <a href="#Bindable-Readline-Commands" accesskey="u" rel="up">Bindable Readline Commands</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Specifying-Numeric-Arguments"></a>
-<h4 class="subsection">8.4.5 Specifying Numeric Arguments</h4>
+<span id="Specifying-Numeric-Arguments"></span><h4 class="subsection">8.4.5 Specifying Numeric Arguments</h4>
<dl compact="compact">
<dt><code>digit-argument (<kbd>M-0</kbd>, <kbd>M-1</kbd>, … <kbd>M--</kbd>)</code>
-<a name="index-digit_002dargument-_0028M_002d0_002c-M_002d1_002c-_2026-M_002d_002d_0029"></a>
+<span id="index-digit_002dargument-_0028M_002d0_002c-M_002d1_002c-_2026-M_002d_002d_0029"></span>
</dt>
<dd><p>Add this digit to the argument already accumulating, or start a new
argument. <kbd>M--</kbd> starts a negative argument.
</p>
</dd>
<dt><code>universal-argument ()</code>
-<a name="index-universal_002dargument-_0028_0029"></a>
+<span id="index-universal_002dargument-_0028_0029"></span>
</dt>
<dd><p>This is another way to specify an argument.
If this command is followed by one or more digits, optionally with a
</dl>
<hr>
-<a name="Commands-For-Completion"></a>
-<div class="header">
+<span id="Commands-For-Completion"></span><div class="header">
<p>
Next: <a href="#Keyboard-Macros" accesskey="n" rel="next">Keyboard Macros</a>, Previous: <a href="#Numeric-Arguments" accesskey="p" rel="prev">Numeric Arguments</a>, Up: <a href="#Bindable-Readline-Commands" accesskey="u" rel="up">Bindable Readline Commands</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Letting-Readline-Type-For-You"></a>
-<h4 class="subsection">8.4.6 Letting Readline Type For You</h4>
+<span id="Letting-Readline-Type-For-You"></span><h4 class="subsection">8.4.6 Letting Readline Type For You</h4>
<dl compact="compact">
<dt><code>complete (<span class="key">TAB</span>)</code>
-<a name="index-complete-_0028TAB_0029"></a>
+<span id="index-complete-_0028TAB_0029"></span>
</dt>
<dd><p>Attempt to perform completion on the text before point.
The actual completion performed is application-specific.
</p>
</dd>
<dt><code>possible-completions (M-?)</code>
-<a name="index-possible_002dcompletions-_0028M_002d_003f_0029"></a>
+<span id="index-possible_002dcompletions-_0028M_002d_003f_0029"></span>
</dt>
<dd><p>List the possible completions of the text before point.
When displaying completions, Readline sets the number of columns used
</p>
</dd>
<dt><code>insert-completions (M-*)</code>
-<a name="index-insert_002dcompletions-_0028M_002d_002a_0029"></a>
+<span id="index-insert_002dcompletions-_0028M_002d_002a_0029"></span>
</dt>
<dd><p>Insert all completions of the text before point that would have
been generated by <code>possible-completions</code>.
</p>
</dd>
<dt><code>menu-complete ()</code>
-<a name="index-menu_002dcomplete-_0028_0029"></a>
+<span id="index-menu_002dcomplete-_0028_0029"></span>
</dt>
<dd><p>Similar to <code>complete</code>, but replaces the word to be completed
with a single match from the list of possible completions.
</p>
</dd>
<dt><code>menu-complete-backward ()</code>
-<a name="index-menu_002dcomplete_002dbackward-_0028_0029"></a>
+<span id="index-menu_002dcomplete_002dbackward-_0028_0029"></span>
</dt>
<dd><p>Identical to <code>menu-complete</code>, but moves backward through the list
of possible completions, as if <code>menu-complete</code> had been given a
</p>
</dd>
<dt><code>delete-char-or-list ()</code>
-<a name="index-delete_002dchar_002dor_002dlist-_0028_0029"></a>
+<span id="index-delete_002dchar_002dor_002dlist-_0028_0029"></span>
</dt>
<dd><p>Deletes the character under the cursor if not at the beginning or
end of the line (like <code>delete-char</code>).
</p>
</dd>
<dt><code>complete-filename (M-/)</code>
-<a name="index-complete_002dfilename-_0028M_002d_002f_0029"></a>
+<span id="index-complete_002dfilename-_0028M_002d_002f_0029"></span>
</dt>
<dd><p>Attempt filename completion on the text before point.
</p>
</dd>
<dt><code>possible-filename-completions (C-x /)</code>
-<a name="index-possible_002dfilename_002dcompletions-_0028C_002dx-_002f_0029"></a>
+<span id="index-possible_002dfilename_002dcompletions-_0028C_002dx-_002f_0029"></span>
</dt>
<dd><p>List the possible completions of the text before point,
treating it as a filename.
</p>
</dd>
<dt><code>complete-username (M-~)</code>
-<a name="index-complete_002dusername-_0028M_002d_007e_0029"></a>
+<span id="index-complete_002dusername-_0028M_002d_007e_0029"></span>
</dt>
<dd><p>Attempt completion on the text before point, treating
it as a username.
</p>
</dd>
<dt><code>possible-username-completions (C-x ~)</code>
-<a name="index-possible_002dusername_002dcompletions-_0028C_002dx-_007e_0029"></a>
+<span id="index-possible_002dusername_002dcompletions-_0028C_002dx-_007e_0029"></span>
</dt>
<dd><p>List the possible completions of the text before point,
treating it as a username.
</p>
</dd>
<dt><code>complete-variable (M-$)</code>
-<a name="index-complete_002dvariable-_0028M_002d_0024_0029"></a>
+<span id="index-complete_002dvariable-_0028M_002d_0024_0029"></span>
</dt>
<dd><p>Attempt completion on the text before point, treating
it as a shell variable.
</p>
</dd>
<dt><code>possible-variable-completions (C-x $)</code>
-<a name="index-possible_002dvariable_002dcompletions-_0028C_002dx-_0024_0029"></a>
+<span id="index-possible_002dvariable_002dcompletions-_0028C_002dx-_0024_0029"></span>
</dt>
<dd><p>List the possible completions of the text before point,
treating it as a shell variable.
</p>
</dd>
<dt><code>complete-hostname (M-@)</code>
-<a name="index-complete_002dhostname-_0028M_002d_0040_0029"></a>
+<span id="index-complete_002dhostname-_0028M_002d_0040_0029"></span>
</dt>
<dd><p>Attempt completion on the text before point, treating
it as a hostname.
</p>
</dd>
<dt><code>possible-hostname-completions (C-x @)</code>
-<a name="index-possible_002dhostname_002dcompletions-_0028C_002dx-_0040_0029"></a>
+<span id="index-possible_002dhostname_002dcompletions-_0028C_002dx-_0040_0029"></span>
</dt>
<dd><p>List the possible completions of the text before point,
treating it as a hostname.
</p>
</dd>
<dt><code>complete-command (M-!)</code>
-<a name="index-complete_002dcommand-_0028M_002d_0021_0029"></a>
+<span id="index-complete_002dcommand-_0028M_002d_0021_0029"></span>
</dt>
<dd><p>Attempt completion on the text before point, treating
it as a command name. Command completion attempts to
</p>
</dd>
<dt><code>possible-command-completions (C-x !)</code>
-<a name="index-possible_002dcommand_002dcompletions-_0028C_002dx-_0021_0029"></a>
+<span id="index-possible_002dcommand_002dcompletions-_0028C_002dx-_0021_0029"></span>
</dt>
<dd><p>List the possible completions of the text before point,
treating it as a command name.
</p>
</dd>
<dt><code>dynamic-complete-history (M-<span class="key">TAB</span>)</code>
-<a name="index-dynamic_002dcomplete_002dhistory-_0028M_002dTAB_0029"></a>
+<span id="index-dynamic_002dcomplete_002dhistory-_0028M_002dTAB_0029"></span>
</dt>
<dd><p>Attempt completion on the text before point, comparing
the text against lines from the history list for possible
</p>
</dd>
<dt><code>dabbrev-expand ()</code>
-<a name="index-dabbrev_002dexpand-_0028_0029"></a>
+<span id="index-dabbrev_002dexpand-_0028_0029"></span>
</dt>
<dd><p>Attempt menu completion on the text before point, comparing
the text against lines from the history list for possible
</p>
</dd>
<dt><code>complete-into-braces (M-{)</code>
-<a name="index-complete_002dinto_002dbraces-_0028M_002d_007b_0029"></a>
+<span id="index-complete_002dinto_002dbraces-_0028M_002d_007b_0029"></span>
</dt>
<dd><p>Perform filename completion and insert the list of possible completions
enclosed within braces so the list is available to the shell
</dl>
<hr>
-<a name="Keyboard-Macros"></a>
-<div class="header">
+<span id="Keyboard-Macros"></span><div class="header">
<p>
Next: <a href="#Miscellaneous-Commands" accesskey="n" rel="next">Miscellaneous Commands</a>, Previous: <a href="#Commands-For-Completion" accesskey="p" rel="prev">Commands For Completion</a>, Up: <a href="#Bindable-Readline-Commands" accesskey="u" rel="up">Bindable Readline Commands</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Keyboard-Macros-1"></a>
-<h4 class="subsection">8.4.7 Keyboard Macros</h4>
+<span id="Keyboard-Macros-1"></span><h4 class="subsection">8.4.7 Keyboard Macros</h4>
<dl compact="compact">
<dt><code>start-kbd-macro (C-x ()</code>
-<a name="index-start_002dkbd_002dmacro-_0028C_002dx-_0028_0029"></a>
+<span id="index-start_002dkbd_002dmacro-_0028C_002dx-_0028_0029"></span>
</dt>
<dd><p>Begin saving the characters typed into the current keyboard macro.
</p>
</dd>
<dt><code>end-kbd-macro (C-x ))</code>
-<a name="index-end_002dkbd_002dmacro-_0028C_002dx-_0029_0029"></a>
+<span id="index-end_002dkbd_002dmacro-_0028C_002dx-_0029_0029"></span>
</dt>
<dd><p>Stop saving the characters typed into the current keyboard macro
and save the definition.
</p>
</dd>
<dt><code>call-last-kbd-macro (C-x e)</code>
-<a name="index-call_002dlast_002dkbd_002dmacro-_0028C_002dx-e_0029"></a>
+<span id="index-call_002dlast_002dkbd_002dmacro-_0028C_002dx-e_0029"></span>
</dt>
<dd><p>Re-execute the last keyboard macro defined, by making the characters
in the macro appear as if typed at the keyboard.
</p>
</dd>
<dt><code>print-last-kbd-macro ()</code>
-<a name="index-print_002dlast_002dkbd_002dmacro-_0028_0029"></a>
+<span id="index-print_002dlast_002dkbd_002dmacro-_0028_0029"></span>
</dt>
<dd><p>Print the last keboard macro defined in a format suitable for the
<var>inputrc</var> file.
</dl>
<hr>
-<a name="Miscellaneous-Commands"></a>
-<div class="header">
+<span id="Miscellaneous-Commands"></span><div class="header">
<p>
Previous: <a href="#Keyboard-Macros" accesskey="p" rel="prev">Keyboard Macros</a>, Up: <a href="#Bindable-Readline-Commands" accesskey="u" rel="up">Bindable Readline Commands</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Some-Miscellaneous-Commands"></a>
-<h4 class="subsection">8.4.8 Some Miscellaneous Commands</h4>
+<span id="Some-Miscellaneous-Commands"></span><h4 class="subsection">8.4.8 Some Miscellaneous Commands</h4>
<dl compact="compact">
<dt><code>re-read-init-file (C-x C-r)</code>
-<a name="index-re_002dread_002dinit_002dfile-_0028C_002dx-C_002dr_0029"></a>
+<span id="index-re_002dread_002dinit_002dfile-_0028C_002dx-C_002dr_0029"></span>
</dt>
<dd><p>Read in the contents of the <var>inputrc</var> file, and incorporate
any bindings or variable assignments found there.
</p>
</dd>
<dt><code>abort (C-g)</code>
-<a name="index-abort-_0028C_002dg_0029"></a>
+<span id="index-abort-_0028C_002dg_0029"></span>
</dt>
<dd><p>Abort the current editing command and
ring the terminal’s bell (subject to the setting of
</p>
</dd>
<dt><code>do-lowercase-version (M-A, M-B, M-<var>x</var>, …)</code>
-<a name="index-do_002dlowercase_002dversion-_0028M_002dA_002c-M_002dB_002c-M_002dx_002c-_2026_0029"></a>
+<span id="index-do_002dlowercase_002dversion-_0028M_002dA_002c-M_002dB_002c-M_002dx_002c-_2026_0029"></span>
</dt>
<dd><p>If the metafied character <var>x</var> is upper case, run the command
that is bound to the corresponding metafied lower case character.
</p>
</dd>
<dt><code>prefix-meta (<span class="key">ESC</span>)</code>
-<a name="index-prefix_002dmeta-_0028ESC_0029"></a>
+<span id="index-prefix_002dmeta-_0028ESC_0029"></span>
</dt>
<dd><p>Metafy the next character typed. This is for keyboards
without a meta key. Typing ‘<samp><span class="key">ESC</span> f</samp>’ is equivalent to typing
</p>
</dd>
<dt><code>undo (C-_ or C-x C-u)</code>
-<a name="index-undo-_0028C_002d_005f-or-C_002dx-C_002du_0029"></a>
+<span id="index-undo-_0028C_002d_005f-or-C_002dx-C_002du_0029"></span>
</dt>
<dd><p>Incremental undo, separately remembered for each line.
</p>
</dd>
<dt><code>revert-line (M-r)</code>
-<a name="index-revert_002dline-_0028M_002dr_0029"></a>
+<span id="index-revert_002dline-_0028M_002dr_0029"></span>
</dt>
<dd><p>Undo all changes made to this line. This is like executing the <code>undo</code>
command enough times to get back to the beginning.
</p>
</dd>
<dt><code>tilde-expand (M-&)</code>
-<a name="index-tilde_002dexpand-_0028M_002d_0026_0029"></a>
+<span id="index-tilde_002dexpand-_0028M_002d_0026_0029"></span>
</dt>
<dd><p>Perform tilde expansion on the current word.
</p>
</dd>
<dt><code>set-mark (C-@)</code>
-<a name="index-set_002dmark-_0028C_002d_0040_0029"></a>
+<span id="index-set_002dmark-_0028C_002d_0040_0029"></span>
</dt>
<dd><p>Set the mark to the point. If a
numeric argument is supplied, the mark is set to that position.
</p>
</dd>
<dt><code>exchange-point-and-mark (C-x C-x)</code>
-<a name="index-exchange_002dpoint_002dand_002dmark-_0028C_002dx-C_002dx_0029"></a>
+<span id="index-exchange_002dpoint_002dand_002dmark-_0028C_002dx-C_002dx_0029"></span>
</dt>
<dd><p>Swap the point with the mark. The current cursor position is set to
the saved position, and the old cursor position is saved as the mark.
</p>
</dd>
<dt><code>character-search (C-])</code>
-<a name="index-character_002dsearch-_0028C_002d_005d_0029"></a>
+<span id="index-character_002dsearch-_0028C_002d_005d_0029"></span>
</dt>
<dd><p>A character is read and point is moved to the next occurrence of that
character. A negative count searches for previous occurrences.
</p>
</dd>
<dt><code>character-search-backward (M-C-])</code>
-<a name="index-character_002dsearch_002dbackward-_0028M_002dC_002d_005d_0029"></a>
+<span id="index-character_002dsearch_002dbackward-_0028M_002dC_002d_005d_0029"></span>
</dt>
<dd><p>A character is read and point is moved to the previous occurrence
of that character. A negative count searches for subsequent
</p>
</dd>
<dt><code>skip-csi-sequence ()</code>
-<a name="index-skip_002dcsi_002dsequence-_0028_0029"></a>
+<span id="index-skip_002dcsi_002dsequence-_0028_0029"></span>
</dt>
<dd><p>Read enough characters to consume a multi-key sequence such as those
defined for keys like Home and End. Such sequences begin with a
</p>
</dd>
<dt><code>insert-comment (M-#)</code>
-<a name="index-insert_002dcomment-_0028M_002d_0023_0029"></a>
+<span id="index-insert_002dcomment-_0028M_002d_0023_0029"></span>
</dt>
<dd><p>Without a numeric argument, the value of the <code>comment-begin</code>
variable is inserted at the beginning of the current line.
</p>
</dd>
<dt><code>dump-functions ()</code>
-<a name="index-dump_002dfunctions-_0028_0029"></a>
+<span id="index-dump_002dfunctions-_0028_0029"></span>
</dt>
<dd><p>Print all of the functions and their key bindings to the
Readline output stream. If a numeric argument is supplied,
</p>
</dd>
<dt><code>dump-variables ()</code>
-<a name="index-dump_002dvariables-_0028_0029"></a>
+<span id="index-dump_002dvariables-_0028_0029"></span>
</dt>
<dd><p>Print all of the settable variables and their values to the
Readline output stream. If a numeric argument is supplied,
</p>
</dd>
<dt><code>dump-macros ()</code>
-<a name="index-dump_002dmacros-_0028_0029"></a>
+<span id="index-dump_002dmacros-_0028_0029"></span>
</dt>
<dd><p>Print all of the Readline key sequences bound to macros and the
strings they output. If a numeric argument is supplied,
</p>
</dd>
<dt><code>glob-complete-word (M-g)</code>
-<a name="index-glob_002dcomplete_002dword-_0028M_002dg_0029"></a>
+<span id="index-glob_002dcomplete_002dword-_0028M_002dg_0029"></span>
</dt>
<dd><p>The word before point is treated as a pattern for pathname expansion,
with an asterisk implicitly appended. This pattern is used to
</p>
</dd>
<dt><code>glob-expand-word (C-x *)</code>
-<a name="index-glob_002dexpand_002dword-_0028C_002dx-_002a_0029"></a>
+<span id="index-glob_002dexpand_002dword-_0028C_002dx-_002a_0029"></span>
</dt>
<dd><p>The word before point is treated as a pattern for pathname expansion,
and the list of matching file names is inserted, replacing the word.
</p>
</dd>
<dt><code>glob-list-expansions (C-x g)</code>
-<a name="index-glob_002dlist_002dexpansions-_0028C_002dx-g_0029"></a>
+<span id="index-glob_002dlist_002dexpansions-_0028C_002dx-g_0029"></span>
</dt>
<dd><p>The list of expansions that would have been generated by
<code>glob-expand-word</code> is displayed, and the line is redrawn.
</p>
</dd>
<dt><code>display-shell-version (C-x C-v)</code>
-<a name="index-display_002dshell_002dversion-_0028C_002dx-C_002dv_0029"></a>
+<span id="index-display_002dshell_002dversion-_0028C_002dx-C_002dv_0029"></span>
</dt>
<dd><p>Display version information about the current instance of Bash.
</p>
</dd>
<dt><code>shell-expand-line (M-C-e)</code>
-<a name="index-shell_002dexpand_002dline-_0028M_002dC_002de_0029"></a>
+<span id="index-shell_002dexpand_002dline-_0028M_002dC_002de_0029"></span>
</dt>
<dd><p>Expand the line as the shell does.
This performs alias and history expansion as well as all of the shell
</p>
</dd>
<dt><code>history-expand-line (M-^)</code>
-<a name="index-history_002dexpand_002dline-_0028M_002d_005e_0029"></a>
+<span id="index-history_002dexpand_002dline-_0028M_002d_005e_0029"></span>
</dt>
<dd><p>Perform history expansion on the current line.
</p>
</dd>
<dt><code>magic-space ()</code>
-<a name="index-magic_002dspace-_0028_0029"></a>
+<span id="index-magic_002dspace-_0028_0029"></span>
</dt>
<dd><p>Perform history expansion on the current line and insert a space
(see <a href="#History-Interaction">History Interaction</a>).
</p>
</dd>
<dt><code>alias-expand-line ()</code>
-<a name="index-alias_002dexpand_002dline-_0028_0029"></a>
+<span id="index-alias_002dexpand_002dline-_0028_0029"></span>
</dt>
<dd><p>Perform alias expansion on the current line (see <a href="#Aliases">Aliases</a>).
</p>
</dd>
<dt><code>history-and-alias-expand-line ()</code>
-<a name="index-history_002dand_002dalias_002dexpand_002dline-_0028_0029"></a>
+<span id="index-history_002dand_002dalias_002dexpand_002dline-_0028_0029"></span>
</dt>
<dd><p>Perform history and alias expansion on the current line.
</p>
</dd>
<dt><code>insert-last-argument (M-. or M-_)</code>
-<a name="index-insert_002dlast_002dargument-_0028M_002d_002e-or-M_002d_005f_0029"></a>
+<span id="index-insert_002dlast_002dargument-_0028M_002d_002e-or-M_002d_005f_0029"></span>
</dt>
<dd><p>A synonym for <code>yank-last-arg</code>.
</p>
</dd>
-<dt><code>operate-and-get-next (C-o)</code>
-<a name="index-operate_002dand_002dget_002dnext-_0028C_002do_0029"></a>
-</dt>
-<dd><p>Accept the current line for execution and fetch the next line
-relative to the current line from the history for editing.
-A numeric argument, if supplied, specifies the history entry to use instead
-of the current line.
-</p>
-</dd>
<dt><code>edit-and-execute-command (C-x C-e)</code>
-<a name="index-edit_002dand_002dexecute_002dcommand-_0028C_002dx-C_002de_0029"></a>
+<span id="index-edit_002dand_002dexecute_002dcommand-_0028C_002dx-C_002de_0029"></span>
</dt>
<dd><p>Invoke an editor on the current command line, and execute the result as shell
commands.
</dl>
<hr>
-<a name="Readline-vi-Mode"></a>
-<div class="header">
+<span id="Readline-vi-Mode"></span><div class="header">
<p>
Next: <a href="#Programmable-Completion" accesskey="n" rel="next">Programmable Completion</a>, Previous: <a href="#Bindable-Readline-Commands" accesskey="p" rel="prev">Bindable Readline Commands</a>, Up: <a href="#Command-Line-Editing" accesskey="u" rel="up">Command Line Editing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Readline-vi-Mode-1"></a>
-<h3 class="section">8.5 Readline vi Mode</h3>
+<span id="Readline-vi-Mode-1"></span><h3 class="section">8.5 Readline vi Mode</h3>
<p>While the Readline library does not have a full set of <code>vi</code>
editing functions, it does contain enough to allow simple editing
so forth.
</p>
<hr>
-<a name="Programmable-Completion"></a>
-<div class="header">
+<span id="Programmable-Completion"></span><div class="header">
<p>
Next: <a href="#Programmable-Completion-Builtins" accesskey="n" rel="next">Programmable Completion Builtins</a>, Previous: <a href="#Readline-vi-Mode" accesskey="p" rel="prev">Readline vi Mode</a>, Up: <a href="#Command-Line-Editing" accesskey="u" rel="up">Command Line Editing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Programmable-Completion-1"></a>
-<h3 class="section">8.6 Programmable Completion</h3>
-<a name="index-programmable-completion"></a>
+<span id="Programmable-Completion-1"></span><h3 class="section">8.6 Programmable Completion</h3>
+<span id="index-programmable-completion"></span>
<p>When word completion is attempted for an argument to a command for
which a completion specification (a <var>compspec</var>) has been defined
</pre></div>
<hr>
-<a name="Programmable-Completion-Builtins"></a>
-<div class="header">
+<span id="Programmable-Completion-Builtins"></span><div class="header">
<p>
Next: <a href="#A-Programmable-Completion-Example" accesskey="n" rel="next">A Programmable Completion Example</a>, Previous: <a href="#Programmable-Completion" accesskey="p" rel="prev">Programmable Completion</a>, Up: <a href="#Command-Line-Editing" accesskey="u" rel="up">Command Line Editing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Programmable-Completion-Builtins-1"></a>
-<h3 class="section">8.7 Programmable Completion Builtins</h3>
-<a name="index-completion-builtins"></a>
+<span id="Programmable-Completion-Builtins-1"></span><h3 class="section">8.7 Programmable Completion Builtins</h3>
+<span id="index-completion-builtins"></span>
<p>Three builtin commands are available to manipulate the programmable completion
facilities: one to specify how the arguments to a particular command are to
</p>
<dl compact="compact">
<dt><code>compgen</code></dt>
-<dd><a name="index-compgen"></a>
+<dd><span id="index-compgen"></span>
<div class="example">
<pre class="example"><code>compgen [<var>option</var>] [<var>word</var>]</code>
</pre></div>
</p>
</dd>
<dt><code>complete</code></dt>
-<dd><a name="index-complete"></a>
+<dd><span id="index-complete"></span>
<div class="example">
<pre class="example"><code>complete [-abcdefgjksuv] [-o <var>comp-option</var>] [-DEI] [-A <var>action</var>] [-G <var>globpat</var>]
[-W <var>wordlist</var>] [-F <var>function</var>] [-C <var>command</var>] [-X <var>filterpat</var>]
apply to “empty” command completion; that is, completion attempted on a
blank line.
The <samp>-I</samp> option indicates that other supplied options and actions should
-apply to completion on the inital non-assignment word on the line, or after a
+apply to completion on the initial non-assignment word on the line, or after a
command delimiter such as ‘<samp>;</samp>’ or ‘<samp>|</samp>’, which is usually command
name completion.
If multiple options are supplied, the <samp>-D</samp> option takes precedence
</p>
</dd>
<dt><code>compopt</code></dt>
-<dd><a name="index-compopt"></a>
+<dd><span id="index-compopt"></span>
<div class="example">
<pre class="example"><code>compopt</code> [-o <var>option</var>] [-DEI] [+o <var>option</var>] [<var>name</var>]
</pre></div>
apply to “empty” command completion; that is, completion attempted on a
blank line.
The <samp>-I</samp> option indicates that other supplied options should
-apply to completion on the inital non-assignment word on the line, or after a
+apply to completion on the initial non-assignment word on the line, or after a
command delimiter such as ‘<samp>;</samp>’ or ‘<samp>|</samp>’, which is usually command
name completion.
</p>
</dl>
<hr>
-<a name="A-Programmable-Completion-Example"></a>
-<div class="header">
+<span id="A-Programmable-Completion-Example"></span><div class="header">
<p>
Previous: <a href="#Programmable-Completion-Builtins" accesskey="p" rel="prev">Programmable Completion Builtins</a>, Up: <a href="#Command-Line-Editing" accesskey="u" rel="up">Command Line Editing</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="A-Programmable-Completion-Example-1"></a>
-<h3 class="section">8.8 A Programmable Completion Example</h3>
+<span id="A-Programmable-Completion-Example-1"></span><h3 class="section">8.8 A Programmable Completion Example</h3>
<p>The most common way to obtain additional completion functionality beyond
the default actions <code>complete</code> and <code>compgen</code> provide is to use
The <samp>-o bashdefault</samp> option brings in the rest of the "Bash default"
completions – possible completion that Bash adds to the default Readline
set. These include things like command name completion, variable completion
-for words beginning with ‘<samp>{</samp>’, completions containing pathname
+for words beginning with ‘<samp>$</samp>’ or ‘<samp>${</samp>’, completions containing pathname
expansion patterns (see <a href="#Filename-Expansion">Filename Expansion</a>), and so on.
</p>
<p>Once installed using <code>complete</code>, <code>_comp_cd</code> will be called every
the common GNU, Unix, and Linux commands – are available as part of the
bash_completion project. This is installed by default on many GNU/Linux
distributions. Originally written by Ian Macdonald, the project now lives
-at <a href="http://bash-completion.alioth.debian.org/">http://bash-completion.alioth.debian.org/</a>. There are ports for
+at <a href="https://github.com/scop/bash-completion/">https://github.com/scop/bash-completion/</a>. There are ports for
other systems such as Solaris and Mac OS X.
</p>
<p>An older version of the bash_completion package is distributed with bash
in the <samp>examples/complete</samp> subdirectory.
</p>
-<a name="index-History_002c-how-to-use"></a>
+<span id="index-History_002c-how-to-use"></span>
<hr>
-<a name="Using-History-Interactively"></a>
-<div class="header">
+<span id="Using-History-Interactively"></span><div class="header">
<p>
Next: <a href="#Installing-Bash" accesskey="n" rel="next">Installing Bash</a>, Previous: <a href="#Command-Line-Editing" accesskey="p" rel="prev">Command Line Editing</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Using-History-Interactively-1"></a>
-<h2 class="chapter">9 Using History Interactively</h2>
+<span id="Using-History-Interactively-1"></span><h2 class="chapter">9 Using History Interactively</h2>
<p>This chapter describes how to use the <small>GNU</small> History Library
see the <small>GNU</small> Readline Library Manual.
</p>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Bash-History-Facilities" accesskey="1">Bash History Facilities</a>:</td><td> </td><td align="left" valign="top">How Bash lets you manipulate your command
+<tr><td align="left" valign="top">• <a href="#Bash-History-Facilities" accesskey="1">Bash History Facilities</a></td><td> </td><td align="left" valign="top">How Bash lets you manipulate your command
history.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Bash-History-Builtins" accesskey="2">Bash History Builtins</a>:</td><td> </td><td align="left" valign="top">The Bash builtin commands that manipulate
+<tr><td align="left" valign="top">• <a href="#Bash-History-Builtins" accesskey="2">Bash History Builtins</a></td><td> </td><td align="left" valign="top">The Bash builtin commands that manipulate
the command history.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#History-Interaction" accesskey="3">History Interaction</a>:</td><td> </td><td align="left" valign="top">What it feels like using History as a user.
+<tr><td align="left" valign="top">• <a href="#History-Interaction" accesskey="3">History Interaction</a></td><td> </td><td align="left" valign="top">What it feels like using History as a user.
</td></tr>
</table>
<hr>
-<a name="Bash-History-Facilities"></a>
-<div class="header">
+<span id="Bash-History-Facilities"></span><div class="header">
<p>
Next: <a href="#Bash-History-Builtins" accesskey="n" rel="next">Bash History Builtins</a>, Up: <a href="#Using-History-Interactively" accesskey="u" rel="up">Using History Interactively</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Bash-History-Facilities-1"></a>
-<h3 class="section">9.1 Bash History Facilities</h3>
-<a name="index-command-history"></a>
-<a name="index-history-list"></a>
+<span id="Bash-History-Facilities-1"></span><h3 class="section">9.1 Bash History Facilities</h3>
+<span id="index-command-history"></span>
+<span id="index-history-list"></span>
<p>When the <samp>-o history</samp> option to the <code>set</code> builtin
is enabled (see <a href="#The-Set-Builtin">The Set Builtin</a>),
See <a href="#The-Shopt-Builtin">The Shopt Builtin</a>, for a description of <code>shopt</code>.
</p>
<hr>
-<a name="Bash-History-Builtins"></a>
-<div class="header">
+<span id="Bash-History-Builtins"></span><div class="header">
<p>
Next: <a href="#History-Interaction" accesskey="n" rel="next">History Interaction</a>, Previous: <a href="#Bash-History-Facilities" accesskey="p" rel="prev">Bash History Facilities</a>, Up: <a href="#Using-History-Interactively" accesskey="u" rel="up">Using History Interactively</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Bash-History-Builtins-1"></a>
-<h3 class="section">9.2 Bash History Builtins</h3>
-<a name="index-history-builtins"></a>
+<span id="Bash-History-Builtins-1"></span><h3 class="section">9.2 Bash History Builtins</h3>
+<span id="index-history-builtins"></span>
<p>Bash provides two builtin commands which manipulate the
history list and history file.
</p>
<dl compact="compact">
<dt><code>fc</code></dt>
-<dd><a name="index-fc"></a>
+<dd><span id="index-fc"></span>
<div class="example">
<pre class="example"><code>fc [-e <var>ename</var>] [-lnr] [<var>first</var>] [<var>last</var>]</code>
<code>fc -s [<var>pat</var>=<var>rep</var>] [<var>command</var>]</code>
<var>last</var> may be specified as a string (to locate the most recent
command beginning with that string) or as a number (an index into the
history list, where a negative number is used as an offset from the
-current command number). If <var>last</var> is not specified, it is set to
+current command number).
+</p>
+<p>When listing, a <var>first</var> or <var>last</var> of 0 is equivalent to -1
+and -0 is equivalent to the current command (usually the <code>fc</code>
+command);
+otherwise 0 is equivalent to -1 and -0 is invalid.
+</p>
+<p>If <var>last</var> is not specified, it is set to
<var>first</var>. If <var>first</var> is not specified, it is set to the previous
command for editing and -16 for listing. If the <samp>-l</samp> flag is
given, the commands are listed on standard output. The <samp>-n</samp> flag
</p>
<p>In the second form, <var>command</var> is re-executed after each instance
of <var>pat</var> in the selected command is replaced by <var>rep</var>.
-<var>command</var> is intepreted the same as <var>first</var> above.
+<var>command</var> is interpreted the same as <var>first</var> above.
</p>
<p>A useful alias to use with the <code>fc</code> command is <code>r='fc -s'</code>, so
that typing ‘<samp>r cc</samp>’ runs the last command beginning with <code>cc</code>
</p>
</dd>
<dt><code>history</code></dt>
-<dd><a name="index-history"></a>
+<dd><span id="index-history"></span>
<div class="example">
<pre class="example">history [<var>n</var>]
history -c
</dl>
<hr>
-<a name="History-Interaction"></a>
-<div class="header">
+<span id="History-Interaction"></span><div class="header">
<p>
Previous: <a href="#Bash-History-Builtins" accesskey="p" rel="prev">Bash History Builtins</a>, Up: <a href="#Using-History-Interactively" accesskey="u" rel="up">Using History Interactively</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="History-Expansion"></a>
-<h3 class="section">9.3 History Expansion</h3>
-<a name="index-history-expansion"></a>
+<span id="History-Expansion"></span><h3 class="section">9.3 History Expansion</h3>
+<span id="index-history-expansion"></span>
<p>The History library provides a history expansion feature that is similar
to the history expansion provided by <code>csh</code>. This section
writing the history file.
</p>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Event-Designators" accesskey="1">Event Designators</a>:</td><td> </td><td align="left" valign="top">How to specify which history line to use.
+<tr><td align="left" valign="top">• <a href="#Event-Designators" accesskey="1">Event Designators</a></td><td> </td><td align="left" valign="top">How to specify which history line to use.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Word-Designators" accesskey="2">Word Designators</a>:</td><td> </td><td align="left" valign="top">Specifying which words are of interest.
+<tr><td align="left" valign="top">• <a href="#Word-Designators" accesskey="2">Word Designators</a></td><td> </td><td align="left" valign="top">Specifying which words are of interest.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Modifiers" accesskey="3">Modifiers</a>:</td><td> </td><td align="left" valign="top">Modifying the results of substitution.
+<tr><td align="left" valign="top">• <a href="#Modifiers" accesskey="3">Modifiers</a></td><td> </td><td align="left" valign="top">Modifying the results of substitution.
</td></tr>
</table>
<hr>
-<a name="Event-Designators"></a>
-<div class="header">
+<span id="Event-Designators"></span><div class="header">
<p>
Next: <a href="#Word-Designators" accesskey="n" rel="next">Word Designators</a>, Up: <a href="#History-Interaction" accesskey="u" rel="up">History Interaction</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Event-Designators-1"></a>
-<h4 class="subsection">9.3.1 Event Designators</h4>
-<a name="index-event-designators"></a>
+<span id="Event-Designators-1"></span><h4 class="subsection">9.3.1 Event Designators</h4>
+<span id="index-event-designators"></span>
<p>An event designator is a reference to a command line entry in the
history list.
Unless the reference is absolute, events are relative to the current
position in the history list.
-<a name="index-history-events"></a>
+<span id="index-history-events"></span>
</p>
<dl compact="compact">
<dt><code>!</code></dt>
The trailing
‘<samp>?</samp>’ may be omitted if the <var>string</var> is followed immediately by
a newline.
+If <var>string</var> is missing, the string from the most recent search is used;
+it is an error if there is no previous search string.
</p>
</dd>
<dt><code>^<var>string1</var>^<var>string2</var>^</code></dt>
<dd><p>Quick Substitution. Repeat the last command, replacing <var>string1</var>
with <var>string2</var>. Equivalent to
-<code>!!:s/<var>string1</var>/<var>string2</var>/</code>.
+<code>!!:s^<var>string1</var>^<var>string2</var>^</code>.
</p>
</dd>
<dt><code>!#</code></dt>
</dl>
<hr>
-<a name="Word-Designators"></a>
-<div class="header">
+<span id="Word-Designators"></span><div class="header">
<p>
Next: <a href="#Modifiers" accesskey="n" rel="next">Modifiers</a>, Previous: <a href="#Event-Designators" accesskey="p" rel="prev">Event Designators</a>, Up: <a href="#History-Interaction" accesskey="u" rel="up">History Interaction</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Word-Designators-1"></a>
-<h4 class="subsection">9.3.2 Word Designators</h4>
+<span id="Word-Designators-1"></span><h4 class="subsection">9.3.2 Word Designators</h4>
<p>Word designators are used to select desired words from the event.
A ‘<samp>:</samp>’ separates the event specification from the word designator. It
</p>
</dd>
<dt><code>%</code></dt>
-<dd><p>The word matched by the most recent ‘<samp>?<var>string</var>?</samp>’ search.
+<dd><p>The first word matched by the most recent ‘<samp>?<var>string</var>?</samp>’ search,
+if the search string begins with a character that is part of a word.
</p>
</dd>
<dt><code><var>x</var>-<var>y</var></code></dt>
</dd>
<dt><code><var>x</var>-</code></dt>
<dd><p>Abbreviates ‘<samp><var>x</var>-$</samp>’ like ‘<samp><var>x</var>*</samp>’, but omits the last word.
+If ‘<samp>x</samp>’ is missing, it defaults to 0.
</p>
</dd>
</dl>
previous command is used as the event.
</p>
<hr>
-<a name="Modifiers"></a>
-<div class="header">
+<span id="Modifiers"></span><div class="header">
<p>
Previous: <a href="#Word-Designators" accesskey="p" rel="prev">Word Designators</a>, Up: <a href="#History-Interaction" accesskey="u" rel="up">History Interaction</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Modifiers-1"></a>
-<h4 class="subsection">9.3.3 Modifiers</h4>
+<span id="Modifiers-1"></span><h4 class="subsection">9.3.3 Modifiers</h4>
<p>After the optional word designator, you can add a sequence of one or more
of the following modifiers, each preceded by a ‘<samp>:</samp>’.
+These modify, or edit, the word or words selected from the history event.
</p>
<dl compact="compact">
<dt><code>h</code></dt>
<dt><code>x</code></dt>
<dd><p>Quote the substituted words as with ‘<samp>q</samp>’,
but break into words at spaces, tabs, and newlines.
+The ‘<samp>q</samp>’ and ‘<samp>x</samp>’ modifiers are mutually exclusive; the last one
+supplied is used.
</p>
</dd>
<dt><code>s/<var>old</var>/<var>new</var>/</code></dt>
<dd><p>Substitute <var>new</var> for the first occurrence of <var>old</var> in the
-event line. Any delimiter may be used in place of ‘<samp>/</samp>’.
+event line.
+Any character may be used as the delimiter in place of ‘<samp>/</samp>’.
The delimiter may be quoted in <var>old</var> and <var>new</var>
with a single backslash. If ‘<samp>&</samp>’ appears in <var>new</var>,
it is replaced by <var>old</var>. A single backslash will quote
-the ‘<samp>&</samp>’. The final delimiter is optional if it is the last
+the ‘<samp>&</samp>’.
+If <var>old</var> is null, it is set to the last <var>old</var>
+substituted, or, if no previous history substitutions took place,
+the last <var>string</var>
+in a !?<var>string</var><code>[?]</code>
+search.
+If <var>new</var> is is null, each matching <var>old</var> is deleted.
+The final delimiter is optional if it is the last
character on the input line.
</p>
</dd>
</p>
</dd>
<dt><code>G</code></dt>
-<dd><p>Apply the following ‘<samp>s</samp>’ modifier once to each word in the event.
+<dd><p>Apply the following ‘<samp>s</samp>’ or ‘<samp>&</samp>’ modifier once to each word
+in the event.
</p>
</dd>
</dl>
<hr>
-<a name="Installing-Bash"></a>
-<div class="header">
+<span id="Installing-Bash"></span><div class="header">
<p>
Next: <a href="#Reporting-Bugs" accesskey="n" rel="next">Reporting Bugs</a>, Previous: <a href="#Using-History-Interactively" accesskey="p" rel="prev">Using History Interactively</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Installing-Bash-1"></a>
-<h2 class="chapter">10 Installing Bash</h2>
+<span id="Installing-Bash-1"></span><h2 class="chapter">10 Installing Bash</h2>
<p>This chapter provides basic instructions for installing Bash on
the various supported platforms. The distribution supports the
<small>MS-DOS</small>, <small>OS/2</small>, and Windows platforms.
</p>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Basic-Installation" accesskey="1">Basic Installation</a>:</td><td> </td><td align="left" valign="top">Installation instructions.
+<tr><td align="left" valign="top">• <a href="#Basic-Installation" accesskey="1">Basic Installation</a></td><td> </td><td align="left" valign="top">Installation instructions.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Compilers-and-Options" accesskey="2">Compilers and Options</a>:</td><td> </td><td align="left" valign="top">How to set special options for various
+<tr><td align="left" valign="top">• <a href="#Compilers-and-Options" accesskey="2">Compilers and Options</a></td><td> </td><td align="left" valign="top">How to set special options for various
systems.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Compiling-For-Multiple-Architectures" accesskey="3">Compiling For Multiple Architectures</a>:</td><td> </td><td align="left" valign="top">How to compile Bash for more
+<tr><td align="left" valign="top">• <a href="#Compiling-For-Multiple-Architectures" accesskey="3">Compiling For Multiple Architectures</a></td><td> </td><td align="left" valign="top">How to compile Bash for more
than one kind of system from
the same source tree.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Installation-Names" accesskey="4">Installation Names</a>:</td><td> </td><td align="left" valign="top">How to set the various paths used by the installation.
+<tr><td align="left" valign="top">• <a href="#Installation-Names" accesskey="4">Installation Names</a></td><td> </td><td align="left" valign="top">How to set the various paths used by the installation.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Specifying-the-System-Type" accesskey="5">Specifying the System Type</a>:</td><td> </td><td align="left" valign="top">How to configure Bash for a particular system.
+<tr><td align="left" valign="top">• <a href="#Specifying-the-System-Type" accesskey="5">Specifying the System Type</a></td><td> </td><td align="left" valign="top">How to configure Bash for a particular system.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Sharing-Defaults" accesskey="6">Sharing Defaults</a>:</td><td> </td><td align="left" valign="top">How to share default configuration values among GNU
+<tr><td align="left" valign="top">• <a href="#Sharing-Defaults" accesskey="6">Sharing Defaults</a></td><td> </td><td align="left" valign="top">How to share default configuration values among GNU
programs.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Operation-Controls" accesskey="7">Operation Controls</a>:</td><td> </td><td align="left" valign="top">Options recognized by the configuration program.
+<tr><td align="left" valign="top">• <a href="#Operation-Controls" accesskey="7">Operation Controls</a></td><td> </td><td align="left" valign="top">Options recognized by the configuration program.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Optional-Features" accesskey="8">Optional Features</a>:</td><td> </td><td align="left" valign="top">How to enable and disable optional features when
+<tr><td align="left" valign="top">• <a href="#Optional-Features" accesskey="8">Optional Features</a></td><td> </td><td align="left" valign="top">How to enable and disable optional features when
building Bash.
</td></tr>
</table>
<hr>
-<a name="Basic-Installation"></a>
-<div class="header">
+<span id="Basic-Installation"></span><div class="header">
<p>
Next: <a href="#Compilers-and-Options" accesskey="n" rel="next">Compilers and Options</a>, Up: <a href="#Installing-Bash" accesskey="u" rel="up">Installing Bash</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Basic-Installation-1"></a>
-<h3 class="section">10.1 Basic Installation</h3>
-<a name="index-installation"></a>
-<a name="index-configuration"></a>
-<a name="index-Bash-installation"></a>
-<a name="index-Bash-configuration"></a>
+<span id="Basic-Installation-1"></span><h3 class="section">10.1 Basic Installation</h3>
+<span id="index-installation"></span>
+<span id="index-configuration"></span>
+<span id="index-Bash-installation"></span>
+<span id="index-Bash-configuration"></span>
<p>These are installation instructions for Bash.
</p>
a different kind of computer), type ‘<samp>make distclean</samp>’.
</p>
<hr>
-<a name="Compilers-and-Options"></a>
-<div class="header">
+<span id="Compilers-and-Options"></span><div class="header">
<p>
Next: <a href="#Compiling-For-Multiple-Architectures" accesskey="n" rel="next">Compiling For Multiple Architectures</a>, Previous: <a href="#Basic-Installation" accesskey="p" rel="prev">Basic Installation</a>, Up: <a href="#Installing-Bash" accesskey="u" rel="up">Installing Bash</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Compilers-and-Options-1"></a>
-<h3 class="section">10.2 Compilers and Options</h3>
+<span id="Compilers-and-Options-1"></span><h3 class="section">10.2 Compilers and Options</h3>
<p>Some systems require unusual options for compilation or linking
that the <code>configure</code> script does not know about. You can
is available.
</p>
<hr>
-<a name="Compiling-For-Multiple-Architectures"></a>
-<div class="header">
+<span id="Compiling-For-Multiple-Architectures"></span><div class="header">
<p>
Next: <a href="#Installation-Names" accesskey="n" rel="next">Installation Names</a>, Previous: <a href="#Compilers-and-Options" accesskey="p" rel="prev">Compilers and Options</a>, Up: <a href="#Installing-Bash" accesskey="u" rel="up">Installing Bash</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Compiling-For-Multiple-Architectures-1"></a>
-<h3 class="section">10.3 Compiling For Multiple Architectures</h3>
+<span id="Compiling-For-Multiple-Architectures-1"></span><h3 class="section">10.3 Compiling For Multiple Architectures</h3>
<p>You can compile Bash for more than one kind of computer at the
same time, by placing the object files for each architecture in their
directories for other architectures.
</p>
<hr>
-<a name="Installation-Names"></a>
-<div class="header">
+<span id="Installation-Names"></span><div class="header">
<p>
Next: <a href="#Specifying-the-System-Type" accesskey="n" rel="next">Specifying the System Type</a>, Previous: <a href="#Compiling-For-Multiple-Architectures" accesskey="p" rel="prev">Compiling For Multiple Architectures</a>, Up: <a href="#Installing-Bash" accesskey="u" rel="up">Installing Bash</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Installation-Names-1"></a>
-<h3 class="section">10.4 Installation Names</h3>
+<span id="Installation-Names-1"></span><h3 class="section">10.4 Installation Names</h3>
<p>By default, ‘<samp>make install</samp>’ will install into
<samp>/usr/local/bin</samp>, <samp>/usr/local/man</samp>, etc. You can
Documentation and other data files will still use the regular prefix.
</p>
<hr>
-<a name="Specifying-the-System-Type"></a>
-<div class="header">
+<span id="Specifying-the-System-Type"></span><div class="header">
<p>
Next: <a href="#Sharing-Defaults" accesskey="n" rel="next">Sharing Defaults</a>, Previous: <a href="#Installation-Names" accesskey="p" rel="prev">Installation Names</a>, Up: <a href="#Installing-Bash" accesskey="u" rel="up">Installing Bash</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Specifying-the-System-Type-1"></a>
-<h3 class="section">10.5 Specifying the System Type</h3>
+<span id="Specifying-the-System-Type-1"></span><h3 class="section">10.5 Specifying the System Type</h3>
<p>There may be some features <code>configure</code> can not figure out
automatically, but need to determine by the type of host Bash
values of each field.
</p>
<hr>
-<a name="Sharing-Defaults"></a>
-<div class="header">
+<span id="Sharing-Defaults"></span><div class="header">
<p>
Next: <a href="#Operation-Controls" accesskey="n" rel="next">Operation Controls</a>, Previous: <a href="#Specifying-the-System-Type" accesskey="p" rel="prev">Specifying the System Type</a>, Up: <a href="#Installing-Bash" accesskey="u" rel="up">Installing Bash</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Sharing-Defaults-1"></a>
-<h3 class="section">10.6 Sharing Defaults</h3>
+<span id="Sharing-Defaults-1"></span><h3 class="section">10.6 Sharing Defaults</h3>
<p>If you want to set default values for <code>configure</code> scripts to
share, you can create a site shell script called
but not all <code>configure</code> scripts do.
</p>
<hr>
-<a name="Operation-Controls"></a>
-<div class="header">
+<span id="Operation-Controls"></span><div class="header">
<p>
Next: <a href="#Optional-Features" accesskey="n" rel="next">Optional Features</a>, Previous: <a href="#Sharing-Defaults" accesskey="p" rel="prev">Sharing Defaults</a>, Up: <a href="#Installing-Bash" accesskey="u" rel="up">Installing Bash</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Operation-Controls-1"></a>
-<h3 class="section">10.7 Operation Controls</h3>
+<span id="Operation-Controls-1"></span><h3 class="section">10.7 Operation Controls</h3>
<p><code>configure</code> recognizes the following options to control how it
operates.
options. ‘<samp>configure --help</samp>’ prints the complete list.
</p>
<hr>
-<a name="Optional-Features"></a>
-<div class="header">
+<span id="Optional-Features"></span><div class="header">
<p>
Previous: <a href="#Operation-Controls" accesskey="p" rel="prev">Operation Controls</a>, Up: <a href="#Installing-Bash" accesskey="u" rel="up">Installing Bash</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Optional-Features-1"></a>
-<h3 class="section">10.8 Optional Features</h3>
+<span id="Optional-Features-1"></span><h3 class="section">10.8 Optional Features</h3>
<p>The Bash <code>configure</code> has a number of <samp>--enable-<var>feature</var></samp>
options, where <var>feature</var> indicates an optional part of Bash.
information about its effect.
</p>
<hr>
-<a name="Reporting-Bugs"></a>
-<div class="header">
+<span id="Reporting-Bugs"></span><div class="header">
<p>
Next: <a href="#Major-Differences-From-The-Bourne-Shell" accesskey="n" rel="next">Major Differences From The Bourne Shell</a>, Previous: <a href="#Installing-Bash" accesskey="p" rel="prev">Installing Bash</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Reporting-Bugs-1"></a>
-<h2 class="appendix">Appendix A Reporting Bugs</h2>
+<span id="Reporting-Bugs-1"></span><h2 class="appendix">Appendix A Reporting Bugs</h2>
<p>Please report all bugs you find in Bash.
But first, you should
<a href="mailto:bug-bash@gnu.org">bug-bash@gnu.org</a>.
</p>
<hr>
-<a name="Major-Differences-From-The-Bourne-Shell"></a>
-<div class="header">
+<span id="Major-Differences-From-The-Bourne-Shell"></span><div class="header">
<p>
Next: <a href="#GNU-Free-Documentation-License" accesskey="n" rel="next">GNU Free Documentation License</a>, Previous: <a href="#Reporting-Bugs" accesskey="p" rel="prev">Reporting Bugs</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Major-Differences-From-The-Bourne-Shell-1"></a>
-<h2 class="appendix">Appendix B Major Differences From The Bourne Shell</h2>
+<span id="Major-Differences-From-The-Bourne-Shell-1"></span><h2 class="appendix">Appendix B Major Differences From The Bourne Shell</h2>
<p>Bash implements essentially the same grammar, parameter and
variable expansion, redirection, and quoting as the Bourne Shell.
<p>More features unique to Bash may be found in <a href="#Bash-Features">Bash Features</a>.
</p>
-<a name="Implementation-Differences-From-The-SVR4_002e2-Shell"></a>
-<h3 class="appendixsec">B.1 Implementation Differences From The SVR4.2 Shell</h3>
+<span id="Implementation-Differences-From-The-SVR4_002e2-Shell"></span><h3 class="appendixsec">B.1 Implementation Differences From The SVR4.2 Shell</h3>
<p>Since Bash is a completely new implementation, it does not suffer from
many of the limitations of the SVR4.2 shell. For instance:
</li></ul>
<hr>
-<a name="GNU-Free-Documentation-License"></a>
-<div class="header">
+<span id="GNU-Free-Documentation-License"></span><div class="header">
<p>
Next: <a href="#Indexes" accesskey="n" rel="next">Indexes</a>, Previous: <a href="#Major-Differences-From-The-Bourne-Shell" accesskey="p" rel="prev">Major Differences From The Bourne Shell</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="GNU-Free-Documentation-License-1"></a>
-<h2 class="appendix">Appendix C GNU Free Documentation License</h2>
+<span id="GNU-Free-Documentation-License-1"></span><h2 class="appendix">Appendix C GNU Free Documentation License</h2>
<div align="center">Version 1.3, 3 November 2008
</div>
</p>
</li></ol>
-<a name="ADDENDUM_003a-How-to-use-this-License-for-your-documents"></a>
-<h3 class="heading">ADDENDUM: How to use this License for your documents</h3>
+<span id="ADDENDUM_003a-How-to-use-this-License-for-your-documents"></span><h3 class="heading">ADDENDUM: How to use this License for your documents</h3>
<p>To use this License in a document you have written, include a copy of
the License in the document and put the following copyright and
license notices just after the title page:
</p>
-<div class="smallexample">
-<pre class="smallexample"> Copyright (C) <var>year</var> <var>your name</var>.
+<div class="example">
+<pre class="example"> Copyright (C) <var>year</var> <var>your name</var>.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
or any later version published by the Free Software Foundation;
<p>If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
replace the “with…Texts.” line with this:
</p>
-<div class="smallexample">
-<pre class="smallexample"> with the Invariant Sections being <var>list their titles</var>, with
+<div class="example">
+<pre class="example"> with the Invariant Sections being <var>list their titles</var>, with
the Front-Cover Texts being <var>list</var>, and with the Back-Cover Texts
being <var>list</var>.
</pre></div>
<hr>
-<a name="Indexes"></a>
-<div class="header">
+<span id="Indexes"></span><div class="header">
<p>
Previous: <a href="#GNU-Free-Documentation-License" accesskey="p" rel="prev">GNU Free Documentation License</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Indexes-1"></a>
-<h2 class="appendix">Appendix D Indexes</h2>
+<span id="Indexes-1"></span><h2 class="appendix">Appendix D Indexes</h2>
<table class="menu" border="0" cellspacing="0">
-<tr><td align="left" valign="top">• <a href="#Builtin-Index" accesskey="1">Builtin Index</a>:</td><td> </td><td align="left" valign="top">Index of Bash builtin commands.
+<tr><td align="left" valign="top">• <a href="#Builtin-Index" rel="index" accesskey="1">Builtin Index</a></td><td> </td><td align="left" valign="top">Index of Bash builtin commands.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Reserved-Word-Index" accesskey="2">Reserved Word Index</a>:</td><td> </td><td align="left" valign="top">Index of Bash reserved words.
+<tr><td align="left" valign="top">• <a href="#Reserved-Word-Index" rel="index" accesskey="2">Reserved Word Index</a></td><td> </td><td align="left" valign="top">Index of Bash reserved words.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Variable-Index" accesskey="3">Variable Index</a>:</td><td> </td><td align="left" valign="top">Quick reference helps you find the
+<tr><td align="left" valign="top">• <a href="#Variable-Index" rel="index" accesskey="3">Variable Index</a></td><td> </td><td align="left" valign="top">Quick reference helps you find the
variable you want.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Function-Index" accesskey="4">Function Index</a>:</td><td> </td><td align="left" valign="top">Index of bindable Readline functions.
+<tr><td align="left" valign="top">• <a href="#Function-Index" rel="index" accesskey="4">Function Index</a></td><td> </td><td align="left" valign="top">Index of bindable Readline functions.
</td></tr>
-<tr><td align="left" valign="top">• <a href="#Concept-Index" accesskey="5">Concept Index</a>:</td><td> </td><td align="left" valign="top">General index for concepts described in
+<tr><td align="left" valign="top">• <a href="#Concept-Index" rel="index" accesskey="5">Concept Index</a></td><td> </td><td align="left" valign="top">General index for concepts described in
this manual.
</td></tr>
</table>
<hr>
-<a name="Builtin-Index"></a>
-<div class="header">
+<span id="Builtin-Index"></span><div class="header">
<p>
Next: <a href="#Reserved-Word-Index" accesskey="n" rel="next">Reserved Word Index</a>, Up: <a href="#Indexes" accesskey="u" rel="up">Indexes</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Index-of-Shell-Builtin-Commands"></a>
-<h3 class="appendixsec">D.1 Index of Shell Builtin Commands</h3>
+<span id="Index-of-Shell-Builtin-Commands"></span><h3 class="appendixsec">D.1 Index of Shell Builtin Commands</h3>
<table><tr><th valign="top">Jump to: </th><td><a class="summary-letter" href="#Builtin-Index_bt_symbol-1"><b>.</b></a>
<a class="summary-letter" href="#Builtin-Index_bt_symbol-2"><b>:</b></a>
<table class="index-bt" border="0">
<tr><td></td><th align="left">Index Entry</th><td> </td><th align="left"> Section</th></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Builtin-Index_bt_symbol-1">.</a></th><td></td><td></td></tr>
+<tr><th id="Builtin-Index_bt_symbol-1">.</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002e"><code>.</code></a>:</td><td> </td><td valign="top"><a href="#Bourne-Shell-Builtins">Bourne Shell Builtins</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Builtin-Index_bt_symbol-2">:</a></th><td></td><td></td></tr>
+<tr><th id="Builtin-Index_bt_symbol-2">:</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-_003a"><code>:</code></a>:</td><td> </td><td valign="top"><a href="#Bourne-Shell-Builtins">Bourne Shell Builtins</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Builtin-Index_bt_symbol-3">[</a></th><td></td><td></td></tr>
+<tr><th id="Builtin-Index_bt_symbol-3">[</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-_005b"><code>[</code></a>:</td><td> </td><td valign="top"><a href="#Bourne-Shell-Builtins">Bourne Shell Builtins</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Builtin-Index_bt_letter-A">A</a></th><td></td><td></td></tr>
+<tr><th id="Builtin-Index_bt_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-alias"><code>alias</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Builtins">Bash Builtins</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Builtin-Index_bt_letter-B">B</a></th><td></td><td></td></tr>
+<tr><th id="Builtin-Index_bt_letter-B">B</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-bg"><code>bg</code></a>:</td><td> </td><td valign="top"><a href="#Job-Control-Builtins">Job Control Builtins</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-bind"><code>bind</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Builtins">Bash Builtins</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-break"><code>break</code></a>:</td><td> </td><td valign="top"><a href="#Bourne-Shell-Builtins">Bourne Shell Builtins</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-builtin"><code>builtin</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Builtins">Bash Builtins</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Builtin-Index_bt_letter-C">C</a></th><td></td><td></td></tr>
+<tr><th id="Builtin-Index_bt_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-caller"><code>caller</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Builtins">Bash Builtins</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-cd"><code>cd</code></a>:</td><td> </td><td valign="top"><a href="#Bourne-Shell-Builtins">Bourne Shell Builtins</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-command"><code>command</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Builtins">Bash Builtins</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-compopt"><code>compopt</code></a>:</td><td> </td><td valign="top"><a href="#Programmable-Completion-Builtins">Programmable Completion Builtins</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-continue"><code>continue</code></a>:</td><td> </td><td valign="top"><a href="#Bourne-Shell-Builtins">Bourne Shell Builtins</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Builtin-Index_bt_letter-D">D</a></th><td></td><td></td></tr>
+<tr><th id="Builtin-Index_bt_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-declare"><code>declare</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Builtins">Bash Builtins</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-dirs"><code>dirs</code></a>:</td><td> </td><td valign="top"><a href="#Directory-Stack-Builtins">Directory Stack Builtins</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-disown"><code>disown</code></a>:</td><td> </td><td valign="top"><a href="#Job-Control-Builtins">Job Control Builtins</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Builtin-Index_bt_letter-E">E</a></th><td></td><td></td></tr>
+<tr><th id="Builtin-Index_bt_letter-E">E</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-echo"><code>echo</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Builtins">Bash Builtins</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-enable"><code>enable</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Builtins">Bash Builtins</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-eval"><code>eval</code></a>:</td><td> </td><td valign="top"><a href="#Bourne-Shell-Builtins">Bourne Shell Builtins</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-exit"><code>exit</code></a>:</td><td> </td><td valign="top"><a href="#Bourne-Shell-Builtins">Bourne Shell Builtins</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-export"><code>export</code></a>:</td><td> </td><td valign="top"><a href="#Bourne-Shell-Builtins">Bourne Shell Builtins</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Builtin-Index_bt_letter-F">F</a></th><td></td><td></td></tr>
+<tr><th id="Builtin-Index_bt_letter-F">F</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-fc"><code>fc</code></a>:</td><td> </td><td valign="top"><a href="#Bash-History-Builtins">Bash History Builtins</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-fg"><code>fg</code></a>:</td><td> </td><td valign="top"><a href="#Job-Control-Builtins">Job Control Builtins</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Builtin-Index_bt_letter-G">G</a></th><td></td><td></td></tr>
+<tr><th id="Builtin-Index_bt_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-getopts"><code>getopts</code></a>:</td><td> </td><td valign="top"><a href="#Bourne-Shell-Builtins">Bourne Shell Builtins</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Builtin-Index_bt_letter-H">H</a></th><td></td><td></td></tr>
+<tr><th id="Builtin-Index_bt_letter-H">H</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-hash"><code>hash</code></a>:</td><td> </td><td valign="top"><a href="#Bourne-Shell-Builtins">Bourne Shell Builtins</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-help"><code>help</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Builtins">Bash Builtins</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-history"><code>history</code></a>:</td><td> </td><td valign="top"><a href="#Bash-History-Builtins">Bash History Builtins</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Builtin-Index_bt_letter-J">J</a></th><td></td><td></td></tr>
+<tr><th id="Builtin-Index_bt_letter-J">J</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-jobs"><code>jobs</code></a>:</td><td> </td><td valign="top"><a href="#Job-Control-Builtins">Job Control Builtins</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Builtin-Index_bt_letter-K">K</a></th><td></td><td></td></tr>
+<tr><th id="Builtin-Index_bt_letter-K">K</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-kill"><code>kill</code></a>:</td><td> </td><td valign="top"><a href="#Job-Control-Builtins">Job Control Builtins</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Builtin-Index_bt_letter-L">L</a></th><td></td><td></td></tr>
+<tr><th id="Builtin-Index_bt_letter-L">L</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-let"><code>let</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Builtins">Bash Builtins</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-local"><code>local</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Builtins">Bash Builtins</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-logout"><code>logout</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Builtins">Bash Builtins</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Builtin-Index_bt_letter-M">M</a></th><td></td><td></td></tr>
+<tr><th id="Builtin-Index_bt_letter-M">M</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-mapfile"><code>mapfile</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Builtins">Bash Builtins</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Builtin-Index_bt_letter-P">P</a></th><td></td><td></td></tr>
+<tr><th id="Builtin-Index_bt_letter-P">P</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-popd"><code>popd</code></a>:</td><td> </td><td valign="top"><a href="#Directory-Stack-Builtins">Directory Stack Builtins</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-printf"><code>printf</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Builtins">Bash Builtins</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-pushd"><code>pushd</code></a>:</td><td> </td><td valign="top"><a href="#Directory-Stack-Builtins">Directory Stack Builtins</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-pwd"><code>pwd</code></a>:</td><td> </td><td valign="top"><a href="#Bourne-Shell-Builtins">Bourne Shell Builtins</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Builtin-Index_bt_letter-R">R</a></th><td></td><td></td></tr>
+<tr><th id="Builtin-Index_bt_letter-R">R</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-read"><code>read</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Builtins">Bash Builtins</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-readarray"><code>readarray</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Builtins">Bash Builtins</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-readonly"><code>readonly</code></a>:</td><td> </td><td valign="top"><a href="#Bourne-Shell-Builtins">Bourne Shell Builtins</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-return"><code>return</code></a>:</td><td> </td><td valign="top"><a href="#Bourne-Shell-Builtins">Bourne Shell Builtins</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Builtin-Index_bt_letter-S">S</a></th><td></td><td></td></tr>
+<tr><th id="Builtin-Index_bt_letter-S">S</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-set"><code>set</code></a>:</td><td> </td><td valign="top"><a href="#The-Set-Builtin">The Set Builtin</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-shift"><code>shift</code></a>:</td><td> </td><td valign="top"><a href="#Bourne-Shell-Builtins">Bourne Shell Builtins</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-shopt"><code>shopt</code></a>:</td><td> </td><td valign="top"><a href="#The-Shopt-Builtin">The Shopt Builtin</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-source"><code>source</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Builtins">Bash Builtins</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-suspend"><code>suspend</code></a>:</td><td> </td><td valign="top"><a href="#Job-Control-Builtins">Job Control Builtins</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Builtin-Index_bt_letter-T">T</a></th><td></td><td></td></tr>
+<tr><th id="Builtin-Index_bt_letter-T">T</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-test"><code>test</code></a>:</td><td> </td><td valign="top"><a href="#Bourne-Shell-Builtins">Bourne Shell Builtins</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-times"><code>times</code></a>:</td><td> </td><td valign="top"><a href="#Bourne-Shell-Builtins">Bourne Shell Builtins</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-trap"><code>trap</code></a>:</td><td> </td><td valign="top"><a href="#Bourne-Shell-Builtins">Bourne Shell Builtins</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-type"><code>type</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Builtins">Bash Builtins</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-typeset"><code>typeset</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Builtins">Bash Builtins</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Builtin-Index_bt_letter-U">U</a></th><td></td><td></td></tr>
+<tr><th id="Builtin-Index_bt_letter-U">U</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-ulimit"><code>ulimit</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Builtins">Bash Builtins</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-umask"><code>umask</code></a>:</td><td> </td><td valign="top"><a href="#Bourne-Shell-Builtins">Bourne Shell Builtins</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-unalias"><code>unalias</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Builtins">Bash Builtins</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-unset"><code>unset</code></a>:</td><td> </td><td valign="top"><a href="#Bourne-Shell-Builtins">Bourne Shell Builtins</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Builtin-Index_bt_letter-W">W</a></th><td></td><td></td></tr>
+<tr><th id="Builtin-Index_bt_letter-W">W</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-wait"><code>wait</code></a>:</td><td> </td><td valign="top"><a href="#Job-Control-Builtins">Job Control Builtins</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
</td></tr></table>
<hr>
-<a name="Reserved-Word-Index"></a>
-<div class="header">
+<span id="Reserved-Word-Index"></span><div class="header">
<p>
Next: <a href="#Variable-Index" accesskey="n" rel="next">Variable Index</a>, Previous: <a href="#Builtin-Index" accesskey="p" rel="prev">Builtin Index</a>, Up: <a href="#Indexes" accesskey="u" rel="up">Indexes</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Index-of-Shell-Reserved-Words"></a>
-<h3 class="appendixsec">D.2 Index of Shell Reserved Words</h3>
+<span id="Index-of-Shell-Reserved-Words"></span><h3 class="appendixsec">D.2 Index of Shell Reserved Words</h3>
<table><tr><th valign="top">Jump to: </th><td><a class="summary-letter" href="#Reserved-Word-Index_rw_symbol-1"><b>!</b></a>
<a class="summary-letter" href="#Reserved-Word-Index_rw_symbol-2"><b>[</b></a>
<table class="index-rw" border="0">
<tr><td></td><th align="left">Index Entry</th><td> </td><th align="left"> Section</th></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Reserved-Word-Index_rw_symbol-1">!</a></th><td></td><td></td></tr>
+<tr><th id="Reserved-Word-Index_rw_symbol-1">!</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-_0021"><code>!</code></a>:</td><td> </td><td valign="top"><a href="#Pipelines">Pipelines</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Reserved-Word-Index_rw_symbol-2">[</a></th><td></td><td></td></tr>
+<tr><th id="Reserved-Word-Index_rw_symbol-2">[</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-_005b_005b"><code>[[</code></a>:</td><td> </td><td valign="top"><a href="#Conditional-Constructs">Conditional Constructs</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Reserved-Word-Index_rw_symbol-3">]</a></th><td></td><td></td></tr>
+<tr><th id="Reserved-Word-Index_rw_symbol-3">]</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-_005d_005d"><code>]]</code></a>:</td><td> </td><td valign="top"><a href="#Conditional-Constructs">Conditional Constructs</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Reserved-Word-Index_rw_symbol-4">{</a></th><td></td><td></td></tr>
+<tr><th id="Reserved-Word-Index_rw_symbol-4">{</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-_007b"><code>{</code></a>:</td><td> </td><td valign="top"><a href="#Command-Grouping">Command Grouping</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Reserved-Word-Index_rw_symbol-5">}</a></th><td></td><td></td></tr>
+<tr><th id="Reserved-Word-Index_rw_symbol-5">}</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-_007d"><code>}</code></a>:</td><td> </td><td valign="top"><a href="#Command-Grouping">Command Grouping</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Reserved-Word-Index_rw_letter-C">C</a></th><td></td><td></td></tr>
+<tr><th id="Reserved-Word-Index_rw_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-case"><code>case</code></a>:</td><td> </td><td valign="top"><a href="#Conditional-Constructs">Conditional Constructs</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Reserved-Word-Index_rw_letter-D">D</a></th><td></td><td></td></tr>
+<tr><th id="Reserved-Word-Index_rw_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-do"><code>do</code></a>:</td><td> </td><td valign="top"><a href="#Looping-Constructs">Looping Constructs</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-done"><code>done</code></a>:</td><td> </td><td valign="top"><a href="#Looping-Constructs">Looping Constructs</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Reserved-Word-Index_rw_letter-E">E</a></th><td></td><td></td></tr>
+<tr><th id="Reserved-Word-Index_rw_letter-E">E</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-elif"><code>elif</code></a>:</td><td> </td><td valign="top"><a href="#Conditional-Constructs">Conditional Constructs</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-else"><code>else</code></a>:</td><td> </td><td valign="top"><a href="#Conditional-Constructs">Conditional Constructs</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-esac"><code>esac</code></a>:</td><td> </td><td valign="top"><a href="#Conditional-Constructs">Conditional Constructs</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Reserved-Word-Index_rw_letter-F">F</a></th><td></td><td></td></tr>
+<tr><th id="Reserved-Word-Index_rw_letter-F">F</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-fi"><code>fi</code></a>:</td><td> </td><td valign="top"><a href="#Conditional-Constructs">Conditional Constructs</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-for"><code>for</code></a>:</td><td> </td><td valign="top"><a href="#Looping-Constructs">Looping Constructs</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-function"><code>function</code></a>:</td><td> </td><td valign="top"><a href="#Shell-Functions">Shell Functions</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Reserved-Word-Index_rw_letter-I">I</a></th><td></td><td></td></tr>
+<tr><th id="Reserved-Word-Index_rw_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-if"><code>if</code></a>:</td><td> </td><td valign="top"><a href="#Conditional-Constructs">Conditional Constructs</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-in"><code>in</code></a>:</td><td> </td><td valign="top"><a href="#Conditional-Constructs">Conditional Constructs</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Reserved-Word-Index_rw_letter-S">S</a></th><td></td><td></td></tr>
+<tr><th id="Reserved-Word-Index_rw_letter-S">S</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-select"><code>select</code></a>:</td><td> </td><td valign="top"><a href="#Conditional-Constructs">Conditional Constructs</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Reserved-Word-Index_rw_letter-T">T</a></th><td></td><td></td></tr>
+<tr><th id="Reserved-Word-Index_rw_letter-T">T</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-then"><code>then</code></a>:</td><td> </td><td valign="top"><a href="#Conditional-Constructs">Conditional Constructs</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-time"><code>time</code></a>:</td><td> </td><td valign="top"><a href="#Pipelines">Pipelines</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Reserved-Word-Index_rw_letter-U">U</a></th><td></td><td></td></tr>
+<tr><th id="Reserved-Word-Index_rw_letter-U">U</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-until"><code>until</code></a>:</td><td> </td><td valign="top"><a href="#Looping-Constructs">Looping Constructs</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Reserved-Word-Index_rw_letter-W">W</a></th><td></td><td></td></tr>
+<tr><th id="Reserved-Word-Index_rw_letter-W">W</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-while"><code>while</code></a>:</td><td> </td><td valign="top"><a href="#Looping-Constructs">Looping Constructs</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>
</td></tr></table>
<hr>
-<a name="Variable-Index"></a>
-<div class="header">
+<span id="Variable-Index"></span><div class="header">
<p>
Next: <a href="#Function-Index" accesskey="n" rel="next">Function Index</a>, Previous: <a href="#Reserved-Word-Index" accesskey="p" rel="prev">Reserved Word Index</a>, Up: <a href="#Indexes" accesskey="u" rel="up">Indexes</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Parameter-and-Variable-Index"></a>
-<h3 class="appendixsec">D.3 Parameter and Variable Index</h3>
+<span id="Parameter-and-Variable-Index"></span><h3 class="appendixsec">D.3 Parameter and Variable Index</h3>
<table><tr><th valign="top">Jump to: </th><td><a class="summary-letter" href="#Variable-Index_vr_symbol-1"><b>!</b></a>
<a class="summary-letter" href="#Variable-Index_vr_symbol-2"><b>#</b></a>
<table class="index-vr" border="0">
<tr><td></td><th align="left">Index Entry</th><td> </td><th align="left"> Section</th></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Variable-Index_vr_symbol-1">!</a></th><td></td><td></td></tr>
+<tr><th id="Variable-Index_vr_symbol-1">!</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-_0021-1"><code>!</code></a>:</td><td> </td><td valign="top"><a href="#Special-Parameters">Special Parameters</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Variable-Index_vr_symbol-2">#</a></th><td></td><td></td></tr>
+<tr><th id="Variable-Index_vr_symbol-2">#</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-_0023"><code>#</code></a>:</td><td> </td><td valign="top"><a href="#Special-Parameters">Special Parameters</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Variable-Index_vr_symbol-3">$</a></th><td></td><td></td></tr>
+<tr><th id="Variable-Index_vr_symbol-3">$</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-_0024"><code>$</code></a>:</td><td> </td><td valign="top"><a href="#Special-Parameters">Special Parameters</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_0024_0021"><code>$!</code></a>:</td><td> </td><td valign="top"><a href="#Special-Parameters">Special Parameters</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_0024_0023"><code>$#</code></a>:</td><td> </td><td valign="top"><a href="#Special-Parameters">Special Parameters</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_00240"><code>$0</code></a>:</td><td> </td><td valign="top"><a href="#Special-Parameters">Special Parameters</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_0024_003f"><code>$?</code></a>:</td><td> </td><td valign="top"><a href="#Special-Parameters">Special Parameters</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-_0024_0040"><code>$@</code></a>:</td><td> </td><td valign="top"><a href="#Special-Parameters">Special Parameters</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-_0024_005f"><code>$_</code></a>:</td><td> </td><td valign="top"><a href="#Special-Parameters">Special Parameters</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-_0024_005f"><code>$_</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Variable-Index_vr_symbol-4">*</a></th><td></td><td></td></tr>
+<tr><th id="Variable-Index_vr_symbol-4">*</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002a"><code>*</code></a>:</td><td> </td><td valign="top"><a href="#Special-Parameters">Special Parameters</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Variable-Index_vr_symbol-5">-</a></th><td></td><td></td></tr>
+<tr><th id="Variable-Index_vr_symbol-5">-</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-_002d"><code>-</code></a>:</td><td> </td><td valign="top"><a href="#Special-Parameters">Special Parameters</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Variable-Index_vr_symbol-6">0</a></th><td></td><td></td></tr>
+<tr><th id="Variable-Index_vr_symbol-6">0</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-0"><code>0</code></a>:</td><td> </td><td valign="top"><a href="#Special-Parameters">Special Parameters</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Variable-Index_vr_symbol-7">?</a></th><td></td><td></td></tr>
+<tr><th id="Variable-Index_vr_symbol-7">?</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-_003f"><code>?</code></a>:</td><td> </td><td valign="top"><a href="#Special-Parameters">Special Parameters</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Variable-Index_vr_symbol-8">@</a></th><td></td><td></td></tr>
+<tr><th id="Variable-Index_vr_symbol-8">@</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-_0040"><code>@</code></a>:</td><td> </td><td valign="top"><a href="#Special-Parameters">Special Parameters</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Variable-Index_vr_symbol-9">_</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-_005f"><code>_</code></a>:</td><td> </td><td valign="top"><a href="#Special-Parameters">Special Parameters</a></td></tr>
+<tr><th id="Variable-Index_vr_symbol-9">_</th><td></td><td></td></tr>
+<tr><td></td><td valign="top"><a href="#index-_005f"><code>_</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Variable-Index_vr_letter-A">A</a></th><td></td><td></td></tr>
+<tr><th id="Variable-Index_vr_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-auto_005fresume"><code>auto_resume</code></a>:</td><td> </td><td valign="top"><a href="#Job-Control-Variables">Job Control Variables</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Variable-Index_vr_letter-B">B</a></th><td></td><td></td></tr>
+<tr><th id="Variable-Index_vr_letter-B">B</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-BASH"><code>BASH</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-BASHOPTS"><code>BASHOPTS</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-BASHPID"><code>BASHPID</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-bind_002dtty_002dspecial_002dchars"><code>bind-tty-special-chars</code></a>:</td><td> </td><td valign="top"><a href="#Readline-Init-File-Syntax">Readline Init File Syntax</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-blink_002dmatching_002dparen"><code>blink-matching-paren</code></a>:</td><td> </td><td valign="top"><a href="#Readline-Init-File-Syntax">Readline Init File Syntax</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Variable-Index_vr_letter-C">C</a></th><td></td><td></td></tr>
+<tr><th id="Variable-Index_vr_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-CDPATH"><code>CDPATH</code></a>:</td><td> </td><td valign="top"><a href="#Bourne-Shell-Variables">Bourne Shell Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-CHILD_005fMAX"><code>CHILD_MAX</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-colored_002dcompletion_002dprefix"><code>colored-completion-prefix</code></a>:</td><td> </td><td valign="top"><a href="#Readline-Init-File-Syntax">Readline Init File Syntax</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-convert_002dmeta"><code>convert-meta</code></a>:</td><td> </td><td valign="top"><a href="#Readline-Init-File-Syntax">Readline Init File Syntax</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-COPROC"><code>COPROC</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Variable-Index_vr_letter-D">D</a></th><td></td><td></td></tr>
+<tr><th id="Variable-Index_vr_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-DIRSTACK"><code>DIRSTACK</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-disable_002dcompletion"><code>disable-completion</code></a>:</td><td> </td><td valign="top"><a href="#Readline-Init-File-Syntax">Readline Init File Syntax</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Variable-Index_vr_letter-E">E</a></th><td></td><td></td></tr>
+<tr><th id="Variable-Index_vr_letter-E">E</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-echo_002dcontrol_002dcharacters"><code>echo-control-characters</code></a>:</td><td> </td><td valign="top"><a href="#Readline-Init-File-Syntax">Readline Init File Syntax</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-editing_002dmode"><code>editing-mode</code></a>:</td><td> </td><td valign="top"><a href="#Readline-Init-File-Syntax">Readline Init File Syntax</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-EMACS"><code>EMACS</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-EXECIGNORE"><code>EXECIGNORE</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-expand_002dtilde"><code>expand-tilde</code></a>:</td><td> </td><td valign="top"><a href="#Readline-Init-File-Syntax">Readline Init File Syntax</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Variable-Index_vr_letter-F">F</a></th><td></td><td></td></tr>
+<tr><th id="Variable-Index_vr_letter-F">F</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-FCEDIT"><code>FCEDIT</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-FIGNORE"><code>FIGNORE</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-FUNCNAME"><code>FUNCNAME</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-FUNCNEST"><code>FUNCNEST</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Variable-Index_vr_letter-G">G</a></th><td></td><td></td></tr>
+<tr><th id="Variable-Index_vr_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-GLOBIGNORE"><code>GLOBIGNORE</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-GROUPS"><code>GROUPS</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Variable-Index_vr_letter-H">H</a></th><td></td><td></td></tr>
+<tr><th id="Variable-Index_vr_letter-H">H</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-histchars"><code>histchars</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-HISTCMD"><code>HISTCMD</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-HISTCONTROL"><code>HISTCONTROL</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-HOSTNAME"><code>HOSTNAME</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-HOSTTYPE"><code>HOSTTYPE</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Variable-Index_vr_letter-I">I</a></th><td></td><td></td></tr>
+<tr><th id="Variable-Index_vr_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-IFS"><code>IFS</code></a>:</td><td> </td><td valign="top"><a href="#Bourne-Shell-Variables">Bourne Shell Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-IGNOREEOF"><code>IGNOREEOF</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-input_002dmeta"><code>input-meta</code></a>:</td><td> </td><td valign="top"><a href="#Readline-Init-File-Syntax">Readline Init File Syntax</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-INSIDE_005fEMACS"><code>INSIDE_EMACS</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-isearch_002dterminators"><code>isearch-terminators</code></a>:</td><td> </td><td valign="top"><a href="#Readline-Init-File-Syntax">Readline Init File Syntax</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Variable-Index_vr_letter-K">K</a></th><td></td><td></td></tr>
+<tr><th id="Variable-Index_vr_letter-K">K</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-keymap"><code>keymap</code></a>:</td><td> </td><td valign="top"><a href="#Readline-Init-File-Syntax">Readline Init File Syntax</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Variable-Index_vr_letter-L">L</a></th><td></td><td></td></tr>
+<tr><th id="Variable-Index_vr_letter-L">L</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-LANG"><code>LANG</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-LC_005fALL"><code>LC_ALL</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-LC_005fCOLLATE"><code>LC_COLLATE</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-LINENO"><code>LINENO</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-LINES"><code>LINES</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Variable-Index_vr_letter-M">M</a></th><td></td><td></td></tr>
+<tr><th id="Variable-Index_vr_letter-M">M</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-MACHTYPE"><code>MACHTYPE</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-MAIL"><code>MAIL</code></a>:</td><td> </td><td valign="top"><a href="#Bourne-Shell-Variables">Bourne Shell Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-MAILCHECK"><code>MAILCHECK</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-menu_002dcomplete_002ddisplay_002dprefix"><code>menu-complete-display-prefix</code></a>:</td><td> </td><td valign="top"><a href="#Readline-Init-File-Syntax">Readline Init File Syntax</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-meta_002dflag"><code>meta-flag</code></a>:</td><td> </td><td valign="top"><a href="#Readline-Init-File-Syntax">Readline Init File Syntax</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Variable-Index_vr_letter-O">O</a></th><td></td><td></td></tr>
+<tr><th id="Variable-Index_vr_letter-O">O</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-OLDPWD"><code>OLDPWD</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-OPTARG"><code>OPTARG</code></a>:</td><td> </td><td valign="top"><a href="#Bourne-Shell-Variables">Bourne Shell Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-OPTERR"><code>OPTERR</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-OSTYPE"><code>OSTYPE</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-output_002dmeta"><code>output-meta</code></a>:</td><td> </td><td valign="top"><a href="#Readline-Init-File-Syntax">Readline Init File Syntax</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Variable-Index_vr_letter-P">P</a></th><td></td><td></td></tr>
+<tr><th id="Variable-Index_vr_letter-P">P</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-page_002dcompletions"><code>page-completions</code></a>:</td><td> </td><td valign="top"><a href="#Readline-Init-File-Syntax">Readline Init File Syntax</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-PATH"><code>PATH</code></a>:</td><td> </td><td valign="top"><a href="#Bourne-Shell-Variables">Bourne Shell Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-PIPESTATUS"><code>PIPESTATUS</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-PS4"><code>PS4</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-PWD"><code>PWD</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Variable-Index_vr_letter-R">R</a></th><td></td><td></td></tr>
+<tr><th id="Variable-Index_vr_letter-R">R</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-RANDOM"><code>RANDOM</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-READLINE_005fLINE"><code>READLINE_LINE</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-READLINE_005fMARK"><code>READLINE_MARK</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-READLINE_005fPOINT"><code>READLINE_POINT</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-REPLY"><code>REPLY</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-revert_002dall_002dat_002dnewline"><code>revert-all-at-newline</code></a>:</td><td> </td><td valign="top"><a href="#Readline-Init-File-Syntax">Readline Init File Syntax</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Variable-Index_vr_letter-S">S</a></th><td></td><td></td></tr>
+<tr><th id="Variable-Index_vr_letter-S">S</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-SECONDS"><code>SECONDS</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-SHELL"><code>SHELL</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-SHELLOPTS"><code>SHELLOPTS</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-show_002dall_002dif_002dunmodified"><code>show-all-if-unmodified</code></a>:</td><td> </td><td valign="top"><a href="#Readline-Init-File-Syntax">Readline Init File Syntax</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-show_002dmode_002din_002dprompt"><code>show-mode-in-prompt</code></a>:</td><td> </td><td valign="top"><a href="#Readline-Init-File-Syntax">Readline Init File Syntax</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-skip_002dcompleted_002dtext"><code>skip-completed-text</code></a>:</td><td> </td><td valign="top"><a href="#Readline-Init-File-Syntax">Readline Init File Syntax</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-SRANDOM"><code>SRANDOM</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Variable-Index_vr_letter-T">T</a></th><td></td><td></td></tr>
+<tr><th id="Variable-Index_vr_letter-T">T</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-TEXTDOMAIN"><code>TEXTDOMAIN</code></a>:</td><td> </td><td valign="top"><a href="#Locale-Translation">Locale Translation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-TEXTDOMAINDIR"><code>TEXTDOMAINDIR</code></a>:</td><td> </td><td valign="top"><a href="#Locale-Translation">Locale Translation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-TIMEFORMAT"><code>TIMEFORMAT</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-TMOUT"><code>TMOUT</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-TMPDIR"><code>TMPDIR</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Variable-Index_vr_letter-U">U</a></th><td></td><td></td></tr>
+<tr><th id="Variable-Index_vr_letter-U">U</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-UID"><code>UID</code></a>:</td><td> </td><td valign="top"><a href="#Bash-Variables">Bash Variables</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Variable-Index_vr_letter-V">V</a></th><td></td><td></td></tr>
+<tr><th id="Variable-Index_vr_letter-V">V</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-vi_002dcmd_002dmode_002dstring"><code>vi-cmd-mode-string</code></a>:</td><td> </td><td valign="top"><a href="#Readline-Init-File-Syntax">Readline Init File Syntax</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-vi_002dins_002dmode_002dstring"><code>vi-ins-mode-string</code></a>:</td><td> </td><td valign="top"><a href="#Readline-Init-File-Syntax">Readline Init File Syntax</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-visible_002dstats"><code>visible-stats</code></a>:</td><td> </td><td valign="top"><a href="#Readline-Init-File-Syntax">Readline Init File Syntax</a></td></tr>
</td></tr></table>
<hr>
-<a name="Function-Index"></a>
-<div class="header">
+<span id="Function-Index"></span><div class="header">
<p>
Next: <a href="#Concept-Index" accesskey="n" rel="next">Concept Index</a>, Previous: <a href="#Variable-Index" accesskey="p" rel="prev">Variable Index</a>, Up: <a href="#Indexes" accesskey="u" rel="up">Indexes</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Function-Index-1"></a>
-<h3 class="appendixsec">D.4 Function Index</h3>
+<span id="Function-Index-1"></span><h3 class="appendixsec">D.4 Function Index</h3>
<table><tr><th valign="top">Jump to: </th><td><a class="summary-letter" href="#Function-Index_fn_letter-A"><b>A</b></a>
<a class="summary-letter" href="#Function-Index_fn_letter-B"><b>B</b></a>
<table class="index-fn" border="0">
<tr><td></td><th align="left">Index Entry</th><td> </td><th align="left"> Section</th></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Function-Index_fn_letter-A">A</a></th><td></td><td></td></tr>
+<tr><th id="Function-Index_fn_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-abort-_0028C_002dg_0029"><code>abort (C-g)</code></a>:</td><td> </td><td valign="top"><a href="#Miscellaneous-Commands">Miscellaneous Commands</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-accept_002dline-_0028Newline-or-Return_0029"><code>accept-line (Newline or Return)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-History">Commands For History</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-alias_002dexpand_002dline-_0028_0029"><code>alias-expand-line ()</code></a>:</td><td> </td><td valign="top"><a href="#Miscellaneous-Commands">Miscellaneous Commands</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Function-Index_fn_letter-B">B</a></th><td></td><td></td></tr>
+<tr><th id="Function-Index_fn_letter-B">B</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-backward_002dchar-_0028C_002db_0029"><code>backward-char (C-b)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Moving">Commands For Moving</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-backward_002ddelete_002dchar-_0028Rubout_0029"><code>backward-delete-char (Rubout)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Text">Commands For Text</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-backward_002dkill_002dline-_0028C_002dx-Rubout_0029"><code>backward-kill-line (C-x Rubout)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Killing">Commands For Killing</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-beginning_002dof_002dline-_0028C_002da_0029"><code>beginning-of-line (C-a)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Moving">Commands For Moving</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-bracketed_002dpaste_002dbegin-_0028_0029"><code>bracketed-paste-begin ()</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Text">Commands For Text</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Function-Index_fn_letter-C">C</a></th><td></td><td></td></tr>
+<tr><th id="Function-Index_fn_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-call_002dlast_002dkbd_002dmacro-_0028C_002dx-e_0029"><code>call-last-kbd-macro (C-x e)</code></a>:</td><td> </td><td valign="top"><a href="#Keyboard-Macros">Keyboard Macros</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-capitalize_002dword-_0028M_002dc_0029"><code>capitalize-word (M-c)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Text">Commands For Text</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-character_002dsearch-_0028C_002d_005d_0029"><code>character-search (C-])</code></a>:</td><td> </td><td valign="top"><a href="#Miscellaneous-Commands">Miscellaneous Commands</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-character_002dsearch_002dbackward-_0028M_002dC_002d_005d_0029"><code>character-search-backward (M-C-])</code></a>:</td><td> </td><td valign="top"><a href="#Miscellaneous-Commands">Miscellaneous Commands</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-clear_002ddisplay-_0028M_002dC_002dl_0029"><code>clear-display (M-C-l)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Moving">Commands For Moving</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-clear_002dscreen-_0028C_002dl_0029"><code>clear-screen (C-l)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Moving">Commands For Moving</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-complete-_0028TAB_0029"><code>complete (<span class="key">TAB</span>)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Completion">Commands For Completion</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-complete_002dcommand-_0028M_002d_0021_0029"><code>complete-command (M-!)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Completion">Commands For Completion</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-copy_002dforward_002dword-_0028_0029"><code>copy-forward-word ()</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Killing">Commands For Killing</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-copy_002dregion_002das_002dkill-_0028_0029"><code>copy-region-as-kill ()</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Killing">Commands For Killing</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Function-Index_fn_letter-D">D</a></th><td></td><td></td></tr>
+<tr><th id="Function-Index_fn_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-dabbrev_002dexpand-_0028_0029"><code>dabbrev-expand ()</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Completion">Commands For Completion</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-delete_002dchar-_0028C_002dd_0029"><code>delete-char (C-d)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Text">Commands For Text</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-delete_002dchar_002dor_002dlist-_0028_0029"><code>delete-char-or-list ()</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Completion">Commands For Completion</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-dump_002dvariables-_0028_0029"><code>dump-variables ()</code></a>:</td><td> </td><td valign="top"><a href="#Miscellaneous-Commands">Miscellaneous Commands</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-dynamic_002dcomplete_002dhistory-_0028M_002dTAB_0029"><code>dynamic-complete-history (M-<span class="key">TAB</span>)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Completion">Commands For Completion</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Function-Index_fn_letter-E">E</a></th><td></td><td></td></tr>
+<tr><th id="Function-Index_fn_letter-E">E</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-edit_002dand_002dexecute_002dcommand-_0028C_002dx-C_002de_0029"><code>edit-and-execute-command (C-x C-e)</code></a>:</td><td> </td><td valign="top"><a href="#Miscellaneous-Commands">Miscellaneous Commands</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-end_002dkbd_002dmacro-_0028C_002dx-_0029_0029"><code>end-kbd-macro (C-x ))</code></a>:</td><td> </td><td valign="top"><a href="#Keyboard-Macros">Keyboard Macros</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-end_002dof_002dfile-_0028usually-C_002dd_0029"><code><i>end-of-file</i> (usually C-d)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Text">Commands For Text</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-end_002dof_002dline-_0028C_002de_0029"><code>end-of-line (C-e)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Moving">Commands For Moving</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-exchange_002dpoint_002dand_002dmark-_0028C_002dx-C_002dx_0029"><code>exchange-point-and-mark (C-x C-x)</code></a>:</td><td> </td><td valign="top"><a href="#Miscellaneous-Commands">Miscellaneous Commands</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Function-Index_fn_letter-F">F</a></th><td></td><td></td></tr>
+<tr><th id="Function-Index_fn_letter-F">F</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-forward_002dbackward_002ddelete_002dchar-_0028_0029"><code>forward-backward-delete-char ()</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Text">Commands For Text</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-forward_002dchar-_0028C_002df_0029"><code>forward-char (C-f)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Moving">Commands For Moving</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-forward_002dsearch_002dhistory-_0028C_002ds_0029"><code>forward-search-history (C-s)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-History">Commands For History</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-forward_002dword-_0028M_002df_0029"><code>forward-word (M-f)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Moving">Commands For Moving</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Function-Index_fn_letter-G">G</a></th><td></td><td></td></tr>
+<tr><th id="Function-Index_fn_letter-G">G</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-glob_002dcomplete_002dword-_0028M_002dg_0029"><code>glob-complete-word (M-g)</code></a>:</td><td> </td><td valign="top"><a href="#Miscellaneous-Commands">Miscellaneous Commands</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-glob_002dexpand_002dword-_0028C_002dx-_002a_0029"><code>glob-expand-word (C-x *)</code></a>:</td><td> </td><td valign="top"><a href="#Miscellaneous-Commands">Miscellaneous Commands</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-glob_002dlist_002dexpansions-_0028C_002dx-g_0029"><code>glob-list-expansions (C-x g)</code></a>:</td><td> </td><td valign="top"><a href="#Miscellaneous-Commands">Miscellaneous Commands</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Function-Index_fn_letter-H">H</a></th><td></td><td></td></tr>
+<tr><th id="Function-Index_fn_letter-H">H</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-history_002dand_002dalias_002dexpand_002dline-_0028_0029"><code>history-and-alias-expand-line ()</code></a>:</td><td> </td><td valign="top"><a href="#Miscellaneous-Commands">Miscellaneous Commands</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-history_002dexpand_002dline-_0028M_002d_005e_0029"><code>history-expand-line (M-^)</code></a>:</td><td> </td><td valign="top"><a href="#Miscellaneous-Commands">Miscellaneous Commands</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-history_002dsearch_002dbackward-_0028_0029"><code>history-search-backward ()</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-History">Commands For History</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-history_002dsubstring_002dsearch_002dbackward-_0028_0029"><code>history-substring-search-backward ()</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-History">Commands For History</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-history_002dsubstring_002dsearch_002dforward-_0028_0029"><code>history-substring-search-forward ()</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-History">Commands For History</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Function-Index_fn_letter-I">I</a></th><td></td><td></td></tr>
+<tr><th id="Function-Index_fn_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-insert_002dcomment-_0028M_002d_0023_0029"><code>insert-comment (M-#)</code></a>:</td><td> </td><td valign="top"><a href="#Miscellaneous-Commands">Miscellaneous Commands</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-insert_002dcompletions-_0028M_002d_002a_0029"><code>insert-completions (M-*)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Completion">Commands For Completion</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-insert_002dlast_002dargument-_0028M_002d_002e-or-M_002d_005f_0029"><code>insert-last-argument (M-. or M-_)</code></a>:</td><td> </td><td valign="top"><a href="#Miscellaneous-Commands">Miscellaneous Commands</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Function-Index_fn_letter-K">K</a></th><td></td><td></td></tr>
+<tr><th id="Function-Index_fn_letter-K">K</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-kill_002dline-_0028C_002dk_0029"><code>kill-line (C-k)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Killing">Commands For Killing</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-kill_002dregion-_0028_0029"><code>kill-region ()</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Killing">Commands For Killing</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-kill_002dwhole_002dline-_0028_0029"><code>kill-whole-line ()</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Killing">Commands For Killing</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-kill_002dword-_0028M_002dd_0029"><code>kill-word (M-d)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Killing">Commands For Killing</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Function-Index_fn_letter-M">M</a></th><td></td><td></td></tr>
+<tr><th id="Function-Index_fn_letter-M">M</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-magic_002dspace-_0028_0029"><code>magic-space ()</code></a>:</td><td> </td><td valign="top"><a href="#Miscellaneous-Commands">Miscellaneous Commands</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-menu_002dcomplete-_0028_0029"><code>menu-complete ()</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Completion">Commands For Completion</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-menu_002dcomplete_002dbackward-_0028_0029"><code>menu-complete-backward ()</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Completion">Commands For Completion</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Function-Index_fn_letter-N">N</a></th><td></td><td></td></tr>
+<tr><th id="Function-Index_fn_letter-N">N</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-next_002dhistory-_0028C_002dn_0029"><code>next-history (C-n)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-History">Commands For History</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-next_002dscreen_002dline-_0028_0029"><code>next-screen-line ()</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Moving">Commands For Moving</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-non_002dincremental_002dforward_002dsearch_002dhistory-_0028M_002dn_0029"><code>non-incremental-forward-search-history (M-n)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-History">Commands For History</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-non_002dincremental_002dreverse_002dsearch_002dhistory-_0028M_002dp_0029"><code>non-incremental-reverse-search-history (M-p)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-History">Commands For History</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Function-Index_fn_letter-O">O</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-operate_002dand_002dget_002dnext-_0028C_002do_0029"><code>operate-and-get-next (C-o)</code></a>:</td><td> </td><td valign="top"><a href="#Miscellaneous-Commands">Miscellaneous Commands</a></td></tr>
+<tr><th id="Function-Index_fn_letter-O">O</th><td></td><td></td></tr>
+<tr><td></td><td valign="top"><a href="#index-operate_002dand_002dget_002dnext-_0028C_002do_0029"><code>operate-and-get-next (C-o)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-History">Commands For History</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-overwrite_002dmode-_0028_0029"><code>overwrite-mode ()</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Text">Commands For Text</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Function-Index_fn_letter-P">P</a></th><td></td><td></td></tr>
+<tr><th id="Function-Index_fn_letter-P">P</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-possible_002dcommand_002dcompletions-_0028C_002dx-_0021_0029"><code>possible-command-completions (C-x !)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Completion">Commands For Completion</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-possible_002dcompletions-_0028M_002d_003f_0029"><code>possible-completions (M-?)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Completion">Commands For Completion</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-possible_002dfilename_002dcompletions-_0028C_002dx-_002f_0029"><code>possible-filename-completions (C-x /)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Completion">Commands For Completion</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-previous_002dscreen_002dline-_0028_0029"><code>previous-screen-line ()</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Moving">Commands For Moving</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-print_002dlast_002dkbd_002dmacro-_0028_0029"><code>print-last-kbd-macro ()</code></a>:</td><td> </td><td valign="top"><a href="#Keyboard-Macros">Keyboard Macros</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Function-Index_fn_letter-Q">Q</a></th><td></td><td></td></tr>
+<tr><th id="Function-Index_fn_letter-Q">Q</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-quoted_002dinsert-_0028C_002dq-or-C_002dv_0029"><code>quoted-insert (C-q or C-v)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Text">Commands For Text</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Function-Index_fn_letter-R">R</a></th><td></td><td></td></tr>
+<tr><th id="Function-Index_fn_letter-R">R</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-re_002dread_002dinit_002dfile-_0028C_002dx-C_002dr_0029"><code>re-read-init-file (C-x C-r)</code></a>:</td><td> </td><td valign="top"><a href="#Miscellaneous-Commands">Miscellaneous Commands</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-redraw_002dcurrent_002dline-_0028_0029"><code>redraw-current-line ()</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Moving">Commands For Moving</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-reverse_002dsearch_002dhistory-_0028C_002dr_0029"><code>reverse-search-history (C-r)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-History">Commands For History</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-revert_002dline-_0028M_002dr_0029"><code>revert-line (M-r)</code></a>:</td><td> </td><td valign="top"><a href="#Miscellaneous-Commands">Miscellaneous Commands</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Function-Index_fn_letter-S">S</a></th><td></td><td></td></tr>
+<tr><th id="Function-Index_fn_letter-S">S</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-self_002dinsert-_0028a_002c-b_002c-A_002c-1_002c-_0021_002c-_2026_0029"><code>self-insert (a, b, A, 1, !, …)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Text">Commands For Text</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-set_002dmark-_0028C_002d_0040_0029"><code>set-mark (C-@)</code></a>:</td><td> </td><td valign="top"><a href="#Miscellaneous-Commands">Miscellaneous Commands</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-shell_002dbackward_002dkill_002dword-_0028_0029"><code>shell-backward-kill-word ()</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Killing">Commands For Killing</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-shell_002dbackward_002dword-_0028_0029"><code>shell-backward-word ()</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Moving">Commands For Moving</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-shell_002dbackward_002dword-_0028M_002dC_002db_0029"><code>shell-backward-word (M-C-b)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Moving">Commands For Moving</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-shell_002dexpand_002dline-_0028M_002dC_002de_0029"><code>shell-expand-line (M-C-e)</code></a>:</td><td> </td><td valign="top"><a href="#Miscellaneous-Commands">Miscellaneous Commands</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-shell_002dforward_002dword-_0028_0029"><code>shell-forward-word ()</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Moving">Commands For Moving</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-shell_002dkill_002dword-_0028_0029"><code>shell-kill-word ()</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Killing">Commands For Killing</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-shell_002dforward_002dword-_0028M_002dC_002df_0029"><code>shell-forward-word (M-C-f)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Moving">Commands For Moving</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-shell_002dkill_002dword-_0028M_002dC_002dd_0029"><code>shell-kill-word (M-C-d)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Killing">Commands For Killing</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-shell_002dtranspose_002dwords-_0028M_002dC_002dt_0029"><code>shell-transpose-words (M-C-t)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Killing">Commands For Killing</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-skip_002dcsi_002dsequence-_0028_0029"><code>skip-csi-sequence ()</code></a>:</td><td> </td><td valign="top"><a href="#Miscellaneous-Commands">Miscellaneous Commands</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-start_002dkbd_002dmacro-_0028C_002dx-_0028_0029"><code>start-kbd-macro (C-x ()</code></a>:</td><td> </td><td valign="top"><a href="#Keyboard-Macros">Keyboard Macros</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Function-Index_fn_letter-T">T</a></th><td></td><td></td></tr>
+<tr><th id="Function-Index_fn_letter-T">T</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-tilde_002dexpand-_0028M_002d_0026_0029"><code>tilde-expand (M-&)</code></a>:</td><td> </td><td valign="top"><a href="#Miscellaneous-Commands">Miscellaneous Commands</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-transpose_002dchars-_0028C_002dt_0029"><code>transpose-chars (C-t)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Text">Commands For Text</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-transpose_002dwords-_0028M_002dt_0029"><code>transpose-words (M-t)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Text">Commands For Text</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Function-Index_fn_letter-U">U</a></th><td></td><td></td></tr>
+<tr><th id="Function-Index_fn_letter-U">U</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-undo-_0028C_002d_005f-or-C_002dx-C_002du_0029"><code>undo (C-_ or C-x C-u)</code></a>:</td><td> </td><td valign="top"><a href="#Miscellaneous-Commands">Miscellaneous Commands</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-universal_002dargument-_0028_0029"><code>universal-argument ()</code></a>:</td><td> </td><td valign="top"><a href="#Numeric-Arguments">Numeric Arguments</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-unix_002dfilename_002drubout-_0028_0029"><code>unix-filename-rubout ()</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Killing">Commands For Killing</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-unix_002dword_002drubout-_0028C_002dw_0029"><code>unix-word-rubout (C-w)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Killing">Commands For Killing</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-upcase_002dword-_0028M_002du_0029"><code>upcase-word (M-u)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Text">Commands For Text</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Function-Index_fn_letter-Y">Y</a></th><td></td><td></td></tr>
+<tr><th id="Function-Index_fn_letter-Y">Y</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-yank-_0028C_002dy_0029"><code>yank (C-y)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-Killing">Commands For Killing</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-yank_002dlast_002darg-_0028M_002d_002e-or-M_002d_005f_0029"><code>yank-last-arg (M-. or M-_)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-History">Commands For History</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-yank_002dnth_002darg-_0028M_002dC_002dy_0029"><code>yank-nth-arg (M-C-y)</code></a>:</td><td> </td><td valign="top"><a href="#Commands-For-History">Commands For History</a></td></tr>
</td></tr></table>
<hr>
-<a name="Concept-Index"></a>
-<div class="header">
+<span id="Concept-Index"></span><div class="header">
<p>
Previous: <a href="#Function-Index" accesskey="p" rel="prev">Function Index</a>, Up: <a href="#Indexes" accesskey="u" rel="up">Indexes</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Indexes" title="Index" rel="index">Index</a>]</p>
</div>
-<a name="Concept-Index-1"></a>
-<h3 class="appendixsec">D.5 Concept Index</h3>
+<span id="Concept-Index-1"></span><h3 class="appendixsec">D.5 Concept Index</h3>
<table><tr><th valign="top">Jump to: </th><td><a class="summary-letter" href="#Concept-Index_cp_letter-A"><b>A</b></a>
<a class="summary-letter" href="#Concept-Index_cp_letter-B"><b>B</b></a>
<table class="index-cp" border="0">
<tr><td></td><th align="left">Index Entry</th><td> </td><th align="left"> Section</th></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Concept-Index_cp_letter-A">A</a></th><td></td><td></td></tr>
+<tr><th id="Concept-Index_cp_letter-A">A</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-alias-expansion">alias expansion</a>:</td><td> </td><td valign="top"><a href="#Aliases">Aliases</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-arithmetic-evaluation">arithmetic evaluation</a>:</td><td> </td><td valign="top"><a href="#Shell-Arithmetic">Shell Arithmetic</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-arithmetic-expansion">arithmetic expansion</a>:</td><td> </td><td valign="top"><a href="#Arithmetic-Expansion">Arithmetic Expansion</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-arithmetic_002c-shell">arithmetic, shell</a>:</td><td> </td><td valign="top"><a href="#Shell-Arithmetic">Shell Arithmetic</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-arrays">arrays</a>:</td><td> </td><td valign="top"><a href="#Arrays">Arrays</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Concept-Index_cp_letter-B">B</a></th><td></td><td></td></tr>
+<tr><th id="Concept-Index_cp_letter-B">B</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-background">background</a>:</td><td> </td><td valign="top"><a href="#Job-Control-Basics">Job Control Basics</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-Bash-configuration">Bash configuration</a>:</td><td> </td><td valign="top"><a href="#Basic-Installation">Basic Installation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-Bash-installation">Bash installation</a>:</td><td> </td><td valign="top"><a href="#Basic-Installation">Basic Installation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-brace-expansion">brace expansion</a>:</td><td> </td><td valign="top"><a href="#Brace-Expansion">Brace Expansion</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-builtin-1">builtin</a>:</td><td> </td><td valign="top"><a href="#Definitions">Definitions</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Concept-Index_cp_letter-C">C</a></th><td></td><td></td></tr>
+<tr><th id="Concept-Index_cp_letter-C">C</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-command-editing">command editing</a>:</td><td> </td><td valign="top"><a href="#Readline-Bare-Essentials">Readline Bare Essentials</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-command-execution">command execution</a>:</td><td> </td><td valign="top"><a href="#Command-Search-and-Execution">Command Search and Execution</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-command-expansion">command expansion</a>:</td><td> </td><td valign="top"><a href="#Simple-Command-Expansion">Simple Command Expansion</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-commands_002c-shell">commands, shell</a>:</td><td> </td><td valign="top"><a href="#Shell-Commands">Shell Commands</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-commands_002c-simple">commands, simple</a>:</td><td> </td><td valign="top"><a href="#Simple-Commands">Simple Commands</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-comments_002c-shell">comments, shell</a>:</td><td> </td><td valign="top"><a href="#Comments">Comments</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-Compatibility-Level">Compatibility Level</a>:</td><td> </td><td valign="top"><a href="#Shell-Compatibility-Mode">Shell Compatibility Mode</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-Compatibility-Mode">Compatibility Mode</a>:</td><td> </td><td valign="top"><a href="#Shell-Compatibility-Mode">Shell Compatibility Mode</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-completion-builtins">completion builtins</a>:</td><td> </td><td valign="top"><a href="#Programmable-Completion-Builtins">Programmable Completion Builtins</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-configuration">configuration</a>:</td><td> </td><td valign="top"><a href="#Basic-Installation">Basic Installation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-control-operator">control operator</a>:</td><td> </td><td valign="top"><a href="#Definitions">Definitions</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-coprocess">coprocess</a>:</td><td> </td><td valign="top"><a href="#Coprocesses">Coprocesses</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Concept-Index_cp_letter-D">D</a></th><td></td><td></td></tr>
+<tr><th id="Concept-Index_cp_letter-D">D</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-directory-stack">directory stack</a>:</td><td> </td><td valign="top"><a href="#The-Directory-Stack">The Directory Stack</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Concept-Index_cp_letter-E">E</a></th><td></td><td></td></tr>
+<tr><th id="Concept-Index_cp_letter-E">E</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-editing-command-lines">editing command lines</a>:</td><td> </td><td valign="top"><a href="#Readline-Bare-Essentials">Readline Bare Essentials</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-environment">environment</a>:</td><td> </td><td valign="top"><a href="#Environment">Environment</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-evaluation_002c-arithmetic">evaluation, arithmetic</a>:</td><td> </td><td valign="top"><a href="#Shell-Arithmetic">Shell Arithmetic</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-expressions_002c-arithmetic">expressions, arithmetic</a>:</td><td> </td><td valign="top"><a href="#Shell-Arithmetic">Shell Arithmetic</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-expressions_002c-conditional">expressions, conditional</a>:</td><td> </td><td valign="top"><a href="#Bash-Conditional-Expressions">Bash Conditional Expressions</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Concept-Index_cp_letter-F">F</a></th><td></td><td></td></tr>
+<tr><th id="Concept-Index_cp_letter-F">F</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-field">field</a>:</td><td> </td><td valign="top"><a href="#Definitions">Definitions</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-filename">filename</a>:</td><td> </td><td valign="top"><a href="#Definitions">Definitions</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-filename-expansion">filename expansion</a>:</td><td> </td><td valign="top"><a href="#Filename-Expansion">Filename Expansion</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-foreground">foreground</a>:</td><td> </td><td valign="top"><a href="#Job-Control-Basics">Job Control Basics</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-functions_002c-shell">functions, shell</a>:</td><td> </td><td valign="top"><a href="#Shell-Functions">Shell Functions</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Concept-Index_cp_letter-H">H</a></th><td></td><td></td></tr>
+<tr><th id="Concept-Index_cp_letter-H">H</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-history-builtins">history builtins</a>:</td><td> </td><td valign="top"><a href="#Bash-History-Builtins">Bash History Builtins</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-history-events">history events</a>:</td><td> </td><td valign="top"><a href="#Event-Designators">Event Designators</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-history-expansion">history expansion</a>:</td><td> </td><td valign="top"><a href="#History-Interaction">History Interaction</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-history-list">history list</a>:</td><td> </td><td valign="top"><a href="#Bash-History-Facilities">Bash History Facilities</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-History_002c-how-to-use">History, how to use</a>:</td><td> </td><td valign="top"><a href="#A-Programmable-Completion-Example">A Programmable Completion Example</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Concept-Index_cp_letter-I">I</a></th><td></td><td></td></tr>
+<tr><th id="Concept-Index_cp_letter-I">I</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-identifier">identifier</a>:</td><td> </td><td valign="top"><a href="#Definitions">Definitions</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-initialization-file_002c-readline">initialization file, readline</a>:</td><td> </td><td valign="top"><a href="#Readline-Init-File">Readline Init File</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-installation">installation</a>:</td><td> </td><td valign="top"><a href="#Basic-Installation">Basic Installation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-interactive-shell-1">interactive shell</a>:</td><td> </td><td valign="top"><a href="#Interactive-Shells">Interactive Shells</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-internationalization">internationalization</a>:</td><td> </td><td valign="top"><a href="#Locale-Translation">Locale Translation</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Concept-Index_cp_letter-J">J</a></th><td></td><td></td></tr>
+<tr><th id="Concept-Index_cp_letter-J">J</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-job">job</a>:</td><td> </td><td valign="top"><a href="#Definitions">Definitions</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-job-control">job control</a>:</td><td> </td><td valign="top"><a href="#Definitions">Definitions</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-job-control-1">job control</a>:</td><td> </td><td valign="top"><a href="#Job-Control-Basics">Job Control Basics</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Concept-Index_cp_letter-K">K</a></th><td></td><td></td></tr>
+<tr><th id="Concept-Index_cp_letter-K">K</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-kill-ring">kill ring</a>:</td><td> </td><td valign="top"><a href="#Readline-Killing-Commands">Readline Killing Commands</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-killing-text">killing text</a>:</td><td> </td><td valign="top"><a href="#Readline-Killing-Commands">Readline Killing Commands</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Concept-Index_cp_letter-L">L</a></th><td></td><td></td></tr>
+<tr><th id="Concept-Index_cp_letter-L">L</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-localization">localization</a>:</td><td> </td><td valign="top"><a href="#Locale-Translation">Locale Translation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-login-shell">login shell</a>:</td><td> </td><td valign="top"><a href="#Invoking-Bash">Invoking Bash</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Concept-Index_cp_letter-M">M</a></th><td></td><td></td></tr>
+<tr><th id="Concept-Index_cp_letter-M">M</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-matching_002c-pattern">matching, pattern</a>:</td><td> </td><td valign="top"><a href="#Pattern-Matching">Pattern Matching</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-metacharacter">metacharacter</a>:</td><td> </td><td valign="top"><a href="#Definitions">Definitions</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Concept-Index_cp_letter-N">N</a></th><td></td><td></td></tr>
+<tr><th id="Concept-Index_cp_letter-N">N</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-name">name</a>:</td><td> </td><td valign="top"><a href="#Definitions">Definitions</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-native-languages">native languages</a>:</td><td> </td><td valign="top"><a href="#Locale-Translation">Locale Translation</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-notation_002c-readline">notation, readline</a>:</td><td> </td><td valign="top"><a href="#Readline-Bare-Essentials">Readline Bare Essentials</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Concept-Index_cp_letter-O">O</a></th><td></td><td></td></tr>
+<tr><th id="Concept-Index_cp_letter-O">O</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-operator_002c-shell">operator, shell</a>:</td><td> </td><td valign="top"><a href="#Definitions">Definitions</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Concept-Index_cp_letter-P">P</a></th><td></td><td></td></tr>
+<tr><th id="Concept-Index_cp_letter-P">P</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-parameter-expansion">parameter expansion</a>:</td><td> </td><td valign="top"><a href="#Shell-Parameter-Expansion">Shell Parameter Expansion</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-parameters">parameters</a>:</td><td> </td><td valign="top"><a href="#Shell-Parameters">Shell Parameters</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-parameters_002c-positional">parameters, positional</a>:</td><td> </td><td valign="top"><a href="#Positional-Parameters">Positional Parameters</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-programmable-completion">programmable completion</a>:</td><td> </td><td valign="top"><a href="#Programmable-Completion">Programmable Completion</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-prompting">prompting</a>:</td><td> </td><td valign="top"><a href="#Controlling-the-Prompt">Controlling the Prompt</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Concept-Index_cp_letter-Q">Q</a></th><td></td><td></td></tr>
+<tr><th id="Concept-Index_cp_letter-Q">Q</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-quoting">quoting</a>:</td><td> </td><td valign="top"><a href="#Quoting">Quoting</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-quoting_002c-ANSI">quoting, ANSI</a>:</td><td> </td><td valign="top"><a href="#ANSI_002dC-Quoting">ANSI-C Quoting</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Concept-Index_cp_letter-R">R</a></th><td></td><td></td></tr>
+<tr><th id="Concept-Index_cp_letter-R">R</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-Readline_002c-how-to-use">Readline, how to use</a>:</td><td> </td><td valign="top"><a href="#Job-Control-Variables">Job Control Variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-redirection">redirection</a>:</td><td> </td><td valign="top"><a href="#Redirections">Redirections</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-reserved-word">reserved word</a>:</td><td> </td><td valign="top"><a href="#Definitions">Definitions</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-reserved-words">reserved words</a>:</td><td> </td><td valign="top"><a href="#Reserved-Words">Reserved Words</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-restricted-shell">restricted shell</a>:</td><td> </td><td valign="top"><a href="#The-Restricted-Shell">The Restricted Shell</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-return-status">return status</a>:</td><td> </td><td valign="top"><a href="#Definitions">Definitions</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Concept-Index_cp_letter-S">S</a></th><td></td><td></td></tr>
+<tr><th id="Concept-Index_cp_letter-S">S</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-shell-arithmetic">shell arithmetic</a>:</td><td> </td><td valign="top"><a href="#Shell-Arithmetic">Shell Arithmetic</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-shell-function">shell function</a>:</td><td> </td><td valign="top"><a href="#Shell-Functions">Shell Functions</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-shell-script">shell script</a>:</td><td> </td><td valign="top"><a href="#Shell-Scripts">Shell Scripts</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-startup-files">startup files</a>:</td><td> </td><td valign="top"><a href="#Bash-Startup-Files">Bash Startup Files</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-suspending-jobs">suspending jobs</a>:</td><td> </td><td valign="top"><a href="#Job-Control-Basics">Job Control Basics</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Concept-Index_cp_letter-T">T</a></th><td></td><td></td></tr>
+<tr><th id="Concept-Index_cp_letter-T">T</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-tilde-expansion">tilde expansion</a>:</td><td> </td><td valign="top"><a href="#Tilde-Expansion">Tilde Expansion</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-token">token</a>:</td><td> </td><td valign="top"><a href="#Definitions">Definitions</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-translation_002c-native-languages">translation, native languages</a>:</td><td> </td><td valign="top"><a href="#Locale-Translation">Locale Translation</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Concept-Index_cp_letter-V">V</a></th><td></td><td></td></tr>
+<tr><th id="Concept-Index_cp_letter-V">V</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-variable_002c-shell">variable, shell</a>:</td><td> </td><td valign="top"><a href="#Shell-Parameters">Shell Parameters</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-variables_002c-readline">variables, readline</a>:</td><td> </td><td valign="top"><a href="#Readline-Init-File-Syntax">Readline Init File Syntax</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Concept-Index_cp_letter-W">W</a></th><td></td><td></td></tr>
+<tr><th id="Concept-Index_cp_letter-W">W</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-word">word</a>:</td><td> </td><td valign="top"><a href="#Definitions">Definitions</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-word-splitting">word splitting</a>:</td><td> </td><td valign="top"><a href="#Word-Splitting">Word Splitting</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
-<tr><th><a name="Concept-Index_cp_letter-Y">Y</a></th><td></td><td></td></tr>
+<tr><th id="Concept-Index_cp_letter-Y">Y</th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-yanking-text">yanking text</a>:</td><td> </td><td valign="top"><a href="#Readline-Killing-Commands">Readline Killing Commands</a></td></tr>
<tr><td colspan="4"> <hr></td></tr>
</table>