summaryrefslogtreecommitdiff
path: root/doc/bash.info
diff options
context:
space:
mode:
Diffstat (limited to 'doc/bash.info')
-rw-r--r--doc/bash.info2330
1 files changed, 1441 insertions, 889 deletions
diff --git a/doc/bash.info b/doc/bash.info
index 2fd137a9..6d31de62 100644
--- a/doc/bash.info
+++ b/doc/bash.info
@@ -1,13 +1,12 @@
-This is bash.info, produced by makeinfo version 6.7 from
-bashref.texi.
+This is bash.info, produced by makeinfo version 6.8 from bashref.texi.
This text is a brief description of the features that are present in the
-Bash shell (version 5.1, 29 October 2020).
+Bash shell (version 5.2, 19 September 2022).
- This is Edition 5.1, last updated 29 October 2020, of 'The GNU Bash
-Reference Manual', for 'Bash', Version 5.1.
+ This is Edition 5.2, last updated 19 September 2022, of 'The GNU Bash
+Reference Manual', for 'Bash', Version 5.2.
- Copyright (C) 1988-2020 Free Software Foundation, Inc.
+ Copyright (C) 1988-2022 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License,
@@ -27,11 +26,11 @@ Bash Features
*************
This text is a brief description of the features that are present in the
-Bash shell (version 5.1, 29 October 2020). The Bash home page is
+Bash shell (version 5.2, 19 September 2022). The Bash home page is
<http://www.gnu.org/software/bash/>.
- This is Edition 5.1, last updated 29 October 2020, of 'The GNU Bash
-Reference Manual', for 'Bash', Version 5.1.
+ This is Edition 5.2, last updated 19 September 2022, of 'The GNU Bash
+Reference Manual', for 'Bash', Version 5.2.
Bash contains features that appear in other popular shells, and some
features that only appear in Bash. Some of the shells that Bash has
@@ -359,11 +358,11 @@ as such, and to prevent parameter expansion.
Each of the shell metacharacters (*note Definitions::) has special
meaning to the shell and must be quoted if it is to represent itself.
When the command history expansion facilities are being used (*note
-History Interaction::), the HISTORY EXPANSION character, usually '!',
+History Interaction::), the "history expansion" character, usually '!',
must be quoted to prevent history expansion. *Note Bash History
Facilities::, for more details concerning history expansion.
- There are three quoting mechanisms: the ESCAPE CHARACTER, single
+ There are three quoting mechanisms: the "escape character", single
quotes, and double quotes.

@@ -419,10 +418,11 @@ File: bash.info, Node: ANSI-C Quoting, Next: Locale Translation, Prev: Double
3.1.2.4 ANSI-C Quoting
......................
-Words of the form '$'STRING'' are treated specially. The word expands
-to STRING, with backslash-escaped characters replaced as specified by
-the ANSI C standard. Backslash escape sequences, if present, are
-decoded as follows:
+Character sequences of the form $'STRING' are treated as a special kind
+of single quotes. The sequence expands to STRING, with
+backslash-escaped characters in STRING replaced as specified by the ANSI
+C standard. Backslash escape sequences, if present, are decoded as
+follows:
'\a'
alert (bell)
@@ -473,22 +473,114 @@ File: bash.info, Node: Locale Translation, Prev: ANSI-C Quoting, Up: Quoting
3.1.2.5 Locale-Specific Translation
...................................
-A double-quoted string preceded by a dollar sign ('$') will cause the
-string to be translated according to the current locale. The GETTEXT
-infrastructure performs the message catalog lookup and translation,
-using the 'LC_MESSAGES' and 'TEXTDOMAIN' shell variables, as explained
-below. See the gettext documentation for additional details. If the
-current locale is 'C' or 'POSIX', or if there are no translations
-available, the dollar sign is ignored. If the string is translated and
-replaced, the replacement is double-quoted.
+* Menu:
- Some systems use the message catalog selected by the 'LC_MESSAGES'
-shell variable. Others create the name of the message catalog from the
-value of the 'TEXTDOMAIN' shell variable, possibly adding a suffix of
-'.mo'. If you use the 'TEXTDOMAIN' variable, you may need to set the
-'TEXTDOMAINDIR' variable to the location of the message catalog files.
-Still others use both variables in this fashion:
-'TEXTDOMAINDIR'/'LC_MESSAGES'/LC_MESSAGES/'TEXTDOMAIN'.mo.
+* Creating Internationalized Scripts:: How to use translations and different
+ languages in your scripts.
+
+Prefixing a double-quoted string with a dollar sign ('$'), such as
+$"hello, world", will cause the string to be translated according to the
+current locale. The 'gettext' infrastructure performs the lookup and
+translation, using the 'LC_MESSAGES', 'TEXTDOMAINDIR', and 'TEXTDOMAIN'
+shell variables, as explained below. See the gettext documentation for
+additional details not covered here. If the current locale is 'C' or
+'POSIX', if there are no translations available, of if the string is not
+translated, the dollar sign is ignored. Since this is a form of double
+quoting, the string remains double-quoted by default, whether or not it
+is translated and replaced. If the 'noexpand_translation' option is
+enabled using the 'shopt' builtin (*note The Shopt Builtin::),
+translated strings are single-quoted instead of double-quoted.
+
+ The rest of this section is a brief overview of how you use gettext
+to create translations for strings in a shell script named SCRIPTNAME.
+There are more details in the gettext documentation.
+
+
+File: bash.info, Node: Creating Internationalized Scripts, Up: Locale Translation
+
+Once you've marked the strings in your script that you want to translate
+using $"...", you create a gettext "template" file using the command
+
+ bash --dump-po-strings SCRIPTNAME > DOMAIN.pot
+
+The DOMAIN is your "message domain". It's just an arbitrary string
+that's used to identify the files gettext needs, like a package or
+script name. It needs to be unique among all the message domains on
+systems where you install the translations, so gettext knows which
+translations correspond to your script. You'll use the template file to
+create translations for each target language. The template file
+conventionally has the suffix '.pot'.
+
+ You copy this template file to a separate file for each target
+language you want to support (called "PO" files, which use the suffix
+'.po'). PO files use various naming conventions, but when you are
+working to translate a template file into a particular language, you
+first copy the template file to a file whose name is the language you
+want to target, with the '.po' suffix. For instance, the Spanish
+translations of your strings would be in a file named 'es.po', and to
+get started using a message domain named "example," you would run
+
+ cp example.pot es.po
+
+Ultimately, PO files are often named DOMAIN.po and installed in
+directories that contain multiple translation files for a particular
+language.
+
+ Whichever naming convention you choose, you will need to translate
+the strings in the PO files into the appropriate languages. This has to
+be done manually.
+
+ When you have the translations and PO files complete, you'll use the
+gettext tools to produce what are called "MO" files, which are compiled
+versions of the PO files the gettext tools use to look up translations
+efficiently. MO files are also called "message catalog" files. You use
+the 'msgfmt' program to do this. For instance, if you had a file with
+Spanish translations, you could run
+
+ msgfmt -o es.mo es.po
+
+to produce the corresponding MO file.
+
+ Once you have the MO files, you decide where to install them and use
+the 'TEXTDOMAINDIR' shell variable to tell the gettext tools where they
+are. Make sure to use the same message domain to name the MO files as
+you did for the PO files when you install them.
+
+ Your users will use the 'LANG' or 'LC_MESSAGES' shell variables to
+select the desired language.
+
+ You set the 'TEXTDOMAIN' variable to the script's message domain. As
+above, you use the message domain to name your translation files.
+
+ You, or possibly your users, set the 'TEXTDOMAINDIR' variable to the
+name of a directory where the message catalog files are stored. If you
+install the message files into the system's standard message catalog
+directory, you don't need to worry about this variable.
+
+ The directory where the message catalog files are stored varies
+between systems. Some use the message catalog selected by the
+'LC_MESSAGES' shell variable. Others create the name of the message
+catalog from the value of the 'TEXTDOMAIN' shell variable, possibly
+adding the '.mo' suffix. If you use the 'TEXTDOMAIN' variable, you may
+need to set the 'TEXTDOMAINDIR' variable to the location of the message
+catalog files, as above. It's common to use both variables in this
+fashion: '$TEXTDOMAINDIR'/'$LC_MESSAGES'/LC_MESSAGES/'$TEXTDOMAIN'.mo.
+
+ If you used that last convention, and you wanted to store the message
+catalog files with Spanish (es) and Esperanto (eo) translations into a
+local directory you use for custom translation files, you could run
+
+ TEXTDOMAIN=example
+ TEXTDOMAINDIR=/usr/local/share/locale
+
+ cp es.mo ${TEXTDOMAINDIR}/es/LC_MESSAGES/${TEXTDOMAIN}.mo
+ cp eo.mo ${TEXTDOMAINDIR}/eo/LC_MESSAGES/${TEXTDOMAIN}.mo
+
+ When all of this is done, and the message catalog files containing
+the compiled translations are installed in the correct location, your
+users will be able to see translated strings in any of the supported
+languages by setting the 'LANG' or 'LC_MESSAGES' environment variables
+before running your script.

File: bash.info, Node: Comments, Prev: Quoting, Up: Shell Syntax
@@ -582,13 +674,13 @@ the control operators '|' or '|&'.
The output of each command in the pipeline is connected via a pipe to
the input of the next command. That is, each command reads the previous
command's output. This connection is performed before any redirections
-specified by the command.
+specified by COMMAND1.
If '|&' is used, COMMAND1's standard error, in addition to its
standard output, is connected to COMMAND2's standard input through the
pipe; it is shorthand for '2>&1 |'. This implicit redirection of the
standard error to the standard output is performed after any
-redirections specified by the command.
+redirections specified by COMMAND1.
The reserved word 'time' causes timing statistics to be printed for
the pipeline once it finishes. The statistics currently consist of
@@ -612,11 +704,12 @@ information.
If the pipeline is not executed asynchronously (*note Lists::), the
shell waits for all commands in the pipeline to complete.
- Each command in a pipeline is executed in its own subshell, which is
-a separate process (*note Command Execution Environment::). If the
-'lastpipe' option is enabled using the 'shopt' builtin (*note The Shopt
-Builtin::), the last element of a pipeline may be run by the shell
-process.
+ Each command in a multi-command pipeline, where pipes are created, is
+executed in its own "subshell", which is a separate process (*note
+Command Execution Environment::). If the 'lastpipe' option is enabled
+using the 'shopt' builtin (*note The Shopt Builtin::), the last element
+of a pipeline may be run by the shell process when job control is not
+active.
The exit status of a pipeline is the exit status of the last command
in the pipeline, unless the 'pipefail' option is enabled (*note The Set
@@ -645,8 +738,8 @@ commands, equivalent to a semicolon.
If a command is terminated by the control operator '&', the shell
executes the command asynchronously in a subshell. This is known as
-executing the command in the BACKGROUND, and these are referred to as
-ASYNCHRONOUS commands. The shell does not wait for the command to
+executing the command in the "background", and these are referred to as
+"asynchronous" commands. The shell does not wait for the command to
finish, and the return status is 0 (true). When job control is not
active (*note Job Control::), the standard input for asynchronous
commands, in the absence of any explicit redirections, is redirected
@@ -814,7 +907,8 @@ File: bash.info, Node: Conditional Constructs, Next: Command Grouping, Prev:
substitution, arithmetic expansion, and quote removal (*note Shell
Parameter Expansion::) before matching is attempted. Each PATTERN
undergoes tilde expansion, parameter expansion, command
- substitution, and arithmetic expansion.
+ substitution, arithmetic expansion, process substitution, and quote
+ removal.
There may be an arbitrary number of 'case' clauses, each terminated
by a ';;', ';&', or ';;&'. The first pattern that matches
@@ -855,16 +949,16 @@ File: bash.info, Node: Conditional Constructs, Next: Command Grouping, Prev:
select NAME [in WORDS ...]; do COMMANDS; done
The list of words following 'in' is expanded, generating a list of
- items. The set of expanded words is printed on the standard error
- output stream, each preceded by a number. If the 'in WORDS' is
- omitted, the positional parameters are printed, as if 'in "$@"' had
- been specified. The 'PS3' prompt is then displayed and a line is
- read from the standard input. If the line consists of a number
- corresponding to one of the displayed words, then the value of NAME
- is set to that word. If the line is empty, the words and prompt
- are displayed again. If 'EOF' is read, the 'select' command
- completes. Any other value read causes NAME to be set to null.
- The line read is saved in the variable 'REPLY'.
+ items, and the set of expanded words is printed on the standard
+ error output stream, each preceded by a number. If the 'in WORDS'
+ is omitted, the positional parameters are printed, as if 'in "$@"'
+ had been specified. 'select' then displays the 'PS3' prompt and
+ reads a line from the standard input. If the line consists of a
+ number corresponding to one of the displayed words, then the value
+ of NAME is set to that word. If the line is empty, the words and
+ prompt are displayed again. If 'EOF' is read, the 'select' command
+ completes and returns 1. Any other value read causes NAME to be
+ set to null. The line read is saved in the variable 'REPLY'.
The COMMANDS are executed after each selection until a 'break'
command is executed, at which point the 'select' command completes.
@@ -883,11 +977,11 @@ File: bash.info, Node: Conditional Constructs, Next: Command Grouping, Prev:
(( EXPRESSION ))
The arithmetic EXPRESSION is evaluated according to the rules
- described below (*note Shell Arithmetic::). If the value of the
- expression is non-zero, the return status is 0; otherwise the
- return status is 1. This is exactly equivalent to
- let "EXPRESSION"
- *Note Bash Builtins::, for a full description of the 'let' builtin.
+ described below (*note Shell Arithmetic::). The EXPRESSION
+ undergoes the same expansions as if it were within double quotes,
+ but double quote characters in EXPRESSION are not treated specially
+ are removed. If the value of the expression is non-zero, the
+ return status is 0; otherwise the return status is 1.
'[[...]]'
[[ EXPRESSION ]]
@@ -895,12 +989,13 @@ File: bash.info, Node: Conditional Constructs, Next: Command Grouping, Prev:
Return a status of 0 or 1 depending on the evaluation of the
conditional expression EXPRESSION. Expressions are composed of the
primaries described below in *note Bash Conditional Expressions::.
- Word splitting and filename expansion are not performed on the
- words between the '[[' and ']]'; tilde expansion, parameter and
- variable expansion, arithmetic expansion, command substitution,
- process substitution, and quote removal are performed. Conditional
- operators such as '-f' must be unquoted to be recognized as
- primaries.
+ The words between the '[[' and ']]' do not undergo word splitting
+ and filename expansion. The shell performs tilde expansion,
+ parameter and variable expansion, arithmetic expansion, command
+ substitution, process substitution, and quote removal on those
+ words (the expansions that would occur if the words were enclosed
+ in double quotes). Conditional operators such as '-f' must be
+ unquoted to be recognized as primaries.
When used with '[[', the '<' and '>' operators sort
lexicographically using the current locale.
@@ -913,67 +1008,92 @@ File: bash.info, Node: Conditional Constructs, Next: Command Grouping, Prev:
'shopt' in *note The Shopt Builtin::) is enabled, the match is
performed without regard to the case of alphabetic characters. The
return value is 0 if the string matches ('==') or does not match
- ('!=') the pattern, and 1 otherwise. Any part of the pattern may
- be quoted to force the quoted portion to be matched as a string.
+ ('!=') the pattern, and 1 otherwise.
+
+ If you quote any part of the pattern, using any of the shell's
+ quoting mechanisms, the quoted portion is matched literally. This
+ means every character in the quoted portion matches itself, instead
+ of having any special pattern matching meaning.
An additional binary operator, '=~', is available, with the same
- precedence as '==' and '!='. When it is used, the string to the
+ precedence as '==' and '!='. When you use '=~', the string to the
right of the operator is considered a POSIX extended regular
- expression and matched accordingly (using the POSIX 'regcomp' and
- 'regexec' interfaces usually described in regex(3)). The return
- value is 0 if the string matches the pattern, and 1 otherwise. If
- the regular expression is syntactically incorrect, the conditional
- expression's return value is 2. If the 'nocasematch' shell option
- (see the description of 'shopt' in *note The Shopt Builtin::) is
- enabled, the match is performed without regard to the case of
- alphabetic characters. Any part of the pattern may be quoted to
- force the quoted portion to be matched as a string. Bracket
- expressions in regular expressions must be treated carefully, 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.
-
- The pattern will match if it matches any part of the string.
- Anchor the pattern using the '^' and '$' regular expression
- operators to force it to match the entire string. The array
- variable 'BASH_REMATCH' records which parts of the string matched
- the pattern. The element of 'BASH_REMATCH' 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 remaining 'BASH_REMATCH'
- indices. The element of 'BASH_REMATCH' with index N is the portion
- of the string matching the Nth parenthesized subexpression.
+ expression pattern and matched accordingly (using the POSIX
+ 'regcomp' and 'regexec' interfaces usually described in regex(3)).
+ The return value is 0 if the string matches the pattern, and 1 if
+ it does not. If the regular expression is syntactically incorrect,
+ the conditional expression returns 2. If the 'nocasematch' shell
+ option (see the description of 'shopt' in *note The Shopt
+ Builtin::) is enabled, the match is performed without regard to the
+ case of alphabetic characters.
+
+ You can quote any part of the pattern to force the quoted portion
+ to be matched literally instead of as a regular expression (see
+ above). If the pattern is stored in a shell variable, quoting the
+ variable expansion forces the entire pattern to be matched
+ literally.
+
+ The pattern will match if it matches any part of the string. If
+ you want to force the pattern to match the entire string, anchor
+ the pattern using the '^' and '$' regular expression operators.
For example, the following will match a line (stored in the shell
- variable LINE) if there is a sequence of characters anywhere in the
- value consisting of any number, including zero, of characters in
- the 'space' character class, zero or one instances of 'a', then a
- 'b':
+ variable 'line') if there is a sequence of characters anywhere in
+ the value consisting of any number, including zero, of characters
+ in the 'space' character class, immediately followed by zero or one
+ instances of 'a', then a 'b':
+
[[ $line =~ [[:space:]]*(a)?b ]]
- That means values like 'aab' and ' aaaaaab' will match, as will a
- line containing a 'b' anywhere in its value.
-
- Storing the regular expression in a shell variable is often a
- useful way to avoid problems with quoting characters that are
- special to the shell. It is sometimes difficult to specify a
- regular expression literally without using quotes, or to keep track
- of the quoting used by regular expressions while paying attention
- to the shell's quote removal. Using a shell variable to store the
- pattern decreases these problems. For example, the following is
- equivalent to the above:
+ That means values for 'line' like 'aab', ' aaaaaab', 'xaby', and '
+ ab' will all match, as will a line containing a 'b' anywhere in its
+ value.
+
+ If you want to match a character that's special to the regular
+ expression grammar ('^$|[]()\.*+?'), it has to be quoted to remove
+ its special meaning. This means that in the pattern 'xxx.txt', the
+ '.' matches any character in the string (its usual regular
+ expression meaning), but in the pattern '"xxx.txt"', it can only
+ match a literal '.'.
+
+ Likewise, if you want to include a character in your pattern that
+ has a special meaning to the regular expression grammar, you must
+ make sure it's not quoted. If you want to anchor a pattern at the
+ beginning or end of the string, for instance, you cannot quote the
+ '^' or '$' characters using any form of shell quoting.
+
+ If you want to match 'initial string' at the start of a line, the
+ following will work:
+ [[ $line =~ ^"initial string" ]]
+ but this will not:
+ [[ $line =~ "^initial string" ]]
+ because in the second example the '^' is quoted and doesn't have
+ its usual special meaning.
+
+ It is sometimes difficult to specify a regular expression properly
+ without using quotes, or to keep track of the quoting used by
+ regular expressions while paying attention to shell quoting and the
+ shell's quote removal. Storing the regular expression in a shell
+ variable is often a useful way to avoid problems with quoting
+ characters that are special to the shell. For example, the
+ following is equivalent to the pattern used above:
+
pattern='[[:space:]]*(a)?b'
[[ $line =~ $pattern ]]
- If you want to match a character that's special to the regular
- expression grammar, it has to be quoted to remove its special
- meaning. This means that in the pattern 'xxx.txt', the '.' matches
- any character in the string (its usual regular expression meaning),
- but in the pattern '"xxx.txt"' it can only match a literal '.'.
Shell programmers should take special care with backslashes, since
- backslashes are used both by the shell and regular expressions to
- remove the special meaning from the following character. The
- following two sets of commands are _not_ equivalent:
+ backslashes are used by both the shell and regular expressions to
+ remove the special meaning from the following character. This
+ means that after the shell's word expansions complete (*note Shell
+ Expansions::), any backslashes remaining in parts of the pattern
+ that were originally not quoted can remove the special meaning of
+ pattern characters. If any part of the pattern is quoted, the
+ shell does its best to ensure that the regular expression treats
+ those remaining backslashes as literal, if they appeared in a
+ quoted portion.
+
+ The following two sets of commands are _not_ equivalent:
+
pattern='\.'
[[ . =~ $pattern ]]
@@ -984,12 +1104,49 @@ File: bash.info, Node: Conditional Constructs, Next: Command Grouping, Prev:
The first two matches will succeed, but the second two will not,
because in the second two the backslash will be part of the pattern
- to be matched. In the first two examples, the backslash removes
- the special meaning from '.', so the literal '.' matches. If the
+ to be matched. In the first two examples, the pattern passed to
+ the regular expression parser is '\.'. The backslash removes the
+ special meaning from '.', so the literal '.' matches. In the
+ second two examples, the pattern passed to the regular expression
+ parser has the backslash quoted (e.g., '\\\.'), which will not
+ match the string, since it does not contain a backslash. If the
string in the first examples were anything other than '.', say 'a',
the pattern would not match, because the quoted '.' in the pattern
loses its special meaning of matching any single character.
+ Bracket expressions in regular expressions can be sources of errors
+ as well, since characters that are normally special in regular
+ expressions lose their special meanings between brackets. However,
+ you can use bracket expressions to match special pattern characters
+ without quoting them, so they are sometimes useful for this
+ purpose.
+
+ Though it might seem like a strange way to write it, the following
+ pattern will match a '.' in the string:
+
+ [[ . =~ [.] ]]
+
+ The shell performs any word expansions before passing the pattern
+ to the regular expression functions, so you can assume that the
+ shell's quoting takes precedence. As noted above, the regular
+ expression parser will interpret any unquoted backslashes remaining
+ in the pattern after shell expansion according to its own rules.
+ The intention is to avoid making shell programmers quote things
+ twice as much as possible, so shell quoting should be sufficient to
+ quote special pattern characters where that's necessary.
+
+ The array variable 'BASH_REMATCH' records which parts of the string
+ matched the pattern. The element of 'BASH_REMATCH' 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 remaining
+ 'BASH_REMATCH' indices. The element of 'BASH_REMATCH' with index N
+ is the portion of the string matching the Nth parenthesized
+ subexpression.
+
+ Bash sets 'BASH_REMATCH' in the global scope; declaring it as a
+ local variable will lead to unexpected results.
+
Expressions may be combined using the following operators, listed
in decreasing order of precedence:
@@ -1024,9 +1181,9 @@ list may be redirected to a single stream.
'()'
( LIST )
- Placing a list of commands between parentheses causes a subshell
- environment to be created (*note Command Execution Environment::),
- and each of the commands in LIST to be executed in that subshell.
+ Placing a list of commands between parentheses forces the shell to
+ create a subshell (*note Command Execution Environment::), and each
+ of the commands in LIST is executed in that subshell environment.
Since the LIST is executed in a subshell, variable assignments do
not remain in effect after the subshell completes.
@@ -1039,10 +1196,10 @@ list may be redirected to a single stream.
In addition to the creation of a subshell, there is a subtle
difference between these two constructs due to historical reasons. The
-braces are 'reserved words', so they must be separated from the LIST by
-'blank's or other shell metacharacters. The parentheses are
-'operators', and are recognized as separate tokens by the shell even if
-they are not separated from the LIST by whitespace.
+braces are reserved words, so they must be separated from the LIST by
+'blank's or other shell metacharacters. The parentheses are operators,
+and are recognized as separate tokens by the shell even if they are not
+separated from the LIST by whitespace.
The exit status of both of these constructs is the exit status of
LIST.
@@ -1058,29 +1215,51 @@ A coprocess is executed asynchronously in a subshell, as if the command
had been terminated with the '&' control operator, with a two-way pipe
established between the executing shell and the coprocess.
- The format for a coprocess is:
+ The syntax for a coprocess is:
+
coproc [NAME] COMMAND [REDIRECTIONS]
-This creates a coprocess named NAME. If NAME is not supplied, the
-default name is COPROC. NAME must not be supplied if COMMAND is a
-simple command (*note Simple Commands::); otherwise, it is interpreted
-as the first word of the simple command.
+This creates a coprocess named NAME. COMMAND may be either a simple
+command (*note Simple Commands::) or a compound command (*note Compound
+Commands::). NAME is a shell variable name. If NAME is not supplied,
+the default name is 'COPROC'.
+
+ The recommended form to use for a coprocess is
+
+ coproc NAME { COMMAND; }
+
+This form is recommended because simple commands result in the coprocess
+always being named 'COPROC', and it is simpler to use and more complete
+than the other compound commands.
+
+ There are other forms of coprocesses:
+
+ coproc NAME COMPOUND-COMMAND
+ coproc COMPOUND-COMMAND
+ coproc SIMPLE-COMMAND
+
+If COMMAND is a compound command, NAME is optional. The word following
+'coproc' determines whether that word is interpreted as a variable name:
+it is interpreted as NAME if it is not a reserved word that introduces a
+compound command. If COMMAND is a simple command, NAME is not allowed;
+this is to avoid confusion between NAME and the first word of the simple
+command.
When the coprocess is executed, the shell creates an array variable
-(*note Arrays::) named 'NAME' in the context of the executing shell.
-The standard output of COMMAND is connected via a pipe to a file
+(*note Arrays::) named NAME in the context of the executing shell. The
+standard output of COMMAND is connected via a pipe to a file descriptor
+in the executing shell, and that file descriptor is assigned to NAME[0].
+The standard input of COMMAND is connected via a pipe to a file
descriptor in the executing shell, and that file descriptor is assigned
-to 'NAME'[0]. The standard input of COMMAND is connected via a pipe to
-a file descriptor in the executing shell, and that file descriptor is
-assigned to 'NAME'[1]. This pipe is established before any redirections
-specified by the command (*note Redirections::). The file descriptors
-can be utilized as arguments to shell commands and redirections using
-standard word expansions. Other than those created to execute command
-and process substitutions, the file descriptors are not available in
+to NAME[1]. This pipe is established before any redirections specified
+by the command (*note Redirections::). The file descriptors can be
+utilized as arguments to shell commands and redirections using standard
+word expansions. Other than those created to execute command and
+process substitutions, the file descriptors are not available in
subshells.
The process ID of the shell spawned to execute the coprocess is
-available as the value of the variable 'NAME'_PID. The 'wait' builtin
+available as the value of the variable 'NAME_PID'. The 'wait' builtin
command may be used to wait for the coprocess to terminate.
Since the coprocess is created as an asynchronous command, the
@@ -1105,88 +1284,9 @@ line, different ways to specify the input source, and so on). Parallel
can replace 'xargs' or feed commands from its input sources to several
different instances of Bash.
- For a complete description, refer to the GNU Parallel documentation.
-A few examples should provide a brief introduction to its use.
-
- For example, it is easy to replace 'xargs' to gzip all html files in
-the current directory and its subdirectories:
- find . -type f -name '*.html' -print | parallel gzip
-If you need to protect special characters such as newlines in file
-names, use find's '-print0' option and parallel's '-0' option.
-
- You can use Parallel to move files from the current directory when
-the number of files is too large to process with one 'mv' invocation:
- printf '%s\n' * | parallel mv {} destdir
-
- As you can see, the {} is replaced with each line read from standard
-input. While using 'ls' will work in most instances, it is not
-sufficient to deal with all filenames. 'printf' 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 '*' (but see below about the
-'dotglob' shell option). If you need to accommodate special characters
-in filenames, you can use
-
- printf '%s\0' * | parallel -0 mv {} destdir
-
-as alluded to above.
-
- This will run as many 'mv' commands as there are files in the current
-directory. You can emulate a parallel 'xargs' by adding the '-X'
-option:
- printf '%s\0' * | parallel -0 -X mv {} destdir
-
- (You may have to modify the pattern if you have the 'dotglob' option
-enabled.)
-
- GNU Parallel can replace certain common idioms that operate on lines
-read from a file (in this case, filenames listed one per line):
- while IFS= read -r x; do
- do-something1 "$x" "config-$x"
- do-something2 < "$x"
- done < file | process-output
-
-with a more compact syntax reminiscent of lambdas:
- cat list | parallel "do-something1 {} config-{} ; do-something2 < {}" |
- process-output
-
- Parallel provides a built-in mechanism to remove filename extensions,
-which lends itself to batch file transformations or renaming:
- ls *.gz | parallel -j+0 "zcat {} | bzip2 >{.}.bz2 && rm {}"
-This will recompress all files in the current directory with names
-ending in .gz using bzip2, running one job per CPU (-j+0) in parallel.
-(We use 'ls' for brevity here; using 'find' as above is more robust in
-the face of filenames containing unexpected characters.) Parallel can
-take arguments from the command line; the above can also be written as
-
- parallel "zcat {} | bzip2 >{.}.bz2 && rm {}" ::: *.gz
-
- If a command generates output, you may want to preserve the input
-order in the output. For instance, the following command
- {
- echo foss.org.my ;
- echo debian.org ;
- echo freenetproject.org ;
- } | parallel traceroute
-will display as output the traceroute invocation that finishes first.
-Adding the '-k' option
- {
- echo foss.org.my ;
- echo debian.org ;
- echo freenetproject.org ;
- } | parallel -k traceroute
-will ensure that the output of 'traceroute foss.org.my' is displayed
-first.
-
- Finally, Parallel can be used to run a sequence of shell commands in
-parallel, similar to 'cat file | bash'. It is not uncommon to take a
-list of filenames, create a series of shell commands to operate on them,
-and feed that list of commands to a shell. Parallel can speed this up.
-Assuming that 'file' contains a list of shell commands, one per line,
-
- parallel -j 10 < file
-
-will evaluate the commands using the shell (since no explicit command is
-supplied as an argument), in blocks of ten shell jobs at a time.
+ For a complete description, refer to the GNU Parallel documentation,
+which is available at
+<https://www.gnu.org/software/parallel/parallel_tutorial.html>.

