addition to POSIX mode documentation; new translations; update copyrights on some files; update formatted documentation; changes to cut/lcut loadable builtins when supplied -a ARRAY

This commit is contained in:
Chet Ramey
2025-06-06 12:16:11 -04:00
parent dbe4256d5e
commit 727b8d3663
56 changed files with 6737 additions and 11126 deletions
+145 -134
View File
@@ -1,12 +1,12 @@
<!DOCTYPE html>
<html>
<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ -->
<!-- Created by GNU Texinfo 7.2, https://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- This text is a brief description of the features that are present in
the Bash shell (version 5.3, 7 April 2025).
the Bash shell (version 5.3, 18 May 2025).
This is Edition 5.3, last updated 7 April 2025,
This is Edition 5.3, last updated 18 May 2025,
of The GNU Bash Reference Manual,
for Bash, Version 5.3.
@@ -77,10 +77,10 @@ Next: <a href="#Introduction" accesskey="n" rel="next">Introduction</a>, Previou
<h1 class="top" id="Bash-Features-1"><span>Bash Features<a class="copiable-link" href="#Bash-Features-1"> &para;</a></span></h1>
<p>This text is a brief description of the features that are present in
the Bash shell (version 5.3, 7 April 2025).
the Bash shell (version 5.3, 18 May 2025).
The Bash home page is <a class="url" href="http://www.gnu.org/software/bash/">http://www.gnu.org/software/bash/</a>.
</p>
<p>This is Edition 5.3, last updated 7 April 2025,
<p>This is Edition 5.3, last updated 18 May 2025,
of <cite class="cite">The GNU Bash Reference Manual</cite>,
for <code class="code">Bash</code>, Version 5.3.
</p>
@@ -99,70 +99,70 @@ The Bash manual page should be used as the definitive
reference on shell behavior.
</p>
<div class="element-contents" id="SEC_Contents">
<div class="region-contents" id="SEC_Contents">
<h2 class="contents-heading">Table of Contents</h2>
<div class="contents">
<ul class="toc-numbered-mark">
<li><a id="toc-Introduction-1" href="#Introduction">1 Introduction</a>
<li><a id="toc-Introduction" href="#Introduction">1 Introduction</a>
<ul class="toc-numbered-mark">
<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>
<li><a id="toc-What-is-Bash_003f" href="#What-is-Bash_003f">1.1 What is Bash?</a></li>
<li><a id="toc-What-is-a-shell_003f" href="#What-is-a-shell_003f">1.2 What is a shell?</a></li>
</ul></li>
<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>
<li><a id="toc-Definitions" href="#Definitions">2 Definitions</a></li>
<li><a id="toc-Basic-Shell-Features" href="#Basic-Shell-Features">3 Basic Shell Features</a>
<ul class="toc-numbered-mark">
<li><a id="toc-Shell-Syntax-1" href="#Shell-Syntax">3.1 Shell Syntax</a>
<li><a id="toc-Shell-Syntax" href="#Shell-Syntax">3.1 Shell Syntax</a>
<ul class="toc-numbered-mark">
<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>
<li><a id="toc-Shell-Operation" href="#Shell-Operation">3.1.1 Shell Operation</a></li>
<li><a id="toc-Quoting" href="#Quoting">3.1.2 Quoting</a>
<ul class="toc-numbered-mark">
<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-Escape-Character" href="#Escape-Character">3.1.2.1 Escape Character</a></li>
<li><a id="toc-Single-Quotes" href="#Single-Quotes">3.1.2.2 Single Quotes</a></li>
<li><a id="toc-Double-Quotes" href="#Double-Quotes">3.1.2.3 Double Quotes</a></li>
<li><a id="toc-ANSI_002dC-Quoting" 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 id="toc-Comments-1" href="#Comments">3.1.3 Comments</a></li>
<li><a id="toc-Comments" href="#Comments">3.1.3 Comments</a></li>
</ul></li>
<li><a id="toc-Shell-Commands-1" href="#Shell-Commands">3.2 Shell Commands</a>
<li><a id="toc-Shell-Commands" href="#Shell-Commands">3.2 Shell Commands</a>
<ul class="toc-numbered-mark">
<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-Reserved-Words" href="#Reserved-Words">3.2.1 Reserved Words</a></li>
<li><a id="toc-Simple-Commands" href="#Simple-Commands">3.2.2 Simple Commands</a></li>
<li><a id="toc-Pipelines" 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>
<li><a id="toc-Compound-Commands" href="#Compound-Commands">3.2.5 Compound Commands</a>
<ul class="toc-numbered-mark">
<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-Looping-Constructs" href="#Looping-Constructs">3.2.5.1 Looping Constructs</a></li>
<li><a id="toc-Conditional-Constructs" 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 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>
<li><a id="toc-Coprocesses" href="#Coprocesses">3.2.6 Coprocesses</a></li>
<li><a id="toc-GNU-Parallel" href="#GNU-Parallel">3.2.7 GNU Parallel</a></li>
</ul></li>
<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>
<li><a id="toc-Shell-Functions" href="#Shell-Functions">3.3 Shell Functions</a></li>
<li><a id="toc-Shell-Parameters" href="#Shell-Parameters">3.4 Shell Parameters</a>
<ul class="toc-numbered-mark">
<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>
<li><a id="toc-Positional-Parameters" href="#Positional-Parameters">3.4.1 Positional Parameters</a></li>
<li><a id="toc-Special-Parameters" href="#Special-Parameters">3.4.2 Special Parameters</a></li>
</ul></li>
<li><a id="toc-Shell-Expansions-1" href="#Shell-Expansions">3.5 Shell Expansions</a>
<li><a id="toc-Shell-Expansions" href="#Shell-Expansions">3.5 Shell Expansions</a>
<ul class="toc-numbered-mark">
<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>
<li><a id="toc-Brace-Expansion" href="#Brace-Expansion">3.5.1 Brace Expansion</a></li>
<li><a id="toc-Tilde-Expansion" href="#Tilde-Expansion">3.5.2 Tilde Expansion</a></li>
<li><a id="toc-Shell-Parameter-Expansion" href="#Shell-Parameter-Expansion">3.5.3 Shell Parameter Expansion</a></li>
<li><a id="toc-Command-Substitution" href="#Command-Substitution">3.5.4 Command Substitution</a></li>
<li><a id="toc-Arithmetic-Expansion" href="#Arithmetic-Expansion">3.5.5 Arithmetic Expansion</a></li>
<li><a id="toc-Process-Substitution" href="#Process-Substitution">3.5.6 Process Substitution</a></li>
<li><a id="toc-Word-Splitting" href="#Word-Splitting">3.5.7 Word Splitting</a></li>
<li><a id="toc-Filename-Expansion" href="#Filename-Expansion">3.5.8 Filename Expansion</a>
<ul class="toc-numbered-mark">
<li><a id="toc-Pattern-Matching-1" href="#Pattern-Matching">3.5.8.1 Pattern Matching</a></li>
<li><a id="toc-Pattern-Matching" href="#Pattern-Matching">3.5.8.1 Pattern Matching</a></li>
</ul></li>
<li><a id="toc-Quote-Removal-1" href="#Quote-Removal">3.5.9 Quote Removal</a></li>
<li><a id="toc-Quote-Removal" href="#Quote-Removal">3.5.9 Quote Removal</a></li>
</ul></li>
<li><a id="toc-Redirections-1" href="#Redirections">3.6 Redirections</a>
<li><a id="toc-Redirections" href="#Redirections">3.6 Redirections</a>
<ul class="toc-numbered-mark">
<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>
@@ -175,134 +175,134 @@ reference on shell behavior.
<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 id="toc-Executing-Commands-1" href="#Executing-Commands">3.7 Executing Commands</a>
<li><a id="toc-Executing-Commands" href="#Executing-Commands">3.7 Executing Commands</a>
<ul class="toc-numbered-mark">
<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>
<li><a id="toc-Simple-Command-Expansion" href="#Simple-Command-Expansion">3.7.1 Simple Command Expansion</a></li>
<li><a id="toc-Command-Search-and-Execution" href="#Command-Search-and-Execution">3.7.2 Command Search and Execution</a></li>
<li><a id="toc-Command-Execution-Environment" href="#Command-Execution-Environment">3.7.3 Command Execution Environment</a></li>
<li><a id="toc-Environment" href="#Environment">3.7.4 Environment</a></li>
<li><a id="toc-Exit-Status" href="#Exit-Status">3.7.5 Exit Status</a></li>
<li><a id="toc-Signals" href="#Signals">3.7.6 Signals</a></li>
</ul></li>
<li><a id="toc-Shell-Scripts-1" href="#Shell-Scripts">3.8 Shell Scripts</a></li>
<li><a id="toc-Shell-Scripts" href="#Shell-Scripts">3.8 Shell Scripts</a></li>
</ul></li>
<li><a id="toc-Shell-Builtin-Commands-1" href="#Shell-Builtin-Commands">4 Shell Builtin Commands</a>
<li><a id="toc-Shell-Builtin-Commands" href="#Shell-Builtin-Commands">4 Shell Builtin Commands</a>
<ul class="toc-numbered-mark">
<li><a id="toc-Bourne-Shell-Builtins-1" href="#Bourne-Shell-Builtins">4.1 Bourne Shell Builtins</a></li>
<li><a id="toc-Bourne-Shell-Builtins" 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>
<li><a id="toc-Modifying-Shell-Behavior" href="#Modifying-Shell-Behavior">4.3 Modifying Shell Behavior</a>
<ul class="toc-numbered-mark">
<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>
<li><a id="toc-The-Set-Builtin" href="#The-Set-Builtin">4.3.1 The Set Builtin</a></li>
<li><a id="toc-The-Shopt-Builtin" href="#The-Shopt-Builtin">4.3.2 The Shopt Builtin</a></li>
</ul></li>
<li><a id="toc-Special-Builtins-1" href="#Special-Builtins">4.4 Special Builtins</a></li>
<li><a id="toc-Special-Builtins" href="#Special-Builtins">4.4 Special Builtins</a></li>
</ul></li>
<li><a id="toc-Shell-Variables-1" href="#Shell-Variables">5 Shell Variables</a>
<li><a id="toc-Shell-Variables" href="#Shell-Variables">5 Shell Variables</a>
<ul class="toc-numbered-mark">
<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>
<li><a id="toc-Bourne-Shell-Variables" href="#Bourne-Shell-Variables">5.1 Bourne Shell Variables</a></li>
<li><a id="toc-Bash-Variables" href="#Bash-Variables">5.2 Bash Variables</a></li>
</ul></li>
<li><a id="toc-Bash-Features-2" href="#Bash-Features">6 Bash Features</a>
<li><a id="toc-Bash-Features-1" href="#Bash-Features">6 Bash Features</a>
<ul class="toc-numbered-mark">
<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>
<li><a id="toc-Invoking-Bash" href="#Invoking-Bash">6.1 Invoking Bash</a></li>
<li><a id="toc-Bash-Startup-Files" href="#Bash-Startup-Files">6.2 Bash Startup Files</a></li>
<li><a id="toc-Interactive-Shells" href="#Interactive-Shells">6.3 Interactive Shells</a>
<ul class="toc-numbered-mark">
<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>
<li><a id="toc-What-is-an-Interactive-Shell_003f" 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" href="#Is-this-Shell-Interactive_003f">6.3.2 Is this Shell Interactive?</a></li>
<li><a id="toc-Interactive-Shell-Behavior" href="#Interactive-Shell-Behavior">6.3.3 Interactive Shell Behavior</a></li>
</ul></li>
<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>
<li><a id="toc-Bash-Conditional-Expressions" href="#Bash-Conditional-Expressions">6.4 Bash Conditional Expressions</a></li>
<li><a id="toc-Shell-Arithmetic" href="#Shell-Arithmetic">6.5 Shell Arithmetic</a></li>
<li><a id="toc-Aliases" href="#Aliases">6.6 Aliases</a></li>
<li><a id="toc-Arrays" href="#Arrays">6.7 Arrays</a></li>
<li><a id="toc-The-Directory-Stack" href="#The-Directory-Stack">6.8 The Directory Stack</a>
<ul class="toc-numbered-mark">
<li><a id="toc-Directory-Stack-Builtins-1" href="#Directory-Stack-Builtins">6.8.1 Directory Stack Builtins</a></li>
<li><a id="toc-Directory-Stack-Builtins" href="#Directory-Stack-Builtins">6.8.1 Directory Stack Builtins</a></li>
</ul></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-Controlling-the-Prompt" href="#Controlling-the-Prompt">6.9 Controlling the Prompt</a></li>
<li><a id="toc-The-Restricted-Shell" href="#The-Restricted-Shell">6.10 The Restricted Shell</a></li>
<li><a id="toc-Bash-and-POSIX" href="#Bash-POSIX-Mode">6.11 Bash and POSIX</a>
<ul class="toc-numbered-mark">
<li><a id="toc-What-is-POSIX_003f" href="#What-is-POSIX_003f">6.11.1 What is POSIX?</a></li>
<li><a id="toc-Bash-POSIX-Mode-1" href="#Bash-POSIX-Mode-1">6.11.2 Bash POSIX Mode</a></li>
<li><a id="toc-Bash-POSIX-Mode" href="#Bash-POSIX-Mode-1">6.11.2 Bash POSIX Mode</a></li>
</ul></li>
<li><a id="toc-Shell-Compatibility-Mode-1" href="#Shell-Compatibility-Mode">6.12 Shell Compatibility Mode</a></li>
<li><a id="toc-Shell-Compatibility-Mode" href="#Shell-Compatibility-Mode">6.12 Shell Compatibility Mode</a></li>
</ul></li>
<li><a id="toc-Job-Control-1" href="#Job-Control">7 Job Control</a>
<li><a id="toc-Job-Control" href="#Job-Control">7 Job Control</a>
<ul class="toc-numbered-mark">
<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>
<li><a id="toc-Job-Control-Basics" href="#Job-Control-Basics">7.1 Job Control Basics</a></li>
<li><a id="toc-Job-Control-Builtins" href="#Job-Control-Builtins">7.2 Job Control Builtins</a></li>
<li><a id="toc-Job-Control-Variables" href="#Job-Control-Variables">7.3 Job Control Variables</a></li>
</ul></li>
<li><a id="toc-Command-Line-Editing-1" href="#Command-Line-Editing">8 Command Line Editing</a>
<li><a id="toc-Command-Line-Editing" href="#Command-Line-Editing">8 Command Line Editing</a>
<ul class="toc-numbered-mark">
<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>
<li><a id="toc-Readline-Interaction" href="#Readline-Interaction">8.2 Readline Interaction</a>
<ul class="toc-numbered-mark">
<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-Readline-Bare-Essentials" href="#Readline-Bare-Essentials">8.2.1 Readline Bare Essentials</a></li>
<li><a id="toc-Readline-Movement-Commands" href="#Readline-Movement-Commands">8.2.2 Readline Movement Commands</a></li>
<li><a id="toc-Readline-Killing-Commands" href="#Readline-Killing-Commands">8.2.3 Readline Killing Commands</a></li>
<li><a id="toc-Readline-Arguments" 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 id="toc-Readline-Init-File-1" href="#Readline-Init-File">8.3 Readline Init File</a>
<li><a id="toc-Readline-Init-File" href="#Readline-Init-File">8.3 Readline Init File</a>
<ul class="toc-numbered-mark">
<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>
<li><a id="toc-Readline-Init-File-Syntax" href="#Readline-Init-File-Syntax">8.3.1 Readline Init File Syntax</a></li>
<li><a id="toc-Conditional-Init-Constructs" href="#Conditional-Init-Constructs">8.3.2 Conditional Init Constructs</a></li>
<li><a id="toc-Sample-Init-File" href="#Sample-Init-File">8.3.3 Sample Init File</a></li>
</ul></li>
<li><a id="toc-Bindable-Readline-Commands-1" href="#Bindable-Readline-Commands">8.4 Bindable Readline Commands</a>
<li><a id="toc-Bindable-Readline-Commands" href="#Bindable-Readline-Commands">8.4 Bindable Readline Commands</a>
<ul class="toc-numbered-mark">
<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-Moving" 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-Keyboard-Macros" 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 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>
<li><a id="toc-Readline-vi-Mode" href="#Readline-vi-Mode">8.5 Readline vi Mode</a></li>
<li><a id="toc-Programmable-Completion" href="#Programmable-Completion">8.6 Programmable Completion</a></li>
<li><a id="toc-Programmable-Completion-Builtins" href="#Programmable-Completion-Builtins">8.7 Programmable Completion Builtins</a></li>
<li><a id="toc-A-Programmable-Completion-Example" href="#A-Programmable-Completion-Example">8.8 A Programmable Completion Example</a></li>
</ul></li>
<li><a id="toc-Using-History-Interactively-1" href="#Using-History-Interactively">9 Using History Interactively</a>
<li><a id="toc-Using-History-Interactively" href="#Using-History-Interactively">9 Using History Interactively</a>
<ul class="toc-numbered-mark">
<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-Bash-History-Facilities" href="#Bash-History-Facilities">9.1 Bash History Facilities</a></li>
<li><a id="toc-Bash-History-Builtins" 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="toc-numbered-mark">
<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>
<li><a id="toc-Event-Designators" href="#Event-Designators">9.3.1 Event Designators</a></li>
<li><a id="toc-Word-Designators" href="#Word-Designators">9.3.2 Word Designators</a></li>
<li><a id="toc-Modifiers" href="#Modifiers">9.3.3 Modifiers</a></li>
</ul></li>
</ul></li>
<li><a id="toc-Installing-Bash-1" href="#Installing-Bash">10 Installing Bash</a>
<li><a id="toc-Installing-Bash" href="#Installing-Bash">10 Installing Bash</a>
<ul class="toc-numbered-mark">
<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>
<li><a id="toc-Basic-Installation" href="#Basic-Installation">10.1 Basic Installation</a></li>
<li><a id="toc-Compilers-and-Options" href="#Compilers-and-Options">10.2 Compilers and Options</a></li>
<li><a id="toc-Compiling-For-Multiple-Architectures" href="#Compiling-For-Multiple-Architectures">10.3 Compiling For Multiple Architectures</a></li>
<li><a id="toc-Installation-Names" href="#Installation-Names">10.4 Installation Names</a></li>
<li><a id="toc-Specifying-the-System-Type" href="#Specifying-the-System-Type">10.5 Specifying the System Type</a></li>
<li><a id="toc-Sharing-Defaults" href="#Sharing-Defaults">10.6 Sharing Defaults</a></li>
<li><a id="toc-Operation-Controls" href="#Operation-Controls">10.7 Operation Controls</a></li>
<li><a id="toc-Optional-Features" href="#Optional-Features">10.8 Optional Features</a></li>
</ul></li>
<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>
<li><a id="toc-Reporting-Bugs" href="#Reporting-Bugs">Appendix A Reporting Bugs</a></li>
<li><a id="toc-Major-Differences-From-The-Bourne-Shell" href="#Major-Differences-From-The-Bourne-Shell">Appendix B Major Differences From The Bourne Shell</a>
<ul class="toc-numbered-mark">
<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 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>
<li><a id="toc-GNU-Free-Documentation-License" href="#GNU-Free-Documentation-License">Appendix C GNU Free Documentation License</a></li>
<li><a id="toc-Indexes" href="#Indexes">Appendix D Indexes</a>
<ul class="toc-numbered-mark">
<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>
<li><a id="toc-Function-Index" href="#Function-Index" rel="index">D.4 Function Index</a></li>
<li><a id="toc-Concept-Index" href="#Concept-Index" rel="index">D.5 Concept Index</a></li>
</ul></li>
</ul>
</div>
@@ -9562,7 +9562,8 @@ not when the function is executed, because a function definition
is itself a command.
As a consequence, aliases
defined in a function are not available until after that
function is executed. To be safe, always put
function is executed.
To be safe, always put
alias definitions on a separate line, and do not use <code class="code">alias</code>
in compound commands.
</p>
@@ -10531,12 +10532,22 @@ statuses after the <code class="code">wait</code> builtin returns it.
</li></ol>
<p>There is other <small class="sc">POSIX</small> behavior that Bash does not implement by
<p>There is additional <small class="sc">POSIX</small> behavior that Bash does not implement by
default even when in <small class="sc">POSIX</small> mode.
Specifically:
</p>
<ol class="enumerate">
<li> The <code class="code">fc</code> builtin checks <code class="code">$EDITOR</code> as a program to edit history
<li> <small class="sc">POSIX</small> requires that word splitting be byte-oriented.
That is, each <em class="emph">byte</em> in the value of <code class="env">IFS</code> potentially splits a
word, even if that byte is part of a multibyte character in <code class="env">IFS</code>
or part of multibyte character in the word.
Bash allows multibyte characters in the value of <code class="env">IFS</code>, treating
a valid multibyte character as a single delimiter, and will not
split a valid multibyte character even if one of the bytes composing that
character appears in <code class="env">IFS</code>.
This is <small class="sc">POSIX</small> interpretation 1560, further modified by issue 1924.
</li><li> The <code class="code">fc</code> builtin checks <code class="code">$EDITOR</code> as a program to edit history
entries if <code class="code">FCEDIT</code> is unset, rather than defaulting directly to
<code class="code">ed</code>.
<code class="code">fc</code> uses <code class="code">ed</code> if <code class="code">EDITOR</code> is unset.
@@ -12866,7 +12877,7 @@ This is how to insert key sequences like <kbd class="kbd">C-q</kbd>, for example
</p>
</dd>
<dt><a id="index-self_002dinsert-_0028a_002c-b_002c-A_002c-1_002c-_0021_002c-_2026_0029"></a><span><code class="code">self-insert (a, b, A, 1, !, &hellip;)</code><a class="copiable-link" href="#index-self_002dinsert-_0028a_002c-b_002c-A_002c-1_002c-_0021_002c-_2026_0029"> &para;</a></span></dt>
<dt><a id="index-self_002dinsert-_0028a_002c-b_002c-A_002c-1_002c-_0021_002c-_002e_002e_002e_0029"></a><span><code class="code">self-insert (a, b, A, 1, !, &hellip;)</code><a class="copiable-link" href="#index-self_002dinsert-_0028a_002c-b_002c-A_002c-1_002c-_0021_002c-_002e_002e_002e_0029"> &para;</a></span></dt>
<dd><p>Insert the character typed.
</p>
</dd>
@@ -13059,7 +13070,7 @@ Next: <a href="#Commands-For-Completion" accesskey="n" rel="next">Letting Readli
</div>
<h4 class="subsection" id="Specifying-Numeric-Arguments"><span>8.4.5 Specifying Numeric Arguments<a class="copiable-link" href="#Specifying-Numeric-Arguments"> &para;</a></span></h4>
<dl class="ftable">
<dt><a id="index-digit_002dargument-_0028M_002d0_002c-M_002d1_002c-_2026-M_002d_002d_0029"></a><span><code class="code">digit-argument (<kbd class="kbd">M-0</kbd>, <kbd class="kbd">M-1</kbd>, &hellip; <kbd class="kbd">M--</kbd>)</code><a class="copiable-link" href="#index-digit_002dargument-_0028M_002d0_002c-M_002d1_002c-_2026-M_002d_002d_0029"> &para;</a></span></dt>
<dt><a id="index-digit_002dargument-_0028M_002d0_002c-M_002d1_002c-_002e_002e_002e-M_002d_002d_0029"></a><span><code class="code">digit-argument (<kbd class="kbd">M-0</kbd>, <kbd class="kbd">M-1</kbd>, &hellip; <kbd class="kbd">M--</kbd>)</code><a class="copiable-link" href="#index-digit_002dargument-_0028M_002d0_002c-M_002d1_002c-_002e_002e_002e-M_002d_002d_0029"> &para;</a></span></dt>
<dd><p>Add this digit to the argument already accumulating, or start a new
argument.
<kbd class="kbd">M--</kbd> starts a negative argument.
@@ -13298,7 +13309,7 @@ ring the terminal&rsquo;s bell (subject to the setting of
<code class="code">bell-style</code>).
</p>
</dd>
<dt><a id="index-do_002dlowercase_002dversion-_0028M_002dA_002c-M_002dB_002c-M_002dx_002c-_2026_0029"></a><span><code class="code">do-lowercase-version (M-A, M-B, M-<var class="var">x</var>, &hellip;)</code><a class="copiable-link" href="#index-do_002dlowercase_002dversion-_0028M_002dA_002c-M_002dB_002c-M_002dx_002c-_2026_0029"> &para;</a></span></dt>
<dt><a id="index-do_002dlowercase_002dversion-_0028M_002dA_002c-M_002dB_002c-M_002dx_002c-_002e_002e_002e_0029"></a><span><code class="code">do-lowercase-version (M-A, M-B, M-<var class="var">x</var>, &hellip;)</code><a class="copiable-link" href="#index-do_002dlowercase_002dversion-_0028M_002dA_002c-M_002dB_002c-M_002dx_002c-_002e_002e_002e_0029"> &para;</a></span></dt>
<dd><p>If the metafied character <var class="var">x</var> is upper case, run the command
that is bound to the corresponding metafied lower case character.
The behavior is undefined if <var class="var">x</var> is already lower case.
@@ -16650,7 +16661,7 @@ Next: <a href="#Reserved-Word-Index" accesskey="n" rel="next">Index of Shell Res
<a class="summary-letter-printindex" href="#Builtin-Index_bt_letter-W"><b>W</b></a>
&nbsp;
</td></tr></table>
<table class="bt-entries-printindex" border="0">
<table class="bt-entries-printindex">
<tr><td></td><th class="entries-header-printindex">Index Entry</th><th class="sections-header-printindex">Section</th></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Builtin-Index_bt_symbol-1">:</th></tr>
@@ -16842,7 +16853,7 @@ Next: <a href="#Variable-Index" accesskey="n" rel="next">Parameter and Variable
<a class="summary-letter-printindex" href="#Reserved-Word-Index_rw_letter-W"><b>W</b></a>
&nbsp;
</td></tr></table>
<table class="rw-entries-printindex" border="0">
<table class="rw-entries-printindex">
<tr><td></td><th class="entries-header-printindex">Index Entry</th><th class="sections-header-printindex">Section</th></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Reserved-Word-Index_rw_symbol-1">!</th></tr>
@@ -16994,7 +17005,7 @@ Next: <a href="#Function-Index" accesskey="n" rel="next">Function Index</a>, Pre
<a class="summary-letter-printindex" href="#Variable-Index_vr_letter-V"><b>V</b></a>
&nbsp;
</td></tr></table>
<table class="vr-entries-printindex" border="0">
<table class="vr-entries-printindex">
<tr><td></td><th class="entries-header-printindex">Index Entry</th><th class="sections-header-printindex">Section</th></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Variable-Index_vr_symbol-1">_</th></tr>
@@ -17343,7 +17354,7 @@ Next: <a href="#Concept-Index" accesskey="n" rel="next">Concept Index</a>, Previ
<a class="summary-letter-printindex" href="#Function-Index_fn_letter-Y"><b>Y</b></a>
&nbsp;
</td></tr></table>
<table class="fn-entries-printindex" border="0">
<table class="fn-entries-printindex">
<tr><td></td><th class="entries-header-printindex">Index Entry</th><th class="sections-header-printindex">Section</th></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Function-Index_fn_letter-A">A</th></tr>
@@ -17384,9 +17395,9 @@ Next: <a href="#Concept-Index" accesskey="n" rel="next">Concept Index</a>, Previ
<tr><td></td><td class="printindex-index-entry"><a href="#index-delete_002dchar-_0028C_002dd_0029"><code>delete-char (C-d)</code></a></td><td class="printindex-index-section"><a href="#Commands-For-Text">Commands For Text</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-delete_002dchar_002dor_002dlist-_0028_0029"><code>delete-char-or-list ()</code></a></td><td class="printindex-index-section"><a href="#Commands-For-Completion">Commands For Completion</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-delete_002dhorizontal_002dspace-_0028_0029"><code>delete-horizontal-space ()</code></a></td><td class="printindex-index-section"><a href="#Commands-For-Killing">Commands For Killing</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-digit_002dargument-_0028M_002d0_002c-M_002d1_002c-_2026-M_002d_002d_0029"><code>digit-argument (<kbd class="kbd">M-0</kbd>, <kbd class="kbd">M-1</kbd>, &hellip; <kbd class="kbd">M--</kbd>)</code></a></td><td class="printindex-index-section"><a href="#Numeric-Arguments">Numeric Arguments</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-digit_002dargument-_0028M_002d0_002c-M_002d1_002c-_002e_002e_002e-M_002d_002d_0029"><code>digit-argument (<kbd class="kbd">M-0</kbd>, <kbd class="kbd">M-1</kbd>, &hellip; <kbd class="kbd">M--</kbd>)</code></a></td><td class="printindex-index-section"><a href="#Numeric-Arguments">Numeric Arguments</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-display_002dshell_002dversion-_0028C_002dx-C_002dv_0029"><code>display-shell-version (C-x C-v)</code></a></td><td class="printindex-index-section"><a href="#Miscellaneous-Commands">Miscellaneous Commands</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-do_002dlowercase_002dversion-_0028M_002dA_002c-M_002dB_002c-M_002dx_002c-_2026_0029"><code>do-lowercase-version (M-A, M-B, M-<var class="var">x</var>, &hellip;)</code></a></td><td class="printindex-index-section"><a href="#Miscellaneous-Commands">Miscellaneous Commands</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-do_002dlowercase_002dversion-_0028M_002dA_002c-M_002dB_002c-M_002dx_002c-_002e_002e_002e_0029"><code>do-lowercase-version (M-A, M-B, M-<var class="var">x</var>, &hellip;)</code></a></td><td class="printindex-index-section"><a href="#Miscellaneous-Commands">Miscellaneous Commands</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-downcase_002dword-_0028M_002dl_0029"><code>downcase-word (M-l)</code></a></td><td class="printindex-index-section"><a href="#Commands-For-Text">Commands For Text</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-dump_002dfunctions-_0028_0029"><code>dump-functions ()</code></a></td><td class="printindex-index-section"><a href="#Miscellaneous-Commands">Miscellaneous Commands</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-dump_002dmacros-_0028_0029"><code>dump-macros ()</code></a></td><td class="printindex-index-section"><a href="#Miscellaneous-Commands">Miscellaneous Commands</a></td></tr>
@@ -17471,7 +17482,7 @@ Next: <a href="#Concept-Index" accesskey="n" rel="next">Concept Index</a>, Previ
<tr><td></td><td class="printindex-index-entry"><a href="#index-revert_002dline-_0028M_002dr_0029"><code>revert-line (M-r)</code></a></td><td class="printindex-index-section"><a href="#Miscellaneous-Commands">Miscellaneous Commands</a></td></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Function-Index_fn_letter-S">S</th></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-self_002dinsert-_0028a_002c-b_002c-A_002c-1_002c-_0021_002c-_2026_0029"><code>self-insert (a, b, A, 1, !, &hellip;)</code></a></td><td class="printindex-index-section"><a href="#Commands-For-Text">Commands For Text</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-self_002dinsert-_0028a_002c-b_002c-A_002c-1_002c-_0021_002c-_002e_002e_002e_0029"><code>self-insert (a, b, A, 1, !, &hellip;)</code></a></td><td class="printindex-index-section"><a href="#Commands-For-Text">Commands For Text</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-set_002dmark-_0028C_002d_0040_0029"><code>set-mark (C-@)</code></a></td><td class="printindex-index-section"><a href="#Miscellaneous-Commands">Miscellaneous Commands</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-shell_002dbackward_002dkill_002dword-_0028_0029"><code>shell-backward-kill-word ()</code></a></td><td class="printindex-index-section"><a href="#Commands-For-Killing">Commands For Killing</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-shell_002dbackward_002dword-_0028M_002dC_002db_0029"><code>shell-backward-word (M-C-b)</code></a></td><td class="printindex-index-section"><a href="#Commands-For-Moving">Commands For Moving</a></td></tr>
@@ -17602,7 +17613,7 @@ Previous: <a href="#Function-Index" accesskey="p" rel="prev">Function Index</a>,
<a class="summary-letter-printindex" href="#Concept-Index_cp_letter-Y"><b>Y</b></a>
&nbsp;
</td></tr></table>
<table class="cp-entries-printindex" border="0">
<table class="cp-entries-printindex">
<tr><td></td><th class="entries-header-printindex">Index Entry</th><th class="sections-header-printindex">Section</th></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Concept-Index_cp_letter-A">A</th></tr>