File: bash.info, Node: Shell Functions, Next: Shell Parameters, Prev: Shell Commands, Up: Basic Shell Features
@@ -1210,15 +1310,15 @@ new process is created to interpret them.
This defines a shell function named FNAME. The reserved word
'function' is optional. If the 'function' reserved word is supplied,
-the parentheses are optional. The BODY of the function is the compound
-command COMPOUND-COMMAND (*note Compound Commands::). That command is
-usually a LIST enclosed between { and }, but may be any compound command
-listed above, with one exception: If the 'function' reserved word is
-used, but the parentheses are not supplied, the braces are required.
+the parentheses are optional. The "body" of the function is the
+compound command COMPOUND-COMMAND (*note Compound Commands::). That
+command is usually a LIST enclosed between { and }, but may be any
+compound command listed above. If the 'function' reserved word is used,
+but the parentheses are not supplied, the braces are recommended.
COMPOUND-COMMAND is executed whenever FNAME is specified as the name of
-a command. When the shell is in POSIX mode (*note Bash POSIX Mode::),
-FNAME must be a valid shell NAME and may not be the same as one of the
-special builtins (*note Special Builtins::). In default mode, a
+a simple command. When the shell is in POSIX mode (*note Bash POSIX
+Mode::), FNAME must be a valid shell name and may not be the same as one
+of the special builtins (*note Special Builtins::). In default mode, a
function name can be any unquoted shell word that does not contain '$'.
Any redirections (*note Redirections::) associated with the shell
function are performed when the function is executed. A function
@@ -1271,9 +1371,17 @@ status; otherwise the function's return status is the exit status of the
last command executed before the 'return'.
Variables local to the function may be declared with the 'local'
-builtin. These variables are visible only to the function and the
-commands it invokes. This is particularly important when a shell
-function calls other functions.
+builtin ("local variables"). Ordinarily, variables and their values are
+shared between a function and its caller. These variables are visible
+only to the function and the commands it invokes. This is particularly
+important when a shell function calls other functions.
+
+ In the following description, the "current scope" is a currently-
+executing function. Previous scopes consist of that function's caller
+and so on, back to the "global" scope, where the shell is not executing
+any shell function. Consequently, a local variable at the current local
+scope is a variable declared using the 'local' or 'declare' builtins in
+the function that is currently executing.
Local variables "shadow" variables with the same name declared at
previous scopes. For instance, a local variable declared in a function
@@ -1281,7 +1389,7 @@ hides a global variable of the same name: references and assignments
refer to the local variable, leaving the global variable unmodified.
When the function returns, the global variable is once again visible.
- The shell uses DYNAMIC SCOPING to control a variable's visibility
+ The shell uses "dynamic scoping" to control a variable's visibility
within functions. With dynamic scoping, visible variables and their
values are a result of the sequence of function calls that caused
execution to reach the current function. The value of a variable that a
@@ -1290,10 +1398,10 @@ that caller is the "global" scope or another shell function. This is
also the value that a local variable declaration "shadows", and the
value that is restored when the function returns.
- For example, if a variable VAR is declared as local in function
-FUNC1, and FUNC1 calls another function FUNC2, references to VAR made
-from within FUNC2 will resolve to the local variable VAR from FUNC1,
-shadowing any global variable named VAR.
+ For example, if a variable 'var' is declared as local in function
+'func1', and 'func1' calls another function 'func2', references to 'var'
+made from within 'func2' will resolve to the local variable 'var' from
+'func1', shadowing any global variable named 'var'.
The following script demonstrates this behavior. When executed, the
script displays
@@ -1318,17 +1426,19 @@ script displays
variable is local to the current scope, 'unset' will unset it; otherwise
the unset will refer to the variable found in any calling scope as
described above. If a variable at the current local scope is unset, it
-will remain so until it is reset in that scope or until the function
-returns. Once the function returns, any instance of the variable at a
-previous scope will become visible. If the unset acts on a variable at
-a previous scope, any instance of a variable with that name that had
-been shadowed will become visible.
+will remain so (appearing as unset) until it is reset in that scope or
+until the function returns. Once the function returns, any instance of
+the variable at a previous scope will become visible. If the unset acts
+on a variable at a previous scope, any instance of a variable with that
+name that had been shadowed will become visible (see below how
+'localvar_unset'shell option changes this behavior).
Function names and definitions may be listed with the '-f' option to
the 'declare' ('typeset') builtin command (*note Bash Builtins::). The
'-F' option to 'declare' or 'typeset' will list the function names only
(and optionally the source file and line number, if the 'extdebug' shell
-option is enabled). Functions may be exported so that subshells
+option is enabled). Functions may be exported so that child shell
+processes (those created when executing a separate shell invocation)
automatically have them defined with the '-f' option to the 'export'
builtin (*note Bourne Shell Builtins::).
@@ -1348,11 +1458,12 @@ File: bash.info, Node: Shell Parameters, Next: Shell Expansions, Prev: Shell
* Positional Parameters:: The shell's command-line arguments.
* Special Parameters:: Parameters denoted by special characters.
-A PARAMETER is an entity that stores values. It can be a 'name', a
-number, or one of the special characters listed below. A VARIABLE is a
-parameter denoted by a 'name'. A variable has a VALUE and zero or more
-ATTRIBUTES. Attributes are assigned using the 'declare' builtin command
-(see the description of the 'declare' builtin in *note Bash Builtins::).
+A "parameter" is an entity that stores values. It can be a 'name', a
+number, or one of the special characters listed below. A "variable" is
+a parameter denoted by a 'name'. A variable has a 'value' and zero or
+more 'attributes'. Attributes are assigned using the 'declare' builtin
+command (see the description of the 'declare' builtin in *note Bash
+Builtins::).
A parameter is set if it has been assigned a value. The null string
is a valid value. Once a variable is set, it may be unset only by using
@@ -1362,24 +1473,23 @@ the 'unset' builtin command.
NAME=[VALUE]
If VALUE is not given, the variable is assigned the null string. All
VALUEs undergo tilde expansion, parameter and variable expansion,
-command substitution, arithmetic expansion, and quote removal (detailed
-below). If the variable has its 'integer' attribute set, then VALUE is
-evaluated as an arithmetic expression even if the '$((...))' expansion
-is not used (*note Arithmetic Expansion::). Word splitting is not
-performed, with the exception of '"$@"' as explained below. Filename
-expansion is not performed. Assignment statements may also appear as
-arguments to the 'alias', 'declare', 'typeset', 'export', 'readonly',
-and 'local' builtin commands (DECLARATION commands). When in POSIX mode
-(*note Bash POSIX Mode::), these builtins may appear in a command after
-one or more instances of the 'command' builtin and retain these
-assignment statement properties.
+command substitution, arithmetic expansion, and quote removal (*note
+Shell Parameter Expansion::). If the variable has its 'integer'
+attribute set, then VALUE is evaluated as an arithmetic expression even
+if the '$((...))' expansion is not used (*note Arithmetic Expansion::).
+Word splitting and filename expansion are not performed. Assignment
+statements may also appear as arguments to the 'alias', 'declare',
+'typeset', 'export', 'readonly', and 'local' builtin commands
+("declaration" commands). When in POSIX mode (*note Bash POSIX Mode::),
+these builtins may appear in a command after one or more instances of
+the 'command' builtin and retain these assignment statement properties.
In the context where an assignment statement is assigning a value to
a shell variable or array index (*note Arrays::), the '+=' operator can
be used to append to or add to the variable's previous value. This
includes arguments to builtin commands such as 'declare' that accept
-assignment statements (DECLARATION commands). When '+=' is applied to a
-variable for which the INTEGER attribute has been set, VALUE is
+assignment statements (declaration commands). When '+=' is applied to a
+variable for which the 'integer' attribute has been set, VALUE is
evaluated as an arithmetic expression and added to the variable's
current value, which is also evaluated. When '+=' is applied to an
array variable using compound assignment (*note Arrays::), the
@@ -1389,9 +1499,9 @@ maximum index (for indexed arrays), or added as additional key-value
pairs in an associative array. When applied to a string-valued
variable, VALUE is expanded and appended to the variable's value.
- A variable can be assigned the NAMEREF attribute using the '-n'
+ A variable can be assigned the 'nameref' attribute using the '-n'
option to the 'declare' or 'local' builtin commands (*note Bash
-Builtins::) to create a NAMEREF, or a reference to another variable.
+Builtins::) to create a "nameref", or a reference to another variable.
This allows variables to be manipulated indirectly. Whenever the
nameref variable is referenced, assigned to, unset, or has its
attributes modified (other than using or changing the nameref attribute
@@ -1401,9 +1511,9 @@ shell functions to refer to a variable whose name is passed as an
argument to the function. For instance, if a variable name is passed to
a shell function as its first argument, running
declare -n ref=$1
-inside the function creates a nameref variable REF whose value is the
+inside the function creates a nameref variable 'ref' whose value is the
variable name passed as the first argument. References and assignments
-to REF, and changes to its attributes, are treated as references,
+to 'ref', and changes to its attributes, are treated as references,
assignments, and attribute modifications to the variable whose name was
passed as '$1'.
@@ -1423,7 +1533,7 @@ File: bash.info, Node: Positional Parameters, Next: Special Parameters, Up: S
3.4.1 Positional Parameters
---------------------------
-A POSITIONAL PARAMETER is a parameter denoted by one or more digits,
+A "positional parameter" is a parameter denoted by one or more digits,
other than the single digit '0'. Positional parameters are assigned
from the shell's arguments when it is invoked, and may be reassigned
using the 'set' builtin command. Positional parameter 'N' may be
@@ -1488,9 +1598,8 @@ only be referenced; assignment to them is not allowed.
shell itself (such as the '-i' option).
'$'
- ($$) Expands to the process ID of the shell. In a '()' subshell,
- it expands to the process ID of the invoking shell, not the
- subshell.
+ ($$) Expands to the process ID of the shell. In a subshell, it
+ expands to the process ID of the invoking shell, not the subshell.
'!'
($!) Expands to the process ID of the job most recently placed
@@ -1544,13 +1653,13 @@ substitution (done in a left-to-right fashion); word splitting; and
filename expansion.
On systems that can support it, there is an additional expansion
-available: PROCESS SUBSTITUTION. This is performed at the same time as
-tilde, parameter, variable, and arithmetic expansion and command
+available: "process substitution". This is performed at the same time
+as tilde, parameter, variable, and arithmetic expansion and command
substitution.
After these expansions are performed, quote characters present in the
-original word are removed unless they have been quoted themselves (QUOTE
-REMOVAL).
+original word are removed unless they have been quoted themselves
+("quote removal").
Only brace expansion, word splitting, and filename expansion can
increase the number of words of the expansion; other expansions expand a
@@ -1568,7 +1677,7 @@ File: bash.info, Node: Brace Expansion, Next: Tilde Expansion, Up: Shell Expa
---------------------
Brace expansion is a mechanism by which arbitrary strings may be
-generated. This mechanism is similar to FILENAME EXPANSION (*note
+generated. This mechanism is similar to "filename expansion" (*note
Filename Expansion::), but the filenames generated need not exist.
Patterns to be brace expanded take the form of an optional PREAMBLE,
followed by either a series of comma-separated strings or a sequence
@@ -1583,17 +1692,17 @@ are not sorted; left to right order is preserved. For example,
ade ace abe
A sequence expression takes the form '{X..Y[..INCR]}', where X and Y
-are either integers or single characters, and INCR, an optional
-increment, is an integer. When integers are supplied, the expression
-expands to each number between X and Y, inclusive. Supplied integers
-may be prefixed with '0' to force each term to have the same width.
-When either X or Y begins with a zero, the shell attempts to force all
-generated terms to contain the same number of digits, zero-padding where
-necessary. When characters are supplied, the expression expands to each
-character lexicographically between X and Y, inclusive, using the
-default C locale. Note that both X and Y must be of the same type.
-When the increment is supplied, it is used as the difference between
-each term. The default increment is 1 or -1 as appropriate.
+are either integers or letters, and INCR, an optional increment, is an
+integer. When integers are supplied, the expression expands to each
+number between X and Y, inclusive. Supplied integers may be prefixed
+with '0' to force each term to have the same width. When either X or Y
+begins with a zero, the shell attempts to force all generated terms to
+contain the same number of digits, zero-padding where necessary. When
+letters are supplied, the expression expands to each character
+lexicographically between X and Y, inclusive, using the default C
+locale. Note that both X and Y must be of the same type (integer or
+letter). When the increment is supplied, it is used as the difference
+between each term. The default increment is 1 or -1 as appropriate.
Brace expansion is performed before any other expansions, and any
characters special to other expansions are preserved in the result. It
@@ -1623,9 +1732,9 @@ File: bash.info, Node: Tilde Expansion, Next: Shell Parameter Expansion, Prev
If a word begins with an unquoted tilde character ('~'), all of the
characters up to the first unquoted slash (or all characters, if there
-is no unquoted slash) are considered a TILDE-PREFIX. If none of the
+is no unquoted slash) are considered a "tilde-prefix". If none of the
characters in the tilde-prefix are quoted, the characters in the
-tilde-prefix following the tilde are treated as a possible LOGIN NAME.
+tilde-prefix following the tilde are treated as a possible "login name".
If this login name is the null string, the tilde is replaced with the
value of the 'HOME' shell variable. If 'HOME' is unset, the home
directory of the user executing the shell is substituted instead.
@@ -1681,7 +1790,7 @@ assigns the expanded value.
Bash also performs tilde expansion on words satisfying the conditions
of variable assignments (*note Shell Parameters::) when they appear as
arguments to simple commands. Bash does not do this, except for the
-DECLARATION commands listed above, when in POSIX mode.
+declaration commands listed above, when in POSIX mode.

File: bash.info, Node: Shell Parameter Expansion, Next: Command Substitution, Prev: Tilde Expansion, Up: Shell Expansions
@@ -1708,7 +1817,7 @@ parameter with more than one digit, or when PARAMETER is followed by a
character that is not to be interpreted as part of its name.
If the first character of PARAMETER is an exclamation point (!), and
-PARAMETER is not a NAMEREF, it introduces a level of indirection. Bash
+PARAMETER is not a nameref, it introduces a level of indirection. Bash
uses the value formed by expanding the rest of PARAMETER as the new
PARAMETER; this is then expanded and that value is used in the rest of
the expansion, rather than the expansion of the original PARAMETER.
@@ -1734,31 +1843,48 @@ omitted, the operator tests only for existence.
If PARAMETER is unset or null, the expansion of WORD is
substituted. Otherwise, the value of PARAMETER is substituted.
+ $ v=123
+ $ echo ${v-unset}
+ 123
+
'${PARAMETER:=WORD}'
If PARAMETER is unset or null, the expansion of WORD is assigned to
PARAMETER. The value of PARAMETER is then substituted. Positional
parameters and special parameters may not be assigned to in this
way.
+ $ var=
+ $ : ${var:=DEFAULT}
+ $ echo $var
+ DEFAULT
+
'${PARAMETER:?WORD}'
If PARAMETER is null or unset, the expansion of WORD (or a message
to that effect if WORD is not present) is written to the standard
error and the shell, if it is not interactive, exits. Otherwise,
the value of PARAMETER is substituted.
+ $ var=
+ $ : ${var:?var is unset or null}
+ bash: var: var is unset or null
+
'${PARAMETER:+WORD}'
If PARAMETER is null or unset, nothing is substituted, otherwise
the expansion of WORD is substituted.
+ $ var=123
+ $ echo ${var:+var is set and not null}
+ var is set and not null
+
'${PARAMETER:OFFSET}'
'${PARAMETER:OFFSET:LENGTH}'
This is referred to as Substring Expansion. It expands to up to
LENGTH characters of the value of PARAMETER starting at the
- character specified by OFFSET. If PARAMETER is '@', an indexed
- array subscripted by '@' or '*', or an associative array name, the
- results differ as described below. If LENGTH is omitted, it
- expands to the substring of the value of PARAMETER starting at the
- character specified by OFFSET and extending to the end of the
+ character specified by OFFSET. If PARAMETER is '@' or '*', an
+ indexed array subscripted by '@' or '*', or an associative array
+ name, the results differ as described below. If LENGTH is omitted,
+ it expands to the substring of the value of PARAMETER starting at
+ the character specified by OFFSET and extending to the end of the
value. LENGTH and OFFSET are arithmetic expressions (*note Shell
Arithmetic::).
@@ -1826,11 +1952,11 @@ omitted, the operator tests only for existence.
$ echo ${array[0]: -7:-2}
bcdef
- If PARAMETER is '@', the result is LENGTH positional parameters
- beginning at OFFSET. A negative OFFSET is taken relative to one
- greater than the greatest positional parameter, so an offset of -1
- evaluates to the last positional parameter. It is an expansion
- error if LENGTH evaluates to a number less than zero.
+ If PARAMETER is '@' or '*', the result is LENGTH positional
+ parameters beginning at OFFSET. A negative OFFSET is taken
+ relative to one greater than the greatest positional parameter, so
+ an offset of -1 evaluates to the last positional parameter. It is
+ an expansion error if LENGTH evaluates to a number less than zero.
The following examples illustrate substring expansion using
positional parameters:
@@ -1940,26 +2066,92 @@ omitted, the operator tests only for existence.
array in turn, and the expansion is the resultant list.
'${PARAMETER/PATTERN/STRING}'
-
+'${PARAMETER//PATTERN/STRING}'
+'${PARAMETER/#PATTERN/STRING}'
+'${PARAMETER/%PATTERN/STRING}'
The PATTERN is expanded to produce a pattern just as in filename
expansion. PARAMETER is expanded and the longest match of PATTERN
- against its value is replaced with STRING. The match is performed
- according to the rules described below (*note Pattern Matching::).
- If PATTERN begins with '/', all matches of PATTERN are replaced
- with STRING. Normally only the first match is replaced. If
- PATTERN begins with '#', it must match at the beginning of the
- expanded value of PARAMETER. If PATTERN begins with '%', it must
- match at the end of the expanded value of PARAMETER. If STRING is
- null, matches of PATTERN are deleted and the '/' following PATTERN
- may be omitted. If the 'nocasematch' shell option (see the
- description of 'shopt' in *note The Shopt Builtin::) is enabled,
- the match is performed without regard to the case of alphabetic
- characters. If PARAMETER is '@' or '*', the substitution operation
- is applied to each positional parameter in turn, and the expansion
- is the resultant list. If PARAMETER is an array variable
- subscripted with '@' or '*', the substitution operation is applied
- to each member of the array in turn, and the expansion is the
- resultant list.
+ against its value is replaced with STRING. STRING undergoes tilde
+ expansion, parameter and variable expansion, arithmetic expansion,
+ command and process substitution, and quote removal. The match is
+ performed according to the rules described below (*note Pattern
+ Matching::).
+
+ In the first form above, only the first match is replaced. If
+ there are two slashes separating PARAMETER and PATTERN (the second
+ form above), all matches of PATTERN are replaced with STRING. If
+ PATTERN is preceded by '#' (the third form above), it must match at
+ the beginning of the expanded value of PARAMETER. If PATTERN is
+ preceded by '%' (the fourth form above), it must match at the end
+ of the expanded value of PARAMETER. If the expansion of STRING is
+ null, matches of PATTERN are deleted. If STRING is null, matches
+ of PATTERN are deleted and the '/' following PATTERN may be
+ omitted.
+
+ If the 'patsub_replacement' shell option is enabled using 'shopt',
+ any unquoted instances of '&' in STRING are replaced with the
+ matching portion of PATTERN. This is intended to duplicate a
+ common 'sed' idiom.
+
+ Quoting any part of STRING inhibits replacement in the expansion of
+ the quoted portion, including replacement strings stored in shell
+ variables. Backslash will escape '&' in STRING; the backslash is
+ removed in order to permit a literal '&' in the replacement string.
+ Users should take care if STRING is double-quoted to avoid unwanted
+ interactions between the backslash and double-quoting, since
+ backslash has special meaning within double quotes. Pattern
+ substitution performs the check for unquoted '&' after expanding
+ STRING, so users should ensure to properly quote any occurrences of
+ '&' they want to be taken literally in the replacement and ensure
+ any instances of '&' they want to be replaced are unquoted.
+
+ For instance,
+
+ var=abcdef
+ rep='& '
+ echo ${var/abc/& }
+ echo "${var/abc/& }"
+ echo ${var/abc/$rep}
+ echo "${var/abc/$rep}"
+
+ will display four lines of "abc def", while
+
+ var=abcdef
+ rep='& '
+ echo ${var/abc/\& }
+ echo "${var/abc/\& }"
+ echo ${var/abc/"& "}
+ echo ${var/abc/"$rep"}
+
+ will display four lines of "& def". Like the pattern removal
+ operators, double quotes surrounding the replacement string quote
+ the expanded characters, while double quotes enclosing the entire
+ parameter substitution do not, since the expansion is performed in
+ a context that doesn't take any enclosing double quotes into
+ account.
+
+ Since backslash can escape '&', it can also escape a backslash in
+ the replacement string. This means that '\\' will insert a literal
+ backslash into the replacement, so these two 'echo' commands
+
+ var=abcdef
+ rep='\\&xyz'
+ echo ${var/abc/\\&xyz}
+ echo ${var/abc/$rep}
+
+ will both output '\abcxyzdef'.
+
+ It should rarely be necessary to enclose only STRING in double
+ quotes.
+
+ If the 'nocasematch' shell option (see the description of 'shopt'
+ in *note The Shopt Builtin::) is enabled, the match is performed
+ without regard to the case of alphabetic characters. If PARAMETER
+ is '@' or '*', the substitution operation is applied to each
+ positional parameter in turn, and the expansion is the resultant
+ list. If PARAMETER is an array variable subscripted with '@' or
+ '*', the substitution operation is applied to each member of the
+ array in turn, and the expansion is the resultant list.
'${PARAMETER^PATTERN}'
'${PARAMETER^^PATTERN}'
@@ -1970,18 +2162,22 @@ omitted, the operator tests only for existence.
filename expansion. Each character in the expanded value of
PARAMETER is tested against PATTERN, and, if it matches the
pattern, its case is converted. The pattern should not attempt to
- match more than one character. The '^' operator converts lowercase
- letters matching PATTERN to uppercase; the ',' operator converts
- matching uppercase letters to lowercase. The '^^' and ',,'
- expansions convert each matched character in the expanded value;
- the '^' and ',' expansions match and convert only the first
- character in the expanded value. If PATTERN is omitted, it is
- treated like a '?', which matches every character. If PARAMETER is
- '@' or '*', the case modification operation is applied to each
- positional parameter in turn, and the expansion is the resultant
- list. If PARAMETER is an array variable subscripted with '@' or
- '*', the case modification operation is applied to each member of
- the array in turn, and the expansion is the resultant list.
+ match more than one character.
+
+ The '^' operator converts lowercase letters matching PATTERN to
+ uppercase; the ',' operator converts matching uppercase letters to
+ lowercase. The '^^' and ',,' expansions convert each matched
+ character in the expanded value; the '^' and ',' expansions match
+ and convert only the first character in the expanded value. If
+ PATTERN is omitted, it is treated like a '?', which matches every
+ character.
+
+ If PARAMETER is '@' or '*', the case modification operation is
+ applied to each positional parameter in turn, and the expansion is
+ the resultant list. If PARAMETER is an array variable subscripted
+ with '@' or '*', the case modification operation is applied to each
+ member of the array in turn, and the expansion is the resultant
+ list.
'${PARAMETER@OPERATOR}'
The expansion is either a transformation of the value of PARAMETER
@@ -2021,6 +2217,10 @@ omitted, the operator tests only for existence.
'a'
The expansion is a string consisting of flag values
representing PARAMETER's attributes.
+ 'k'
+ Like the 'K' transformation, but expands the keys and values
+ of indexed and associative arrays to separate words after word
+ splitting.
If PARAMETER is '@' or '*', the operation is applied to each
positional parameter in turn, and the expansion is the resultant
@@ -2075,12 +2275,12 @@ is:
$(( EXPRESSION ))
- The expression is treated as if it were within double quotes, but a
-double quote inside the parentheses is not treated specially. All
-tokens in the expression undergo parameter and variable expansion,
-command substitution, and quote removal. The result is treated as the
-arithmetic expression to be evaluated. Arithmetic expansions may be
-nested.
+ The EXPRESSION undergoes the same expansions as if it were within
+double quotes, but double quote characters in EXPRESSION are not treated
+specially and are removed. All tokens in the expression undergo
+parameter and variable expansion, command substitution, and quote
+removal. The result is treated as the arithmetic expression to be
+evaluated. Arithmetic expansions may be nested.
The evaluation is performed according to the rules listed below
(*note Shell Arithmetic::). If the expression is invalid, Bash prints a
@@ -2175,9 +2375,12 @@ characters.
When a pattern is used for filename expansion, the character '.' at
the start of a filename or immediately following a slash must be matched
-explicitly, unless the shell option 'dotglob' is set. The filenames '.'
-and '..' must always be matched explicitly, even if 'dotglob' is set.
-In other cases, the '.' character is not treated specially.
+explicitly, unless the shell option 'dotglob' is set. In order to match
+the filenames '.' and '..', the pattern must begin with '.' (for
+example, '.?'), even if 'dotglob' is set. If the 'globskipdots' shell
+option is enabled, the filenames '.' and '..' are never matched, even if
+the pattern begins with a '.'. When not matching filenames, the '.'
+character is not treated specially.
When matching a filename, the slash character must always be matched
explicitly by a slash in the pattern, but in other matching contexts it
@@ -2185,8 +2388,8 @@ can be matched by a special pattern character as described below (*note
Pattern Matching::).
See the description of 'shopt' in *note The Shopt Builtin::, for a
-description of the 'nocaseglob', 'nullglob', 'failglob', and 'dotglob'
-options.
+description of the 'nocaseglob', 'nullglob', 'globskipdots', 'failglob',
+and 'dotglob' options.
The 'GLOBIGNORE' shell variable may be used to restrict the set of
file names matching a pattern. If 'GLOBIGNORE' is set, each matching
@@ -2232,20 +2435,21 @@ characters must be quoted if they are to be matched literally.
character not enclosed is matched. A '-' may be matched by
including it as the first or last character in the set. A ']' may
be matched by including it as the first character in the set. The
- sorting order of characters in range expressions is determined by
- the current locale and the values of the 'LC_COLLATE' and 'LC_ALL'
- shell variables, if set.
+ sorting order of characters in range expressions, and the
+ characters included in the range, are determined by the current
+ locale and the values of the 'LC_COLLATE' and 'LC_ALL' shell
+ variables, if set.
For example, in the default C locale, '[a-dx-z]' is equivalent to
'[abcdxyz]'. Many locales sort characters in dictionary order, and
in these locales '[a-dx-z]' is typically not equivalent to
- '[abcdxyz]'; it might be equivalent to '[aBbCcDdxXyYz]', for
+ '[abcdxyz]'; it might be equivalent to '[aBbCcDdxYyZz]', for
example. To obtain the traditional interpretation of ranges in
bracket expressions, you can force the use of the C locale by
setting the 'LC_COLLATE' or 'LC_ALL' environment variable to the
value 'C', or enable the 'globasciiranges' shell option.
- Within '[' and ']', CHARACTER CLASSES can be specified using the
+ Within '[' and ']', "character classes" can be specified using the
syntax '[:'CLASS':]', where CLASS is one of the following classes
defined in the POSIX standard:
alnum alpha ascii blank cntrl digit graph lower
@@ -2254,8 +2458,8 @@ characters must be quoted if they are to be matched literally.
The 'word' character class matches letters, digits, and the
character '_'.
- Within '[' and ']', an EQUIVALENCE CLASS can be specified using the
- syntax '[='C'=]', which matches all characters with the same
+ Within '[' and ']', an "equivalence class" can be specified using
+ the syntax '[='C'=]', which matches all characters with the same
collation weight (as defined by the current locale) as the
character C.
@@ -2263,10 +2467,12 @@ characters must be quoted if they are to be matched literally.
symbol SYMBOL.
If the 'extglob' shell option is enabled using the 'shopt' builtin,
-several extended pattern matching operators are recognized. In the
-following description, a PATTERN-LIST is a list of one or more patterns
-separated by a '|'. Composite patterns may be formed using one or more
-of the following sub-patterns:
+the shell recognizes several extended pattern matching operators. In
+the following description, a PATTERN-LIST is a list of one or more
+patterns separated by a '|'. When matching filenames, the 'dotglob'
+shell option determines the set of filenames that are tested, as
+described above. Composite patterns may be formed using one or more of
+the following sub-patterns:
'?(PATTERN-LIST)'
Matches zero or one occurrence of the given patterns.
@@ -2283,6 +2489,20 @@ of the following sub-patterns:
'!(PATTERN-LIST)'
Matches anything except one of the given patterns.
+ The 'extglob' option changes the behavior of the parser, since the
+parentheses are normally treated as operators with syntactic meaning.
+To ensure that extended matching patterns are parsed correctly, make
+sure that 'extglob' is enabled before parsing constructs containing the
+patterns, including shell functions and command substitutions.
+
+ When matching filenames, the 'dotglob' shell option determines the
+set of filenames that are tested: when 'dotglob' is enabled, the set of
+filenames includes all files beginning with '.', but the filenames '.'
+and '..' must be matched by a pattern or sub-pattern that begins with a
+dot; when it is disabled, the set does not include any filenames
+beginning with "." unless the pattern or sub-pattern begins with a '.'.
+As above, '.' only has a special meaning when matching filenames.
+
Complicated extended pattern matching against long strings is slow,
especially when the patterns contain alternations and the strings
contain multiple matches. Using separate matches against shorter
@@ -2305,8 +2525,8 @@ File: bash.info, Node: Redirections, Next: Executing Commands, Prev: Shell Ex
3.6 Redirections
================
-Before a command is executed, its input and output may be REDIRECTED
-using a special notation interpreted by the shell. Redirection allows
+Before a command is executed, its input and output may be "redirected"
+using a special notation interpreted by the shell. "Redirection" allows
commands' file handles to be duplicated, opened, closed, made to refer
to different files, and can change the files the command reads from and
writes to. Redirection may also be used to modify file handles in the
@@ -2322,7 +2542,8 @@ file descriptor greater than 10 and assign it to {VARNAME}. If >&- or
<&- is preceded by {VARNAME}, the value of VARNAME defines the file
descriptor to close. If {VARNAME} is supplied, the redirection persists
beyond the scope of the command, allowing the shell programmer to manage
-the file descriptor's lifetime manually.
+the file descriptor's lifetime manually. The 'varredir_close' shell
+option manages this behavior (*note The Shopt Builtin::).
In the following descriptions, if the file descriptor number is
omitted, and the first character of the redirection operator is '<', the
@@ -2584,11 +2805,13 @@ following order.
expansion, and quote removal before being assigned to the variable.
If no command name results, the variable assignments affect the
-current shell environment. Otherwise, the variables are added to the
-environment of the executed command and do not affect the current shell
-environment. If any of the assignments attempts to assign a value to a
-readonly variable, an error occurs, and the command exits with a
-non-zero status.
+current shell environment. In the case of such a command (one that
+consists only of assignment statements and redirections), assignment
+statements are performed before redirections. Otherwise, the variables
+are added to the environment of the executed command and do not affect
+the current shell environment. If any of the assignments attempts to
+assign a value to a readonly variable, an error occurs, and the command
+exits with a non-zero status.
If no command name results, redirections are performed, but do not
affect the current shell environment. A redirection error causes the
@@ -2642,8 +2865,8 @@ taken.
5. If this execution fails because the file is not in executable
format, and the file is not a directory, it is assumed to be a
- SHELL SCRIPT and the shell executes it as described in *note Shell
- Scripts::.
+ "shell script" and the shell executes it as described in *note
+ Shell Scripts::.
6. If the command was not begun asynchronously, the shell waits for
the command to complete and collects its exit status.
@@ -2654,7 +2877,8 @@ File: bash.info, Node: Command Execution Environment, Next: Environment, Prev
3.7.3 Command Execution Environment
-----------------------------------
-The shell has an EXECUTION ENVIRONMENT, which consists of the following:
+The shell has an "execution environment", which consists of the
+following:
* open files inherited by the shell at invocation, as modified by
redirections supplied to the 'exec' builtin
@@ -2705,6 +2929,8 @@ inherited from the shell.
A command invoked in this separate environment cannot affect the
shell's execution environment.
+ A "subshell" is a copy of the shell process.
+
Command substitution, commands grouped with parentheses, and
asynchronous commands are invoked in a subshell environment that is a
duplicate of the shell environment, except that traps caught by the
@@ -2729,12 +2955,12 @@ File: bash.info, Node: Environment, Next: Exit Status, Prev: Command Executio
-----------------
When a program is invoked it is given an array of strings called the
-ENVIRONMENT. This is a list of name-value pairs, of the form
+"environment". This is a list of name-value pairs, of the form
'name=value'.
Bash provides several ways to manipulate the environment. On
invocation, the shell scans its own environment and creates a parameter
-for each name found, automatically marking it for EXPORT to child
+for each name found, automatically marking it for 'export' to child
processes. Executed commands inherit the environment. The 'export' and
'declare -x' commands allow parameters and functions to be added to and
deleted from the environment. If the value of a parameter in the
@@ -2765,11 +2991,11 @@ File: bash.info, Node: Exit Status, Next: Signals, Prev: Environment, Up: Ex
-----------------
The exit status of an executed command is the value returned by the
-WAITPID system call or equivalent function. Exit statuses fall between
-0 and 255, though, as explained below, the shell may use values above
-125 specially. Exit statuses from shell builtins and compound commands
-are also limited to this range. Under certain circumstances, the shell
-will use special values to indicate specific failure modes.
+'waitpid' system call or equivalent function. Exit statuses fall
+between 0 and 255, though, as explained below, the shell may use values
+above 125 specially. Exit statuses from shell builtins and compound
+commands are also limited to this range. Under certain circumstances,
+the shell will use special values to indicate specific failure modes.
For the shell's purposes, a command which exits with a zero exit
status has succeeded. A non-zero exit status indicates failure. This
@@ -2795,6 +3021,9 @@ conditional and list constructs. All builtins return an exit status of
2 to indicate incorrect usage, generally invalid options or missing
arguments.
+ The exit status of the last command is available in the special
+parameter $? (*note Special Parameters::).
+

File: bash.info, Node: Signals, Prev: Exit Status, Up: Executing Commands
@@ -2835,6 +3064,33 @@ the 'wait' builtin, the reception of a signal for which a trap has been
set will cause the 'wait' builtin to return immediately with an exit
status greater than 128, immediately after which the trap is executed.
+ When job control is not enabled, and Bash is waiting for a foreground
+command to complete, the shell receives keyboard-generated signals such
+as 'SIGINT' (usually generated by '^C') that users commonly intend to
+send to that command. This happens because the shell and the command
+are in the same process group as the terminal, and '^C' sends 'SIGINT'
+to all processes in that process group. See *note Job Control::, for a
+more in-depth discussion of process groups.
+
+ When Bash is running without job control enabled and receives
+'SIGINT' while waiting for a foreground command, it waits until that
+foreground command terminates and then decides what to do about the
+'SIGINT':
+
+ 1. If the command terminates due to the 'SIGINT', Bash concludes that
+ the user meant to end the entire script, and acts on the 'SIGINT'
+ (e.g., by running a 'SIGINT' trap or exiting itself);
+
+ 2. If the pipeline does not terminate due to 'SIGINT', the program
+ handled the 'SIGINT' itself and did not treat it as a fatal signal.
+ In that case, Bash does not treat 'SIGINT' as a fatal signal,
+ either, instead assuming that the 'SIGINT' was used as part of the
+ program's normal operation (e.g., 'emacs' uses it to abort editing
+ commands) or deliberately discarded. However, Bash will run any
+ trap set on 'SIGINT', as it does with any other trapped signal it
+ receives while it is waiting for the foreground command to
+ complete, for compatibility.
+

File: bash.info, Node: Shell Scripts, Prev: Executing Commands, Up: Basic Shell Features
@@ -2857,8 +3113,8 @@ parameters are unset.
A shell script may be made executable by using the 'chmod' command to
turn on the execute bit. When Bash finds such a file while searching
-the '$PATH' for a command, it spawns a subshell to execute it. In other
-words, executing
+the '$PATH' for a command, it creates a new instance of itself to
+execute it. In other words, executing
filename ARGUMENTS
is equivalent to executing
bash filename ARGUMENTS
@@ -2962,19 +3218,20 @@ standard.
Read and execute commands from the FILENAME argument in the current
shell context. If FILENAME does not contain a slash, the 'PATH'
- variable is used to find FILENAME. When Bash is not in POSIX mode,
- the current directory is searched if FILENAME is not found in
- '$PATH'. If any ARGUMENTS are supplied, they become the positional
- parameters when FILENAME is executed. Otherwise the positional
- parameters are unchanged. If the '-T' option is enabled, 'source'
- inherits any trap on 'DEBUG'; if it is not, any 'DEBUG' trap string
- is saved and restored around the call to 'source', and 'source'
- unsets the 'DEBUG' trap while it executes. If '-T' is not set, and
- the sourced file changes the 'DEBUG' trap, the new value is
- retained when 'source' completes. The return status is the exit
- status of the last command executed, or zero if no commands are
- executed. If FILENAME is not found, or cannot be read, the return
- status is non-zero. This builtin is equivalent to 'source'.
+ variable is used to find FILENAME, but FILENAME does not need to be
+ executable. When Bash is not in POSIX mode, it searches the
+ current directory if FILENAME is not found in '$PATH'. If any
+ ARGUMENTS are supplied, they become the positional parameters when
+ FILENAME is executed. Otherwise the positional parameters are
+ unchanged. If the '-T' option is enabled, '.' inherits any trap on
+ 'DEBUG'; if it is not, any 'DEBUG' trap string is saved and
+ restored around the call to '.', and '.' unsets the 'DEBUG' trap
+ while it executes. If '-T' is not set, and the sourced file
+ changes the 'DEBUG' trap, the new value is retained when '.'
+ completes. The return status is the exit status of the last
+ command executed, or zero if no commands are executed. If FILENAME
+ is not found, or cannot be read, the return status is non-zero.
+ This builtin is equivalent to 'source'.
'break'
break [N]
@@ -2988,10 +3245,9 @@ standard.
cd [-L|[-P [-e]] [-@] [DIRECTORY]
Change the current working directory to DIRECTORY. If DIRECTORY is
- not supplied, the value of the 'HOME' shell variable is used. Any
- additional arguments following DIRECTORY are ignored. If the shell
- variable 'CDPATH' exists, it is used as a search path: each
- directory name in 'CDPATH' is searched for DIRECTORY, with
+ not supplied, the value of the 'HOME' shell variable is used. If
+ the shell variable 'CDPATH' exists, it is used as a search path:
+ each directory name in 'CDPATH' is searched for DIRECTORY, with
alternative directory names in 'CDPATH' separated by a colon (':').
If DIRECTORY begins with a slash, 'CDPATH' is not used.
@@ -3022,6 +3278,11 @@ standard.
absolute pathname of the new working directory is written to the
standard output.
+ If the directory change is successful, 'cd' sets the value of the
+ 'PWD' environment variable to the new directory name, and sets the
+ 'OLDPWD' environment variable to the value of the current working
+ directory before the change.
+
The return status is zero if the directory is successfully changed,
non-zero otherwise.
@@ -3073,7 +3334,7 @@ standard.
Mark each NAME to be passed to child processes in the environment.
If the '-f' option is supplied, the NAMEs refer to shell functions;
otherwise the names refer to shell variables. The '-n' option
- means to no longer mark each NAME for export. If no NAMES are
+ means to no longer mark each NAME for export. If no NAMEs are
supplied, or if the '-p' option is given, a list of names of all
exported variables is displayed. The '-p' option displays output
in a form that may be reused as input. If a variable name is
@@ -3277,10 +3538,16 @@ standard.
4. Otherwise, the expression is false.
4 arguments
- If the first argument is '!', the result is the negation of
- the three-argument expression composed of the remaining
- arguments. Otherwise, the expression is parsed and evaluated
- according to precedence using the rules listed above.
+ The following conditions are applied in the order listed.
+
+ 1. If the first argument is '!', the result is the negation
+ of the three-argument expression composed of the
+ remaining arguments.
+ 2. If the first argument is exactly '(' and the fourth
+ argument is exactly ')', the result is the two-argument
+ test of the second and third arguments.
+ 3. Otherwise, the expression is parsed and evaluated
+ according to precedence using the rules listed above.
5 or more arguments
The expression is parsed and evaluated according to precedence
@@ -3369,7 +3636,7 @@ standard.
given, each NAME refers to a shell variable and that variable is
removed. If the '-f' option is given, the NAMEs refer to shell
functions, and the function definition is removed. If the '-n'
- option is supplied, and NAME is a variable with the NAMEREF
+ option is supplied, and NAME is a variable with the 'nameref'
attribute, NAME will be unset rather than the variable it
references. '-n' has no effect if the '-f' option is supplied. If
no options are supplied, each NAME refers to a variable; if there
@@ -3377,7 +3644,8 @@ standard.
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 NAME is readonly.
+ The return status is zero unless a NAME is readonly or may not be
+ unset.

File: bash.info, Node: Bash Builtins, Next: Modifying Shell Behavior, Prev: Bourne Shell Builtins, Up: Shell Builtin Commands
@@ -3406,6 +3674,7 @@ standard.
bind [-m KEYMAP] -x KEYSEQ:SHELL-COMMAND
bind [-m KEYMAP] KEYSEQ:FUNCTION-NAME
bind [-m KEYMAP] KEYSEQ:READLINE-COMMAND
+ bind READLINE-COMMAND-LINE
Display current Readline (*note Command Line Editing::) key and
function bindings, bind a key sequence to a Readline function or
@@ -3470,10 +3739,13 @@ standard.
'READLINE_LINE' variable to the contents of the Readline line
buffer and the 'READLINE_POINT' and 'READLINE_MARK' variables
to the current location of the insertion point and the saved
- insertion point (the MARK), respectively. If the executed
- command changes the value of any of 'READLINE_LINE',
- 'READLINE_POINT', or 'READLINE_MARK', those new values will be
- reflected in the editing state.
+ insertion point (the MARK), respectively. The shell assigns
+ any numeric argument the user supplied to the
+ 'READLINE_ARGUMENT' variable. If there was no argument, that
+ variable is not set. If the executed command changes the
+ value of any of 'READLINE_LINE', 'READLINE_POINT', or
+ 'READLINE_MARK', those new values will be reflected in the
+ editing state.
'-X'
List all key sequences bound to shell commands and the
@@ -3556,7 +3828,7 @@ standard.
It is ignored in all other cases.
The '-I' option causes local variables to inherit the attributes
- (except the NAMEREF attribute) and value of any existing variable
+ (except the 'nameref' attribute) and value of any existing variable
with the same NAME at a surrounding scope. If there is no existing
variable, the local variable is initially unset.
@@ -3583,7 +3855,7 @@ standard.
attribute is disabled.
'-n'
- Give each NAME the NAMEREF attribute, making it a name
+ Give each NAME the 'nameref' attribute, making it a name
reference to another variable. That other variable is defined
by the value of NAME. All references, assignments, and
attribute modifications to NAME, except for those using or
@@ -3626,7 +3898,7 @@ standard.
attempt is made to assign a value to a readonly variable, an
attempt is made to assign a value to an array variable without
using the compound assignment syntax (*note Arrays::), one of the
- NAMES is not a valid shell variable name, an attempt is made to
+ NAMEs is not a valid shell variable name, an attempt is made to
turn off readonly status for a readonly variable, an attempt is
made to turn off array status for an array variable, or an attempt
is made to display a non-existent function with '-f'.
@@ -3699,13 +3971,20 @@ standard.
The '-f' option means to load the new builtin command NAME from
shared object FILENAME, on systems that support dynamic loading.
- The '-d' option will delete a builtin loaded with '-f'.
+ Bash will use the value of the 'BASH_LOADABLES_PATH' variable as a
+ colon-separated list of directories in which to search for
+ FILENAME. The default is system-dependent. The '-d' option will
+ delete a builtin loaded with '-f'.
If there are no options, a list of the shell builtins is displayed.
The '-s' option restricts 'enable' to the POSIX special builtins.
If '-s' is used with '-f', the new builtin becomes a special
builtin (*note Special Builtins::).
+ If no options are supplied and a NAME is not a shell builtin,
+ 'enable' will attempt to load NAME from a shared object named NAME,
+ as if the command were 'enable -f NAME NAME'.
+
The return status is zero unless a NAME is not a shell builtin or
there is an error loading a new builtin from a shared object.
@@ -3826,6 +4105,9 @@ standard.
'%q'
Causes 'printf' to output the corresponding ARGUMENT in a
format that can be reused as shell input.
+ '%Q'
+ like '%q', but applies any supplied precision to the ARGUMENT
+ before quoting it.
'%(DATEFMT)T'
Causes 'printf' to output the date-time string resulting from
using DATEFMT as a format string for 'strftime'(3). The
@@ -3934,8 +4216,9 @@ standard.
partial input read into the specified variable NAME. If
TIMEOUT is 0, 'read' returns immediately, without trying to
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.
+ the specified file descriptor, or the read will return EOF,
+ non-zero otherwise. The exit status is greater than 128 if
+ the timeout is exceeded.
'-u FD'
Read input from file descriptor FD.
@@ -3991,7 +4274,7 @@ standard.
If the '-f' option is used, 'type' does not attempt to find shell
functions, as with the 'command' builtin.
- The return status is zero if all of the NAMES are found, non-zero
+ The return status is zero if all of the NAMEs are found, non-zero
if any are not found.
'typeset'
@@ -4135,8 +4418,8 @@ allows you to change the values of shell options and set the positional
parameters, or to display the names and values of shell variables.
'set'
- set [--abefhkmnptuvxBCEHPT] [-o OPTION-NAME] [ARGUMENT ...]
- set [+abefhkmnptuvxBCEHPT] [+o OPTION-NAME] [ARGUMENT ...]
+ set [-abefhkmnptuvxBCEHPT] [-o OPTION-NAME] [--] [-] [ARGUMENT ...]
+ set [+abefhkmnptuvxBCEHPT] [+o OPTION-NAME] [--] [-] [ARGUMENT ...]
If no options or arguments are supplied, 'set' displays the names
and values of all shell variables and functions, sorted according
@@ -4317,14 +4600,19 @@ parameters, or to display the names and values of shell variables.
causes the effective user and group ids to be set to the real
user and group ids.
+ '-r'
+ Enable restricted shell mode. This option cannot be unset
+ once it has been set.
+
'-t'
Exit after reading and executing one command.
'-u'
Treat unset variables and parameters other than the special
- parameters '@' or '*' as an error when performing parameter
- expansion. An error message will be written to the standard
- error, and a non-interactive shell will exit.
+ parameters '@' or '*', or array variables subscripted with '@'
+ or '*', as an error when performing parameter expansion. An
+ error message will be written to the standard error, and a
+ non-interactive shell will exit.
'-v'
Print shell input lines as they are read.
@@ -4421,7 +4709,7 @@ This builtin allows you to change additional shell optional behavior.
option is used, those available with the '-o' option to the 'set'
builtin command (*note The Set Builtin::). With no options, or
with the '-p' option, a list of all settable options is displayed,
- with an indication of whether or not each is set; if OPTNAMES are
+ with an indication of whether or not each is set; if OPTNAMEs are
supplied, the output is restricted to those options. The '-p'
option causes output to be displayed in a form that may be reused
as input. Other options have the following meanings:
@@ -4435,7 +4723,7 @@ This builtin allows you to change additional shell optional behavior.
'-q'
Suppresses normal output; the return status indicates whether
the OPTNAME is set or unset. If multiple OPTNAME arguments
- are given with '-q', the return status is zero if all OPTNAMES
+ are given with '-q', the return status is zero if all OPTNAMEs
are enabled; non-zero otherwise.
'-o'
@@ -4448,7 +4736,7 @@ This builtin allows you to change additional shell optional behavior.
Unless otherwise noted, the 'shopt' options are disabled (off) by
default.
- The return status when listing options is zero if all OPTNAMES are
+ The return status when listing options is zero if all OPTNAMEs are
enabled, non-zero otherwise. When setting or unsetting options,
the return status is zero unless an OPTNAME is not a valid shell
option.
@@ -4532,7 +4820,7 @@ This builtin allows you to change additional shell optional behavior.
'direxpand'
If set, Bash replaces directory names with the results of word
expansion when performing filename completion. This changes
- the contents of the readline editing buffer. If not set, Bash
+ the contents of the Readline editing buffer. If not set, Bash
attempts to preserve what the user typed.
'dirspell'
@@ -4616,6 +4904,11 @@ This builtin allows you to change additional shell optional behavior.
upper-case and lower-case ASCII characters will collate
together.
+ 'globskipdots'
+ If set, filename expansion will never match the filenames '.'
+ and '..', even if the pattern begins with a '.'. This option
+ is enabled by default.
+
'globstar'
If set, the pattern '**' used in a filename expansion context
will match all files and zero or more directories and
@@ -4675,7 +4968,7 @@ This builtin allows you to change additional shell optional behavior.
'localvar_inherit'
If set, local variables inherit the value and attributes of a
variable of the same name that exists at a previous scope
- before any new value is assigned. The NAMEREF attribute is
+ before any new value is assigned. The 'nameref' attribute is
not inherited.
'localvar_unset'
@@ -4706,14 +4999,26 @@ This builtin allows you to change additional shell optional behavior.
'nocasematch'
If set, Bash matches patterns in a case-insensitive fashion
when performing matching while executing 'case' or '[['
- conditional commands, when performing pattern substitution
- word expansions, or when filtering possible completions as
- part of programmable completion.
+ conditional commands (*note Conditional Constructs::, when
+ performing pattern substitution word expansions, or when
+ filtering possible completions as part of programmable
+ completion.
+
+ 'noexpand_translation'
+ If set, Bash encloses the translated results of $"..."
+ quoting in single quotes instead of double quotes. If the
+ string is not translated, this has no effect.
'nullglob'
If set, Bash allows filename patterns which match no files to
expand to a null string, rather than themselves.
+ 'patsub_replacement'
+ If set, Bash expands occurrences of '&' in the replacement
+ string of pattern substitution to the text matched by the
+ pattern, as described above (*note Shell Parameter
+ Expansion::). This option is enabled by default.
+
'progcomp'
If set, the programmable completion facilities (*note
Programmable Completion::) are enabled. This option is
@@ -4745,9 +5050,15 @@ This builtin allows you to change additional shell optional behavior.
parameters.
'sourcepath'
- If set, the 'source' builtin uses the value of 'PATH' to find
- the directory containing the file supplied as an argument.
- This option is enabled by default.
+ If set, the '.' ('source') builtin uses the value of 'PATH' to
+ find the directory containing the file supplied as an
+ argument. This option is enabled by default.
+
+ 'varredir_close'
+ If set, the shell automatically closes file descriptors
+ assigned using the '{varname}' redirection syntax (*note
+ Redirections::) instead of leaving them open when the command
+ completes.
'xpg_echo'
If set, the 'echo' builtin expands backslash-escape sequences
@@ -4980,7 +5291,7 @@ Variables::).
'BASH_LINENO'
An array variable whose members are the line numbers in source
- files where each corresponding member of FUNCNAME was invoked.
+ files where each corresponding member of 'FUNCNAME' was invoked.
'${BASH_LINENO[$i]}' is the line number in the source file
('${BASH_SOURCE[$i+1]}') where '${FUNCNAME[$i]}' was called (or
'${BASH_LINENO[$i-1]}' if referenced within another shell
@@ -5017,10 +5328,10 @@ Variables::).
to the array members are as follows:
'BASH_VERSINFO[0]'
- The major version number (the RELEASE).
+ The major version number (the "release").
'BASH_VERSINFO[1]'
- The minor version number (the VERSION).
+ The minor version number (the "version").
'BASH_VERSINFO[2]'
The patch level.
@@ -5029,7 +5340,7 @@ Variables::).
The build version.
'BASH_VERSINFO[4]'
- The release status (e.g., BETA1).
+ The release status (e.g., 'beta1').
'BASH_VERSINFO[5]'
The value of 'MACHTYPE'.
@@ -5082,12 +5393,12 @@ Variables::).
'COMP_TYPE'
Set to an integer value corresponding to the type of completion
- attempted that caused a completion function to be called: TAB, for
- normal completion, '?', for listing completions after successive
- tabs, '!', for listing alternatives on partial word completion,
- '@', to list completions if the word is not unmodified, or '%', for
- menu completion. This variable is available only in shell
- functions and external commands invoked by the programmable
+ attempted that caused a completion function to be called: <TAB>,
+ for normal completion, '?', for listing completions after
+ successive tabs, '!', for listing alternatives on partial word
+ completion, '@', to list completions if the word is not unmodified,
+ or '%', for menu completion. This variable is available only in
+ shell functions and external commands invoked by the programmable
completion facilities (*note Programmable Completion::).
'COMP_KEY'
@@ -5133,7 +5444,7 @@ Variables::).
Emacs shell buffer and disables line editing.
'ENV'
- Expanded and executed similarlty to 'BASH_ENV' (*note Bash Startup
+ Expanded and executed similarly to 'BASH_ENV' (*note Bash Startup
Files::) when an interactive shell is invoked in POSIX Mode (*note
Bash POSIX Mode::).
@@ -5141,16 +5452,16 @@ Variables::).
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 TIME for the definition of Epoch). Assignments to
+ function 'time' for the definition of Epoch). Assignments to
'EPOCHREALTIME' are ignored. If 'EPOCHREALTIME' is unset, it loses
its special properties, even if it is subsequently reset.
'EPOCHSECONDS'
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 TIME for the definition of Epoch). Assignments to
- 'EPOCHSECONDS' are ignored. If 'EPOCHSECONDS' is unset, it loses
- its special properties, even if it is subsequently reset.
+ library function 'time' for the definition of Epoch). Assignments
+ to 'EPOCHSECONDS' are ignored. If 'EPOCHSECONDS' is unset, it
+ loses its special properties, even if it is subsequently reset.
'EUID'
The numeric effective user id of the current user. This variable
@@ -5217,7 +5528,7 @@ Variables::).
'histchars'
Up to three characters which control history expansion, quick
substitution, and tokenization (*note History Interaction::). The
- first character is the HISTORY EXPANSION character, that is, the
+ first character is the "history expansion" character, that is, the
character which signifies the start of a history expansion,
normally '!'. The second character is the character which
signifies 'quick substitution' when seen as the first character on
@@ -5295,7 +5606,7 @@ Variables::).
'HISTTIMEFORMAT'
If this variable is set and not null, its value is used as a format
- string for STRFTIME to print the time stamp associated with each
+ string for 'strftime' to print the time stamp associated with each
history entry displayed by the 'history' builtin. If this variable
is set, time stamps are written to the history file so they may be
preserved across shell sessions. This uses the history comment
@@ -5449,7 +5760,7 @@ Variables::).
with '#? '
'PS4'
- The value of this parameter is expanded like PS1 and the expanded
+ The value of this parameter is expanded like 'PS1' and the expanded
value is the prompt printed before the command line is echoed when
the '-x' option is set (*note The Set Builtin::). The first
character of the expanded value is replicated multiple times, as
@@ -5465,15 +5776,19 @@ Variables::).
seeds the random number generator. If 'RANDOM' is unset, it loses
its special properties, even if it is subsequently reset.
+'READLINE_ARGUMENT'
+ Any numeric argument given to a Readline command that was defined
+ using 'bind -x' (*note Bash Builtins:: when it was invoked.
+
'READLINE_LINE'
The contents of the Readline line buffer, for use with 'bind -x'
(*note Bash Builtins::).
'READLINE_MARK'
- The position of the MARK (saved insertion point) in the Readline
+ The position of the "mark" (saved insertion point) in the Readline
line buffer, for use with 'bind -x' (*note Bash Builtins::). The
characters between the insertion point and the mark are often
- called the REGION.
+ called the "region".
'READLINE_POINT'
The position of the insertion point in the Readline line buffer,
@@ -5487,7 +5802,7 @@ Variables::).
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
+ at shell invocation and the current time are always determined by
querying the system clock. If 'SECONDS' is unset, it loses its
special properties, even if it is subsequently reset.
@@ -5843,14 +6158,15 @@ Invoked by remote shell daemon
..............................
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
-daemon, usually 'rshd', or the secure shell daemon 'sshd'. If Bash
-determines it is being run in this fashion, it reads and executes
-commands from '~/.bashrc', if that file exists and is readable. It will
-not do this if invoked as 'sh'. The '--norc' option may be used to
-inhibit this behavior, and the '--rcfile' option may be used to force
-another file to be read, but neither 'rshd' nor 'sshd' generally invoke
-the shell with those options or allow them to be specified.
+connected to a network connection, as when executed by the historical
+remote shell daemon, usually 'rshd', or the secure shell daemon 'sshd'.
+If Bash determines it is being run non-interactively in this fashion, it
+reads and executes commands from '~/.bashrc', if that file exists and is
+readable. It will not do this if invoked as 'sh'. The '--norc' option
+may be used to inhibit this behavior, and the '--rcfile' option may be
+used to force another file to be read, but neither 'rshd' nor 'sshd'
+generally invoke the shell with those options or allow them to be
+specified.
Invoked with unequal effective and real UID/GIDs
................................................
@@ -5874,7 +6190,7 @@ File: bash.info, Node: Interactive Shells, Next: Bash Conditional Expressions,
* What is an Interactive Shell?:: What determines whether a shell is Interactive.
* Is this Shell Interactive?:: How to tell if a shell is interactive.
-* Interactive Shell Behavior:: What changes in a interactive shell?
+* Interactive Shell Behavior:: What changes in an interactive shell?

File: bash.info, Node: What is an Interactive Shell?, Next: Is this Shell Interactive?, Up: Interactive Shells
@@ -5882,8 +6198,8 @@ File: bash.info, Node: What is an Interactive Shell?, Next: Is this Shell Inte
6.3.1 What is an Interactive Shell?
-----------------------------------
-An interactive shell is one started without non-option arguments, unless
-'-s' is specified, without specifying the '-c' option, and whose input
+An interactive shell is one started without non-option arguments (unless
+'-s' is specified) and without specifying the '-c' option, whose input
and error output are both connected to terminals (as determined by
'isatty(3)'), or one started with the '-i' option.
@@ -5941,7 +6257,7 @@ several ways.
string escape sequences.
4. Bash executes the values of the set elements of the
- 'PROMPT_COMMANDS' array variable as commands before printing the
+ 'PROMPT_COMMAND' array variable as commands before printing the
primary prompt, '$PS1' (*note Bash Variables::).
5. Readline (*note Command Line Editing::) is used to read commands
@@ -5993,9 +6309,11 @@ several ways.
19. Parser syntax errors will not cause the shell to exit.
- 20. Simple spelling correction for directory arguments to the 'cd'
- builtin is enabled by default (see the description of the 'cdspell'
- option to the 'shopt' builtin in *note The Shopt Builtin::).
+ 20. If the 'cdspell' shell option is enabled, the shell will attempt
+ simple spelling correction for directory arguments to the 'cd'
+ builtin (see the description of the 'cdspell' option to the 'shopt'
+ builtin in *note The Shopt Builtin::). The 'cdspell' option is
+ only effective in interactive shells.
21. The shell will check the value of the 'TMOUT' variable and exit if
a command is not read within the specified number of seconds after
@@ -6007,10 +6325,11 @@ File: bash.info, Node: Bash Conditional Expressions, Next: Shell Arithmetic,
6.4 Bash Conditional Expressions
================================
-Conditional expressions are used by the '[[' compound command and the
-'test' and '[' builtin commands. The 'test' and '[' commands determine
-their behavior based on the number of arguments; see the descriptions of
-those commands for any other command-specific actions.
+Conditional expressions are used by the '[[' compound command (*note
+Conditional Constructs::) and the 'test' and '[' builtin commands (*note
+Bourne Shell Builtins::). The 'test' and '[' commands determine their
+behavior based on the number of arguments; see the descriptions of those
+commands for any other command-specific actions.
Expressions may be unary or binary, and are formed from the following
primaries. Unary expressions are often used to examine the status of a
@@ -6228,8 +6547,8 @@ parameter expansion syntax. A shell variable that is null or unset
evaluates to 0 when referenced by name without using the parameter
expansion syntax. The value of a variable is evaluated as an arithmetic
expression when it is referenced, or when a variable which has been
-given the INTEGER attribute using 'declare -i' is assigned a value. A
-null value evaluates to 0. A shell variable need not have its INTEGER
+given the 'integer' attribute using 'declare -i' is assigned a value. A
+null value evaluates to 0. A shell variable need not have its 'integer'
attribute turned on to be used in an expression.
Integer constants follow the C language definition, without suffixes
@@ -6254,7 +6573,7 @@ File: bash.info, Node: Aliases, Next: Arrays, Prev: Shell Arithmetic, Up: Ba
6.6 Aliases
===========
-ALIASES allow a string to be substituted for a word when it is used as
+"Aliases" allow a string to be substituted for a word when it is used as
the first word of a simple command. The shell maintains a list of
aliases that may be set and unset with the 'alias' and 'unalias' builtin
commands.
@@ -6269,15 +6588,15 @@ is tested for aliases, but a word that is identical to an alias being
expanded is not expanded a second time. This means that one may alias
'ls' to '"ls -F"', for instance, and Bash does not try to recursively
expand the replacement text. If the last character of the alias value
-is a BLANK, then the next command word following the alias is also
+is a 'blank', then the next command word following the alias is also
checked for alias expansion.
Aliases are created and listed with the 'alias' command, and removed
with the 'unalias' command.
There is no mechanism for using arguments in the replacement text, as
-in 'csh'. If arguments are needed, a shell function should be used
-(*note Shell Functions::).
+in 'csh'. If arguments are needed, use a shell function (*note Shell
+Functions::).
Aliases are not expanded when the shell is not interactive, unless
the 'expand_aliases' shell option is set using 'shopt' (*note The Shopt
@@ -6363,6 +6682,10 @@ negative number, that number is interpreted as relative to one greater
than the maximum index of NAME, so negative indices count back from the
end of the array, and an index of -1 references the last element.
+ The '+=' operator will append to an array variable when assigning
+using the compound assignment syntax; see *note Shell Parameters::
+above.
+
Any element of an array may be referenced using '${NAME[SUBSCRIPT]}'.
The braces are required to avoid conflicts with the shell's filename
expansion operators. If the SUBSCRIPT is '@' or '*', the word expands
@@ -6402,7 +6725,11 @@ NAME[SUBSCRIPT]' destroys the array element at index SUBSCRIPT.
Negative subscripts to indexed arrays are interpreted as described
above. Unsetting the last element of an array variable does not unset
the variable. 'unset NAME', where NAME is an array, removes the entire
-array. A subscript of '*' or '@' also removes the entire array.
+array. 'unset NAME[SUBSCRIPT]' behaves differently depending on the
+array type when given a subscript of '*' or '@'. When NAME is an
+associative array, it removes the element with key '*' or '@'. If NAME
+is an indexed array, 'unset' removes all of the elements, but does not
+remove the array itself.
When using a variable name with a subscript as an argument to a
command, such as with 'unset', without using the word expansion syntax
@@ -6477,10 +6804,14 @@ File: bash.info, Node: Directory Stack Builtins, Up: The Directory Stack
'popd'
popd [-n] [+N | -N]
+ Removes elements from the directory stack. The elements are
+ numbered from 0 starting at the first directory listed by 'dirs';
+ that is, 'popd' is equivalent to 'popd +0'.
+
When no arguments are given, 'popd' removes the top directory from
- the stack and performs a 'cd' to the new top directory. The
- elements are numbered from 0 starting at the first directory listed
- with 'dirs'; that is, 'popd' is equivalent to 'popd +0'.
+ the stack and changes to the new top directory.
+
+ Arguments, if supplied, have the following meanings:
'-n'
Suppresses the normal change of directory when removing
@@ -6488,17 +6819,32 @@ File: bash.info, Node: Directory Stack Builtins, Up: The Directory Stack
manipulated.
'+N'
Removes the Nth directory (counting from the left of the list
- printed by 'dirs'), starting with zero.
+ printed by 'dirs'), starting with zero, from the stack.
'-N'
Removes the Nth directory (counting from the right of the list
- printed by 'dirs'), starting with zero.
+ printed by 'dirs'), starting with zero, from the stack.
+
+ If the top element of the directory stack is modified, and the '-n'
+ option was not supplied, 'popd' uses the 'cd' builtin to change to
+ the directory at the top of the stack. If the 'cd' fails, 'popd'
+ returns a non-zero value.
+
+ Otherwise, 'popd' returns an unsuccessful status if an invalid
+ option is encountered, the directory stack is empty, or a
+ non-existent directory stack entry is specified.
+
+ If the 'popd' command is successful, Bash runs 'dirs' to show the
+ final contents of the directory stack, and the return status is 0.
'pushd'
pushd [-n] [+N | -N | DIR]
- Save the current directory on the top of the directory stack and
- then 'cd' to DIR. With no arguments, 'pushd' exchanges the top two
- directories and makes the new top the current directory.
+ Adds a directory to the top of the directory stack, or rotates the
+ stack, making the new top of the stack the current working
+ directory. With no arguments, 'pushd' exchanges the top two
+ elements of the directory stack.
+
+ Arguments, if supplied, have the following meanings:
'-n'
Suppresses the normal change of directory when rotating or
@@ -6513,9 +6859,20 @@ File: bash.info, Node: Directory Stack Builtins, Up: The Directory Stack
printed by 'dirs', starting with zero) to the top of the list
by rotating the stack.
'DIR'
- Makes DIR be the top of the stack, making it the new current
- directory as if it had been supplied as an argument to the
- 'cd' builtin.
+ Makes DIR be the top of the stack.
+
+ After the stack has been modified, if the '-n' option was not
+ supplied, 'pushd' uses the 'cd' builtin to change to the directory
+ at the top of the stack. If the 'cd' fails, 'pushd' returns a
+ non-zero value.
+
+ Otherwise, if no arguments are supplied, 'pushd' returns 0 unless
+ the directory stack is empty. When rotating the directory stack,
+ 'pushd' returns 0 unless the directory stack is empty or a
+ non-existent directory stack element is specified.
+
+ If the 'pushd' command is successful, Bash runs 'dirs' to show the
+ final contents of the directory stack.

File: bash.info, Node: Controlling the Prompt, Next: The Restricted Shell, Prev: The Directory Stack, Up: Bash Features
@@ -6523,9 +6880,9 @@ File: bash.info, Node: Controlling the Prompt, Next: The Restricted Shell, Pr
6.9 Controlling the Prompt
==========================
-Bash examines the value of the array variable 'PROMPT_COMMANDS' just
+Bash examines the value of the array variable 'PROMPT_COMMAND' just
before printing each primary prompt. If any elements in
-'PROMPT_COMMANDS' are set and non-null, Bash executes each value, in
+'PROMPT_COMMAND' are set and non-null, Bash executes each value, in
numeric order, just as if it had been typed on the command line.
In addition, the following table describes the special characters
@@ -6571,8 +6928,8 @@ which can appear in the prompt variables 'PS0', 'PS1', 'PS2', and 'PS4':
'\V'
The release of Bash, version + patchlevel (e.g., 2.00.0)
'\w'
- The current working directory, with '$HOME' abbreviated with a
- tilde (uses the '$PROMPT_DIRTRIM' variable).
+ The value of the 'PWD' shell variable ('$PWD'), with '$HOME'
+ abbreviated with a tilde (uses the '$PROMPT_DIRTRIM' variable).
'\W'
The basename of '$PWD', with '$HOME' abbreviated with a tilde.
'\!'
@@ -6638,7 +6995,8 @@ with the exception that the following are disallowed or not performed:
* Using the 'enable' builtin command to enable disabled shell
builtins.
* Specifying the '-p' option to the 'command' builtin.
- * Turning off restricted mode with 'set +r' or 'set +o restricted'.
+ * Turning off restricted mode with 'set +r' or 'shopt -u
+ restricted_shell'.
These restrictions are enforced after any startup files are read.
@@ -6649,11 +7007,11 @@ spawned to execute the script.
The restricted shell mode is only one component of a useful
restricted environment. It should be accompanied by setting 'PATH' 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., 'VISUAL' or 'PAGER').
+that allow shell escapes are particularly vulnerable), changing the
+current directory to a non-writable directory other than '$HOME' 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., 'VISUAL' or 'PAGER').
Modern systems provide more secure ways to implement a restricted
environment, such as 'jails', 'zones', or 'containers'.
@@ -6696,203 +7054,219 @@ startup files.
7. Reserved words appearing in a context where reserved words are
recognized do not undergo alias expansion.
- 8. The POSIX 'PS1' and 'PS2' expansions of '!' to the history number
+ 8. Alias expansion is performed when initially parsing a command
+ substitution. The default mode generally defers it, when enabled,
+ until the command substitution is executed. This means that
+ command substitution will not expand aliases that are defined after
+ the command substitution is initially parsed (e.g., as part of a
+ function definition).
+
+ 9. The POSIX 'PS1' and 'PS2' expansions of '!' to the history number
and '!!' to '!' are enabled, and parameter expansion is performed
on the values of 'PS1' and 'PS2' regardless of the setting of the
'promptvars' option.
- 9. The POSIX startup files are executed ('$ENV') rather than the
+ 10. The POSIX startup files are executed ('$ENV') rather than the
normal Bash files.
- 10. Tilde expansion is only performed on assignments preceding a
+ 11. Tilde expansion is only performed on assignments preceding a
command name, rather than on all assignment statements on the line.
- 11. The default history file is '~/.sh_history' (this is the default
+ 12. The default history file is '~/.sh_history' (this is the default
value of '$HISTFILE').
- 12. Redirection operators do not perform filename expansion on the
+ 13. Redirection operators do not perform filename expansion on the
word in the redirection unless the shell is interactive.
- 13. Redirection operators do not perform word splitting on the word in
+ 14. Redirection operators do not perform word splitting on the word in
the redirection.
- 14. Function names must be valid shell 'name's. That is, they may not
+ 15. Function names must be valid shell 'name's. That is, they may not
contain characters other than letters, digits, and underscores, and
may not start with a digit. Declaring a function with an invalid
name causes a fatal syntax error in non-interactive shells.
- 15. Function names may not be the same as one of the POSIX special
+ 16. Function names may not be the same as one of the POSIX special
builtins.
- 16. POSIX special builtins are found before shell functions during
+ 17. POSIX special builtins are found before shell functions during
command lookup.
- 17. When printing shell function definitions (e.g., by 'type'), Bash
+ 18. When printing shell function definitions (e.g., by 'type'), Bash
does not print the 'function' keyword.
- 18. Literal tildes that appear as the first character in elements of
+ 19. Literal tildes that appear as the first character in elements of
the 'PATH' variable are not expanded as described above under *note
Tilde Expansion::.
- 19. The 'time' reserved word may be used by itself as a command. When
+ 20. The 'time' reserved word may be used by itself as a command. When
used in this way, it displays timing statistics for the shell and
its completed children. The 'TIMEFORMAT' variable controls the
format of the timing information.
- 20. When parsing and expanding a ${...} expansion that appears within
+ 21. When parsing and expanding a ${...} expansion that appears within
double quotes, single quotes are no longer special and cannot be
used to quote a closing brace or other special character, unless
the operator is one of those defined to perform pattern removal.
In this case, they do not have to appear as matched pairs.
- 21. The parser does not recognize 'time' as a reserved word if the
+ 22. The parser does not recognize 'time' as a reserved word if the
next token begins with a '-'.
- 22. The '!' character does not introduce history expansion within a
+ 23. The '!' character does not introduce history expansion within a
double-quoted string, even if the 'histexpand' option is enabled.
- 23. If a POSIX special builtin returns an error status, a
+ 24. If a POSIX special builtin returns an error status, a
non-interactive shell exits. The fatal errors are those listed in
the POSIX standard, and include things like passing incorrect
options, redirection errors, variable assignment errors for
assignments preceding the command name, and so on.
- 24. A non-interactive shell exits with an error status if a variable
+ 25. A non-interactive shell exits with an error status if a variable
assignment error occurs when no command name follows the assignment
statements. A variable assignment error occurs, for example, when
trying to assign a value to a readonly variable.
- 25. A non-interactive shell exits with an error status if a variable
+ 26. A non-interactive shell exits with an error status if a variable
assignment error occurs in an assignment statement preceding a
- special builtin, but not with any other simple command.
+ special builtin, but not with any other simple command. For any
+ other simple command, the shell aborts execution of that command,
+ and execution continues at the top level ("the shell shall not
+ perform any further processing of the command in which the error
+ occurred").
- 26. A non-interactive shell exits with an error status if the
+ 27. A non-interactive shell exits with an error status if the
iteration variable in a 'for' statement or the selection variable
in a 'select' statement is a readonly variable.
- 27. Non-interactive shells exit if FILENAME in '.' FILENAME is not
+ 28. Non-interactive shells exit if FILENAME in '.' FILENAME is not
found.
- 28. Non-interactive shells exit if a syntax error in an arithmetic
+ 29. Non-interactive shells exit if a syntax error in an arithmetic
expansion results in an invalid expression.
- 29. Non-interactive shells exit if a parameter expansion error occurs.
+ 30. Non-interactive shells exit if a parameter expansion error occurs.
- 30. Non-interactive shells exit if there is a syntax error in a script
+ 31. Non-interactive shells exit if there is a syntax error in a script
read with the '.' or 'source' builtins, or in a string processed by
the 'eval' builtin.
- 31. While variable indirection is available, it may not be applied to
+ 32. While variable indirection is available, it may not be applied to
the '#' and '?' special parameters.
- 32. When expanding the '*' special parameter in a pattern context
- where the expansion is double-quoted does not treat the '$*' as if
- it were double-quoted.
+ 33. Expanding the '*' special parameter in a pattern context where the
+ expansion is double-quoted does not treat the '$*' as if it were
+ double-quoted.
- 33. Assignment statements preceding POSIX special builtins persist in
+ 34. Assignment statements preceding POSIX special builtins persist in
the shell environment after the builtin completes.
- 34. The 'command' builtin does not prevent builtins that take
+ 35. The 'command' builtin does not prevent builtins that take
assignment statements as arguments from expanding them as
assignment statements; when not in POSIX mode, assignment builtins
lose their assignment statement expansion properties when preceded
by 'command'.
- 35. The 'bg' builtin uses the required format to describe each job
+ 36. The 'bg' builtin uses the required format to describe each job
placed in the background, which does not include an indication of
whether the job is the current or previous job.
- 36. The output of 'kill -l' prints all the signal names on a single
+ 37. The output of 'kill -l' prints all the signal names on a single
line, separated by spaces, without the 'SIG' prefix.
- 37. The 'kill' builtin does not accept signal names with a 'SIG'
+ 38. The 'kill' builtin does not accept signal names with a 'SIG'
prefix.
- 38. The 'export' and 'readonly' builtin commands display their output
+ 39. The 'export' and 'readonly' builtin commands display their output
in the format required by POSIX.
- 39. The 'trap' builtin displays signal names without the leading
+ 40. The 'trap' builtin displays signal names without the leading
'SIG'.
- 40. The 'trap' builtin doesn't check the first argument for a possible
+ 41. The 'trap' builtin doesn't check the first argument for a possible
signal specification and revert the signal handling to the original
disposition if it is, unless that argument consists solely of
digits and is a valid signal number. If users want to reset the
handler for a given signal to the original disposition, they should
use '-' as the first argument.
- 41. 'trap -p' displays signals whose dispositions are set to SIG_DFL
+ 42. 'trap -p' displays signals whose dispositions are set to SIG_DFL
and those that were ignored when the shell started.
- 42. The '.' and 'source' builtins do not search the current directory
+ 43. The '.' and 'source' builtins do not search the current directory
for the filename argument if it is not found by searching 'PATH'.
- 43. Enabling POSIX mode has the effect of setting the
+ 44. Enabling POSIX mode has the effect of setting the
'inherit_errexit' option, so subshells spawned to execute command
substitutions inherit the value of the '-e' option from the parent
shell. When the 'inherit_errexit' option is not enabled, Bash
clears the '-e' option in such subshells.
- 44. Enabling POSIX mode has the effect of setting the 'shift_verbose'
+ 45. Enabling POSIX mode has the effect of setting the 'shift_verbose'
option, so numeric arguments to 'shift' that exceed the number of
positional parameters will result in an error message.
- 45. When the 'alias' builtin displays alias definitions, it does not
+ 46. When the 'alias' builtin displays alias definitions, it does not
display them with a leading 'alias ' unless the '-p' option is
supplied.
- 46. When the 'set' builtin is invoked without options, it does not
+ 47. When the 'set' builtin is invoked without options, it does not
display shell function names and definitions.
- 47. When the 'set' builtin is invoked without options, it displays
+ 48. When the 'set' builtin is invoked without options, it displays
variable values without quotes, unless they contain shell
metacharacters, even if the result contains nonprinting characters.
- 48. When the 'cd' builtin is invoked in LOGICAL mode, and the pathname
+ 49. When the 'cd' builtin is invoked in logical mode, and the pathname
constructed from '$PWD' and the directory name supplied as an
argument does not refer to an existing directory, 'cd' will fail
- instead of falling back to PHYSICAL mode.
+ instead of falling back to physical mode.
- 49. When the 'cd' builtin cannot change a directory because the length
+ 50. When the 'cd' builtin cannot change a directory because the length
of the pathname constructed from '$PWD' and the directory name
- supplied as an argument exceeds PATH_MAX when all symbolic links
+ supplied as an argument exceeds 'PATH_MAX' when all symbolic links
are expanded, 'cd' will fail instead of attempting to use only the
supplied directory name.
- 50. The 'pwd' builtin verifies that the value it prints is the same as
+ 51. The 'pwd' builtin verifies that the value it prints is the same as
the current directory, even if it is not asked to check the file
system with the '-P' option.
- 51. When listing the history, the 'fc' builtin does not include an
+ 52. When listing the history, the 'fc' builtin does not include an
indication of whether or not a history entry has been modified.
- 52. The default editor used by 'fc' is 'ed'.
+ 53. The default editor used by 'fc' is 'ed'.
- 53. The 'type' and 'command' builtins will not report a non-executable
+ 54. The 'type' and 'command' builtins will not report a non-executable
file as having been found, though the shell will attempt to execute
such a file if it is the only so-named file found in '$PATH'.
- 54. The 'vi' editing mode will invoke the 'vi' editor directly when
+ 55. The 'vi' editing mode will invoke the 'vi' editor directly when
the 'v' command is run, instead of checking '$VISUAL' and
'$EDITOR'.
- 55. When the 'xpg_echo' option is enabled, Bash does not attempt to
+ 56. When the 'xpg_echo' option is enabled, Bash does not attempt to
interpret any arguments to 'echo' as options. Each argument is
displayed, after escape characters are converted.
- 56. The 'ulimit' builtin uses a block size of 512 bytes for the '-c'
+ 57. The 'ulimit' builtin uses a block size of 512 bytes for the '-c'
and '-f' options.
- 57. The arrival of 'SIGCHLD' when a trap is set on 'SIGCHLD' does not
+ 58. The arrival of 'SIGCHLD' when a trap is set on 'SIGCHLD' does not
interrupt the 'wait' builtin and cause it to return immediately.
The trap command is run once for each child that exits.
- 58. The 'read' builtin may be interrupted by a signal for which a trap
+ 59. The 'read' builtin may be interrupted by a signal for which a trap
has been set. If Bash receives a trapped signal while executing
'read', the trap handler executes and 'read' returns an exit status
greater than 128.
- 59. Bash removes an exited background process's status from the list
+ 60. The 'printf' builtin uses 'double' (via 'strtod') to convert
+ arguments corresponding to floating point conversion specifiers,
+ instead of 'long double' if it's available. The 'L' length
+ modifier forces 'printf' to use 'long double' if it's available.
+
+ 61. Bash removes an exited background process's status from the list
of such statuses after the 'wait' builtin is used to obtain it.
There is other POSIX behavior that Bash does not implement by default
@@ -6915,7 +7289,7 @@ File: bash.info, Node: Shell Compatibility Mode, Prev: Bash POSIX Mode, Up: B
6.12 Shell Compatibility Mode
=============================
-Bash-4.0 introduced the concept of a 'shell compatibility level',
+Bash-4.0 introduced the concept of a "shell compatibility level",
specified as a set of options to the shopt builtin ('compat31',
'compat32', 'compat40', 'compat41', and so on). There is only one
current compatibility level - each option is mutually exclusive. The
@@ -6927,7 +7301,7 @@ be a temporary solution.
This section does not mention behavior that is standard for a
particular version (e.g., setting 'compat32' 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).
+word, which is default behavior in bash-3.2 and subsequent versions).
If a user enables, say, 'compat32', it may affect the behavior of
other compatibility levels up to and including the current compatibility
@@ -7004,8 +7378,8 @@ required for bash-5.1 and later versions.
'compat43'
* 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
+ declare (e.g., declare -a foo='(1 2)'). Later versions warn
+ that this usage is deprecated
* 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
@@ -7040,6 +7414,38 @@ required for bash-5.1 and later versions.
when producing output that can be reused as input. Bash-5.1
suppresses that message when the '-l' option is supplied.
+'compat51 (set using BASH_COMPAT)'
+ * The 'unset' builtin will unset the array 'a' given an argument
+ like 'a[@]'. Bash-5.2 will unset an element with key '@'
+ (associative arrays) or remove all the elements without
+ unsetting the array (indexed arrays)
+ * arithmetic commands ( ((...)) ) and the expressions in an
+ arithmetic for statement can be expanded more than once
+ * expressions used as arguments to arithmetic operators in the
+ '[[' conditional command can be expanded more than once
+ * the expressions in substring parameter brace expansion can be
+ expanded more than once
+ * the expressions in the $(( ... )) word expansion can be
+ expanded more than once
+ * arithmetic expressions used as indexed array subscripts can be
+ expanded more than once
+ * 'test -v', when given an argument of 'A[@]', where A is an
+ existing associative array, will return true if the array has
+ any set elements. Bash-5.2 will look for and report on a key
+ named '@'
+ * the ${PARAMETER[:]=VALUE} word expansion will return VALUE,
+ before any variable-specific transformations have been
+ performed (e.g., converting to lowercase). Bash-5.2 will
+ return the final value assigned to the variable.
+ * Parsing command substitutions will behave as if extended glob
+ (*note The Shopt Builtin::) is enabled, so that parsing a
+ command substitution containing an extglob pattern (say, as
+ part of a shell function) will not fail. This assumes the
+ intent is to enable extglob before the command is executed and
+ word expansions are performed. It will fail at word expansion
+ time if extglob hasn't been enabled by the time the command is
+ executed.
+

File: bash.info, Node: Job Control, Next: Command Line Editing, Prev: Bash Features, Up: Top
@@ -7093,19 +7499,19 @@ when 'stty tostop' is in effect) the terminal are sent a 'SIGTTIN'
caught, suspends the process.
If the operating system on which Bash is running supports job
-control, Bash contains facilities to use it. Typing the SUSPEND
+control, Bash contains facilities to use it. Typing the "suspend"
character (typically '^Z', Control-Z) while a process is running causes
that process to be stopped and returns control to Bash. Typing the
-DELAYED SUSPEND character (typically '^Y', Control-Y) causes the process
-to be stopped when it attempts to read input from the terminal, and
-control to be returned to Bash. The user then manipulates the state of
-this job, using the 'bg' command to continue it in the background, the
-'fg' command to continue it in the foreground, or the 'kill' command to
-kill it. A '^Z' takes effect immediately, and has the additional side
-effect of causing pending output and typeahead to be discarded.
+"delayed suspend" character (typically '^Y', Control-Y) causes the
+process to be stopped when it attempts to read input from the terminal,
+and control to be returned to Bash. The user then manipulates the state
+of this job, using the 'bg' command to continue it in the background,
+the 'fg' command to continue it in the foreground, or the 'kill' command
+to kill it. A '^Z' takes effect immediately, and has the additional
+side effect of causing pending output and typeahead to be discarded.
There are a number of ways to refer to a job in the shell. The
-character '%' introduces a job specification (JOBSPEC).
+character '%' introduces a job specification ("jobspec").
Job number 'n' may be referred to as '%n'. The symbols '%%' and '%+'
refer to the shell's notion of the current job, which is the last job
@@ -7234,7 +7640,7 @@ File: bash.info, Node: Job Control Builtins, Next: Job Control Variables, Pre
for all running background jobs and the last-executed process
substitution, if its process id is the same as $!, and the return
status is zero. If the '-n' option is supplied, 'wait' waits for a
- single job from the list of PIDS or JOBSPECS or, if no arguments
+ single job from the list of PIDs or JOBSPECs 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,
@@ -7245,9 +7651,12 @@ File: bash.info, Node: Job Control Builtins, Next: Job Control Variables, Pre
assignment. This is useful only when the '-n' option is supplied.
Supplying the '-f' option, when job control is enabled, forces
'wait' to wait for each PID or JOBSPEC to terminate before
- returning its status, intead of returning when it changes status.
+ returning its status, instead of returning when it changes status.
If neither JOBSPEC nor PID specifies an active child process of the
- shell, the return status is 127.
+ shell, the return status is 127. If 'wait' is interrupted by a
+ signal, the return status will be greater than 128, as described
+ above (*note Signals::). Otherwise, the return status is the exit
+ status of the last process or job waited for.
'disown'
disown [-ar] [-h] [JOBSPEC ... | PID ... ]
@@ -7265,8 +7674,11 @@ File: bash.info, Node: Job Control Builtins, Next: Job Control Variables, Pre
suspend [-f]
Suspend the execution of this shell until it receives a 'SIGCONT'
- signal. A login shell cannot be suspended; the '-f' option can be
- used to override this and force the suspension.
+ signal. A login shell, or a shell without job control enabled,
+ cannot be suspended; the '-f' option can be used to override this
+ and force the suspension. The return status is 0 unless the shell
+ is a login shell or job control is not enabled and '-f' is not
+ supplied.
When job control is not active, the 'kill' and 'wait' builtins do not
accept JOBSPEC arguments. They must be supplied process IDs.
@@ -7427,9 +7839,9 @@ Printing characters
Undo the last editing command. You can undo all the way back to an
empty line.
-(Depending on your configuration, the <Backspace> key be set to delete
-the character to the left of the cursor and the <DEL> key set to delete
-the character underneath the cursor, like 'C-d', rather than the
+(Depending on your configuration, the <Backspace> key might be set to
+delete the character to the left of the cursor and the <DEL> key set to
+delete the character underneath the cursor, like 'C-d', rather than the
character to the left of the cursor.)

@@ -7491,9 +7903,9 @@ available to be yanked back later, when you are typing another line.
as those used by 'M-f'.
'M-<DEL>'
- Kill from the cursor the start of the current word, or, if between
- words, to the start of the previous word. Word boundaries are the
- same as those used by 'M-b'.
+ Kill from the cursor to the start of the current word, or, if
+ between words, to the start of the previous word. Word boundaries
+ are the same as those used by 'M-b'.
'C-w'
Kill from the cursor to the previous whitespace. This is different
@@ -7582,7 +7994,7 @@ File: bash.info, Node: Readline Init File, Next: Bindable Readline Commands,
Although the Readline library comes with a set of Emacs-like keybindings
installed by default, it is possible to use a different set of
keybindings. Any user can customize programs that use Readline by
-putting commands in an "inputrc" file, conventionally in his home
+putting commands in an "inputrc" file, conventionally in their home
directory. The name of this file is taken from the value of the shell
variable 'INPUTRC'. If that variable is unset, the default is
'~/.inputrc'. If that file does not exist or cannot be read, the
@@ -7641,6 +8053,32 @@ Variable Settings
A great deal of run-time behavior is changeable with the following
variables.
+ 'active-region-start-color'
+ A string variable that controls the text color and background
+ when displaying the text in the active region (see the
+ description of 'enable-active-region' below). This string
+ must not take up any physical character positions on the
+ display, so it should consist only of terminal escape
+ sequences. It is output to the terminal before displaying the
+ text in the active region. This variable is reset to the
+ default value whenever the terminal type changes. The default
+ value is the string that puts the terminal in standout mode,
+ as obtained from the terminal's terminfo description. A
+ sample value might be '\e[01;33m'.
+
+ 'active-region-end-color'
+ A string variable that "undoes" the effects of
+ 'active-region-start-color' and restores "normal" terminal
+ display appearance after displaying text in the active region.
+ This string must not take up any physical character positions
+ on the display, so it should consist only of terminal escape
+ sequences. It is output to the terminal after displaying the
+ text in the active region. This variable is reset to the
+ default value whenever the terminal type changes. The default
+ value is the string that restores the terminal from standout
+ mode, as obtained from the terminal's terminfo description. A
+ sample value might be '\e[0m'.
+
'bell-style'
Controls what happens when Readline wants to ring the terminal
bell. If set to 'none', Readline never rings the bell. If
@@ -7662,7 +8100,10 @@ Variable Settings
If set to 'on', 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 'LS_COLORS' environment variable. The default is
+ value of the 'LS_COLORS' environment variable. If there is a
+ color definition in 'LS_COLORS' for the custom suffix
+ 'readline-colored-completion-prefix', Readline uses this color
+ for the common prefix instead of its default. The default is
'off'.
'colored-stats'
@@ -7708,8 +8149,9 @@ Variable Settings
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 '100'.
+ than or equal to zero. A zero value means Readline should
+ never ask; negative values are treated as zero. The default
+ limit is '100'.
'convert-meta'
If set to 'on', Readline will convert characters with the
@@ -7717,7 +8159,9 @@ Variable Settings
eighth bit and prefixing an <ESC> character, converting them
to a meta-prefixed key sequence. The default value is 'on',
but will be set to 'off' if the locale is one that contains
- eight-bit characters.
+ eight-bit characters. This variable is dependent on the
+ 'LC_CTYPE' locale category, and may change if the locale is
+ changed.
'disable-completion'
If set to 'On', Readline will inhibit word completion.
@@ -7726,7 +8170,7 @@ Variable Settings
'echo-control-characters'
When set to 'on', on operating systems that indicate they
- support it, readline echoes a character corresponding to a
+ support it, Readline echoes a character corresponding to a
signal generated from the keyboard. The default is 'on'.
'editing-mode'
@@ -7745,13 +8189,27 @@ Variable Settings
non-printing characters, which can be used to embed a terminal
control sequence into the mode string. The default is '@'.
+ 'enable-active-region'
+ The "point" is the current cursor position, and "mark" refers
+ to a saved cursor position (*note Commands For Moving::). The
+ text between the point and mark is referred to as the
+ "region". When this variable is set to 'On', Readline allows
+ certain commands to designate the region as "active". When
+ the region is active, Readline highlights the text in the
+ region using the value of the 'active-region-start-color',
+ which defaults to the string that enables the terminal's
+ standout mode. The active region shows the text inserted by
+ bracketed-paste and any matching text found by incremental and
+ non-incremental history searches. The default is 'On'.
+
'enable-bracketed-paste'
- When set to 'On', 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 'On'.
+ When set to 'On', Readline configures the terminal 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 is called putting the
+ terminal into "bracketed paste mode"; it prevents Readline
+ from executing any editing commands bound to key sequences
+ appearing in the pasted text. The default is 'On'.
'enable-keypad'
When set to 'on', Readline will try to enable the application
@@ -7798,7 +8256,9 @@ Variable Settings
regardless of what the terminal claims it can support. The
default value is 'off', but Readline will set it to 'on' if
the locale contains eight-bit characters. The name
- 'meta-flag' is a synonym for this variable.
+ 'meta-flag' is a synonym for this variable. This variable is
+ dependent on the 'LC_CTYPE' locale category, and may change if
+ the locale is changed.
'isearch-terminators'
The string of characters that should terminate an incremental
@@ -7863,7 +8323,9 @@ Variable Settings
If set to 'on', Readline will display characters with the
eighth bit set directly rather than as a meta-prefixed escape
sequence. The default is 'off', but Readline will set it to
- 'on' if the locale contains eight-bit characters.
+ 'on' if the locale contains eight-bit characters. This
+ variable is dependent on the 'LC_CTYPE' locale category, and
+ may change if the locale is changed.
'page-completions'
If set to 'on', Readline uses an internal 'more'-like pager to
@@ -7879,7 +8341,8 @@ Variable Settings
If set to 'on', Readline will undo all changes to history
lines before returning when 'accept-line' is executed. By
default, history lines may be modified and retain individual
- undo lists across calls to 'readline'. The default is 'off'.
+ undo lists across calls to 'readline()'. The default is
+ 'off'.
'show-all-if-ambiguous'
This alters the default behavior of the completion functions.
@@ -7906,7 +8369,7 @@ Variable Settings
If set to 'on', 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 does not insert characters from the
+ enabled, Readline does not insert characters from the
completion that match characters after point in the word being
completed, so portions of the word following the cursor are
not duplicated. For instance, if this is enabled, attempting
@@ -7956,11 +8419,11 @@ Key Bindings
part of the key name. The name of the key can be expressed in
different ways, depending on what you find most comfortable.
- In addition to command names, readline allows keys to be bound to a
+ In addition to command names, Readline allows keys to be bound to a
string that is inserted when the key is pressed (a MACRO).
The 'bind -p' command displays Readline function names and bindings
- in a format that can put directly into an initialization file.
+ in a format that can be put directly into an initialization file.
*Note Bash Builtins::.
KEYNAME: FUNCTION-NAME or MACRO
@@ -8438,6 +8901,11 @@ File: bash.info, Node: Commands For History, Next: Commands For Text, Prev: C
supplied, specifies the history entry to use instead of the current
line.
+'fetch-history ()'
+ With a numeric argument, fetch that entry from the history list and
+ make it the current line. Without an argument, move back to the
+ first entry in the history list.
+

File: bash.info, Node: Commands For Text, Next: Commands For Killing, Prev: Commands For History, Up: Bindable Readline Commands
@@ -8754,7 +9222,7 @@ File: bash.info, Node: Keyboard Macros, Next: Miscellaneous Commands, Prev: C
characters in the macro appear as if typed at the keyboard.
'print-last-kbd-macro ()'
- Print the last keboard macro defined in a format suitable for the
+ Print the last keyboard macro defined in a format suitable for the
INPUTRC file.

@@ -8801,12 +9269,12 @@ File: bash.info, Node: Miscellaneous Commands, Prev: Keyboard Macros, Up: Bin
'character-search (C-])'
A character is read and point is moved to the next occurrence of
- that character. A negative count searches for previous
+ that character. A negative argument searches for previous
occurrences.
'character-search-backward (M-C-])'
A character is read and point is moved to the previous occurrence
- of that character. A negative count searches for subsequent
+ of that character. A negative argument searches for subsequent
occurrences.
'skip-csi-sequence ()'
@@ -8814,7 +9282,7 @@ File: bash.info, Node: Miscellaneous Commands, Prev: Keyboard Macros, Up: Bin
those defined for keys like Home and End. Such sequences begin
with a Control Sequence Indicator (CSI), usually ESC-[. If this
sequence is bound to "\e[", keys producing such sequences will have
- no effect unless explicitly bound to a readline command, instead of
+ no effect unless explicitly bound to a Readline command, instead of
inserting stray characters into the editing buffer. This is
unbound by default, but usually bound to ESC-[.
@@ -8849,6 +9317,12 @@ File: bash.info, Node: Miscellaneous Commands, Prev: Keyboard Macros, Up: Bin
is formatted in such a way that it can be made part of an INPUTRC
file. This command is unbound by default.
+'spell-correct-word (C-x s)'
+ Perform spelling correction on the current word, treating it as a
+ directory or filename, in the same way as the 'cdspell' shell
+ option. Word boundaries are the same as those used by
+ 'shell-forward-word'.
+
'glob-complete-word (M-g)'
The word before point is treated as a pattern for pathname
expansion, with an asterisk implicitly appended. This pattern is
@@ -9249,7 +9723,8 @@ happening.
'-C COMMAND'
COMMAND is executed in a subshell environment, and its output
- is used as the possible completions.
+ is used as the possible completions. Arguments are passed as
+ with the '-F' option.
'-F FUNCTION'
The shell function FUNCTION is executed in the current shell
@@ -9411,7 +9886,7 @@ CDPATH: Readline can't tell those completions are directories). The '-o
nospace' option tells Readline to not append a space character to the
directory name, in case we want to append to it. The '-o bashdefault'
option brings in the rest of the "Bash default" completions - possible
-completion that Bash adds to the default Readline set. These include
+completions that Bash adds to the default Readline set. These include
things like command name completion, variable completion for words
beginning with '$' or '${', completions containing pathname expansion
patterns (*note Filename Expansion::), and so on.
@@ -9578,9 +10053,9 @@ history file.
-d' command.
'-d START-END'
- Delete the history entries between positions START and END,
- inclusive. Positive and negative values for START and END are
- interpreted as described above.
+ Delete the range of history entries between positions START
+ and END, inclusive. Positive and negative values for START
+ and END are interpreted as described above.
'-a'
Append the new history lines to the history file. These are
@@ -9609,9 +10084,14 @@ history file.
The ARGs are added to the end of the history list as a single
entry.
- When any of the '-w', '-r', '-a', or '-n' options is used, if
- FILENAME is given, then it is used as the history file. If not,
- then the value of the 'HISTFILE' variable is used.
+ If a FILENAME argument is supplied when any of the '-w', '-r',
+ '-a', or '-n' options is used, Bash uses FILENAME as the history
+ file. If not, then the value of the 'HISTFILE' variable is used.
+
+ The return value is 0 unless an invalid option is encountered, an
+ error occurs while reading or writing the history file, an invalid
+ OFFSET or range is supplied as an argument to '-d', or the history
+ expansion supplied as an argument to '-p' fails.

File: bash.info, Node: History Interaction, Prev: Bash History Builtins, Up: Using History Interactively
@@ -9828,7 +10308,7 @@ or edit, the word or words selected from the history event.
'&' appears in NEW, it is replaced by OLD. A single backslash will
quote the '&'. If OLD is null, it is set to the last OLD
substituted, or, if no previous history substitutions took place,
- the last STRING in a !?STRING'[?]' search. If NEW is is null, each
+ the last STRING in a !?STRING'[?]' search. If NEW is null, each
matching OLD is deleted. The final delimiter is optional if it is
the last character on the input line.
@@ -9897,20 +10377,28 @@ These are installation instructions for Bash.
3. Optionally, type 'make tests' to run the Bash test suite.
4. Type 'make install' to install 'bash' and 'bashbug'. This will
- also install the manual pages and Info file.
+ also install the manual pages and Info file, message translation
+ files, some supplemental documentation, a number of example
+ loadable builtin commands, and a set of header files for developing
+ loadable builtins. You may need additional privileges to install
+ 'bash' to your desired destination, so 'sudo make install' might be
+ required. More information about controlling the locations where
+ 'bash' and other files are installed is below (*note Installation
+ Names::).
The 'configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a 'Makefile' in each directory of the package
-(the top directory, the 'builtins', 'doc', and 'support' directories,
-each directory under 'lib', and several others). It also creates a
-'config.h' file containing system-dependent definitions. Finally, it
-creates a shell script named 'config.status' that you can run in the
-future to recreate the current configuration, a file 'config.cache' that
-saves the results of its tests to speed up reconfiguring, and a file
-'config.log' containing compiler output (useful mainly for debugging
-'configure'). If at some point 'config.cache' contains results you
-don't want to keep, you may remove or edit it.
+(the top directory, the 'builtins', 'doc', 'po', and 'support'
+directories, each directory under 'lib', and several others). It also
+creates a 'config.h' file containing system-dependent definitions.
+Finally, it creates a shell script named 'config.status' that you can
+run in the future to recreate the current configuration, a file
+'config.cache' that saves the results of its tests to speed up
+reconfiguring, and a file 'config.log' containing compiler output
+(useful mainly for debugging 'configure'). If at some point
+'config.cache' contains results you don't want to keep, you may remove
+or edit it.
To find out more about the options and arguments that the 'configure'
script understands, type
@@ -9941,7 +10429,7 @@ considered for the next release.
The file 'configure.ac' is used to create 'configure' by a program
called Autoconf. You only need 'configure.ac' if you want to change it
or regenerate 'configure' using a newer version of Autoconf. If you do
-this, make sure you are using Autoconf version 2.50 or newer.
+this, make sure you are using Autoconf version 2.69 or newer.
You can remove the program binaries and object files from the source
code directory by typing 'make clean'. To also remove the files that
@@ -9984,7 +10472,7 @@ need to supply the '--srcdir=PATH' argument to tell 'configure' where
the source files are. 'configure' automatically checks for the source
code in the directory that 'configure' is in and in '..'.
- If you have to use a 'make' that does not supports the 'VPATH'
+ If you have to use a 'make' that does not support the 'VPATH'
variable, you can compile Bash for one architecture at a time in the
source code directory. After you have installed Bash for one
architecture, use 'make distclean' before reconfiguring for another
@@ -10009,10 +10497,13 @@ File: bash.info, Node: Installation Names, Next: Specifying the System Type,
=======================
By default, 'make install' will install into '/usr/local/bin',
-'/usr/local/man', etc. You can specify an installation prefix other
-than '/usr/local' by giving 'configure' the option '--prefix=PATH', or
-by specifying a value for the 'DESTDIR' 'make' variable when running
-'make install'.
+'/usr/local/man', etc.; that is, the "installation prefix" defaults to
+'/usr/local'. You can specify an installation prefix other than
+'/usr/local' by giving 'configure' the option '--prefix=PATH', or by
+specifying a value for the 'prefix' 'make' variable when running 'make
+install' (e.g., 'make install prefix=PATH'). The 'prefix' variable
+provides a default for 'exec_prefix' and other variables used when
+installing bash.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
@@ -10020,6 +10511,30 @@ give 'configure' the option '--exec-prefix=PATH', 'make install' will
use PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
+ If you would like to change the installation locations for a single
+run, you can specify these variables as arguments to 'make': 'make
+install exec_prefix=/' will install 'bash' and 'bashbug' into '/bin'
+instead of the default '/usr/local/bin'.
+
+ If you want to see the files bash will install and where it will
+install them without changing anything on your system, specify the
+variable 'DESTDIR' as an argument to 'make'. Its value should be the
+absolute directory path you'd like to use as the root of your sample
+installation tree. For example,
+
+ mkdir /fs1/bash-install
+ make install DESTDIR=/fs1/bash-install
+
+will install 'bash' into '/fs1/bash-install/usr/local/bin/bash', the
+documentation into directories within
+'/fs1/bash-install/usr/local/share', the example loadable builtins into
+'/fs1/bash-install/usr/local/lib/bash', and so on. You can use the
+usual 'exec_prefix' and 'prefix' variables to alter the directory paths
+beneath the value of 'DESTDIR'.
+
+ The GNU Makefile standards provide a more complete description of
+these variables and their effects.
+

File: bash.info, Node: Specifying the System Type, Next: Sharing Defaults, Prev: Installation Names, Up: Installing Bash
@@ -10027,7 +10542,7 @@ File: bash.info, Node: Specifying the System Type, Next: Sharing Defaults, Pr
===============================
There may be some features 'configure' can not figure out automatically,
-but need to determine by the type of host Bash will run on. Usually
+but needs to determine by the type of host Bash will run on. Usually
'configure' can figure that out, but if it prints a message saying it
can not guess the host type, give it the '--host=TYPE' option. 'TYPE'
can either be a short name for the system type, such as 'sun4', or a
@@ -10135,16 +10650,20 @@ the Bash 'configure' recognizes.
subdirectories of that directory (include files in PREFIX/'include'
and the library in PREFIX/'lib').
-'--with-purify'
- Define this to use the Purify memory allocation checker from
- Rational Software.
+'--with-libintl-prefix[=PREFIX]'
+ Define this to make Bash link with a locally-installed version of
+ the libintl library instead of the version in 'lib/intl'.
+
+'--with-libiconv-prefix[=PREFIX]'
+ Define this to make Bash look for libiconv in PREFIX instead of the
+ standard system locations. There is no version included with Bash.
'--enable-minimal-config'
This produces a shell with minimal features, close to the
historical Bourne shell.
- There are several '--enable-' options that alter how Bash is compiled
-and linked, rather than changing run-time features.
+ There are several '--enable-' options that alter how Bash is
+compiled, linked, and installed, rather than changing run-time features.
'--enable-largefile'
Enable support for large files
@@ -10157,6 +10676,10 @@ and linked, rather than changing run-time features.
This builds a Bash binary that produces profiling information to be
processed by 'gprof' each time it is executed.
+'--enable-separate-helpfiles'
+ Use external files for the documentation displayed by the 'help'
+ builtin instead of storing the text internally.
+
'--enable-static-link'
This causes Bash to be linked statically, if 'gcc' is being used.
This could be used to build a version to use as root's shell.
@@ -10165,14 +10688,21 @@ and linked, rather than changing run-time features.
following options, but it is processed first, so individual options may
be enabled using 'enable-FEATURE'.
- All of the following options except for 'disabled-builtins',
-'direxpand-default', and 'xpg-echo-default' are enabled by default,
-unless the operating system does not provide the necessary support.
+ All of the following options except for 'alt-array-implementation',
+'disabled-builtins', 'direxpand-default', 'strict-posix-default', and
+'xpg-echo-default' are enabled by default, unless the operating system
+does not provide the necessary support.
'--enable-alias'
Allow alias expansion and include the 'alias' and 'unalias'
builtins (*note Aliases::).
+'--enable-alt-array-implementation'
+ This builds bash using an alternate implementation of arrays (*note
+ Arrays::) that provides faster access at the expense of using more
+ memory (sometimes many times more, depending on how sparse an array
+ is).
+
'--enable-arith-for-command'
Include support for the alternate form of the 'for' command that
behaves like the C language 'for' statement (*note Looping
@@ -10192,7 +10722,7 @@ unless the operating system does not provide the necessary support.
'--enable-casemod-attributes'
Include support for case-modifying attributes in the 'declare'
- builtin and assignment statements. Variables with the UPPERCASE
+ builtin and assignment statements. Variables with the 'uppercase'
attribute, for example, will have their values converted to
uppercase upon assignment.
@@ -10251,7 +10781,7 @@ unless the operating system does not provide the necessary support.
described above under *note Pattern Matching::.
'--enable-extended-glob-default'
- Set the default value of the EXTGLOB shell option described above
+ Set the default value of the 'extglob' shell option described above
under *note The Shopt Builtin:: to be enabled.
'--enable-function-import'
@@ -10260,10 +10790,10 @@ unless the operating system does not provide the necessary support.
enabled by default.
'--enable-glob-asciirange-default'
- Set the default value of the GLOBASCIIRANGES shell option described
- above under *note The Shopt Builtin:: to be enabled. This controls
- the behavior of character ranges when used in pattern matching
- bracket expressions.
+ Set the default value of the 'globasciiranges' shell option
+ described above under *note The Shopt Builtin:: to be enabled.
+ This controls the behavior of character ranges when used in pattern
+ matching bracket expressions.
'--enable-help-builtin'
Include the 'help' builtin, which displays help on shell builtins
@@ -10314,10 +10844,6 @@ unless the operating system does not provide the necessary support.
Include the 'select' compound command, which allows the generation
of simple menus (*note Conditional Constructs::).
-'--enable-separate-helpfiles'
- Use external files for the documentation displayed by the 'help'
- builtin instead of storing the text internally.
-
'--enable-single-help-strings'
Store the text displayed by the 'help' builtin as a single string
for each help topic. This aids in translating the text to
@@ -10327,6 +10853,10 @@ unless the operating system does not provide the necessary support.
'--enable-strict-posix-default'
Make Bash POSIX-conformant by default (*note Bash POSIX Mode::).
+'--enable-translatable-strings'
+ Enable support for '$"STRING"' translatable strings (*note Locale
+ Translation::).
+
'--enable-usg-echo-default'
A synonym for '--enable-xpg-echo-default'.
@@ -10353,7 +10883,8 @@ Appendix A Reporting Bugs
Please report all bugs you find in Bash. But first, you should make
sure that it really is a bug, and that it appears in the latest version
of Bash. The latest version of Bash is always available for FTP from
-<ftp://ftp.gnu.org/pub/gnu/bash/>.
+<ftp://ftp.gnu.org/pub/gnu/bash/> and from
+<http://git.savannah.gnu.org/cgit/bash.git/snapshot/bash-master.tar.gz>.
Once you have determined that a bug actually exists, use the
'bashbug' command to submit a bug report. If you have a fix, you are
@@ -10479,15 +11010,15 @@ the baseline reference.
substring of 'var''s value of length LENGTH, beginning at OFFSET,
is present (*note Shell Parameter Expansion::).
- * The expansion '${var/[/]'PATTERN'[/'REPLACEMENT']}', which matches
- PATTERN and replaces it with REPLACEMENT in the value of 'var', is
+ * The expansion '${VAR/[/]'PATTERN'[/'REPLACEMENT']}', which matches
+ PATTERN and replaces it with REPLACEMENT in the value of VAR, is
available (*note Shell Parameter Expansion::).
* The expansion '${!PREFIX*}' expansion, which expands to the names
of all shell variables whose names begin with PREFIX, is available
(*note Shell Parameter Expansion::).
- * Bash has INDIRECT variable expansion using '${!word}' (*note Shell
+ * Bash has indirect variable expansion using '${!word}' (*note Shell
Parameter Expansion::).
* Bash can expand positional parameters beyond '$9' using '${NUM}'.
@@ -10513,8 +11044,8 @@ the baseline reference.
shell uses only '!'.
* Bash implements the full set of POSIX filename expansion operators,
- including CHARACTER CLASSES, EQUIVALENCE CLASSES, and COLLATING
- SYMBOLS (*note Filename Expansion::).
+ including character classes, equivalence classes, and collating
+ symbols (*note Filename Expansion::).
* Bash implements extended pattern matching features when the
'extglob' shell option is enabled (*note Pattern Matching::).
@@ -10631,7 +11162,7 @@ the baseline reference.
* Bash includes the 'caller' builtin, which displays the context of
any active subroutine call (a shell function or a script executed
- with the '.' or 'source' builtins). This supports the bash
+ with the '.' or 'source' builtins). This supports the Bash
debugger.
* The 'trap' builtin (*note Bourne Shell Builtins::) allows a 'DEBUG'
@@ -10653,7 +11184,7 @@ the baseline reference.
The 'trap' builtin (*note Bourne Shell Builtins::) allows a
'RETURN' pseudo-signal specification, similar to 'EXIT' and
- 'DEBUG'. Commands specified with an 'RETURN' trap are executed
+ 'DEBUG'. Commands specified with a 'RETURN' trap are executed
before execution resumes after a shell function or a shell script
executed with '.' or 'source' returns. The 'RETURN' trap is not
inherited by shell functions unless the function has been given the
@@ -11252,94 +11783,94 @@ D.1 Index of Shell Builtin Commands
* :: Bourne Shell Builtins.
(line 11)
* [: Bourne Shell Builtins.
- (line 270)
+ (line 275)
* alias: Bash Builtins. (line 11)
* bg: Job Control Builtins.
(line 7)
* bind: Bash Builtins. (line 21)
* break: Bourne Shell Builtins.
- (line 36)
-* builtin: Bash Builtins. (line 104)
-* caller: Bash Builtins. (line 113)
+ (line 37)
+* builtin: Bash Builtins. (line 108)
+* caller: Bash Builtins. (line 117)
* cd: Bourne Shell Builtins.
- (line 44)
-* command: Bash Builtins. (line 130)
+ (line 45)
+* command: Bash Builtins. (line 134)
* compgen: Programmable Completion Builtins.
(line 12)
* complete: Programmable Completion Builtins.
(line 30)
* compopt: Programmable Completion Builtins.
- (line 237)
+ (line 238)
* continue: Bourne Shell Builtins.
- (line 85)
-* declare: Bash Builtins. (line 150)
+ (line 90)
+* declare: Bash Builtins. (line 154)
* dirs: Directory Stack Builtins.
(line 7)
* disown: Job Control Builtins.
- (line 101)
-* echo: Bash Builtins. (line 253)
-* enable: Bash Builtins. (line 302)
+ (line 104)
+* echo: Bash Builtins. (line 257)
+* enable: Bash Builtins. (line 306)
* eval: Bourne Shell Builtins.
- (line 94)
+ (line 99)
* exec: Bourne Shell Builtins.
- (line 102)
+ (line 107)
* exit: Bourne Shell Builtins.
- (line 120)
+ (line 125)
* export: Bourne Shell Builtins.
- (line 127)
+ (line 132)
* fc: Bash History Builtins.
(line 10)
* fg: Job Control Builtins.
(line 17)
* getopts: Bourne Shell Builtins.
- (line 143)
+ (line 148)
* hash: Bourne Shell Builtins.
- (line 187)
-* help: Bash Builtins. (line 331)
+ (line 192)
+* help: Bash Builtins. (line 342)
* history: Bash History Builtins.
(line 46)
* jobs: Job Control Builtins.
(line 27)
* kill: Job Control Builtins.
(line 58)
-* let: Bash Builtins. (line 350)
-* local: Bash Builtins. (line 358)
-* logout: Bash Builtins. (line 374)
-* mapfile: Bash Builtins. (line 379)
+* let: Bash Builtins. (line 361)
+* local: Bash Builtins. (line 369)
+* logout: Bash Builtins. (line 385)
+* mapfile: Bash Builtins. (line 390)
* popd: Directory Stack Builtins.
(line 35)
-* printf: Bash Builtins. (line 425)
+* printf: Bash Builtins. (line 436)
* pushd: Directory Stack Builtins.
- (line 53)
+ (line 69)
* pwd: Bourne Shell Builtins.
- (line 207)
-* read: Bash Builtins. (line 474)
-* readarray: Bash Builtins. (line 570)
+ (line 212)
+* read: Bash Builtins. (line 488)
+* readarray: Bash Builtins. (line 585)
* readonly: Bourne Shell Builtins.
- (line 217)
+ (line 222)
* return: Bourne Shell Builtins.
- (line 236)
+ (line 241)
* set: The Set Builtin. (line 11)
* shift: Bourne Shell Builtins.
- (line 257)
+ (line 262)
* shopt: The Shopt Builtin. (line 9)
-* source: Bash Builtins. (line 579)
+* source: Bash Builtins. (line 594)
* suspend: Job Control Builtins.
- (line 113)
+ (line 116)
* test: Bourne Shell Builtins.
- (line 270)
+ (line 275)
* times: Bourne Shell Builtins.
- (line 349)
+ (line 360)
* trap: Bourne Shell Builtins.
- (line 355)
-* type: Bash Builtins. (line 584)
-* typeset: Bash Builtins. (line 616)
-* ulimit: Bash Builtins. (line 622)
+ (line 366)
+* type: Bash Builtins. (line 599)
+* typeset: Bash Builtins. (line 631)
+* ulimit: Bash Builtins. (line 637)
* umask: Bourne Shell Builtins.
- (line 404)
-* unalias: Bash Builtins. (line 728)
+ (line 415)
+* unalias: Bash Builtins. (line 743)
* unset: Bourne Shell Builtins.
- (line 422)
+ (line 433)
* wait: Job Control Builtins.
(line 76)
@@ -11354,9 +11885,9 @@ D.2 Index of Shell Reserved Words
* !: Pipelines. (line 9)
* [[: Conditional Constructs.
- (line 125)
+ (line 126)
* ]]: Conditional Constructs.
- (line 125)
+ (line 126)
* {: Command Grouping. (line 21)
* }: Command Grouping. (line 21)
* case: Conditional Constructs.
@@ -11378,7 +11909,7 @@ D.2 Index of Shell Reserved Words
* in: Conditional Constructs.
(line 28)
* select: Conditional Constructs.
- (line 83)
+ (line 84)
* then: Conditional Constructs.
(line 7)
* time: Pipelines. (line 9)
@@ -11394,24 +11925,28 @@ D.3 Parameter and Variable Index
* Menu:
-* !: Special Parameters. (line 56)
+* !: Special Parameters. (line 55)
* #: Special Parameters. (line 39)
* $: Special Parameters. (line 51)
-* $!: Special Parameters. (line 57)
+* $!: Special Parameters. (line 56)
* $#: Special Parameters. (line 40)
* $$: Special Parameters. (line 52)
* $*: Special Parameters. (line 10)
* $-: Special Parameters. (line 47)
-* $0: Special Parameters. (line 62)
+* $0: Special Parameters. (line 61)
* $?: Special Parameters. (line 43)
* $@: Special Parameters. (line 23)
* $_: Bash Variables. (line 14)
* *: Special Parameters. (line 9)
* -: Special Parameters. (line 46)
-* 0: Special Parameters. (line 61)
+* 0: Special Parameters. (line 60)
* ?: Special Parameters. (line 42)
* @: Special Parameters. (line 22)
* _: Bash Variables. (line 13)
+* active-region-end-color: Readline Init File Syntax.
+ (line 51)
+* active-region-start-color: Readline Init File Syntax.
+ (line 38)
* auto_resume: Job Control Variables.
(line 6)
* BASH: Bash Variables. (line 23)
@@ -11435,31 +11970,31 @@ D.3 Parameter and Variable Index
* BASH_VERSION: Bash Variables. (line 181)
* BASH_XTRACEFD: Bash Variables. (line 184)
* bell-style: Readline Init File Syntax.
- (line 38)
+ (line 64)
* bind-tty-special-chars: Readline Init File Syntax.
- (line 45)
+ (line 71)
* blink-matching-paren: Readline Init File Syntax.
- (line 50)
+ (line 76)
* CDPATH: Bourne Shell Variables.
(line 9)
* CHILD_MAX: Bash Variables. (line 195)
* colored-completion-prefix: Readline Init File Syntax.
- (line 55)
+ (line 81)
* colored-stats: Readline Init File Syntax.
- (line 62)
+ (line 91)
* COLUMNS: Bash Variables. (line 202)
* comment-begin: Readline Init File Syntax.
- (line 68)
+ (line 97)
* completion-display-width: Readline Init File Syntax.
- (line 73)
+ (line 102)
* completion-ignore-case: Readline Init File Syntax.
- (line 80)
+ (line 109)
* completion-map-case: Readline Init File Syntax.
- (line 85)
+ (line 114)
* completion-prefix-display-length: Readline Init File Syntax.
- (line 91)
+ (line 120)
* completion-query-items: Readline Init File Syntax.
- (line 98)
+ (line 127)
* COMPREPLY: Bash Variables. (line 254)
* COMP_CWORD: Bash Variables. (line 208)
* COMP_KEY: Bash Variables. (line 237)
@@ -11469,29 +12004,31 @@ D.3 Parameter and Variable Index
* COMP_WORDBREAKS: Bash Variables. (line 241)
* COMP_WORDS: Bash Variables. (line 247)
* convert-meta: Readline Init File Syntax.
- (line 108)
+ (line 138)
* COPROC: Bash Variables. (line 260)
* DIRSTACK: Bash Variables. (line 264)
* disable-completion: Readline Init File Syntax.
- (line 116)
+ (line 148)
* echo-control-characters: Readline Init File Syntax.
- (line 121)
+ (line 153)
* editing-mode: Readline Init File Syntax.
- (line 126)
+ (line 158)
* EMACS: Bash Variables. (line 274)
* emacs-mode-string: Readline Init File Syntax.
- (line 132)
+ (line 164)
+* enable-active-region: Readline Init File Syntax.
+ (line 174)
* enable-bracketed-paste: Readline Init File Syntax.
- (line 142)
+ (line 187)
* enable-keypad: Readline Init File Syntax.
- (line 150)
+ (line 196)
* ENV: Bash Variables. (line 279)
* EPOCHREALTIME: Bash Variables. (line 284)
* EPOCHSECONDS: Bash Variables. (line 292)
* EUID: Bash Variables. (line 299)
* EXECIGNORE: Bash Variables. (line 303)
* expand-tilde: Readline Init File Syntax.
- (line 161)
+ (line 207)
* FCEDIT: Bash Variables. (line 316)
* FIGNORE: Bash Variables. (line 320)
* FUNCNAME: Bash Variables. (line 326)
@@ -11505,15 +12042,15 @@ D.3 Parameter and Variable Index
* HISTFILESIZE: Bash Variables. (line 402)
* HISTIGNORE: Bash Variables. (line 413)
* history-preserve-point: Readline Init File Syntax.
- (line 165)
+ (line 211)
* history-size: Readline Init File Syntax.
- (line 171)
+ (line 217)
* HISTSIZE: Bash Variables. (line 433)
* HISTTIMEFORMAT: Bash Variables. (line 440)
* HOME: Bourne Shell Variables.
(line 13)
* horizontal-scroll-mode: Readline Init File Syntax.
- (line 180)
+ (line 226)
* HOSTFILE: Bash Variables. (line 448)
* HOSTNAME: Bash Variables. (line 459)
* HOSTTYPE: Bash Variables. (line 462)
@@ -11521,18 +12058,21 @@ D.3 Parameter and Variable Index
(line 18)
* IGNOREEOF: Bash Variables. (line 465)
* input-meta: Readline Init File Syntax.
- (line 189)
+ (line 235)
* INPUTRC: Bash Variables. (line 475)
* INSIDE_EMACS: Bash Variables. (line 479)
* isearch-terminators: Readline Init File Syntax.
- (line 197)
+ (line 245)
* keymap: Readline Init File Syntax.
- (line 204)
-* LANG: Bash Variables. (line 485)
+ (line 252)
+* LANG: Creating Internationalized Scripts.
+ (line 51)
+* LANG <1>: Bash Variables. (line 485)
* LC_ALL: Bash Variables. (line 489)
* LC_COLLATE: Bash Variables. (line 493)
* LC_CTYPE: Bash Variables. (line 500)
-* LC_MESSAGES: Locale Translation. (line 15)
+* LC_MESSAGES: Creating Internationalized Scripts.
+ (line 51)
* LC_MESSAGES <1>: Bash Variables. (line 505)
* LC_NUMERIC: Bash Variables. (line 509)
* LC_TIME: Bash Variables. (line 513)
@@ -11546,15 +12086,15 @@ D.3 Parameter and Variable Index
(line 27)
* MAPFILE: Bash Variables. (line 540)
* mark-modified-lines: Readline Init File Syntax.
- (line 234)
+ (line 282)
* mark-symlinked-directories: Readline Init File Syntax.
- (line 239)
+ (line 287)
* match-hidden-files: Readline Init File Syntax.
- (line 244)
+ (line 292)
* menu-complete-display-prefix: Readline Init File Syntax.
- (line 251)
+ (line 299)
* meta-flag: Readline Init File Syntax.
- (line 189)
+ (line 235)
* OLDPWD: Bash Variables. (line 544)
* OPTARG: Bourne Shell Variables.
(line 34)
@@ -11563,9 +12103,9 @@ D.3 Parameter and Variable Index
(line 38)
* OSTYPE: Bash Variables. (line 551)
* output-meta: Readline Init File Syntax.
- (line 256)
+ (line 304)
* page-completions: Readline Init File Syntax.
- (line 262)
+ (line 312)
* PATH: Bourne Shell Variables.
(line 42)
* PIPESTATUS: Bash Variables. (line 554)
@@ -11582,37 +12122,40 @@ D.3 Parameter and Variable Index
* PS4: Bash Variables. (line 595)
* PWD: Bash Variables. (line 603)
* RANDOM: Bash Variables. (line 606)
-* READLINE_LINE: Bash Variables. (line 612)
-* READLINE_MARK: Bash Variables. (line 616)
-* READLINE_POINT: Bash Variables. (line 622)
-* REPLY: Bash Variables. (line 626)
+* READLINE_ARGUMENT: Bash Variables. (line 612)
+* READLINE_LINE: Bash Variables. (line 616)
+* READLINE_MARK: Bash Variables. (line 620)
+* READLINE_POINT: Bash Variables. (line 626)
+* REPLY: Bash Variables. (line 630)
* revert-all-at-newline: Readline Init File Syntax.
- (line 272)
-* SECONDS: Bash Variables. (line 629)
-* SHELL: Bash Variables. (line 638)
-* SHELLOPTS: Bash Variables. (line 643)
-* SHLVL: Bash Variables. (line 652)
+ (line 322)
+* SECONDS: Bash Variables. (line 633)
+* SHELL: Bash Variables. (line 642)
+* SHELLOPTS: Bash Variables. (line 647)
+* SHLVL: Bash Variables. (line 656)
* show-all-if-ambiguous: Readline Init File Syntax.
- (line 278)
+ (line 329)
* show-all-if-unmodified: Readline Init File Syntax.
- (line 284)
+ (line 335)
* show-mode-in-prompt: Readline Init File Syntax.
- (line 293)
+ (line 344)
* skip-completed-text: Readline Init File Syntax.
- (line 299)
-* SRANDOM: Bash Variables. (line 657)
-* TEXTDOMAIN: Locale Translation. (line 15)
-* TEXTDOMAINDIR: Locale Translation. (line 15)
-* TIMEFORMAT: Bash Variables. (line 666)
-* TMOUT: Bash Variables. (line 704)
-* TMPDIR: Bash Variables. (line 716)
-* UID: Bash Variables. (line 720)
+ (line 350)
+* SRANDOM: Bash Variables. (line 661)
+* TEXTDOMAIN: Creating Internationalized Scripts.
+ (line 51)
+* TEXTDOMAINDIR: Creating Internationalized Scripts.
+ (line 51)
+* TIMEFORMAT: Bash Variables. (line 670)
+* TMOUT: Bash Variables. (line 708)
+* TMPDIR: Bash Variables. (line 720)
+* UID: Bash Variables. (line 724)
* vi-cmd-mode-string: Readline Init File Syntax.
- (line 312)
+ (line 363)
* vi-ins-mode-string: Readline Init File Syntax.
- (line 323)
+ (line 374)
* visible-stats: Readline Init File Syntax.
- (line 334)
+ (line 385)

File: bash.info, Node: Function Index, Next: Concept Index, Prev: Variable Index, Up: Indexes
@@ -11628,7 +12171,7 @@ D.4 Function Index
* accept-line (Newline or Return): Commands For History.
(line 6)
* alias-expand-line (): Miscellaneous Commands.
- (line 125)
+ (line 131)
* backward-char (C-b): Commands For Moving. (line 15)
* backward-delete-char (Rubout): Commands For Text. (line 17)
* backward-kill-line (C-x Rubout): Commands For Killing.
@@ -11677,7 +12220,7 @@ D.4 Function Index
(line 57)
* digit-argument (M-0, M-1, ... M--): Numeric Arguments. (line 6)
* display-shell-version (C-x C-v): Miscellaneous Commands.
- (line 110)
+ (line 116)
* do-lowercase-version (M-A, M-B, M-X, ...): Miscellaneous Commands.
(line 14)
* downcase-word (M-l): Commands For Text. (line 62)
@@ -11690,7 +12233,7 @@ D.4 Function Index
* dynamic-complete-history (M-<TAB>): Commands For Completion.
(line 90)
* edit-and-execute-command (C-x C-e): Miscellaneous Commands.
- (line 134)
+ (line 140)
* end-kbd-macro (C-x )): Keyboard Macros. (line 9)
* end-of-file (usually C-d): Commands For Text. (line 6)
* end-of-history (M->): Commands For History.
@@ -11698,21 +12241,23 @@ D.4 Function Index
* end-of-line (C-e): Commands For Moving. (line 9)
* exchange-point-and-mark (C-x C-x): Miscellaneous Commands.
(line 37)
+* fetch-history (): Commands For History.
+ (line 103)
* forward-backward-delete-char (): Commands For Text. (line 21)
* forward-char (C-f): Commands For Moving. (line 12)
* forward-search-history (C-s): Commands For History.
(line 33)
* forward-word (M-f): Commands For Moving. (line 18)
* glob-complete-word (M-g): Miscellaneous Commands.
- (line 92)
-* glob-expand-word (C-x *): Miscellaneous Commands.
(line 98)
-* glob-list-expansions (C-x g): Miscellaneous Commands.
+* glob-expand-word (C-x *): Miscellaneous Commands.
(line 104)
+* glob-list-expansions (C-x g): Miscellaneous Commands.
+ (line 110)
* history-and-alias-expand-line (): Miscellaneous Commands.
- (line 128)
+ (line 134)
* history-expand-line (M-^): Miscellaneous Commands.
- (line 118)
+ (line 124)
* history-search-backward (): Commands For History.
(line 57)
* history-search-forward (): Commands For History.
@@ -11726,7 +12271,7 @@ D.4 Function Index
* insert-completions (M-*): Commands For Completion.
(line 22)
* insert-last-argument (M-. or M-_): Miscellaneous Commands.
- (line 131)
+ (line 137)
* kill-line (C-k): Commands For Killing.
(line 6)
* kill-region (): Commands For Killing.
@@ -11736,7 +12281,7 @@ D.4 Function Index
* kill-word (M-d): Commands For Killing.
(line 23)
* magic-space (): Miscellaneous Commands.
- (line 121)
+ (line 127)
* menu-complete (): Commands For Completion.
(line 26)
* menu-complete-backward (): Commands For Completion.
@@ -11784,7 +12329,7 @@ D.4 Function Index
(line 37)
* shell-backward-word (M-C-b): Commands For Moving. (line 30)
* shell-expand-line (M-C-e): Miscellaneous Commands.
- (line 113)
+ (line 119)
* shell-forward-word (M-C-f): Commands For Moving. (line 26)
* shell-kill-word (M-C-d): Commands For Killing.
(line 32)
@@ -11792,6 +12337,8 @@ D.4 Function Index
(line 41)
* skip-csi-sequence (): Miscellaneous Commands.
(line 52)
+* spell-correct-word (C-x s): Miscellaneous Commands.
+ (line 92)
* start-kbd-macro (C-x (): Keyboard Macros. (line 6)
* tilde-expand (M-&): Miscellaneous Commands.
(line 30)
@@ -11913,6 +12460,8 @@ D.5 Concept Index
* interactive shell: Invoking Bash. (line 131)
* interactive shell <1>: Interactive Shells. (line 6)
* internationalization: Locale Translation. (line 6)
+* internationalized scripts: Creating Internationalized Scripts.
+ (line 3)
* job: Definitions. (line 38)
* job control: Definitions. (line 42)
* job control <1>: Job Control Basics. (line 6)
@@ -11968,6 +12517,8 @@ D.5 Concept Index
* special builtin: Definitions. (line 82)
* special builtin <1>: Special Builtins. (line 6)
* startup files: Bash Startup Files. (line 6)
+* string translations: Creating Internationalized Scripts.
+ (line 3)
* suspending jobs: Job Control Basics. (line 6)
* tilde expansion: Tilde Expansion. (line 6)
* token: Definitions. (line 86)
@@ -11983,137 +12534,138 @@ D.5 Concept Index

Tag Table:
-Node: Top895
-Node: Introduction2813
-Node: What is Bash?3029
-Node: What is a shell?4143
-Node: Definitions6681
-Node: Basic Shell Features9632
-Node: Shell Syntax10851
-Node: Shell Operation11877
-Node: Quoting13170
-Node: Escape Character14470
-Node: Single Quotes14955
-Node: Double Quotes15303
-Node: ANSI-C Quoting16581
-Node: Locale Translation17840
-Node: Comments18993
-Node: Shell Commands19611
-Node: Reserved Words20549
-Node: Simple Commands21305
-Node: Pipelines21959
-Node: Lists24891
-Node: Compound Commands26682
-Node: Looping Constructs27694
-Node: Conditional Constructs30189
-Node: Command Grouping41760
-Node: Coprocesses43239
-Node: GNU Parallel45142
-Node: Shell Functions49443
-Node: Shell Parameters56650
-Node: Positional Parameters61063
-Node: Special Parameters61963
-Node: Shell Expansions65187
-Node: Brace Expansion67310
-Node: Tilde Expansion70033
-Node: Shell Parameter Expansion72650
-Node: Command Substitution87779
-Node: Arithmetic Expansion89134
-Node: Process Substitution90066
-Node: Word Splitting91186
-Node: Filename Expansion93130
-Node: Pattern Matching95679
-Node: Quote Removal99665
-Node: Redirections99960
-Node: Executing Commands109530
-Node: Simple Command Expansion110200
-Node: Command Search and Execution112154
-Node: Command Execution Environment114530
-Node: Environment117514
-Node: Exit Status119173
-Node: Signals120843
-Node: Shell Scripts122810
-Node: Shell Builtin Commands125822
-Node: Bourne Shell Builtins127860
-Node: Bash Builtins148789
-Node: Modifying Shell Behavior178898
-Node: The Set Builtin179243
-Node: The Shopt Builtin189656
-Node: Special Builtins204566
-Node: Shell Variables205545
-Node: Bourne Shell Variables205982
-Node: Bash Variables208086
-Node: Bash Features240720
-Node: Invoking Bash241733
-Node: Bash Startup Files247746
-Node: Interactive Shells252849
-Node: What is an Interactive Shell?253259
-Node: Is this Shell Interactive?253908
-Node: Interactive Shell Behavior254723
-Node: Bash Conditional Expressions258237
-Node: Shell Arithmetic262814
-Node: Aliases265754
-Node: Arrays268374
-Node: The Directory Stack274383
-Node: Directory Stack Builtins275167
-Node: Controlling the Prompt278135
-Node: The Restricted Shell281085
-Node: Bash POSIX Mode283679
-Node: Shell Compatibility Mode294715
-Node: Job Control301371
-Node: Job Control Basics301831
-Node: Job Control Builtins306827
-Node: Job Control Variables312227
-Node: Command Line Editing313383
-Node: Introduction and Notation315054
-Node: Readline Interaction316677
-Node: Readline Bare Essentials317868
-Node: Readline Movement Commands319651
-Node: Readline Killing Commands320611
-Node: Readline Arguments322529
-Node: Searching323573
-Node: Readline Init File325759
-Node: Readline Init File Syntax327018
-Node: Conditional Init Constructs347556
-Node: Sample Init File351752
-Node: Bindable Readline Commands354876
-Node: Commands For Moving356080
-Node: Commands For History358131
-Node: Commands For Text362924
-Node: Commands For Killing366573
-Node: Numeric Arguments369606
-Node: Commands For Completion370745
-Node: Keyboard Macros374936
-Node: Miscellaneous Commands375623
-Node: Readline vi Mode381307
-Node: Programmable Completion382214
-Node: Programmable Completion Builtins389994
-Node: A Programmable Completion Example400689
-Node: Using History Interactively405936
-Node: Bash History Facilities406620
-Node: Bash History Builtins409625
-Node: History Interaction414354
-Node: Event Designators417974
-Node: Word Designators419328
-Node: Modifiers421088
-Node: Installing Bash422899
-Node: Basic Installation424036
-Node: Compilers and Options427294
-Node: Compiling For Multiple Architectures428035
-Node: Installation Names429728
-Node: Specifying the System Type430546
-Node: Sharing Defaults431262
-Node: Operation Controls431935
-Node: Optional Features432893
-Node: Reporting Bugs443411
-Node: Major Differences From The Bourne Shell444605
-Node: GNU Free Documentation License461457
-Node: Indexes486634
-Node: Builtin Index487088
-Node: Reserved Word Index493915
-Node: Variable Index496363
-Node: Function Index512260
-Node: Concept Index525770
+Node: Top896
+Node: Introduction2815
+Node: What is Bash?3028
+Node: What is a shell?4139
+Node: Definitions6674
+Node: Basic Shell Features9622
+Node: Shell Syntax10838
+Node: Shell Operation11861
+Node: Quoting13151
+Node: Escape Character14452
+Node: Single Quotes14934
+Node: Double Quotes15279
+Node: ANSI-C Quoting16554
+Node: Locale Translation17861
+Node: Creating Internationalized Scripts19169
+Node: Comments23283
+Node: Shell Commands23898
+Node: Reserved Words24833
+Node: Simple Commands25586
+Node: Pipelines26237
+Node: Lists29233
+Node: Compound Commands31025
+Node: Looping Constructs32034
+Node: Conditional Constructs34526
+Node: Command Grouping49011
+Node: Coprocesses50486
+Node: GNU Parallel53146
+Node: Shell Functions54060
+Node: Shell Parameters61942
+Node: Positional Parameters66327
+Node: Special Parameters67226
+Node: Shell Expansions70437
+Node: Brace Expansion72561
+Node: Tilde Expansion75292
+Node: Shell Parameter Expansion77910
+Node: Command Substitution96258
+Node: Arithmetic Expansion97610
+Node: Process Substitution98575
+Node: Word Splitting99692
+Node: Filename Expansion101633
+Node: Pattern Matching104379
+Node: Quote Removal109378
+Node: Redirections109670
+Node: Executing Commands119327
+Node: Simple Command Expansion119994
+Node: Command Search and Execution122101
+Node: Command Execution Environment124476
+Node: Environment127508
+Node: Exit Status129168
+Node: Signals130949
+Node: Shell Scripts134395
+Node: Shell Builtin Commands137419
+Node: Bourne Shell Builtins139454
+Node: Bash Builtins160917
+Node: Modifying Shell Behavior191770
+Node: The Set Builtin192112
+Node: The Shopt Builtin202710
+Node: Special Builtins218619
+Node: Shell Variables219595
+Node: Bourne Shell Variables220029
+Node: Bash Variables222130
+Node: Bash Features254942
+Node: Invoking Bash255952
+Node: Bash Startup Files261962
+Node: Interactive Shells267090
+Node: What is an Interactive Shell?267498
+Node: Is this Shell Interactive?268144
+Node: Interactive Shell Behavior268956
+Node: Bash Conditional Expressions272582
+Node: Shell Arithmetic277221
+Node: Aliases280162
+Node: Arrays282772
+Node: The Directory Stack289160
+Node: Directory Stack Builtins289941
+Node: Controlling the Prompt294198
+Node: The Restricted Shell297160
+Node: Bash POSIX Mode299767
+Node: Shell Compatibility Mode311682
+Node: Job Control320246
+Node: Job Control Basics320703
+Node: Job Control Builtins325702
+Node: Job Control Variables331494
+Node: Command Line Editing332647
+Node: Introduction and Notation334315
+Node: Readline Interaction335935
+Node: Readline Bare Essentials337123
+Node: Readline Movement Commands338909
+Node: Readline Killing Commands339866
+Node: Readline Arguments341784
+Node: Searching342825
+Node: Readline Init File345008
+Node: Readline Init File Syntax346266
+Node: Conditional Init Constructs369849
+Node: Sample Init File374042
+Node: Bindable Readline Commands377163
+Node: Commands For Moving378364
+Node: Commands For History380412
+Node: Commands For Text385403
+Node: Commands For Killing389049
+Node: Numeric Arguments392079
+Node: Commands For Completion393215
+Node: Keyboard Macros397403
+Node: Miscellaneous Commands398088
+Node: Readline vi Mode404030
+Node: Programmable Completion404934
+Node: Programmable Completion Builtins412711
+Node: A Programmable Completion Example423460
+Node: Using History Interactively428705
+Node: Bash History Facilities429386
+Node: Bash History Builtins432388
+Node: History Interaction437409
+Node: Event Designators441026
+Node: Word Designators442377
+Node: Modifiers444134
+Node: Installing Bash445939
+Node: Basic Installation447073
+Node: Compilers and Options450792
+Node: Compiling For Multiple Architectures451530
+Node: Installation Names453219
+Node: Specifying the System Type455325
+Node: Sharing Defaults456039
+Node: Operation Controls456709
+Node: Optional Features457664
+Node: Reporting Bugs468880
+Node: Major Differences From The Bourne Shell470152
+Node: GNU Free Documentation License486998
+Node: Indexes512172
+Node: Builtin Index512623
+Node: Reserved Word Index519447
+Node: Variable Index521892
+Node: Function Index538663
+Node: Concept Index552444

End Tag Table