R\bRE\bES\bSE\bER\bRV\bVE\bED\bD W\bWO\bOR\bRD\bDS\bS
_\bR_\be_\bs_\be_\br_\bv_\be_\bd _\bw_\bo_\br_\bd_\bs are words that have a special meaning to the shell. The
- following words are recognized as reserved when unquoted and either the
- first word of a command (see S\bSH\bHE\bEL\bLL\bL G\bGR\bRA\bAM\bMM\bMA\bAR\bR below), the third word of a
- c\bca\bas\bse\be or s\bse\bel\ble\bec\bct\bt command (only i\bin\bn is valid), or the third word of a f\bfo\bor\br
- command (only i\bin\bn and d\bdo\bo are valid):
+ following words are recognized as reserved when unquoted and either
+
+ +\bo the first word of a command (see S\bSH\bHE\bEL\bLL\bL G\bGR\bRA\bAM\bMM\bMA\bAR\bR below);
+
+ +\bo the first word following a reserved word other than c\bca\bas\bse\be, f\bfo\bor\br,
+ s\bse\bel\ble\bec\bct\bt, or i\bin\bn;
+
+ +\bo the third word of a c\bca\bas\bse\be command (only i\bin\bn is valid);
+
+ +\bo the third word of a f\bfo\bor\br or s\bse\bel\ble\bec\bct\bt command (only i\bin\bn and d\bdo\bo are
+ valid);
+
+ +\bo following a control operator.
+
+ The shell will also recognize reserved words where the syntax of a com-
+ mand specifically requires the reserved word as the only correct token.
+
+ The following are reserved words:
!\b! c\bca\bas\bse\be c\bco\bop\bpr\bro\boc\bc d\bdo\bo d\bdo\bon\bne\be e\bel\bli\bif\bf e\bel\bls\bse\be e\bes\bsa\bac\bc f\bfi\bi f\bfo\bor\br f\bfu\bun\bnc\bct\bti\bio\bon\bn i\bif\bf i\bin\bn s\bse\bel\ble\bec\bct\bt
t\bth\bhe\ben\bn u\bun\bnt\bti\bil\bl w\bwh\bhi\bil\ble\be {\b{ }\b} t\bti\bim\bme\be [\b[[\b[ ]\b]]\b]
the last element of a pipeline may be run by the shell process.
L\bLi\bis\bst\bts\bs
- A _\bl_\bi_\bs_\bt is a sequence of one or more pipelines separated by one of the
- operators ;\b;, &\b&, &\b&&\b&, or |\b||\b|, and optionally terminated by one of ;\b;, &\b&, or
- <\b<n\bne\bew\bwl\bli\bin\bne\be>\b>.
-
- Of these list operators, &\b&&\b& and |\b||\b| have equal precedence, followed by ;\b;
- and &\b&, which have equal precedence.
-
- A sequence of one or more newlines may appear in a _\bl_\bi_\bs_\bt instead of a
- semicolon to delimit commands.
-
- If a command is terminated by the control operator &\b&, the shell exe-
- cutes the command in the _\bb_\ba_\bc_\bk_\bg_\br_\bo_\bu_\bn_\bd in a subshell. The shell does not
- wait for the command to finish, and the return status is 0. These are
- referred to as _\ba_\bs_\by_\bn_\bc_\bh_\br_\bo_\bn_\bo_\bu_\bs commands. Commands separated by a ;\b; are
- executed sequentially; the shell waits for each command to terminate in
- turn. The return status is the exit status of the last command exe-
- cuted.
+ A _\bl_\bi_\bs_\bt is a sequence of one or more AND or OR lists separated by one of
+ the operators ;\b;, &\b&, or <\b<n\bne\bew\bwl\bli\bin\bne\be>\b>, and optionally terminated by one of
+ those three characters.
AND and OR lists are sequences of one or more pipelines separated by
the &\b&&\b& and |\b||\b| control operators, respectively. AND and OR lists are
- executed with left associativity. An AND list has the form
+ executed with left associativity.
+
+ An AND list has the form
_\bc_\bo_\bm_\bm_\ba_\bn_\bd_\b1 &\b&&\b& _\bc_\bo_\bm_\bm_\ba_\bn_\bd_\b2
status. The return status of AND and OR lists is the exit status of
the last command executed in the list.
+ Of these list operators, &\b&&\b& and |\b||\b| have equal precedence, followed by ;\b;
+ and &\b&, which have equal precedence.
+
+ A sequence of one or more newlines may appear in a _\bl_\bi_\bs_\bt instead of a
+ semicolon to delimit commands.
+
+ If a command is terminated by the control operator &\b&, the shell exe-
+ cutes the command in the _\bb_\ba_\bc_\bk_\bg_\br_\bo_\bu_\bn_\bd in a subshell. The shell does not
+ wait for the command to finish, and the return status is 0. These are
+ referred to as _\ba_\bs_\by_\bn_\bc_\bh_\br_\bo_\bn_\bo_\bu_\bs commands. Commands separated or terminated
+ by ;\b; (or an equivalent <\b<n\bne\bew\bwl\bli\bin\bne\be>\b>) are executed sequentially; the shell
+ waits for each command to terminate in turn.
+
+ The return status of a list is the exit status of the last command exe-
+ cuted.
+
C\bCo\bom\bmp\bpo\bou\bun\bnd\bd C\bCo\bom\bmm\bma\ban\bnd\bds\bs
- A _\bc_\bo_\bm_\bp_\bo_\bu_\bn_\bd _\bc_\bo_\bm_\bm_\ba_\bn_\bd is one of the following. In most cases a _\bl_\bi_\bs_\bt in a
- command's description may be separated from the rest of the command by
- one or more newlines, and may be followed by a newline in place of a
+ A _\bc_\bo_\bm_\bp_\bo_\bu_\bn_\bd _\bc_\bo_\bm_\bm_\ba_\bn_\bd is one of the following. In most cases a _\bl_\bi_\bs_\bt in a
+ command's description may be separated from the rest of the command by
+ one or more newlines, and may be followed by a newline in place of a
semicolon.
- (_\bl_\bi_\bs_\bt) _\bl_\bi_\bs_\bt is executed in a subshell (see C\bCO\bOM\bMM\bMA\bAN\bND\bD E\bEX\bXE\bEC\bCU\bUT\bTI\bIO\bON\bN E\bEN\bNV\bVI\bIR\bRO\bON\bN-\b-
- M\bME\bEN\bNT\bT below for a description of a subshell environment). Vari-
- able assignments and builtin commands that affect the shell's
+ (_\bl_\bi_\bs_\bt) _\bl_\bi_\bs_\bt is executed in a subshell (see C\bCO\bOM\bMM\bMA\bAN\bND\bD E\bEX\bXE\bEC\bCU\bUT\bTI\bIO\bON\bN E\bEN\bNV\bVI\bIR\bRO\bON\bN-\b-
+ M\bME\bEN\bNT\bT below for a description of a subshell environment). Vari-
+ able assignments and builtin commands that affect the shell's
environment do not remain in effect after the command completes.
The return status is the exit status of _\bl_\bi_\bs_\bt.
{ _\bl_\bi_\bs_\bt; }
_\bl_\bi_\bs_\bt is executed in the current shell environment. _\bl_\bi_\bs_\bt must be
- terminated with a newline or semicolon. This is known as a
+ terminated with a newline or semicolon. This is known as a
_\bg_\br_\bo_\bu_\bp _\bc_\bo_\bm_\bm_\ba_\bn_\bd. The return status is the exit status of _\bl_\bi_\bs_\bt.
- Note that unlike the metacharacters (\b( and )\b), {\b{ and }\b} are _\br_\be_\b-
- _\bs_\be_\br_\bv_\be_\bd _\bw_\bo_\br_\bd_\bs and must occur where a reserved word is permitted
- to be recognized. Since they do not cause a word break, they
- must be separated from _\bl_\bi_\bs_\bt by whitespace or another shell
+ Note that unlike the metacharacters (\b( and )\b), {\b{ and }\b} are _\br_\be_\b-
+ _\bs_\be_\br_\bv_\be_\bd _\bw_\bo_\br_\bd_\bs and must occur where a reserved word is permitted
+ to be recognized. Since they do not cause a word break, they
+ must be separated from _\bl_\bi_\bs_\bt by whitespace or another shell
metacharacter.
((_\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn))
- The arithmetic _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn is evaluated according to the rules
- described below under A\bAR\bRI\bIT\bTH\bHM\bME\bET\bTI\bIC\bC E\bEV\bVA\bAL\bLU\bUA\bAT\bTI\bIO\bON\bN. If the value of
- the expression is non-zero, the return status is 0; otherwise
- the return status is 1. The _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn undergoes the same ex-
- pansions as if it were within double quotes, but unescaped dou-
+ The arithmetic _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn is evaluated according to the rules
+ described below under A\bAR\bRI\bIT\bTH\bHM\bME\bET\bTI\bIC\bC E\bEV\bVA\bAL\bLU\bUA\bAT\bTI\bIO\bON\bN. If the value of
+ the expression is non-zero, the return status is 0; otherwise
+ the return status is 1. The _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn undergoes the same ex-
+ pansions as if it were within double quotes, but unescaped dou-
ble quote characters in _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn are not treated specially and
are removed. Since this can potentially result in empty
- strings, this command treats those as expressions that evaluate
+ strings, this command treats those as expressions that evaluate
to 0.
[\b[[\b[ _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn ]\b]]\b]
Evaluate the conditional expression _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn and return a sta-
- tus of zero (true) or non-zero (false). Expressions are com-
+ tus of zero (true) or non-zero (false). Expressions are com-
posed of the primaries described below under C\bCO\bON\bND\bDI\bIT\bTI\bIO\bON\bNA\bAL\bL E\bEX\bXP\bPR\bRE\bES\bS-\b-
- S\bSI\bIO\bON\bNS\bS. The words between the [\b[[\b[ and ]\b]]\b] do not undergo word
- splitting and pathname expansion. The shell performs tilde ex-
+ S\bSI\bIO\bON\bNS\bS. The words between the [\b[[\b[ and ]\b]]\b] do not undergo word
+ splitting and pathname expansion. The shell performs tilde ex-
pansion, parameter and variable expansion, arithmetic expansion,
command substitution, process substitution, and quote removal on
- those words. Conditional operators such as -\b-f\bf must be unquoted
+ those words. Conditional operators such as -\b-f\bf must be unquoted
to be recognized as primaries.
- When used with [\b[[\b[, the <\b< and >\b> operators sort lexicographically
+ When used with [\b[[\b[, the <\b< and >\b> operators sort lexicographically
using the current locale.
- When the =\b==\b= and !\b!=\b= operators are used, the string to the right
+ When the =\b==\b= and !\b!=\b= operators are used, the string to the right
of the operator is considered a pattern and matched according to
the rules described below under P\bPa\bat\btt\bte\ber\brn\bn M\bMa\bat\btc\bch\bhi\bin\bng\bg, as if the e\bex\bxt\bt-\b-
g\bgl\blo\bob\bb shell option were enabled. The =\b= operator is equivalent to
- =\b==\b=. If the n\bno\boc\bca\bas\bse\bem\bma\bat\btc\bch\bh shell option is enabled, the match is
- performed without regard to the case of alphabetic characters.
- The return value is 0 if the string matches (=\b==\b=) or does not
- match (!\b!=\b=) the pattern, and 1 otherwise. If any part of the
- pattern is quoted, the quoted portion is matched as a string:
+ =\b==\b=. If the n\bno\boc\bca\bas\bse\bem\bma\bat\btc\bch\bh shell option is enabled, the match is
+ performed without regard to the case of alphabetic characters.
+ The return value is 0 if the string matches (=\b==\b=) or does not
+ match (!\b!=\b=) the pattern, and 1 otherwise. If any part of the
+ pattern is quoted, the quoted portion is matched as a string:
every character in the quoted portion matches itself, instead of
having any special pattern matching meaning.
- An additional binary operator, =\b=~\b~, is available, with the same
- precedence as =\b==\b= and !\b!=\b=. When it is used, the string to the
+ An additional binary operator, =\b=~\b~, is available, with the same
+ precedence as =\b==\b= and !\b!=\b=. When it is used, the string to the
right of the operator is considered a POSIX extended regular ex-
- pression and matched accordingly (using the POSIX _\br_\be_\bg_\bc_\bo_\bm_\bp and
- _\br_\be_\bg_\be_\bx_\be_\bc interfaces usually described in _\br_\be_\bg_\be_\bx(3)). The return
- value is 0 if the string matches the pattern, and 1 otherwise.
+ pression and matched accordingly (using the POSIX _\br_\be_\bg_\bc_\bo_\bm_\bp and
+ _\br_\be_\bg_\be_\bx_\be_\bc interfaces usually described in _\br_\be_\bg_\be_\bx(3)). The return
+ value is 0 if the string matches the pattern, and 1 otherwise.
If the regular expression is syntactically incorrect, the condi-
tional expression's return value is 2. If the n\bno\boc\bca\bas\bse\bem\bma\bat\btc\bch\bh shell
- option is enabled, the match is performed without regard to the
+ option is enabled, the match is performed without regard to the
case of alphabetic characters.
- If any part of the pattern is quoted, the quoted portion is
- matched literally, as above. If the pattern is stored in a
+ If any part of the pattern is quoted, the quoted portion is
+ matched literally, as above. If the pattern is stored in a
shell variable, quoting the variable expansion forces the entire
- pattern to be matched literally. Treat bracket expressions in
- regular expressions carefully, since normal quoting and pattern
+ pattern to be matched literally. Treat bracket expressions in
+ regular expressions carefully, since normal quoting and pattern
characters lose their meanings between brackets.
- The match succeeds if the pattern matches any part of the
+ The match succeeds if the pattern matches any part of the
string. Anchor the pattern using the ^\b^ and $\b$ regular expression
operators to force it to match the entire string.
- The array variable B\bBA\bAS\bSH\bH_\b_R\bRE\bEM\bMA\bAT\bTC\bCH\bH records which parts of the
- string matched the pattern. The element of B\bBA\bAS\bSH\bH_\b_R\bRE\bEM\bMA\bAT\bTC\bCH\bH with
- index 0 contains the portion of the string matching the entire
- regular expression. Substrings matched by parenthesized subex-
+ The array variable B\bBA\bAS\bSH\bH_\b_R\bRE\bEM\bMA\bAT\bTC\bCH\bH records which parts of the
+ string matched the pattern. The element of B\bBA\bAS\bSH\bH_\b_R\bRE\bEM\bMA\bAT\bTC\bCH\bH with
+ index 0 contains the portion of the string matching the entire
+ regular expression. Substrings matched by parenthesized subex-
pressions within the regular expression are saved in the remain-
- ing B\bBA\bAS\bSH\bH_\b_R\bRE\bEM\bMA\bAT\bTC\bCH\bH indices. The element of B\bBA\bAS\bSH\bH_\b_R\bRE\bEM\bMA\bAT\bTC\bCH\bH with in-
- dex _\bn is the portion of the string matching the _\bnth parenthe-
- sized subexpression. B\bBa\bas\bsh\bh sets B\bBA\bAS\bSH\bH_\b_R\bRE\bEM\bMA\bAT\bTC\bCH\bH in the global
- scope; declaring it as a local variable will lead to unexpected
+ ing B\bBA\bAS\bSH\bH_\b_R\bRE\bEM\bMA\bAT\bTC\bCH\bH indices. The element of B\bBA\bAS\bSH\bH_\b_R\bRE\bEM\bMA\bAT\bTC\bCH\bH with in-
+ dex _\bn is the portion of the string matching the _\bnth parenthe-
+ sized subexpression. B\bBa\bas\bsh\bh sets B\bBA\bAS\bSH\bH_\b_R\bRE\bEM\bMA\bAT\bTC\bCH\bH in the global
+ scope; declaring it as a local variable will lead to unexpected
results.
- Expressions may be combined using the following operators,
+ Expressions may be combined using the following operators,
listed in decreasing order of precedence:
(\b( _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn )\b)
- Returns the value of _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn. This may be used to
+ Returns the value of _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn. This may be used to
override the normal precedence of operators.
!\b! _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn
True if _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn is false.
True if either _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn_\b1 or _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn_\b2 is true.
The &\b&&\b& and |\b||\b| operators do not evaluate _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn_\b2 if the value
- of _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn_\b1 is sufficient to determine the return value of
+ of _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn_\b1 is sufficient to determine the return value of
the entire conditional expression.
f\bfo\bor\br _\bn_\ba_\bm_\be [ [ i\bin\bn _\bw_\bo_\br_\bd _\b._\b._\b. ] ; ] d\bdo\bo _\bl_\bi_\bs_\bt ; d\bdo\bon\bne\be
- First, expand The list of words following i\bin\bn, generating a list
- of items. Then, the variable _\bn_\ba_\bm_\be is set to each element of
- this list in turn, and _\bl_\bi_\bs_\bt is executed each time. If the i\bin\bn
+ First, expand the list of words following i\bin\bn, generating a list
+ of items. Then, the variable _\bn_\ba_\bm_\be is set to each element of
+ this list in turn, and _\bl_\bi_\bs_\bt is executed each time. If the i\bin\bn
_\bw_\bo_\br_\bd is omitted, the f\bfo\bor\br command executes _\bl_\bi_\bs_\bt once for each po-
- sitional parameter that is set (see P\bPA\bAR\bRA\bAM\bME\bET\bTE\bER\bRS\bS below). The re-
- turn status is the exit status of the last command that exe-
+ sitional parameter that is set (see P\bPA\bAR\bRA\bAM\bME\bET\bTE\bER\bRS\bS below). The re-
+ turn status is the exit status of the last command that exe-
cutes. If the expansion of the items following i\bin\bn results in an
- empty list, no commands are executed, and the return status is
+ empty list, no commands are executed, and the return status is
0.
f\bfo\bor\br (( _\be_\bx_\bp_\br_\b1 ; _\be_\bx_\bp_\br_\b2 ; _\be_\bx_\bp_\br_\b3 )) [;] d\bdo\bo _\bl_\bi_\bs_\bt ; d\bdo\bon\bne\be
First, evaluate the arithmetic expression _\be_\bx_\bp_\br_\b1 according to the
- rules described below under A\bAR\bRI\bIT\bTH\bHM\bME\bET\bTI\bIC\bC E\bEV\bVA\bAL\bLU\bUA\bAT\bTI\bIO\bON\bN. Then, re-
+ rules described below under A\bAR\bRI\bIT\bTH\bHM\bME\bET\bTI\bIC\bC E\bEV\bVA\bAL\bLU\bUA\bAT\bTI\bIO\bON\bN. Then, re-
peatedly evaluate the arithmetic expression _\be_\bx_\bp_\br_\b2 until it eval-
- uates to zero. Each time _\be_\bx_\bp_\br_\b2 evaluates to a non-zero value,
- execute _\bl_\bi_\bs_\bt and evaluate the arithmetic expression _\be_\bx_\bp_\br_\b3. If
- any expression is omitted, it behaves as if it evaluates to 1.
- The return value is the exit status of the last command in _\bl_\bi_\bs_\bt
- that is executed, or non-zero if any of the expressions is in-
+ uates to zero. Each time _\be_\bx_\bp_\br_\b2 evaluates to a non-zero value,
+ execute _\bl_\bi_\bs_\bt and evaluate the arithmetic expression _\be_\bx_\bp_\br_\b3. If
+ any expression is omitted, it behaves as if it evaluates to 1.
+ The return value is the exit status of the last command in _\bl_\bi_\bs_\bt
+ that is executed, or non-zero if any of the expressions is in-
valid.
- Use the b\bbr\bre\bea\bak\bk and c\bco\bon\bnt\bti\bin\bnu\bue\be builtins (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS
+ Use the b\bbr\bre\bea\bak\bk and c\bco\bon\bnt\bti\bin\bnu\bue\be builtins (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS
below) to control loop execution.
- s\bse\bel\ble\bec\bct\bt _\bn_\ba_\bm_\be [ i\bin\bn _\bw_\bo_\br_\bd ] ; d\bdo\bo _\bl_\bi_\bs_\bt ; d\bdo\bon\bne\be
- First, expand the list of words following i\bin\bn, generating a list
- of items, and print the set of expanded words the standard er-
- ror, each preceded by a number. If the i\bin\bn _\bw_\bo_\br_\bd is omitted,
- print the positional parameters (see P\bPA\bAR\bRA\bAM\bME\bET\bTE\bER\bRS\bS below). s\bse\bel\ble\bec\bct\bt
- then displays the P\bPS\bS3\b3 prompt and reads a line from the standard
+ s\bse\bel\ble\bec\bct\bt _\bn_\ba_\bm_\be [ [ i\bin\bn _\bw_\bo_\br_\bd _\b._\b._\b. ] ; ] d\bdo\bo _\bl_\bi_\bs_\bt ; d\bdo\bon\bne\be
+ First, expand the list of words following i\bin\bn, generating a list
+ of items, and print the set of expanded words the standard er-
+ ror, each preceded by a number. If the i\bin\bn _\bw_\bo_\br_\bd is omitted,
+ print the positional parameters (see P\bPA\bAR\bRA\bAM\bME\bET\bTE\bER\bRS\bS below). s\bse\bel\ble\bec\bct\bt
+ then displays the P\bPS\bS3\b3 prompt and reads a line from the standard
input. If the line consists of a number corresponding to one of
- the displayed words, then s\bse\bel\ble\bec\bct\bt sets the value of _\bn_\ba_\bm_\be to that
- word. If the line is empty, s\bse\bel\ble\bec\bct\bt displays the words and
- prompt again. If EOF is read, s\bse\bel\ble\bec\bct\bt completes and returns 1.
- Any other value sets _\bn_\ba_\bm_\be to null. The line read is saved in
- the variable R\bRE\bEP\bPL\bLY\bY. The _\bl_\bi_\bs_\bt is executed after each selection
+ the displayed words, then s\bse\bel\ble\bec\bct\bt sets the value of _\bn_\ba_\bm_\be to that
+ word. If the line is empty, s\bse\bel\ble\bec\bct\bt displays the words and
+ prompt again. If EOF is read, s\bse\bel\ble\bec\bct\bt completes and returns 1.
+ Any other value sets _\bn_\ba_\bm_\be to null. The line read is saved in
+ the variable R\bRE\bEP\bPL\bLY\bY. The _\bl_\bi_\bs_\bt is executed after each selection
until a b\bbr\bre\bea\bak\bk command is executed. The exit status of s\bse\bel\ble\bec\bct\bt is
the exit status of the last command executed in _\bl_\bi_\bs_\bt, or zero if
no commands were executed.
c\bca\bas\bse\be _\bw_\bo_\br_\bd i\bin\bn [ [(] _\bp_\ba_\bt_\bt_\be_\br_\bn [ |\b| _\bp_\ba_\bt_\bt_\be_\br_\bn ] ... ) _\bl_\bi_\bs_\bt ;; ] ... e\bes\bsa\bac\bc
A c\bca\bas\bse\be command first expands _\bw_\bo_\br_\bd, and tries to match it against
- each _\bp_\ba_\bt_\bt_\be_\br_\bn in turn, proceeding from first to last, using the
- matching rules described under P\bPa\bat\btt\bte\ber\brn\bn M\bMa\bat\btc\bch\bhi\bin\bng\bg below. A pat-
- tern list is a set of one or more patterns separated by , and
- the ) operator terminates the pattern list. The _\bw_\bo_\br_\bd is ex-
- panded using tilde expansion, parameter and variable expansion,
- arithmetic expansion, command substitution, process substitution
- and quote removal. Each _\bp_\ba_\bt_\bt_\be_\br_\bn examined is expanded using
- tilde expansion, parameter and variable expansion, arithmetic
- expansion, command substitution, process substitution, and quote
- removal. If the n\bno\boc\bca\bas\bse\bem\bma\bat\btc\bch\bh shell option is enabled, the match
- is performed without regard to the case of alphabetic charac-
- ters. A _\bc_\bl_\ba_\bu_\bs_\be is a pattern list and an associated _\bl_\bi_\bs_\bt.
+ each _\bp_\ba_\bt_\bt_\be_\br_\bn in turn, proceeding from first to last, using the
+ matching rules described under P\bPa\bat\btt\bte\ber\brn\bn M\bMa\bat\btc\bch\bhi\bin\bng\bg below. The _\bw_\bo_\br_\bd
+ is expanded using tilde expansion, parameter and variable expan-
+ sion, arithmetic expansion, command substitution, process sub-
+ stitution and quote removal. Each _\bp_\ba_\bt_\bt_\be_\br_\bn examined is expanded
+ using tilde expansion, parameter and variable expansion, arith-
+ metic expansion, command substitution, process substitution, and
+ quote removal. If the n\bno\boc\bca\bas\bse\bem\bma\bat\btc\bch\bh shell option is enabled, the
+ match is performed without regard to the case of alphabetic
+ characters.
+
+ A _\bp_\ba_\bt_\bt_\be_\br_\bn _\bl_\bi_\bs_\bt is a set of one or more patterns separated by |\b|,
+ and terminated by the )\b) operator. A case _\bc_\bl_\ba_\bu_\bs_\be is a pattern
+ list and an associated _\bl_\bi_\bs_\bt, terminated by ;\b;;\b;, ;\b;&\b&, or ;\b;;\b;&\b&. The
+ terminator is optional for the last clause preceding e\bes\bsa\bac\bc.
+ There may be an arbitrary number of case clauses. The first
+ pattern that matches determines the _\bl_\bi_\bs_\bt that is executed.
When a match is found, c\bca\bas\bse\be executes the corresponding _\bl_\bi_\bs_\bt. If
- the ;\b;;\b; operator terminates the case clause, the c\bca\bas\bse\be command
- completes after the first match. Using ;\b;&\b& in place of ;\b;;\b; causes
- execution to continue with the _\bl_\bi_\bs_\bt associated with the next
- pattern list. Using ;\b;;\b;&\b& in place of ;\b;;\b; causes the shell to test
- the next pattern list in the statement, if any, and execute any
- associated _\bl_\bi_\bs_\bt if the match succeeds, continuing the case
- statement execution as if the pattern list had not matched. The
- exit status is zero if no pattern matches.
-
- Otherwise, it is the exit status of the last command executed in
- the last _\bl_\bi_\bs_\bt executed.
+ the ;\b;;\b; operator terminates the case clause, the c\bca\bas\bse\be command
+ completes after the first match. Using the ;\b;&\b& terminator con-
+ tinues execution with the _\bl_\bi_\bs_\bt associated with the next clause,
+ if any. Using the ;\b;;\b;&\b& terminator causes the shell to test the
+ pattern list in the next clause, if any, and execute any associ-
+ ated _\bl_\bi_\bs_\bt if the match succeeds, continuing the case statement
+ execution as if the pattern list had not matched.
+
+ The exit status is zero if no pattern matches. Otherwise, it is
+ the exit status of the last command executed in the last _\bl_\bi_\bs_\bt
+ executed.
i\bif\bf _\bl_\bi_\bs_\bt; t\bth\bhe\ben\bn _\bl_\bi_\bs_\bt; [ e\bel\bli\bif\bf _\bl_\bi_\bs_\bt; t\bth\bhe\ben\bn _\bl_\bi_\bs_\bt; ] ... [ e\bel\bls\bse\be _\bl_\bi_\bs_\bt; ] f\bfi\bi
- The i\bif\bf _\bl_\bi_\bs_\bt is executed. If its exit status is zero, the t\bth\bhe\ben\bn
- _\bl_\bi_\bs_\bt is executed. Otherwise, each e\bel\bli\bif\bf _\bl_\bi_\bs_\bt is executed in
- turn, and if its exit status is zero, the corresponding t\bth\bhe\ben\bn
+ The i\bif\bf _\bl_\bi_\bs_\bt is executed. If its exit status is zero, the t\bth\bhe\ben\bn
+ _\bl_\bi_\bs_\bt is executed. Otherwise, each e\bel\bli\bif\bf _\bl_\bi_\bs_\bt is executed in
+ turn, and if its exit status is zero, the corresponding t\bth\bhe\ben\bn
_\bl_\bi_\bs_\bt is executed and the command completes. Otherwise, the e\bel\bls\bse\be
- _\bl_\bi_\bs_\bt is executed, if present. The exit status is the exit sta-
+ _\bl_\bi_\bs_\bt is executed, if present. The exit status is the exit sta-
tus of the last command executed, or zero if no condition tested
true.
w\bwh\bhi\bil\ble\be _\bl_\bi_\bs_\bt_\b-_\b1; d\bdo\bo _\bl_\bi_\bs_\bt_\b-_\b2; d\bdo\bon\bne\be
u\bun\bnt\bti\bil\bl _\bl_\bi_\bs_\bt_\b-_\b1; d\bdo\bo _\bl_\bi_\bs_\bt_\b-_\b2; d\bdo\bon\bne\be
- The w\bwh\bhi\bil\ble\be command continuously executes the list _\bl_\bi_\bs_\bt_\b-_\b2 as long
+ The w\bwh\bhi\bil\ble\be command continuously executes the list _\bl_\bi_\bs_\bt_\b-_\b2 as long
as the last command in the list _\bl_\bi_\bs_\bt_\b-_\b1 returns an exit status of
- zero. The u\bun\bnt\bti\bil\bl command is identical to the w\bwh\bhi\bil\ble\be command, ex-
+ zero. The u\bun\bnt\bti\bil\bl command is identical to the w\bwh\bhi\bil\ble\be command, ex-
cept that the test is negated: _\bl_\bi_\bs_\bt_\b-_\b2 is executed as long as the
last command in _\bl_\bi_\bs_\bt_\b-_\b1 returns a non-zero exit status. The exit
status of the w\bwh\bhi\bil\ble\be and u\bun\bnt\bti\bil\bl commands is the exit status of the
C\bCo\bop\bpr\bro\boc\bce\bes\bss\bse\bes\bs
A _\bc_\bo_\bp_\br_\bo_\bc_\be_\bs_\bs is a shell command preceded by the c\bco\bop\bpr\bro\boc\bc reserved word. A
- coprocess is executed asynchronously in a subshell, as if the command
- had been terminated with the &\b& control operator, with a two-way pipe
+ coprocess is executed asynchronously in a subshell, as if the command
+ had been terminated with the &\b& control operator, with a two-way pipe
established between the executing shell and the coprocess.
The syntax for a coprocess is:
c\bco\bop\bpr\bro\boc\bc [_\bN_\bA_\bM_\bE] _\bc_\bo_\bm_\bm_\ba_\bn_\bd [_\br_\be_\bd_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\bs]
- This creates a coprocess named _\bN_\bA_\bM_\bE. _\bc_\bo_\bm_\bm_\ba_\bn_\bd may be either a simple
- command or a compound command (see above). _\bN_\bA_\bM_\bE is a shell variable
+ This creates a coprocess named _\bN_\bA_\bM_\bE. _\bc_\bo_\bm_\bm_\ba_\bn_\bd may be either a simple
+ command or a compound command (see above). _\bN_\bA_\bM_\bE is a shell variable
name. If _\bN_\bA_\bM_\bE is not supplied, the default name is C\bCO\bOP\bPR\bRO\bOC\bC.
The recommended form to use for a coprocess is
c\bco\bop\bpr\bro\boc\bc _\bN_\bA_\bM_\bE { _\bc_\bo_\bm_\bm_\ba_\bn_\bd [_\br_\be_\bd_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\bs]; }
- This form is preferred because simple commands result in the coprocess
- always being named C\bCO\bOP\bPR\bRO\bOC\bC, and it is simpler to use and more complete
+ This form is preferred because simple commands result in the coprocess
+ always being named C\bCO\bOP\bPR\bRO\bOC\bC, and it is simpler to use and more complete
than the other compound commands.
- If _\bc_\bo_\bm_\bm_\ba_\bn_\bd is a compound command, _\bN_\bA_\bM_\bE is optional. The word following
- c\bco\bop\bpr\bro\boc\bc determines whether that word is interpreted as a variable name:
- it is interpreted as _\bN_\bA_\bM_\bE if it is not a reserved word that introduces
- a compound command. If _\bc_\bo_\bm_\bm_\ba_\bn_\bd is a simple command, _\bN_\bA_\bM_\bE is not al-
- lowed; this is to avoid confusion between _\bN_\bA_\bM_\bE and the first word of
+ If _\bc_\bo_\bm_\bm_\ba_\bn_\bd is a compound command, _\bN_\bA_\bM_\bE is optional. The word following
+ c\bco\bop\bpr\bro\boc\bc determines whether that word is interpreted as a variable name:
+ it is interpreted as _\bN_\bA_\bM_\bE if it is not a reserved word that introduces
+ a compound command. If _\bc_\bo_\bm_\bm_\ba_\bn_\bd is a simple command, _\bN_\bA_\bM_\bE is not al-
+ lowed; this is to avoid confusion between _\bN_\bA_\bM_\bE and the first word of
the simple command.
- When the coprocess is executed, the shell creates an array variable
- (see A\bAr\brr\bra\bay\bys\bs below) named _\bN_\bA_\bM_\bE in the context of the executing shell.
- The standard output of _\bc_\bo_\bm_\bm_\ba_\bn_\bd is connected via a pipe to a file de-
- scriptor in the executing shell, and that file descriptor is assigned
+ When the coprocess is executed, the shell creates an array variable
+ (see A\bAr\brr\bra\bay\bys\bs below) named _\bN_\bA_\bM_\bE in the context of the executing shell.
+ The standard output of _\bc_\bo_\bm_\bm_\ba_\bn_\bd is connected via a pipe to a file de-
+ scriptor in the executing shell, and that file descriptor is assigned
to _\bN_\bA_\bM_\bE[0]. The standard input of _\bc_\bo_\bm_\bm_\ba_\bn_\bd is connected via a pipe to a
file descriptor in the executing shell, and that file descriptor is as-
- signed to _\bN_\bA_\bM_\bE[1]. This pipe is established before any redirections
+ signed to _\bN_\bA_\bM_\bE[1]. This pipe is established before any redirections
specified by the command (see R\bRE\bED\bDI\bIR\bRE\bEC\bCT\bTI\bIO\bON\bN below). 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
+ 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 avail-
- able as the value of the variable _\bN_\bA_\bM_\bE_PID. The w\bwa\bai\bit\bt builtin may be
+ The process ID of the shell spawned to execute the coprocess is avail-
+ able as the value of the variable _\bN_\bA_\bM_\bE_PID. The w\bwa\bai\bit\bt builtin may be
used to wait for the coprocess to terminate.
- Since the coprocess is created as an asynchronous command, the c\bco\bop\bpr\bro\boc\bc
- command always returns success. The return status of a coprocess is
+ Since the coprocess is created as an asynchronous command, the c\bco\bop\bpr\bro\boc\bc
+ command always returns success. The return status of a coprocess is
the exit status of _\bc_\bo_\bm_\bm_\ba_\bn_\bd.
S\bSh\bhe\bel\bll\bl F\bFu\bun\bnc\bct\bti\bio\bon\bn D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bns\bs
- A shell function is an object that is called like a simple command and
- executes a compound command with a new set of positional parameters.
+ A shell function is an object that is called like a simple command and
+ executes a compound command with a new set of positional parameters.
Shell functions are declared as follows:
_\bf_\bn_\ba_\bm_\be () _\bc_\bo_\bm_\bp_\bo_\bu_\bn_\bd_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd [_\br_\be_\bd_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn]
f\bfu\bun\bnc\bct\bti\bio\bon\bn _\bf_\bn_\ba_\bm_\be [()] _\bc_\bo_\bm_\bp_\bo_\bu_\bn_\bd_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd [_\br_\be_\bd_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn]
This defines a function named _\bf_\bn_\ba_\bm_\be. The reserved word f\bfu\bun\bnc\bct\bti\bio\bon\bn
- is optional. If the f\bfu\bun\bnc\bct\bti\bio\bon\bn reserved word is supplied, the
- parentheses are optional. The _\bb_\bo_\bd_\by of the function is the com-
- pound command _\bc_\bo_\bm_\bp_\bo_\bu_\bn_\bd_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd (see C\bCo\bom\bmp\bpo\bou\bun\bnd\bd C\bCo\bom\bmm\bma\ban\bnd\bds\bs above).
- That command is usually a _\bl_\bi_\bs_\bt of commands between { and }, but
+ is optional. If the f\bfu\bun\bnc\bct\bti\bio\bon\bn reserved word is supplied, the
+ parentheses are optional. The _\bb_\bo_\bd_\by of the function is the com-
+ pound command _\bc_\bo_\bm_\bp_\bo_\bu_\bn_\bd_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd (see C\bCo\bom\bmp\bpo\bou\bun\bnd\bd C\bCo\bom\bmm\bma\ban\bnd\bds\bs above).
+ That command is usually a _\bl_\bi_\bs_\bt of commands between { and }, but
may be any command listed under C\bCo\bom\bmp\bpo\bou\bun\bnd\bd C\bCo\bom\bmm\bma\ban\bnd\bds\bs above. If the
f\bfu\bun\bnc\bct\bti\bio\bon\bn reserved word is used, but the parentheses are not sup-
plied, the braces are recommended. _\bc_\bo_\bm_\bp_\bo_\bu_\bn_\bd_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd is executed
- whenever _\bf_\bn_\ba_\bm_\be is specified as the name of a simple command.
+ whenever _\bf_\bn_\ba_\bm_\be is specified as the name of a simple command.
When in posix mode, _\bf_\bn_\ba_\bm_\be must be a valid shell _\bn_\ba_\bm_\be and may not
- be the name of one of the POSIX _\bs_\bp_\be_\bc_\bi_\ba_\bl _\bb_\bu_\bi_\bl_\bt_\bi_\bn_\bs. In default
- mode, a function name can be any unquoted shell word that does
+ be the name of one of the POSIX _\bs_\bp_\be_\bc_\bi_\ba_\bl _\bb_\bu_\bi_\bl_\bt_\bi_\bn_\bs. In default
+ mode, a function name can be any unquoted shell word that does
not contain $\b$.
- Any redirections (see R\bRE\bED\bDI\bIR\bRE\bEC\bCT\bTI\bIO\bON\bN below) specified when a function is
+ Any redirections (see R\bRE\bED\bDI\bIR\bRE\bEC\bCT\bTI\bIO\bON\bN below) specified when a function is
defined are performed when the function is executed.
- The exit status of a function definition is zero unless a syntax error
- occurs or a readonly function with the same name already exists. When
- executed, the exit status of a function is the exit status of the last
+ The exit status of a function definition is zero unless a syntax error
+ occurs or a readonly function with the same name already exists. When
+ executed, the exit status of a function is the exit status of the last
command executed in the body. (See F\bFU\bUN\bNC\bCT\bTI\bIO\bON\bNS\bS below.)
C\bCO\bOM\bMM\bME\bEN\bNT\bTS\bS
In a non-interactive shell, or an interactive shell in which the i\bin\bnt\bte\ber\br-\b-
- a\bac\bct\bti\biv\bve\be_\b_c\bco\bom\bmm\bme\ben\bnt\bts\bs option to the s\bsh\bho\bop\bpt\bt builtin is enabled (see S\bSH\bHE\bEL\bLL\bL
- B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below), a word beginning with #\b# introduces a comment.
+ a\bac\bct\bti\biv\bve\be_\b_c\bco\bom\bmm\bme\ben\bnt\bts\bs option to the s\bsh\bho\bop\bpt\bt builtin is enabled (see S\bSH\bHE\bEL\bLL\bL
+ B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below), a word beginning with #\b# introduces a comment.
A word begins at the beginning of a line, after unquoted whitespace, or
- after an operator. The comment causes that word and all remaining
- characters on that line to be ignored. An interactive shell without
- the i\bin\bnt\bte\ber\bra\bac\bct\bti\biv\bve\be_\b_c\bco\bom\bmm\bme\ben\bnt\bts\bs option enabled does not allow comments. The
+ after an operator. The comment causes that word and all remaining
+ characters on that line to be ignored. An interactive shell without
+ the i\bin\bnt\bte\ber\bra\bac\bct\bti\biv\bve\be_\b_c\bco\bom\bmm\bme\ben\bnt\bts\bs option enabled does not allow comments. The
i\bin\bnt\bte\ber\bra\bac\bct\bti\biv\bve\be_\b_c\bco\bom\bmm\bme\ben\bnt\bts\bs option is enabled by default in interactive
shells.
Q\bQU\bUO\bOT\bTI\bIN\bNG\bG
- _\bQ_\bu_\bo_\bt_\bi_\bn_\bg is used to remove the special meaning of certain characters or
- words to the shell. Quoting can be used to disable special treatment
+ _\bQ_\bu_\bo_\bt_\bi_\bn_\bg is used to remove the special meaning of certain characters or
+ words to the shell. Quoting can be used to disable special treatment
for special characters, to prevent reserved words from being recognized
as such, and to prevent parameter expansion.
- Each of the _\bm_\be_\bt_\ba_\bc_\bh_\ba_\br_\ba_\bc_\bt_\be_\br_\bs listed above under D\bDE\bEF\bFI\bIN\bNI\bIT\bTI\bIO\bON\bNS\bS has special
+ Each of the _\bm_\be_\bt_\ba_\bc_\bh_\ba_\br_\ba_\bc_\bt_\be_\br_\bs listed above under D\bDE\bEF\bFI\bIN\bNI\bIT\bTI\bIO\bON\bNS\bS 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 (see H\bHI\bIS\bS-\b-
+ When the command history expansion facilities are being used (see H\bHI\bIS\bS-\b-
T\bTO\bOR\bRY\bY E\bEX\bXP\bPA\bAN\bNS\bSI\bIO\bON\bN below), the _\bh_\bi_\bs_\bt_\bo_\br_\by _\be_\bx_\bp_\ba_\bn_\bs_\bi_\bo_\bn character, usually !\b!, must
be quoted to prevent history expansion.
There are four quoting mechanisms: the _\be_\bs_\bc_\ba_\bp_\be _\bc_\bh_\ba_\br_\ba_\bc_\bt_\be_\br, single quotes,
double quotes, and dollar-single quotes.
- A non-quoted backslash (\\b\) is the _\be_\bs_\bc_\ba_\bp_\be _\bc_\bh_\ba_\br_\ba_\bc_\bt_\be_\br. It preserves the
- literal value of the next character that follows, removing any special
- meaning it has, with the exception of <newline>. If a \\b\<newline> pair
- appears, and the backslash is not itself quoted, the \\b\<newline> is
- treated as a line continuation (that is, it is removed from the input
+ A non-quoted backslash (\\b\) is the _\be_\bs_\bc_\ba_\bp_\be _\bc_\bh_\ba_\br_\ba_\bc_\bt_\be_\br. It preserves the
+ literal value of the next character that follows, removing any special
+ meaning it has, with the exception of <newline>. If a \\b\<newline> pair
+ appears, and the backslash is not itself quoted, the \\b\<newline> is
+ treated as a line continuation (that is, it is removed from the input
stream and effectively ignored).
- Enclosing characters in single quotes preserves the literal value of
+ Enclosing characters in single quotes preserves the literal value of
each character within the quotes. A single quote may not occur between
single quotes, even when preceded by a backslash.
- Enclosing characters in double quotes preserves the literal value of
- all characters within the quotes, with the exception of $\b$, `\b`, \\b\, and,
+ Enclosing characters in double quotes preserves the literal value of
+ all characters within the quotes, with the exception of $\b$, `\b`, \\b\, and,
when history expansion is enabled, !\b!. When the shell is in posix mode,
- the !\b! has no special meaning within double quotes, even when history
- expansion is enabled. The characters $\b$ and `\b` retain their special
- meaning within double quotes. The backslash retains its special mean-
- ing only when followed by one of the following characters: $\b$, `\b`, "\b", \\b\,
+ the !\b! has no special meaning within double quotes, even when history
+ expansion is enabled. The characters $\b$ and `\b` retain their special
+ meaning within double quotes. The backslash retains its special mean-
+ ing only when followed by one of the following characters: $\b$, `\b`, "\b", \\b\,
or <\b<n\bne\bew\bwl\bli\bin\bne\be>\b>. Backslashes preceding characters without a special mean-
ing are left unmodified.
- A double quote may be quoted within double quotes by preceding it with
+ A double quote may be quoted within double quotes by preceding it with
a backslash. If enabled, history expansion will be performed unless an
- !\b! appearing in double quotes is escaped using a backslash. The back-
+ !\b! appearing in double quotes is escaped using a backslash. The back-
slash preceding the !\b! is not removed.
- The special parameters *\b* and @\b@ have special meaning when in double
+ The special parameters *\b* and @\b@ have special meaning when in double
quotes (see P\bPA\bAR\bRA\bAM\bME\bET\bTE\bER\bRS\bS below).
- Character sequences of the form $\b$'_\bs_\bt_\br_\bi_\bn_\bg' are treated as a special
- variant of single quotes. The sequence expands to _\bs_\bt_\br_\bi_\bn_\bg, with back-
- slash-escaped characters in _\bs_\bt_\br_\bi_\bn_\bg replaced as specified by the ANSI C
- standard. Backslash escape sequences, if present, are decoded as fol-
+ Character sequences of the form $\b$'_\bs_\bt_\br_\bi_\bn_\bg' are treated as a special
+ variant of single quotes. The sequence expands to _\bs_\bt_\br_\bi_\bn_\bg, with back-
+ slash-escaped characters in _\bs_\bt_\br_\bi_\bn_\bg replaced as specified by the ANSI C
+ standard. Backslash escape sequences, if present, are decoded as fol-
lows:
\\b\a\ba alert (bell)
\\b\b\bb backspace
\\b\'\b' single quote
\\b\"\b" double quote
\\b\?\b? question mark
- \\b\_\bn_\bn_\bn The eight-bit character whose value is the octal value
+ \\b\_\bn_\bn_\bn The eight-bit character whose value is the octal value
_\bn_\bn_\bn (one to three octal digits).
- \\b\x\bx_\bH_\bH The eight-bit character whose value is the hexadecimal
+ \\b\x\bx_\bH_\bH The eight-bit character whose value is the hexadecimal
value _\bH_\bH (one or two hex digits).
- \\b\u\bu_\bH_\bH_\bH_\bH The Unicode (ISO/IEC 10646) character whose value is the
+ \\b\u\bu_\bH_\bH_\bH_\bH The Unicode (ISO/IEC 10646) character whose value is the
hexadecimal value _\bH_\bH_\bH_\bH (one to four hex digits).
\\b\U\bU_\bH_\bH_\bH_\bH_\bH_\bH_\bH_\bH
- The Unicode (ISO/IEC 10646) character whose value is the
+ The Unicode (ISO/IEC 10646) character whose value is the
hexadecimal value _\bH_\bH_\bH_\bH_\bH_\bH_\bH_\bH (one to eight hex digits).
\\b\c\bc_\bx A control-_\bx character.
- The expanded result is single-quoted, as if the dollar sign had not
+ The expanded result is single-quoted, as if the dollar sign had not
been present.
T\bTr\bra\ban\bns\bsl\bla\bat\bti\bin\bng\bg S\bSt\btr\bri\bin\bng\bgs\bs
A double-quoted string preceded by a dollar sign ($\b$"_\bs_\bt_\br_\bi_\bn_\bg") causes the
- string to be translated according to the current locale. The _\bg_\be_\bt_\bt_\be_\bx_\bt
- infrastructure performs the lookup and translation, using the L\bLC\bC_\b_M\bME\bES\bS-\b-
- S\bSA\bAG\bGE\bES\bS, T\bTE\bEX\bXT\bTD\bDO\bOM\bMA\bAI\bIN\bND\bDI\bIR\bR, and T\bTE\bEX\bXT\bTD\bDO\bOM\bMA\bAI\bIN\bN shell variables. If the current
+ string to be translated according to the current locale. The _\bg_\be_\bt_\bt_\be_\bx_\bt
+ infrastructure performs the lookup and translation, using the L\bLC\bC_\b_M\bME\bES\bS-\b-
+ S\bSA\bAG\bGE\bES\bS, T\bTE\bEX\bXT\bTD\bDO\bOM\bMA\bAI\bIN\bND\bDI\bIR\bR, and T\bTE\bEX\bXT\bTD\bDO\bOM\bMA\bAI\bIN\bN shell variables. If the current
locale is C\bC or P\bPO\bOS\bSI\bIX\bX, if there are no translations available, or if the
string is not translated, the dollar sign is ignored, and the string is
- treated as double-quoted as described above. This is a form of double
+ treated as double-quoted as described above. This is a form of double
quoting, so the string remains double-quoted by default, whether or not
- it is translated and replaced. If the n\bno\boe\bex\bxp\bpa\ban\bnd\bd_\b_t\btr\bra\ban\bns\bsl\bla\bat\bti\bio\bon\bn option is
- enabled using the s\bsh\bho\bop\bpt\bt builtin, translated strings are single-quoted
- instead of double-quoted. See the description of s\bsh\bho\bop\bpt\bt below under
+ it is translated and replaced. If the n\bno\boe\bex\bxp\bpa\ban\bnd\bd_\b_t\btr\bra\ban\bns\bsl\bla\bat\bti\bio\bon\bn option is
+ enabled using the s\bsh\bho\bop\bpt\bt builtin, translated strings are single-quoted
+ instead of double-quoted. See the description of s\bsh\bho\bop\bpt\bt below under
S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS.
P\bPA\bAR\bRA\bAM\bME\bET\bTE\bER\bRS\bS
- A _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is an entity that stores values. It can be a _\bn_\ba_\bm_\be, a num-
- ber, or one of the special characters listed below under S\bSp\bpe\bec\bci\bia\bal\bl P\bPa\bar\bra\ba-\b-
+ A _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is an entity that stores values. It can be a _\bn_\ba_\bm_\be, a num-
+ ber, or one of the special characters listed below under S\bSp\bpe\bec\bci\bia\bal\bl P\bPa\bar\bra\ba-\b-
m\bme\bet\bte\ber\brs\bs. A _\bv_\ba_\br_\bi_\ba_\bb_\bl_\be is a parameter denoted by a _\bn_\ba_\bm_\be. A variable has a
- _\bv_\ba_\bl_\bu_\be and zero or more _\ba_\bt_\bt_\br_\bi_\bb_\bu_\bt_\be_\bs. Attributes are assigned using the
- d\bde\bec\bcl\bla\bar\bre\be builtin command (see d\bde\bec\bcl\bla\bar\bre\be below in S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS).
+ _\bv_\ba_\bl_\bu_\be and zero or more _\ba_\bt_\bt_\br_\bi_\bb_\bu_\bt_\be_\bs. Attributes are assigned using the
+ d\bde\bec\bcl\bla\bar\bre\be builtin command (see d\bde\bec\bcl\bla\bar\bre\be below in S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS).
The e\bex\bxp\bpo\bor\brt\bt and r\bre\bea\bad\bdo\bon\bnl\bly\by builtins assign specific attributes.
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
+ a valid value. Once a variable is set, it may be unset only by using
the u\bun\bns\bse\bet\bt builtin command (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below).
A _\bv_\ba_\br_\bi_\ba_\bb_\bl_\be is assigned to using a statement of the form
_\bn_\ba_\bm_\be=[_\bv_\ba_\bl_\bu_\be]
- If _\bv_\ba_\bl_\bu_\be is not given, the variable is assigned the null string. All
- _\bv_\ba_\bl_\bu_\be_\bs undergo tilde expansion, parameter and variable expansion, com-
- mand substitution, arithmetic expansion, and quote removal (see E\bEX\bXP\bPA\bAN\bN-\b-
+ If _\bv_\ba_\bl_\bu_\be is not given, the variable is assigned the null string. All
+ _\bv_\ba_\bl_\bu_\be_\bs undergo tilde expansion, parameter and variable expansion, com-
+ mand substitution, arithmetic expansion, and quote removal (see E\bEX\bXP\bPA\bAN\bN-\b-
S\bSI\bIO\bON\bN below). If the variable has its i\bin\bnt\bte\beg\bge\ber\br attribute set, then _\bv_\ba_\bl_\bu_\be
is evaluated as an arithmetic expression even if the $\b$(\b((\b(...)\b))\b) expansion
is not used (see A\bAr\bri\bit\bth\bhm\bme\bet\bti\bic\bc E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn below). Word splitting and path-
- name expansion are not performed. Assignment statements may also ap-
+ name expansion are not performed. Assignment statements may also ap-
pear as arguments to the a\bal\bli\bia\bas\bs, d\bde\bec\bcl\bla\bar\bre\be, t\bty\byp\bpe\bes\bse\bet\bt, e\bex\bxp\bpo\bor\brt\bt, r\bre\bea\bad\bdo\bon\bnl\bly\by, and
- l\blo\boc\bca\bal\bl builtin commands (_\bd_\be_\bc_\bl_\ba_\br_\ba_\bt_\bi_\bo_\bn commands). When in posix mode,
- these builtins may appear in a command after one or more instances of
+ l\blo\boc\bca\bal\bl builtin commands (_\bd_\be_\bc_\bl_\ba_\br_\ba_\bt_\bi_\bo_\bn commands). When in posix mode,
+ these builtins may appear in a command after one or more instances of
the c\bco\bom\bmm\bma\ban\bnd\bd 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, the "+=" operator appends to or adds to
- the variable's previous value. This includes arguments to _\bd_\be_\bc_\bl_\ba_\br_\ba_\bt_\bi_\bo_\bn
- commands such as d\bde\bec\bcl\bla\bar\bre\be that accept assignment statements. When "+="
- is applied to a variable for which the i\bin\bnt\bte\beg\bge\ber\br attribute has been set,
+ In the context where an assignment statement is assigning a value to a
+ shell variable or array index, the "+=" operator appends to or adds to
+ the variable's previous value. This includes arguments to _\bd_\be_\bc_\bl_\ba_\br_\ba_\bt_\bi_\bo_\bn
+ commands such as d\bde\bec\bcl\bla\bar\bre\be that accept assignment statements. When "+="
+ is applied to a variable for which the i\bin\bnt\bte\beg\bge\ber\br attribute has been set,
the variable's current value and _\bv_\ba_\bl_\bu_\be are each evaluated as arithmetic
- expressions, and the sum of the results is assigned as the variable's
+ expressions, and the sum of the results is assigned as the variable's
value. The current value is usually an integer constant, but may be an
- expression. When "+=" is applied to an array variable using compound
+ expression. When "+=" is applied to an array variable using compound
assignment (see A\bAr\brr\bra\bay\bys\bs below), the variable's value is not unset (as it
- is when using "="), and new values are appended to the array beginning
- at one greater than the array's maximum index (for indexed arrays) or
- added as additional key-value pairs in an associative array. When ap-
- plied to a string-valued variable, _\bv_\ba_\bl_\bu_\be is expanded and appended to
+ is when using "="), and new values are appended to the array beginning
+ at one greater than the array's maximum index (for indexed arrays) or
+ added as additional key-value pairs in an associative array. When ap-
+ plied to a string-valued variable, _\bv_\ba_\bl_\bu_\be is expanded and appended to
the variable's value.
A variable can be assigned the _\bn_\ba_\bm_\be_\br_\be_\bf attribute using the -\b-n\bn option to
- the d\bde\bec\bcl\bla\bar\bre\be or l\blo\boc\bca\bal\bl builtin commands (see the descriptions of d\bde\bec\bcl\bla\bar\bre\be
- and l\blo\boc\bca\bal\bl below) to create a _\bn_\ba_\bm_\be_\br_\be_\bf, or a reference to another vari-
- able. This allows variables to be manipulated indirectly. Whenever
- the nameref variable is referenced, assigned to, unset, or has its at-
- tributes modified (other than using or changing the _\bn_\ba_\bm_\be_\br_\be_\bf attribute
- itself), the operation is actually performed on the variable specified
- by the nameref variable's value. A nameref is commonly used within
+ the d\bde\bec\bcl\bla\bar\bre\be or l\blo\boc\bca\bal\bl builtin commands (see the descriptions of d\bde\bec\bcl\bla\bar\bre\be
+ and l\blo\boc\bca\bal\bl below) to create a _\bn_\ba_\bm_\be_\br_\be_\bf, or a reference to another vari-
+ able. This allows variables to be manipulated indirectly. Whenever
+ the nameref variable is referenced, assigned to, unset, or has its at-
+ tributes modified (other than using or changing the _\bn_\ba_\bm_\be_\br_\be_\bf attribute
+ itself), the operation is actually performed on the variable specified
+ by the nameref variable's value. A nameref is commonly used within
shell functions to refer to a variable whose name is passed as an argu-
- ment to the function. For instance, if a variable name is passed to a
+ ment to the function. For instance, if a variable name is passed to a
shell function as its first argument, running
declare -n ref=$1
the variable name passed as the first argument. References and assign-
ments to r\bre\bef\bf, and changes to its attributes, are treated as references,
assignments, and attribute modifications to the variable whose name was
- passed as $\b$1\b1. If the control variable in a f\bfo\bor\br loop has the nameref
- attribute, the list of words can be a list of shell variables, and a
- name reference is established for each word in the list, in turn, when
- the loop is executed. Array variables cannot be given the n\bna\bam\bme\ber\bre\bef\bf at-
- tribute. However, nameref variables can reference array variables and
+ passed as $\b$1\b1. If the control variable in a f\bfo\bor\br loop has the nameref
+ attribute, the list of words can be a list of shell variables, and a
+ name reference is established for each word in the list, in turn, when
+ the loop is executed. Array variables cannot be given the n\bna\bam\bme\ber\bre\bef\bf at-
+ tribute. However, nameref variables can reference array variables and
subscripted array variables. Namerefs can be unset using the -\b-n\bn option
to the u\bun\bns\bse\bet\bt builtin. Otherwise, if u\bun\bns\bse\bet\bt is executed with the name of
- a nameref variable as an argument, the variable referenced by the
+ a nameref variable as an argument, the variable referenced by the
nameref variable is unset.
- When the shell starts, it reads its environment and creates a shell
- variable from each environment variable that has a valid name, as de-
+ When the shell starts, it reads its environment and creates a shell
+ variable from each environment variable that has a valid name, as de-
scribed below (see E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT).
P\bPo\bos\bsi\bit\bti\bio\bon\bna\bal\bl P\bPa\bar\bra\bam\bme\bet\bte\ber\brs\bs
- A _\bp_\bo_\bs_\bi_\bt_\bi_\bo_\bn_\ba_\bl _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is a parameter denoted by one or more digits,
+ A _\bp_\bo_\bs_\bi_\bt_\bi_\bo_\bn_\ba_\bl _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br 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 s\bse\bet\bt builtin command. Positional parameters may not be assigned to
- with assignment statements. The positional parameters are temporarily
+ the shell's arguments when it is invoked, and may be reassigned using
+ the s\bse\bet\bt builtin command. Positional parameters may not be assigned to
+ with assignment statements. The positional parameters are temporarily
replaced when a shell function is executed (see F\bFU\bUN\bNC\bCT\bTI\bIO\bON\bNS\bS below).
- When a positional parameter consisting of more than a single digit is
+ When a positional parameter consisting of more than a single digit is
expanded, it must be enclosed in braces (see E\bEX\bXP\bPA\bAN\bNS\bSI\bIO\bON\bN below). Without
braces, a digit following $ can only refer to one of the first nine po-
- sitional parameters ($\b$1\b1-\b-$\b$9\b9) or the special parameter $\b$0\b0 (see the next
+ sitional parameters ($\b$1\b1-\b-$\b$9\b9) or the special parameter $\b$0\b0 (see the next
section).
S\bSp\bpe\bec\bci\bia\bal\bl P\bPa\bar\bra\bam\bme\bet\bte\ber\brs\bs
- The shell treats several parameters specially. These parameters may
+ The shell treats several parameters specially. These parameters may
only be referenced; assignment to them is not allowed. Special parame-
ters are denoted by one of the following characters.
- *\b* ($\b$*\b*) Expands to the positional parameters, starting from one.
- When the expansion is not within double quotes, each positional
- parameter expands to a separate word. In contexts where word
- expansions are performed, those words are subject to further
- word splitting and pathname expansion. When the expansion oc-
- curs within double quotes, it expands to a single word with the
- value of each parameter separated by the first character of the
+ *\b* ($\b$*\b*) Expands to the positional parameters, starting from one.
+ When the expansion is not within double quotes, each positional
+ parameter expands to a separate word. In contexts where word
+ expansions are performed, those words are subject to further
+ word splitting and pathname expansion. When the expansion oc-
+ curs within double quotes, it expands to a single word with the
+ value of each parameter separated by the first character of the
I\bIF\bFS\bS variable. That is, "\b"$\b$*\b*"\b" is equivalent to "\b"$\b$1\b1_\bc$\b$2\b2_\bc.\b..\b..\b."\b", where
- _\bc is the first character of the value of the I\bIF\bFS\bS variable. If
+ _\bc is the first character of the value of the I\bIF\bFS\bS variable. If
I\bIF\bFS\bS is unset, the parameters are separated by spaces. If I\bIF\bFS\bS is
null, the parameters are joined without intervening separators.
- @\b@ ($\b$@\b@) Expands to the positional parameters, starting from one.
+ @\b@ ($\b$@\b@) Expands to the positional parameters, starting from one.
In contexts where word splitting is performed, this expands each
- positional parameter to a separate word; if not within double
- quotes, these words are subject to word splitting. In contexts
+ positional parameter to a separate word; if not within double
+ quotes, these words are subject to word splitting. In contexts
where word splitting is not performed, such as the value portion
- of an assignment statement, this expands to a single word with
+ of an assignment statement, this expands to a single word with
each positional parameter separated by a space. When the expan-
- sion occurs within double quotes, and word splitting is per-
- formed, each parameter expands to a separate word. That is,
+ sion occurs within double quotes, and word splitting is per-
+ formed, each parameter expands to a separate word. That is,
"\b"$\b$@\b@"\b" is equivalent to "\b"$\b$1\b1"\b" "\b"$\b$2\b2"\b" .\b..\b..\b. If the double-quoted expan-
- sion occurs within a word, the expansion of the first parameter
+ sion occurs within a word, the expansion of the first parameter
is joined with the expansion of the beginning part of the origi-
nal word, and the expansion of the last parameter is joined with
the expansion of the last part of the original word. When there
- are no positional parameters, "\b"$\b$@\b@"\b" and $\b$@\b@ expand to nothing
+ are no positional parameters, "\b"$\b$@\b@"\b" and $\b$@\b@ expand to nothing
(i.e., they are removed).
#\b# ($\b$#\b#) Expands to the number of positional parameters in decimal.
- ?\b? ($\b$?\b?) Expands to the exit status of the most recently executed
+ ?\b? ($\b$?\b?) Expands to the exit status of the most recently executed
command.
-\b- ($\b$-\b-) Expands to the current option flags as specified upon invo-
- cation, by the s\bse\bet\bt builtin command, or those set by the shell
+ cation, by the s\bse\bet\bt builtin command, or those set by the shell
itself (such as the -\b-i\bi option).
- $\b$ ($\b$$\b$) Expands to the process ID of the shell. In a subshell, it
+ $\b$ ($\b$$\b$) Expands to the process ID of the shell. In a subshell, it
expands to the process ID of the parent shell, not the subshell.
- !\b! ($\b$!\b!)Expands to the process ID of the job most recently placed
+ !\b! ($\b$!\b!)Expands to the process ID of the job most recently placed
into the background, whether executed as an asynchronous command
or using the b\bbg\bg builtin (see J\bJO\bOB\bB C\bCO\bON\bNT\bTR\bRO\bOL\bL below).
- 0\b0 ($\b$0\b0) Expands to the name of the shell or shell script. This is
- set at shell initialization. If b\bba\bas\bsh\bh is invoked with a file of
- commands, $\b$0\b0 is set to the name of that file. If b\bba\bas\bsh\bh is
+ 0\b0 ($\b$0\b0) Expands to the name of the shell or shell script. This is
+ set at shell initialization. If b\bba\bas\bsh\bh is invoked with a file of
+ commands, $\b$0\b0 is set to the name of that file. If b\bba\bas\bsh\bh is
started with the -\b-c\bc option, then $\b$0\b0 is set to the first argument
- after the string to be executed, if one is present. Otherwise,
+ after the string to be executed, if one is present. Otherwise,
it is set to the filename used to invoke b\bba\bas\bsh\bh, as given by argu-
ment zero.
S\bSh\bhe\bel\bll\bl V\bVa\bar\bri\bia\bab\bbl\ble\bes\bs
The shell sets following variables:
- _\b_ ($\b$_\b_, an underscore) This has a number of meanings depending on
+ _\b_ ($\b$_\b_, an underscore) This has a number of meanings depending on
context. At shell startup, _\b_ is set to the pathname used to in-
- voke the shell or shell script being executed as passed in the
- environment or argument list. Subsequently, it expands to the
- last argument to the previous simple command executed in the
- foreground, after expansion. It is also set to the full path-
- name used to invoke each command executed and placed in the en-
- vironment exported to that command. When checking mail, $\b$_\b_ ex-
+ voke the shell or shell script being executed as passed in the
+ environment or argument list. Subsequently, it expands to the
+ last argument to the previous simple command executed in the
+ foreground, after expansion. It is also set to the full path-
+ name used to invoke each command executed and placed in the en-
+ vironment exported to that command. When checking mail, $\b$_\b_ ex-
pands to the name of the mail file currently being checked.
- B\bBA\bAS\bSH\bH Expands to the full filename used to invoke this instance of
+ B\bBA\bAS\bSH\bH Expands to the full filename used to invoke this instance of
b\bba\bas\bsh\bh.
B\bBA\bAS\bSH\bHO\bOP\bPT\bTS\bS
- A colon-separated list of enabled shell options. Each word in
- the list is a valid argument for the -\b-s\bs option to the s\bsh\bho\bop\bpt\bt
+ A colon-separated list of enabled shell options. Each word in
+ the list is a valid argument for the -\b-s\bs option to the s\bsh\bho\bop\bpt\bt
builtin command (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below). The options
- appearing in B\bBA\bAS\bSH\bHO\bOP\bPT\bTS\bS are those reported as _\bo_\bn by s\bsh\bho\bop\bpt\bt. If
- this variable is in the environment when b\bba\bas\bsh\bh starts up, the
+ appearing in B\bBA\bAS\bSH\bHO\bOP\bPT\bTS\bS are those reported as _\bo_\bn by s\bsh\bho\bop\bpt\bt. If
+ this variable is in the environment when b\bba\bas\bsh\bh starts up, the
shell enables each option in the list before reading any startup
- files. If this variable is exported, child shells will enable
+ files. If this variable is exported, child shells will enable
each option in the list. This variable is read-only.
B\bBA\bAS\bSH\bHP\bPI\bID\bD
- Expands to the process ID of the current b\bba\bas\bsh\bh process. This
- differs from $\b$$\b$ under certain circumstances, such as subshells
- that do not require b\bba\bas\bsh\bh to be re-initialized. Assignments to
- B\bBA\bAS\bSH\bHP\bPI\bID\bD have no effect. If B\bBA\bAS\bSH\bHP\bPI\bID\bD is unset, it loses its spe-
+ Expands to the process ID of the current b\bba\bas\bsh\bh process. This
+ differs from $\b$$\b$ under certain circumstances, such as subshells
+ that do not require b\bba\bas\bsh\bh to be re-initialized. Assignments to
+ B\bBA\bAS\bSH\bHP\bPI\bID\bD have no effect. If B\bBA\bAS\bSH\bHP\bPI\bID\bD is unset, it loses its spe-
cial properties, even if it is subsequently reset.
B\bBA\bAS\bSH\bH_\b_A\bAL\bLI\bIA\bAS\bSE\bES\bS
- An associative array variable whose members correspond to the
- internal list of aliases as maintained by the a\bal\bli\bia\bas\bs builtin.
- Elements added to this array appear in the alias list; however,
- unsetting array elements currently does not remove aliases from
- the alias list. If B\bBA\bAS\bSH\bH_\b_A\bAL\bLI\bIA\bAS\bSE\bES\bS is unset, it loses its special
+ An associative array variable whose members correspond to the
+ internal list of aliases as maintained by the a\bal\bli\bia\bas\bs builtin.
+ Elements added to this array appear in the alias list; however,
+ unsetting array elements currently does not remove aliases from
+ the alias list. If B\bBA\bAS\bSH\bH_\b_A\bAL\bLI\bIA\bAS\bSE\bES\bS is unset, it loses its special
properties, even if it is subsequently reset.
B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGC\bC
- An array variable whose values are the number of parameters in
+ An array variable whose values are the number of parameters in
each frame of the current b\bba\bas\bsh\bh execution call stack. The number
- of parameters to the current subroutine (shell function or
- script executed with .\b. or s\bso\bou\bur\brc\bce\be) is at the top of the stack.
- When a subroutine is executed, the number of parameters passed
+ of parameters to the current subroutine (shell function or
+ script executed with .\b. or s\bso\bou\bur\brc\bce\be) is at the top of the stack.
+ When a subroutine is executed, the number of parameters passed
is pushed onto B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGC\bC. The shell sets B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGC\bC only when in
extended debugging mode (see the description of the e\bex\bxt\btd\bde\beb\bbu\bug\bg op-
- tion to the s\bsh\bho\bop\bpt\bt builtin below). Setting e\bex\bxt\btd\bde\beb\bbu\bug\bg after the
+ tion to the s\bsh\bho\bop\bpt\bt builtin below). Setting e\bex\bxt\btd\bde\beb\bbu\bug\bg after the
shell has started to execute a script, or referencing this vari-
- able when e\bex\bxt\btd\bde\beb\bbu\bug\bg is not set, may result in inconsistent val-
+ able when e\bex\bxt\btd\bde\beb\bbu\bug\bg is not set, may result in inconsistent val-
ues. Assignments to B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGC\bC have no effect, and it may not be
unset.
B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGV\bV
- An array variable containing all of the parameters in the cur-
+ An array variable containing all of the parameters in the cur-
rent b\bba\bas\bsh\bh execution call stack. The final parameter of the last
- subroutine call is at the top of the stack; the first parameter
+ subroutine call is at the top of the stack; the first parameter
of the initial call is at the bottom. When a subroutine is exe-
- cuted, the shell pushes the supplied parameters onto B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGV\bV.
- The shell sets B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGV\bV only when in extended debugging mode
+ cuted, the shell pushes the supplied parameters onto B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGV\bV.
+ The shell sets B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGV\bV only when in extended debugging mode
(see the description of the e\bex\bxt\btd\bde\beb\bbu\bug\bg option to the s\bsh\bho\bop\bpt\bt builtin
below). Setting e\bex\bxt\btd\bde\beb\bbu\bug\bg after the shell has started to execute
a script, or referencing this variable when e\bex\bxt\btd\bde\beb\bbu\bug\bg is not set,
- may result in inconsistent values. Assignments to B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGV\bV
+ may result in inconsistent values. Assignments to B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGV\bV
have no effect, and it may not be unset.
B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGV\bV0\b0
- When referenced, this variable expands to the name of the shell
+ When referenced, this variable expands to the name of the shell
or shell script (identical to $\b$0\b0; see the description of special
- parameter 0 above). Assigning a value to B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGV\bV0\b0 sets $\b$0\b0 to
- the same value. If B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGV\bV0\b0 is unset, it loses its special
+ parameter 0 above). Assigning a value to B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGV\bV0\b0 sets $\b$0\b0 to
+ the same value. If B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGV\bV0\b0 is unset, it loses its special
properties, even if it is subsequently reset.
B\bBA\bAS\bSH\bH_\b_C\bCM\bMD\bDS\bS
- An associative array variable whose members correspond to the
- internal hash table of commands as maintained by the h\bha\bas\bsh\bh
+ An associative array variable whose members correspond to the
+ internal hash table of commands as maintained by the h\bha\bas\bsh\bh
builtin. Adding elements to this array makes them appear in the
hash table; however, unsetting array elements currently does not
- remove command names from the hash table. If B\bBA\bAS\bSH\bH_\b_C\bCM\bMD\bDS\bS is un-
+ remove command names from the hash table. If B\bBA\bAS\bSH\bH_\b_C\bCM\bMD\bDS\bS is un-
set, it loses its special properties, even if it is subsequently
reset.
B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMM\bMA\bAN\bND\bD
- Expands to the command currently being executed or about to be
- executed, unless the shell is executing a command as the result
+ Expands to the command currently being executed or about to be
+ executed, unless the shell is executing a command as the result
of a trap, in which case it is the command executing at the time
- of the trap. If B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMM\bMA\bAN\bND\bD is unset, it loses its special
+ of the trap. If B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMM\bMA\bAN\bND\bD is unset, it loses its special
properties, even if it is subsequently reset.
B\bBA\bAS\bSH\bH_\b_E\bEX\bXE\bEC\bCU\bUT\bTI\bIO\bON\bN_\b_S\bST\bTR\bRI\bIN\bNG\bG
The command argument to the -\b-c\bc invocation option.
B\bBA\bAS\bSH\bH_\b_L\bLI\bIN\bNE\bEN\bNO\bO
- An array variable whose members are the line numbers in source
- files where each corresponding member of F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE was invoked.
+ An array variable whose members are the line numbers in source
+ files where each corresponding member of F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE was invoked.
$\b${\b{B\bBA\bAS\bSH\bH_\b_L\bLI\bIN\bNE\bEN\bNO\bO[\b[_\b$_\bi]\b]}\b} is the line number in the source file
($\b${\b{B\bBA\bAS\bSH\bH_\b_S\bSO\bOU\bUR\bRC\bCE\bE[\b[_\b$_\bi_\b+_\b1]\b]}\b}) where $\b${\b{F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE[\b[_\b$_\bi]\b]}\b} was called (or
- $\b${\b{B\bBA\bAS\bSH\bH_\b_L\bLI\bIN\bNE\bEN\bNO\bO[\b[_\b$_\bi_\b-_\b1]\b]}\b} if referenced within another shell func-
- tion). Use L\bLI\bIN\bNE\bEN\bNO\bO to obtain the current line number. Assign-
+ $\b${\b{B\bBA\bAS\bSH\bH_\b_L\bLI\bIN\bNE\bEN\bNO\bO[\b[_\b$_\bi_\b-_\b1]\b]}\b} if referenced within another shell func-
+ tion). Use L\bLI\bIN\bNE\bEN\bNO\bO to obtain the current line number. Assign-
ments to B\bBA\bAS\bSH\bH_\b_L\bLI\bIN\bNE\bEN\bNO\bO have no effect, and it may not be unset.
B\bBA\bAS\bSH\bH_\b_L\bLO\bOA\bAD\bDA\bAB\bBL\bLE\bES\bS_\b_P\bPA\bAT\bTH\bH
- A colon-separated list of directories in which the e\ben\bna\bab\bbl\ble\be com-
+ A colon-separated list of directories in which the e\ben\bna\bab\bbl\ble\be com-
mand looks for dynamically loadable builtins.
B\bBA\bAS\bSH\bH_\b_M\bMO\bON\bNO\bOS\bSE\bEC\bCO\bON\bND\bDS\bS
- Each time this variable is referenced, it expands to the value
- returned by the system's monotonic clock, if one is available.
- If there is no monotonic clock, this is equivalent to E\bEP\bPO\bOC\bCH\bHS\bSE\bEC\bC-\b-
- O\bON\bND\bDS\bS. If B\bBA\bAS\bSH\bH_\b_M\bMO\bON\bNO\bOS\bSE\bEC\bCO\bON\bND\bDS\bS is unset, it loses its special prop-
+ Each time this variable is referenced, it expands to the value
+ returned by the system's monotonic clock, if one is available.
+ If there is no monotonic clock, this is equivalent to E\bEP\bPO\bOC\bCH\bHS\bSE\bEC\bC-\b-
+ O\bON\bND\bDS\bS. If B\bBA\bAS\bSH\bH_\b_M\bMO\bON\bNO\bOS\bSE\bEC\bCO\bON\bND\bDS\bS is unset, it loses its special prop-
erties, even if it is subsequently reset.
B\bBA\bAS\bSH\bH_\b_R\bRE\bEM\bMA\bAT\bTC\bCH\bH
- An array variable whose members are assigned by the =\b=~\b~ binary
- operator to the [\b[[\b[ conditional command. The element with index
- 0 is the portion of the string matching the entire regular ex-
+ An array variable whose members are assigned by the =\b=~\b~ binary
+ operator to the [\b[[\b[ conditional command. The element with index
+ 0 is the portion of the string matching the entire regular ex-
pression. The element with index _\bn is the portion of the string
matching the _\bnth parenthesized subexpression.
B\bBA\bAS\bSH\bH_\b_S\bSO\bOU\bUR\bRC\bCE\bE
- An array variable whose members are the source filenames where
- the corresponding shell function names in the F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE array
+ An array variable whose members are the source filenames where
+ the corresponding shell function names in the F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE array
variable are defined. The shell function $\b${\b{F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE[\b[_\b$_\bi]\b]}\b} is de-
- fined in the file $\b${\b{B\bBA\bAS\bSH\bH_\b_S\bSO\bOU\bUR\bRC\bCE\bE[\b[_\b$_\bi]\b]}\b} and called from
- $\b${\b{B\bBA\bAS\bSH\bH_\b_S\bSO\bOU\bUR\bRC\bCE\bE[\b[_\b$_\bi_\b+_\b1]\b]}\b}. Assignments to B\bBA\bAS\bSH\bH_\b_S\bSO\bOU\bUR\bRC\bCE\bE have no ef-
+ fined in the file $\b${\b{B\bBA\bAS\bSH\bH_\b_S\bSO\bOU\bUR\bRC\bCE\bE[\b[_\b$_\bi]\b]}\b} and called from
+ $\b${\b{B\bBA\bAS\bSH\bH_\b_S\bSO\bOU\bUR\bRC\bCE\bE[\b[_\b$_\bi_\b+_\b1]\b]}\b}. Assignments to B\bBA\bAS\bSH\bH_\b_S\bSO\bOU\bUR\bRC\bCE\bE have no ef-
fect, and it may not be unset.
B\bBA\bAS\bSH\bH_\b_S\bSU\bUB\bBS\bSH\bHE\bEL\bLL\bL
- Incremented by one within each subshell or subshell environment
- when the shell begins executing in that environment. The ini-
- tial value is 0. If B\bBA\bAS\bSH\bH_\b_S\bSU\bUB\bBS\bSH\bHE\bEL\bLL\bL is unset, it loses its spe-
+ Incremented by one within each subshell or subshell environment
+ when the shell begins executing in that environment. The ini-
+ tial value is 0. If B\bBA\bAS\bSH\bH_\b_S\bSU\bUB\bBS\bSH\bHE\bEL\bLL\bL is unset, it loses its spe-
cial properties, even if it is subsequently reset.
B\bBA\bAS\bSH\bH_\b_T\bTR\bRA\bAP\bPS\bSI\bIG\bG
- Set to the signal number corresponding to the trap action being
- executed during its execution. See the description of t\btr\bra\bap\bp un-
- der S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below for information about signal
+ Set to the signal number corresponding to the trap action being
+ executed during its execution. See the description of t\btr\bra\bap\bp un-
+ der S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below for information about signal
numbers and trap execution.
B\bBA\bAS\bSH\bH_\b_V\bVE\bER\bRS\bSI\bIN\bNF\bFO\bO
A readonly array variable whose members hold version information
- for this instance of b\bba\bas\bsh\bh. The values assigned to the array
+ for this instance of b\bba\bas\bsh\bh. The values assigned to the array
members are as follows:
B\bBA\bAS\bSH\bH_\b_V\bVE\bER\bRS\bSI\bIN\bNF\bFO\bO[\b[0]\b] The major version number (the _\br_\be_\bl_\be_\ba_\bs_\be).
B\bBA\bAS\bSH\bH_\b_V\bVE\bER\bRS\bSI\bIN\bNF\bFO\bO[\b[1]\b] The minor version number (the _\bv_\be_\br_\bs_\bi_\bo_\bn).
B\bBA\bAS\bSH\bH_\b_V\bVE\bER\bRS\bSI\bIN\bNF\bFO\bO[\b[4]\b] The release status (e.g., _\bb_\be_\bt_\ba).
B\bBA\bAS\bSH\bH_\b_V\bVE\bER\bRS\bSI\bIN\bNF\bFO\bO[\b[5]\b] The value of M\bMA\bAC\bCH\bHT\bTY\bYP\bPE\bE.
B\bBA\bAS\bSH\bH_\b_V\bVE\bER\bRS\bSI\bIO\bON\bN
- Expands to a string describing the version of this instance of
+ Expands to a string describing the version of this instance of
b\bba\bas\bsh\bh (e.g., 5.2.37(3)-release).
C\bCO\bOM\bMP\bP_\b_C\bCW\bWO\bOR\bRD\bD
- An index into $\b${\b{C\bCO\bOM\bMP\bP_\b_W\bWO\bOR\bRD\bDS\bS}\b} of the word containing the current
+ An index into $\b${\b{C\bCO\bOM\bMP\bP_\b_W\bWO\bOR\bRD\bDS\bS}\b} of the word containing the current
cursor position. This variable is available only in shell func-
- tions invoked by the programmable completion facilities (see
+ tions invoked by the programmable completion facilities (see
P\bPr\bro\bog\bgr\bra\bam\bmm\bma\bab\bbl\ble\be C\bCo\bom\bmp\bpl\ble\bet\bti\bio\bon\bn below).
C\bCO\bOM\bMP\bP_\b_K\bKE\bEY\bY
The key (or final key of a key sequence) used to invoke the cur-
- rent completion function. This variable is available only in
- shell functions and external commands invoked by the programma-
+ rent completion function. This variable is available only in
+ shell functions and external commands invoked by the programma-
ble completion facilities (see P\bPr\bro\bog\bgr\bra\bam\bmm\bma\bab\bbl\ble\be C\bCo\bom\bmp\bpl\ble\bet\bti\bio\bon\bn below).
C\bCO\bOM\bMP\bP_\b_L\bLI\bIN\bNE\bE
- The current command line. This variable is available only in
- shell functions and external commands invoked by the programma-
+ The current command line. This variable is available only in
+ shell functions and external commands invoked by the programma-
ble completion facilities (see P\bPr\bro\bog\bgr\bra\bam\bmm\bma\bab\bbl\ble\be C\bCo\bom\bmp\bpl\ble\bet\bti\bio\bon\bn below).
C\bCO\bOM\bMP\bP_\b_P\bPO\bOI\bIN\bNT\bT
- The index of the current cursor position relative to the begin-
- ning of the current command. If the current cursor position is
+ The index of the current cursor position relative to the begin-
+ ning of the current command. If the current cursor position is
at the end of the current command, the value of this variable is
- equal to $\b${\b{#\b#C\bCO\bOM\bMP\bP_\b_L\bLI\bIN\bNE\bE}\b}. This variable is available only in
- shell functions and external commands invoked by the programma-
+ equal to $\b${\b{#\b#C\bCO\bOM\bMP\bP_\b_L\bLI\bIN\bNE\bE}\b}. This variable is available only in
+ shell functions and external commands invoked by the programma-
ble completion facilities (see P\bPr\bro\bog\bgr\bra\bam\bmm\bma\bab\bbl\ble\be C\bCo\bom\bmp\bpl\ble\bet\bti\bio\bon\bn below).
C\bCO\bOM\bMP\bP_\b_T\bTY\bYP\bPE\bE
- Set to an integer value corresponding to the type of attempted
- completion that caused a completion function to be called: _\bT_\bA_\bB,
- for normal completion, _\b?, for listing completions after succes-
- sive tabs, _\b!, for listing alternatives on partial word comple-
- tion, _\b@, to list completions if the word is not unmodified, or
- _\b%, for menu completion. This variable is available only in
- shell functions and external commands invoked by the programma-
+ Set to an integer value corresponding to the type of attempted
+ completion that caused a completion function to be called: _\bT_\bA_\bB,
+ for normal completion, _\b?, for listing completions after succes-
+ sive tabs, _\b!, for listing alternatives on partial word comple-
+ tion, _\b@, to list completions if the word is not unmodified, or
+ _\b%, for menu completion. This variable is available only in
+ shell functions and external commands invoked by the programma-
ble completion facilities (see P\bPr\bro\bog\bgr\bra\bam\bmm\bma\bab\bbl\ble\be C\bCo\bom\bmp\bpl\ble\bet\bti\bio\bon\bn below).
C\bCO\bOM\bMP\bP_\b_W\bWO\bOR\bRD\bDB\bBR\bRE\bEA\bAK\bKS\bS
- The set of characters that the r\bre\bea\bad\bdl\bli\bin\bne\be library treats as word
- separators when performing word completion. If C\bCO\bOM\bMP\bP_\b_W\bWO\bOR\bRD\bDB\bBR\bRE\bEA\bAK\bKS\bS
- is unset, it loses its special properties, even if it is subse-
+ The set of characters that the r\bre\bea\bad\bdl\bli\bin\bne\be library treats as word
+ separators when performing word completion. If C\bCO\bOM\bMP\bP_\b_W\bWO\bOR\bRD\bDB\bBR\bRE\bEA\bAK\bKS\bS
+ is unset, it loses its special properties, even if it is subse-
quently reset.
C\bCO\bOM\bMP\bP_\b_W\bWO\bOR\bRD\bDS\bS
- An array variable (see A\bAr\brr\bra\bay\bys\bs below) consisting of the individ-
- ual words in the current command line. The line is split into
- words as r\bre\bea\bad\bdl\bli\bin\bne\be would split it, using C\bCO\bOM\bMP\bP_\b_W\bWO\bOR\bRD\bDB\bBR\bRE\bEA\bAK\bKS\bS as de-
- scribed above. This variable is available only in shell func-
- tions invoked by the programmable completion facilities (see
+ An array variable (see A\bAr\brr\bra\bay\bys\bs below) consisting of the individ-
+ ual words in the current command line. The line is split into
+ words as r\bre\bea\bad\bdl\bli\bin\bne\be would split it, using C\bCO\bOM\bMP\bP_\b_W\bWO\bOR\bRD\bDB\bBR\bRE\bEA\bAK\bKS\bS as de-
+ scribed above. This variable is available only in shell func-
+ tions invoked by the programmable completion facilities (see
P\bPr\bro\bog\bgr\bra\bam\bmm\bma\bab\bbl\ble\be C\bCo\bom\bmp\bpl\ble\bet\bti\bio\bon\bn below).
- C\bCO\bOP\bPR\bRO\bOC\bC An array variable (see A\bAr\brr\bra\bay\bys\bs below) created to hold the file
- descriptors for output from and input to an unnamed coprocess
+ C\bCO\bOP\bPR\bRO\bOC\bC An array variable (see A\bAr\brr\bra\bay\bys\bs below) created to hold the file
+ descriptors for output from and input to an unnamed coprocess
(see C\bCo\bop\bpr\bro\boc\bce\bes\bss\bse\bes\bs above).
D\bDI\bIR\bRS\bST\bTA\bAC\bCK\bK
An array variable (see A\bAr\brr\bra\bay\bys\bs below) containing the current con-
- tents of the directory stack. Directories appear in the stack
- in the order they are displayed by the d\bdi\bir\brs\bs builtin. Assigning
+ tents of the directory stack. Directories appear in the stack
+ in the order they are displayed by the d\bdi\bir\brs\bs builtin. Assigning
to members of this array variable may be used to modify directo-
- ries already in the stack, but the p\bpu\bus\bsh\bhd\bd and p\bpo\bop\bpd\bd builtins must
- be used to add and remove directories. Assigning to this vari-
- able does not change the current directory. If D\bDI\bIR\bRS\bST\bTA\bAC\bCK\bK is un-
+ ries already in the stack, but the p\bpu\bus\bsh\bhd\bd and p\bpo\bop\bpd\bd builtins must
+ be used to add and remove directories. Assigning to this vari-
+ able does not change the current directory. If D\bDI\bIR\bRS\bST\bTA\bAC\bCK\bK is un-
set, it loses its special properties, even if it is subsequently
reset.
E\bEP\bPO\bOC\bCH\bHR\bRE\bEA\bAL\bLT\bTI\bIM\bME\bE
Each time this parameter is referenced, it expands to the number
- of seconds since the Unix Epoch (see _\bt_\bi_\bm_\be(3)) as a floating-
+ of seconds since the Unix Epoch (see _\bt_\bi_\bm_\be(3)) as a floating-
point value with micro-second granularity. Assignments to
- E\bEP\bPO\bOC\bCH\bHR\bRE\bEA\bAL\bLT\bTI\bIM\bME\bE are ignored. If E\bEP\bPO\bOC\bCH\bHR\bRE\bEA\bAL\bLT\bTI\bIM\bME\bE is unset, it loses
+ E\bEP\bPO\bOC\bCH\bHR\bRE\bEA\bAL\bLT\bTI\bIM\bME\bE are ignored. If E\bEP\bPO\bOC\bCH\bHR\bRE\bEA\bAL\bLT\bTI\bIM\bME\bE is unset, it loses
its special properties, even if it is subsequently reset.
E\bEP\bPO\bOC\bCH\bHS\bSE\bEC\bCO\bON\bND\bDS\bS
Each time this parameter is referenced, it expands to the number
- of seconds since the Unix Epoch (see _\bt_\bi_\bm_\be(3)). Assignments to
- E\bEP\bPO\bOC\bCH\bHS\bSE\bEC\bCO\bON\bND\bDS\bS are ignored. If E\bEP\bPO\bOC\bCH\bHS\bSE\bEC\bCO\bON\bND\bDS\bS is unset, it loses
+ of seconds since the Unix Epoch (see _\bt_\bi_\bm_\be(3)). Assignments to
+ E\bEP\bPO\bOC\bCH\bHS\bSE\bEC\bCO\bON\bND\bDS\bS are ignored. If E\bEP\bPO\bOC\bCH\bHS\bSE\bEC\bCO\bON\bND\bDS\bS is unset, it loses
its special properties, even if it is subsequently reset.
- E\bEU\bUI\bID\bD Expands to the effective user ID of the current user, initial-
+ E\bEU\bUI\bID\bD Expands to the effective user ID of the current user, initial-
ized at shell startup. This variable is readonly.
F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE
- An array variable containing the names of all shell functions
+ An array variable containing the names of all shell functions
currently in the execution call stack. The element with index 0
is the name of any currently-executing shell function. The bot-
- tom-most element (the one with the highest index) is "main".
- This variable exists only when a shell function is executing.
- Assignments to F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE have no effect. If F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE is unset,
- it loses its special properties, even if it is subsequently re-
+ tom-most element (the one with the highest index) is "main".
+ This variable exists only when a shell function is executing.
+ Assignments to F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE have no effect. If F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE is unset,
+ it loses its special properties, even if it is subsequently re-
set.
- This variable can be used with B\bBA\bAS\bSH\bH_\b_L\bLI\bIN\bNE\bEN\bNO\bO and B\bBA\bAS\bSH\bH_\b_S\bSO\bOU\bUR\bRC\bCE\bE.
- Each element of F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE has corresponding elements in
+ This variable can be used with B\bBA\bAS\bSH\bH_\b_L\bLI\bIN\bNE\bEN\bNO\bO and B\bBA\bAS\bSH\bH_\b_S\bSO\bOU\bUR\bRC\bCE\bE.
+ Each element of F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE has corresponding elements in
B\bBA\bAS\bSH\bH_\b_L\bLI\bIN\bNE\bEN\bNO\bO and B\bBA\bAS\bSH\bH_\b_S\bSO\bOU\bUR\bRC\bCE\bE to describe the call stack. For in-
- stance, $\b${\b{F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE[\b[_\b$_\bi]\b]}\b} was called from the file
- $\b${\b{B\bBA\bAS\bSH\bH_\b_S\bSO\bOU\bUR\bRC\bCE\bE[\b[_\b$_\bi_\b+_\b1]\b]}\b} at line number $\b${\b{B\bBA\bAS\bSH\bH_\b_L\bLI\bIN\bNE\bEN\bNO\bO[\b[_\b$_\bi]\b]}\b}. The
+ stance, $\b${\b{F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE[\b[_\b$_\bi]\b]}\b} was called from the file
+ $\b${\b{B\bBA\bAS\bSH\bH_\b_S\bSO\bOU\bUR\bRC\bCE\bE[\b[_\b$_\bi_\b+_\b1]\b]}\b} at line number $\b${\b{B\bBA\bAS\bSH\bH_\b_L\bLI\bIN\bNE\bEN\bNO\bO[\b[_\b$_\bi]\b]}\b}. The
c\bca\bal\bll\ble\ber\br builtin displays the current call stack using this infor-
mation.
- G\bGR\bRO\bOU\bUP\bPS\bS An array variable containing the list of groups of which the
+ G\bGR\bRO\bOU\bUP\bPS\bS An array variable containing the list of groups of which the
current user is a member. Assignments to G\bGR\bRO\bOU\bUP\bPS\bS have no effect.
- If G\bGR\bRO\bOU\bUP\bPS\bS is unset, it loses its special properties, even if it
+ If G\bGR\bRO\bOU\bUP\bPS\bS is unset, it loses its special properties, even if it
is subsequently reset.
H\bHI\bIS\bST\bTC\bCM\bMD\bD
The history number, or index in the history list, of the current
- command. Assignments to H\bHI\bIS\bST\bTC\bCM\bMD\bD have no effect. If H\bHI\bIS\bST\bTC\bCM\bMD\bD is
- unset, it loses its special properties, even if it is subse-
+ command. Assignments to H\bHI\bIS\bST\bTC\bCM\bMD\bD have no effect. If H\bHI\bIS\bST\bTC\bCM\bMD\bD is
+ unset, it loses its special properties, even if it is subse-
quently reset.
H\bHO\bOS\bST\bTN\bNA\bAM\bME\bE
Automatically set to the name of the current host.
H\bHO\bOS\bST\bTT\bTY\bYP\bPE\bE
- Automatically set to a string that uniquely describes the type
- of machine on which b\bba\bas\bsh\bh is executing. The default is system-
+ Automatically set to a string that uniquely describes the type
+ of machine on which b\bba\bas\bsh\bh is executing. The default is system-
dependent.
- L\bLI\bIN\bNE\bEN\bNO\bO Each time this parameter is referenced, the shell substitutes a
- decimal number representing the current sequential line number
- (starting with 1) within a script or function. When not in a
- script or function, the value substituted is not guaranteed to
+ L\bLI\bIN\bNE\bEN\bNO\bO Each time this parameter is referenced, the shell substitutes a
+ decimal number representing the current sequential line number
+ (starting with 1) within a script or function. When not in a
+ script or function, the value substituted is not guaranteed to
be meaningful. If L\bLI\bIN\bNE\bEN\bNO\bO is unset, it loses its special proper-
ties, even if it is subsequently reset.
M\bMA\bAC\bCH\bHT\bTY\bYP\bPE\bE
- Automatically set to a string that fully describes the system
- type on which b\bba\bas\bsh\bh is executing, in the standard GNU _\bc_\bp_\bu_\b-_\bc_\bo_\bm_\b-
+ Automatically set to a string that fully describes the system
+ type on which b\bba\bas\bsh\bh is executing, in the standard GNU _\bc_\bp_\bu_\b-_\bc_\bo_\bm_\b-
_\bp_\ba_\bn_\by_\b-_\bs_\by_\bs_\bt_\be_\bm format. The default is system-dependent.
M\bMA\bAP\bPF\bFI\bIL\bLE\bE
- An array variable (see A\bAr\brr\bra\bay\bys\bs below) created to hold the text
+ An array variable (see A\bAr\brr\bra\bay\bys\bs below) created to hold the text
read by the m\bma\bap\bpf\bfi\bil\ble\be builtin when no variable name is supplied.
O\bOL\bLD\bDP\bPW\bWD\bD The previous working directory as set by the c\bcd\bd command.
- O\bOP\bPT\bTA\bAR\bRG\bG The value of the last option argument processed by the g\bge\bet\bto\bop\bpt\bts\bs
+ O\bOP\bPT\bTA\bAR\bRG\bG The value of the last option argument processed by the g\bge\bet\bto\bop\bpt\bts\bs
builtin command (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below).
- O\bOP\bPT\bTI\bIN\bND\bD The index of the next argument to be processed by the g\bge\bet\bto\bop\bpt\bts\bs
+ O\bOP\bPT\bTI\bIN\bND\bD The index of the next argument to be processed by the g\bge\bet\bto\bop\bpt\bts\bs
builtin command (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below).
- O\bOS\bST\bTY\bYP\bPE\bE Automatically set to a string that describes the operating sys-
- tem on which b\bba\bas\bsh\bh is executing. The default is system-depen-
+ O\bOS\bST\bTY\bYP\bPE\bE Automatically set to a string that describes the operating sys-
+ tem on which b\bba\bas\bsh\bh is executing. The default is system-depen-
dent.
P\bPI\bIP\bPE\bES\bST\bTA\bAT\bTU\bUS\bS
- An array variable (see A\bAr\brr\bra\bay\bys\bs below) containing a list of exit
- status values from the commands in the most-recently-executed
- foreground pipeline, which may consist of only a simple command
+ An array variable (see A\bAr\brr\bra\bay\bys\bs below) containing a list of exit
+ status values from the commands in the most-recently-executed
+ foreground pipeline, which may consist of only a simple command
(see S\bSH\bHE\bEL\bLL\bL G\bGR\bRA\bAM\bMM\bMA\bAR\bR above). B\bBa\bas\bsh\bh sets P\bPI\bIP\bPE\bES\bST\bTA\bAT\bTU\bUS\bS after executing
- multi-element pipelines, timed and negated pipelines, simple
- commands, subshells created with the ( operator, the [\b[[\b[ and (\b((\b(
+ multi-element pipelines, timed and negated pipelines, simple
+ commands, subshells created with the ( operator, the [\b[[\b[ and (\b((\b(
compound commands, and after error conditions that result in the
shell aborting command execution.
- P\bPP\bPI\bID\bD The process ID of the shell's parent. This variable is read-
+ P\bPP\bPI\bID\bD The process ID of the shell's parent. This variable is read-
only.
P\bPW\bWD\bD The current working directory as set by the c\bcd\bd command.
- R\bRA\bAN\bND\bDO\bOM\bM Each time this parameter is referenced, it expands to a random
- integer between 0 and 32767. Assigning a value to R\bRA\bAN\bND\bDO\bOM\bM ini-
- tializes (seeds) the sequence of random numbers. Seeding the
- random number generator with the same constant value produces
- the same sequence of values. If R\bRA\bAN\bND\bDO\bOM\bM is unset, it loses its
+ R\bRA\bAN\bND\bDO\bOM\bM Each time this parameter is referenced, it expands to a random
+ integer between 0 and 32767. Assigning a value to R\bRA\bAN\bND\bDO\bOM\bM ini-
+ tializes (seeds) the sequence of random numbers. Seeding the
+ random number generator with the same constant value produces
+ the same sequence of values. If R\bRA\bAN\bND\bDO\bOM\bM is unset, it loses its
special properties, even if it is subsequently reset.
R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE_\b_A\bAR\bRG\bGU\bUM\bME\bEN\bNT\bT
- Any numeric argument given to a r\bre\bea\bad\bdl\bli\bin\bne\be command that was de-
+ Any numeric argument given to a r\bre\bea\bad\bdl\bli\bin\bne\be command that was de-
fined using "bind -x" (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below) when it
was invoked.
R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE_\b_L\bLI\bIN\bNE\bE
(see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below).
R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE_\b_M\bMA\bAR\bRK\bK
The position of the mark (saved insertion point) in the r\bre\bea\bad\bdl\bli\bin\bne\be
- line buffer, for use with "bind -x" (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS
+ line buffer, for use with "bind -x" (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS
below). The characters between the insertion point and the mark
are often called the _\br_\be_\bg_\bi_\bo_\bn.
R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE_\b_P\bPO\bOI\bIN\bNT\bT
The position of the insertion point in the r\bre\bea\bad\bdl\bli\bin\bne\be line buffer,
for use with "bind -x" (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below).
- R\bRE\bEP\bPL\bLY\bY Set to the line of input read by the r\bre\bea\bad\bd builtin command when
+ R\bRE\bEP\bPL\bLY\bY Set to the line of input read by the r\bre\bea\bad\bd builtin command when
no arguments are supplied.
S\bSE\bEC\bCO\bON\bND\bDS\bS
Each time this parameter is referenced, it expands to the number
- of seconds since shell invocation. If a value is assigned to
- S\bSE\bEC\bCO\bON\bND\bDS\bS, the value returned upon subsequent references is the
- number of seconds since the assignment plus the value assigned.
- The number of seconds at shell invocation and the current time
+ of seconds since shell invocation. If a value is assigned to
+ S\bSE\bEC\bCO\bON\bND\bDS\bS, the value returned upon subsequent references is the
+ number of seconds since the assignment plus the value assigned.
+ The number of seconds at shell invocation and the current time
are always determined by querying the system clock at one-second
- resolution. If S\bSE\bEC\bCO\bON\bND\bDS\bS is unset, it loses its special proper-
+ resolution. If S\bSE\bEC\bCO\bON\bND\bDS\bS is unset, it loses its special proper-
ties, even if it is subsequently reset.
S\bSH\bHE\bEL\bLL\bLO\bOP\bPT\bTS\bS
- A colon-separated list of enabled shell options. Each word in
- the list is a valid argument for the -\b-o\bo option to the s\bse\bet\bt
+ A colon-separated list of enabled shell options. Each word in
+ the list is a valid argument for the -\b-o\bo option to the s\bse\bet\bt
builtin command (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below). The options
- appearing in S\bSH\bHE\bEL\bLL\bLO\bOP\bPT\bTS\bS are those reported as _\bo_\bn by s\bse\bet\bt -\b-o\bo. If
- this variable is in the environment when b\bba\bas\bsh\bh starts up, the
+ appearing in S\bSH\bHE\bEL\bLL\bLO\bOP\bPT\bTS\bS are those reported as _\bo_\bn by s\bse\bet\bt -\b-o\bo. If
+ this variable is in the environment when b\bba\bas\bsh\bh starts up, the
shell enables each option in the list before reading any startup
- files. If this variable is exported, child shells will enable
+ files. If this variable is exported, child shells will enable
each option in the list. This variable is read-only.
S\bSH\bHL\bLV\bVL\bL Incremented by one each time an instance of b\bba\bas\bsh\bh is started.
S\bSR\bRA\bAN\bND\bDO\bOM\bM
- Each time it is referenced, this variable expands to a 32-bit
+ Each time it is referenced, this variable expands to a 32-bit
pseudo-random number. The random number generator is not linear
- on systems that support _\b/_\bd_\be_\bv_\b/_\bu_\br_\ba_\bn_\bd_\bo_\bm or _\ba_\br_\bc_\b4_\br_\ba_\bn_\bd_\bo_\bm(3), so each
+ on systems that support _\b/_\bd_\be_\bv_\b/_\bu_\br_\ba_\bn_\bd_\bo_\bm or _\ba_\br_\bc_\b4_\br_\ba_\bn_\bd_\bo_\bm(3), so each
returned number has no relationship to the numbers preceding it.
- The random number generator cannot be seeded, so assignments to
+ The random number generator cannot be seeded, so assignments to
this variable have no effect. If S\bSR\bRA\bAN\bND\bDO\bOM\bM is unset, it loses its
special properties, even if it is subsequently reset.
U\bUI\bID\bD Expands to the user ID of the current user, initialized at shell
startup. This variable is readonly.
- The shell uses the following variables. In some cases, b\bba\bas\bsh\bh assigns a
+ The shell uses the following variables. In some cases, b\bba\bas\bsh\bh assigns a
default value to a variable; these cases are noted below.
B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMP\bPA\bAT\bT
- The value is used to set the shell's compatibility level. See
- S\bSH\bHE\bEL\bLL\bL C\bCO\bOM\bMP\bPA\bAT\bTI\bIB\bBI\bIL\bLI\bIT\bTY\bY M\bMO\bOD\bDE\bE below for a description of the various
+ The value is used to set the shell's compatibility level. See
+ S\bSH\bHE\bEL\bLL\bL C\bCO\bOM\bMP\bPA\bAT\bTI\bIB\bBI\bIL\bLI\bIT\bTY\bY M\bMO\bOD\bDE\bE below for a description of the various
compatibility levels and their effects. The value may be a dec-
- imal number (e.g., 4.2) or an integer (e.g., 42) corresponding
- to the desired compatibility level. If B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMP\bPA\bAT\bT is unset or
- set to the empty string, the compatibility level is set to the
- default for the current version. If B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMP\bPA\bAT\bT is set to a
- value that is not one of the valid compatibility levels, the
- shell prints an error message and sets the compatibility level
- to the default for the current version. A subset of the valid
- values correspond to the compatibility levels described below
- under S\bSH\bHE\bEL\bLL\bL C\bCO\bOM\bMP\bPA\bAT\bTI\bIB\bBI\bIL\bLI\bIT\bTY\bY M\bMO\bOD\bDE\bE. For example, 4.2 and 42 are
- valid values that correspond to the c\bco\bom\bmp\bpa\bat\bt4\b42\b2 s\bsh\bho\bop\bpt\bt option and
- set the compatibility level to 42. The current version is also
+ imal number (e.g., 4.2) or an integer (e.g., 42) corresponding
+ to the desired compatibility level. If B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMP\bPA\bAT\bT is unset or
+ set to the empty string, the compatibility level is set to the
+ default for the current version. If B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMP\bPA\bAT\bT is set to a
+ value that is not one of the valid compatibility levels, the
+ shell prints an error message and sets the compatibility level
+ to the default for the current version. A subset of the valid
+ values correspond to the compatibility levels described below
+ under S\bSH\bHE\bEL\bLL\bL C\bCO\bOM\bMP\bPA\bAT\bTI\bIB\bBI\bIL\bLI\bIT\bTY\bY M\bMO\bOD\bDE\bE. For example, 4.2 and 42 are
+ valid values that correspond to the c\bco\bom\bmp\bpa\bat\bt4\b42\b2 s\bsh\bho\bop\bpt\bt option and
+ set the compatibility level to 42. The current version is also
a valid value.
B\bBA\bAS\bSH\bH_\b_E\bEN\bNV\bV
- If this parameter is set when b\bba\bas\bsh\bh is executing a shell script,
- its expanded value is interpreted as a filename containing com-
- mands to initialize the shell before it reads and executes com-
- mands from the script. The value of B\bBA\bAS\bSH\bH_\b_E\bEN\bNV\bV is subjected to
+ If this parameter is set when b\bba\bas\bsh\bh is executing a shell script,
+ its expanded value is interpreted as a filename containing com-
+ mands to initialize the shell before it reads and executes com-
+ mands from the script. The value of B\bBA\bAS\bSH\bH_\b_E\bEN\bNV\bV is subjected to
parameter expansion, command substitution, and arithmetic expan-
- sion before being interpreted as a filename. P\bPA\bAT\bTH\bH is not used
+ sion before being interpreted as a filename. P\bPA\bAT\bTH\bH is not used
to search for the resultant filename.
B\bBA\bAS\bSH\bH_\b_X\bXT\bTR\bRA\bAC\bCE\bEF\bFD\bD
- If set to an integer corresponding to a valid file descriptor,
- b\bba\bas\bsh\bh writes the trace output generated when "set -x" is enabled
- to that file descriptor, instead of the standard error. The
- file descriptor is closed when B\bBA\bAS\bSH\bH_\b_X\bXT\bTR\bRA\bAC\bCE\bEF\bFD\bD is unset or as-
+ If set to an integer corresponding to a valid file descriptor,
+ b\bba\bas\bsh\bh writes the trace output generated when "set -x" is enabled
+ to that file descriptor, instead of the standard error. The
+ file descriptor is closed when B\bBA\bAS\bSH\bH_\b_X\bXT\bTR\bRA\bAC\bCE\bEF\bFD\bD is unset or as-
signed a new value. Unsetting B\bBA\bAS\bSH\bH_\b_X\bXT\bTR\bRA\bAC\bCE\bEF\bFD\bD or assigning it the
- empty string causes the trace output to be sent to the standard
+ empty string causes the trace output to be sent to the standard
error. Note that setting B\bBA\bAS\bSH\bH_\b_X\bXT\bTR\bRA\bAC\bCE\bEF\bFD\bD to 2 (the standard error
- file descriptor) and then unsetting it will result in the stan-
+ file descriptor) and then unsetting it will result in the stan-
dard error being closed.
- C\bCD\bDP\bPA\bAT\bTH\bH The search path for the c\bcd\bd command. This is a colon-separated
+ C\bCD\bDP\bPA\bAT\bTH\bH The search path for the c\bcd\bd command. This is a colon-separated
list of directories where the shell looks for directories speci-
- fied as arguments to the c\bcd\bd command. A sample value is
+ fied as arguments to the c\bcd\bd command. A sample value is
".:~:/usr".
C\bCH\bHI\bIL\bLD\bD_\b_M\bMA\bAX\bX
- Set the number of exited child status values for the shell to
- remember. B\bBa\bas\bsh\bh will not allow this value to be decreased below
- a POSIX-mandated minimum, and there is a maximum value (cur-
- rently 8192) that this may not exceed. The minimum value is
+ Set the number of exited child status values for the shell to
+ remember. B\bBa\bas\bsh\bh will not allow this value to be decreased below
+ a POSIX-mandated minimum, and there is a maximum value (cur-
+ rently 8192) that this may not exceed. The minimum value is
system-dependent.
C\bCO\bOL\bLU\bUM\bMN\bNS\bS
- Used by the s\bse\bel\ble\bec\bct\bt compound command to determine the terminal
- width when printing selection lists. Automatically set if the
- c\bch\bhe\bec\bck\bkw\bwi\bin\bns\bsi\biz\bze\be option is enabled or in an interactive shell upon
+ Used by the s\bse\bel\ble\bec\bct\bt compound command to determine the terminal
+ width when printing selection lists. Automatically set if the
+ c\bch\bhe\bec\bck\bkw\bwi\bin\bns\bsi\biz\bze\be option is enabled or in an interactive shell upon
receipt of a S\bSI\bIG\bGW\bWI\bIN\bNC\bCH\bH.
C\bCO\bOM\bMP\bPR\bRE\bEP\bPL\bLY\bY
An array variable from which b\bba\bas\bsh\bh reads the possible completions
- generated by a shell function invoked by the programmable com-
- pletion facility (see P\bPr\bro\bog\bgr\bra\bam\bmm\bma\bab\bbl\ble\be C\bCo\bom\bmp\bpl\ble\bet\bti\bio\bon\bn below). Each ar-
+ generated by a shell function invoked by the programmable com-
+ pletion facility (see P\bPr\bro\bog\bgr\bra\bam\bmm\bma\bab\bbl\ble\be C\bCo\bom\bmp\bpl\ble\bet\bti\bio\bon\bn below). Each ar-
ray element contains one possible completion.
- E\bEM\bMA\bAC\bCS\bS If b\bba\bas\bsh\bh finds this variable in the environment when the shell
- starts with value "t", it assumes that the shell is running in
+ E\bEM\bMA\bAC\bCS\bS If b\bba\bas\bsh\bh finds this variable in the environment when the shell
+ starts with value "t", it assumes that the shell is running in
an Emacs shell buffer and disables line editing.
- E\bEN\bNV\bV Expanded and executed similarly to B\bBA\bAS\bSH\bH_\b_E\bEN\bNV\bV (see I\bIN\bNV\bVO\bOC\bCA\bAT\bTI\bIO\bON\bN
+ E\bEN\bNV\bV Expanded and executed similarly to B\bBA\bAS\bSH\bH_\b_E\bEN\bNV\bV (see I\bIN\bNV\bVO\bOC\bCA\bAT\bTI\bIO\bON\bN
above) when an interactive shell is invoked in posix mode.
E\bEX\bXE\bEC\bCI\bIG\bGN\bNO\bOR\bRE\bE
- A colon-separated list of shell patterns (see P\bPa\bat\btt\bte\ber\brn\bn M\bMa\bat\btc\bch\bhi\bin\bng\bg)
- defining the set of filenames to be ignored by command search
- using P\bPA\bAT\bTH\bH. Files whose full pathnames match one of these pat-
- terns are not considered executable files for the purposes of
+ A colon-separated list of shell patterns (see P\bPa\bat\btt\bte\ber\brn\bn M\bMa\bat\btc\bch\bhi\bin\bng\bg)
+ defining the set of filenames to be ignored by command search
+ using P\bPA\bAT\bTH\bH. Files whose full pathnames match one of these pat-
+ terns are not considered executable files for the purposes of
completion and command execution via P\bPA\bAT\bTH\bH lookup. This does not
affect the behavior of the [\b[, t\bte\bes\bst\bt, and [\b[[\b[ commands. Full path-
- names in the command hash table are not subject to E\bEX\bXE\bEC\bCI\bIG\bGN\bNO\bOR\bRE\bE.
- Use this variable to ignore shared library files that have the
- executable bit set, but are not executable files. The pattern
+ names in the command hash table are not subject to E\bEX\bXE\bEC\bCI\bIG\bGN\bNO\bOR\bRE\bE.
+ Use this variable to ignore shared library files that have the
+ executable bit set, but are not executable files. The pattern
matching honors the setting of the e\bex\bxt\btg\bgl\blo\bob\bb shell option.
F\bFC\bCE\bED\bDI\bIT\bT The default editor for the f\bfc\bc builtin command.
F\bFI\bIG\bGN\bNO\bOR\bRE\bE
- A colon-separated list of suffixes to ignore when performing
+ A colon-separated list of suffixes to ignore when performing
filename completion (see R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE below). A filename whose suf-
- fix matches one of the entries in F\bFI\bIG\bGN\bNO\bOR\bRE\bE is excluded from the
+ fix matches one of the entries in F\bFI\bIG\bGN\bNO\bOR\bRE\bE is excluded from the
list of matched filenames. A sample value is ".o:~".
F\bFU\bUN\bNC\bCN\bNE\bES\bST\bT
- If set to a numeric value greater than 0, defines a maximum
- function nesting level. Function invocations that exceed this
+ If set to a numeric value greater than 0, defines a maximum
+ function nesting level. Function invocations that exceed this
nesting level cause the current command to abort.
G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE
- A colon-separated list of patterns defining the set of file
- names to be ignored by pathname expansion. If a file name
- matched by a pathname expansion pattern also matches one of the
- patterns in G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE, it is removed from the list of matches.
+ A colon-separated list of patterns defining the set of file
+ names to be ignored by pathname expansion. If a file name
+ matched by a pathname expansion pattern also matches one of the
+ patterns in G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE, it is removed from the list of matches.
The pattern matching honors the setting of the e\bex\bxt\btg\bgl\blo\bob\bb shell op-
tion.
G\bGL\bLO\bOB\bBS\bSO\bOR\bRT\bT
- Controls how the results of pathname expansion are sorted. The
- value of this variable specifies the sort criteria and sort or-
- der for the results of pathname expansion. If this variable is
- unset or set to the null string, pathname expansion uses the
- historical behavior of sorting by name, in ascending lexico-
+ Controls how the results of pathname expansion are sorted. The
+ value of this variable specifies the sort criteria and sort or-
+ der for the results of pathname expansion. If this variable is
+ unset or set to the null string, pathname expansion uses the
+ historical behavior of sorting by name, in ascending lexico-
graphic order as determined by the L\bLC\bC_\b_C\bCO\bOL\bLL\bLA\bAT\bTE\bE shell variable.
- If set, a valid value begins with an optional _\b+, which is ig-
+ If set, a valid value begins with an optional _\b+, which is ig-
nored, or _\b-, which reverses the sort order from ascending to de-
- scending, followed by a sort specifier. The valid sort speci-
- fiers are _\bn_\ba_\bm_\be, _\bn_\bu_\bm_\be_\br_\bi_\bc, _\bs_\bi_\bz_\be, _\bm_\bt_\bi_\bm_\be, _\ba_\bt_\bi_\bm_\be, _\bc_\bt_\bi_\bm_\be, and _\bb_\bl_\bo_\bc_\bk_\bs,
+ scending, followed by a sort specifier. The valid sort speci-
+ fiers are _\bn_\ba_\bm_\be, _\bn_\bu_\bm_\be_\br_\bi_\bc, _\bs_\bi_\bz_\be, _\bm_\bt_\bi_\bm_\be, _\ba_\bt_\bi_\bm_\be, _\bc_\bt_\bi_\bm_\be, and _\bb_\bl_\bo_\bc_\bk_\bs,
which sort the files on name, names in numeric rather than lexi-
- cographic order, file size, modification time, access time, in-
- ode change time, and number of blocks, respectively. If any of
- the non-name keys compare as equal (e.g., if two files are the
+ cographic order, file size, modification time, access time, in-
+ ode change time, and number of blocks, respectively. If any of
+ the non-name keys compare as equal (e.g., if two files are the
same size), sorting uses the name as a secondary sort key.
- For example, a value of _\b-_\bm_\bt_\bi_\bm_\be sorts the results in descending
+ For example, a value of _\b-_\bm_\bt_\bi_\bm_\be sorts the results in descending
order by modification time (newest first).
- The _\bn_\bu_\bm_\be_\br_\bi_\bc specifier treats names consisting solely of digits
- as numbers and sorts them using their numeric value (so "2"
+ The _\bn_\bu_\bm_\be_\br_\bi_\bc specifier treats names consisting solely of digits
+ as numbers and sorts them using their numeric value (so "2"
sorts before "10", for example). When using _\bn_\bu_\bm_\be_\br_\bi_\bc, names con-
- taining non-digits sort after all the all-digit names and are
+ taining non-digits sort after all the all-digit names and are
sorted by name using the traditional behavior.
A sort specifier of _\bn_\bo_\bs_\bo_\br_\bt disables sorting completely; b\bba\bas\bsh\bh re-
- turns the results in the order they are read from the file sys-
+ turns the results in the order they are read from the file sys-
tem, ignoring any leading _\b-.
- If the sort specifier is missing, it defaults to _\bn_\ba_\bm_\be, so a
- value of _\b+ is equivalent to the null string, and a value of _\b-
- sorts by name in descending order. Any invalid value restores
+ If the sort specifier is missing, it defaults to _\bn_\ba_\bm_\be, so a
+ value of _\b+ is equivalent to the null string, and a value of _\b-
+ sorts by name in descending order. Any invalid value restores
the historical sorting behavior.
H\bHI\bIS\bST\bTC\bCO\bON\bNT\bTR\bRO\bOL\bL
- A colon-separated list of values controlling how commands are
- saved on the history list. If the list of values includes
- _\bi_\bg_\bn_\bo_\br_\be_\bs_\bp_\ba_\bc_\be, lines which begin with a s\bsp\bpa\bac\bce\be character are not
- saved in the history list. A value of _\bi_\bg_\bn_\bo_\br_\be_\bd_\bu_\bp_\bs causes lines
+ A colon-separated list of values controlling how commands are
+ saved on the history list. If the list of values includes
+ _\bi_\bg_\bn_\bo_\br_\be_\bs_\bp_\ba_\bc_\be, lines which begin with a s\bsp\bpa\bac\bce\be character are not
+ saved in the history list. A value of _\bi_\bg_\bn_\bo_\br_\be_\bd_\bu_\bp_\bs causes lines
matching the previous history entry not to be saved. A value of
_\bi_\bg_\bn_\bo_\br_\be_\bb_\bo_\bt_\bh is shorthand for _\bi_\bg_\bn_\bo_\br_\be_\bs_\bp_\ba_\bc_\be and _\bi_\bg_\bn_\bo_\br_\be_\bd_\bu_\bp_\bs. A value
of _\be_\br_\ba_\bs_\be_\bd_\bu_\bp_\bs causes all previous lines matching the current line
- to be removed from the history list before that line is saved.
- Any value not in the above list is ignored. If H\bHI\bIS\bST\bTC\bCO\bON\bNT\bTR\bRO\bOL\bL is
- unset, or does not include a valid value, b\bba\bas\bsh\bh saves all lines
- read by the shell parser on the history list, subject to the
+ to be removed from the history list before that line is saved.
+ Any value not in the above list is ignored. If H\bHI\bIS\bST\bTC\bCO\bON\bNT\bTR\bRO\bOL\bL is
+ unset, or does not include a valid value, b\bba\bas\bsh\bh saves all lines
+ read by the shell parser on the history list, subject to the
value of H\bHI\bIS\bST\bTI\bIG\bGN\bNO\bOR\bRE\bE. If the first line of a multi-line compound
- command was saved, the second and subsequent lines are not
- tested, and are added to the history regardless of the value of
- H\bHI\bIS\bST\bTC\bCO\bON\bNT\bTR\bRO\bOL\bL. If the first line was not saved, the second and
+ command was saved, the second and subsequent lines are not
+ tested, and are added to the history regardless of the value of
+ H\bHI\bIS\bST\bTC\bCO\bON\bNT\bTR\bRO\bOL\bL. If the first line was not saved, the second and
subsequent lines of the command are not saved either.
H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE
The name of the file in which command history is saved (see H\bHI\bIS\bS-\b-
- T\bTO\bOR\bRY\bY below). B\bBa\bas\bsh\bh assigns a default value of _\b~_\b/_\b._\bb_\ba_\bs_\bh_\b__\bh_\bi_\bs_\bt_\bo_\br_\by.
- If H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE is unset or null, the shell does not save the com-
+ T\bTO\bOR\bRY\bY below). B\bBa\bas\bsh\bh assigns a default value of _\b~_\b/_\b._\bb_\ba_\bs_\bh_\b__\bh_\bi_\bs_\bt_\bo_\br_\by.
+ If H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE is unset or null, the shell does not save the com-
mand history when it exits.
H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bES\bSI\bIZ\bZE\bE
The maximum number of lines contained in the history file. When
- this variable is assigned a value, the history file is trun-
- cated, if necessary, to contain no more than the number of his-
+ this variable is assigned a value, the history file is trun-
+ cated, if necessary, to contain no more than the number of his-
tory entries that total no more than that number of lines by re-
- moving the oldest entries. If the history list contains multi-
- line entries, the history file may contain more lines than this
- maximum to avoid leaving partial history entries. The history
- file is also truncated to this size after writing it when a
- shell exits or by the h\bhi\bis\bst\bto\bor\bry\by builtin. If the value is 0, the
- history file is truncated to zero size. Non-numeric values and
- numeric values less than zero inhibit truncation. The shell
- sets the default value to the value of H\bHI\bIS\bST\bTS\bSI\bIZ\bZE\bE after reading
+ moving the oldest entries. If the history list contains multi-
+ line entries, the history file may contain more lines than this
+ maximum to avoid leaving partial history entries. The history
+ file is also truncated to this size after writing it when a
+ shell exits or by the h\bhi\bis\bst\bto\bor\bry\by builtin. If the value is 0, the
+ history file is truncated to zero size. Non-numeric values and
+ numeric values less than zero inhibit truncation. The shell
+ sets the default value to the value of H\bHI\bIS\bST\bTS\bSI\bIZ\bZE\bE after reading
any startup files.
H\bHI\bIS\bST\bTI\bIG\bGN\bNO\bOR\bRE\bE
- A colon-separated list of patterns used to decide which command
- lines should be saved on the history list. If a command line
- matches one of the patterns in the value of H\bHI\bIS\bST\bTI\bIG\bGN\bNO\bOR\bRE\bE, it is
- not saved on the history list. Each pattern is anchored at the
- beginning of the line and must match the complete line (b\bba\bas\bsh\bh
- does not implicitly append a "*\b*"). Each pattern is tested
- against the line after the checks specified by H\bHI\bIS\bST\bTC\bCO\bON\bNT\bTR\bRO\bOL\bL are
+ A colon-separated list of patterns used to decide which command
+ lines should be saved on the history list. If a command line
+ matches one of the patterns in the value of H\bHI\bIS\bST\bTI\bIG\bGN\bNO\bOR\bRE\bE, it is
+ not saved on the history list. Each pattern is anchored at the
+ beginning of the line and must match the complete line (b\bba\bas\bsh\bh
+ does not implicitly append a "*\b*"). Each pattern is tested
+ against the line after the checks specified by H\bHI\bIS\bST\bTC\bCO\bON\bNT\bTR\bRO\bOL\bL are
applied. In addition to the normal shell pattern matching char-
- acters, "&\b&" matches the previous history line. A backslash es-
- capes the "&\b&"; the backslash is removed before attempting a
- match. If the first line of a multi-line compound command was
- saved, the second and subsequent lines are not tested, and are
- added to the history regardless of the value of H\bHI\bIS\bST\bTI\bIG\bGN\bNO\bOR\bRE\bE. If
+ acters, "&\b&" matches the previous history line. A backslash es-
+ capes the "&\b&"; the backslash is removed before attempting a
+ match. If the first line of a multi-line compound command was
+ saved, the second and subsequent lines are not tested, and are
+ added to the history regardless of the value of H\bHI\bIS\bST\bTI\bIG\bGN\bNO\bOR\bRE\bE. If
the first line was not saved, the second and subsequent lines of
- the command are not saved either. The pattern matching honors
+ the command are not saved either. The pattern matching honors
the setting of the e\bex\bxt\btg\bgl\blo\bob\bb shell option.
H\bHI\bIS\bST\bTI\bIG\bGN\bNO\bOR\bRE\bE subsumes some of the function of H\bHI\bIS\bST\bTC\bCO\bON\bNT\bTR\bRO\bOL\bL. A pat-
- tern of "&" is identical to "ignoredups", and a pattern of "[
- ]*" is identical to "ignorespace". Combining these two pat-
- terns, separating them with a colon, provides the functionality
+ tern of "&" is identical to "ignoredups", and a pattern of "[
+ ]*" is identical to "ignorespace". Combining these two pat-
+ terns, separating them with a colon, provides the functionality
of "ignoreboth".
H\bHI\bIS\bST\bTS\bSI\bIZ\bZE\bE
- The number of commands to remember in the command history (see
- H\bHI\bIS\bST\bTO\bOR\bRY\bY below). If the value is 0, commands are not saved in
+ The number of commands to remember in the command history (see
+ H\bHI\bIS\bST\bTO\bOR\bRY\bY below). If the value is 0, commands are not saved in
the history list. Numeric values less than zero result in every
- command being saved on the history list (there is no limit).
- The shell sets the default value to 500 after reading any
+ command being saved on the history list (there is no limit).
+ The shell sets the default value to 500 after reading any
startup files.
H\bHI\bIS\bST\bTT\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT
- If this variable is set and not null, its value is used as a
+ If this variable is set and not null, its value is used as a
format string for _\bs_\bt_\br_\bf_\bt_\bi_\bm_\be(3) to print the time stamp associated
- with each history entry displayed by the h\bhi\bis\bst\bto\bor\bry\by builtin. If
- this variable is set, the shell writes time stamps to the his-
- tory file so they may be preserved across shell sessions. This
- uses the history comment character to distinguish timestamps
+ with each history entry displayed by the h\bhi\bis\bst\bto\bor\bry\by builtin. If
+ this variable is set, the shell writes time stamps to the his-
+ tory file so they may be preserved across shell sessions. This
+ uses the history comment character to distinguish timestamps
from other history lines.
H\bHO\bOM\bME\bE The home directory of the current user; the default argument for
the c\bcd\bd builtin command. The value of this variable is also used
when performing tilde expansion.
H\bHO\bOS\bST\bTF\bFI\bIL\bLE\bE
- Contains the name of a file in the same format as _\b/_\be_\bt_\bc_\b/_\bh_\bo_\bs_\bt_\bs
+ Contains the name of a file in the same format as _\b/_\be_\bt_\bc_\b/_\bh_\bo_\bs_\bt_\bs
that should be read when the shell needs to complete a hostname.
- The list of possible hostname completions may be changed while
- the shell is running; the next time hostname completion is at-
- tempted after the value is changed, b\bba\bas\bsh\bh adds the contents of
- the new file to the existing list. If H\bHO\bOS\bST\bTF\bFI\bIL\bLE\bE is set, but has
- no value, or does not name a readable file, b\bba\bas\bsh\bh attempts to
- read _\b/_\be_\bt_\bc_\b/_\bh_\bo_\bs_\bt_\bs to obtain the list of possible hostname comple-
+ The list of possible hostname completions may be changed while
+ the shell is running; the next time hostname completion is at-
+ tempted after the value is changed, b\bba\bas\bsh\bh adds the contents of
+ the new file to the existing list. If H\bHO\bOS\bST\bTF\bFI\bIL\bLE\bE is set, but has
+ no value, or does not name a readable file, b\bba\bas\bsh\bh attempts to
+ read _\b/_\be_\bt_\bc_\b/_\bh_\bo_\bs_\bt_\bs to obtain the list of possible hostname comple-
tions. When H\bHO\bOS\bST\bTF\bFI\bIL\bLE\bE is unset, b\bba\bas\bsh\bh clears the hostname list.
I\bIF\bFS\bS The _\bI_\bn_\bt_\be_\br_\bn_\ba_\bl _\bF_\bi_\be_\bl_\bd _\bS_\be_\bp_\ba_\br_\ba_\bt_\bo_\br that is used for word splitting af-
- ter expansion and to split lines into words with the r\bre\bea\bad\bd
+ ter expansion and to split lines into words with the r\bre\bea\bad\bd
builtin command. Word splitting is described below under E\bEX\bXP\bPA\bAN\bN-\b-
S\bSI\bIO\bON\bN. The default value is "<space><tab><newline>".
I\bIG\bGN\bNO\bOR\bRE\bEE\bEO\bOF\bF
Controls the action of an interactive shell on receipt of an E\bEO\bOF\bF
character as the sole input. If set, the value is the number of
- consecutive E\bEO\bOF\bF characters which must be typed as the first
- characters on an input line before b\bba\bas\bsh\bh exits. If the variable
- is set but does not have a numeric value, or the value is null,
- the default value is 10. If it is unset, E\bEO\bOF\bF signifies the end
+ consecutive E\bEO\bOF\bF characters which must be typed as the first
+ characters on an input line before b\bba\bas\bsh\bh exits. If the variable
+ is set but does not have a numeric value, or the value is null,
+ the default value is 10. If it is unset, E\bEO\bOF\bF signifies the end
of input to the shell.
I\bIN\bNP\bPU\bUT\bTR\bRC\bC
- The filename for the r\bre\bea\bad\bdl\bli\bin\bne\be startup file, overriding the de-
+ The filename for the r\bre\bea\bad\bdl\bli\bin\bne\be startup file, overriding the de-
fault of _\b~_\b/_\b._\bi_\bn_\bp_\bu_\bt_\br_\bc (see R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE below).
I\bIN\bNS\bSI\bID\bDE\bE_\b_E\bEM\bMA\bAC\bCS\bS
- If this variable appears in the environment when the shell
- starts, b\bba\bas\bsh\bh assumes that it is running inside an Emacs shell
- buffer and may disable line editing, depending on the value of
+ If this variable appears in the environment when the shell
+ starts, b\bba\bas\bsh\bh assumes that it is running inside an Emacs shell
+ buffer and may disable line editing, depending on the value of
T\bTE\bER\bRM\bM.
- L\bLA\bAN\bNG\bG Used to determine the locale category for any category not
+ L\bLA\bAN\bNG\bG Used to determine the locale category for any category not
specifically selected with a variable starting with L\bLC\bC_\b_.
- L\bLC\bC_\b_A\bAL\bLL\bL This variable overrides the value of L\bLA\bAN\bNG\bG and any other L\bLC\bC_\b_
+ L\bLC\bC_\b_A\bAL\bLL\bL This variable overrides the value of L\bLA\bAN\bNG\bG and any other L\bLC\bC_\b_
variable specifying a locale category.
L\bLC\bC_\b_C\bCO\bOL\bLL\bLA\bAT\bTE\bE
- This variable determines the collation order used when sorting
- the results of pathname expansion, and determines the behavior
- of range expressions, equivalence classes, and collating se-
+ This variable determines the collation order used when sorting
+ the results of pathname expansion, and determines the behavior
+ of range expressions, equivalence classes, and collating se-
quences within pathname expansion and pattern matching.
L\bLC\bC_\b_C\bCT\bTY\bYP\bPE\bE
- This variable determines the interpretation of characters and
- the behavior of character classes within pathname expansion and
+ This variable determines the interpretation of characters and
+ the behavior of character classes within pathname expansion and
pattern matching.
L\bLC\bC_\b_M\bME\bES\bSS\bSA\bAG\bGE\bES\bS
- This variable determines the locale used to translate double-
+ This variable determines the locale used to translate double-
quoted strings preceded by a $\b$.
L\bLC\bC_\b_N\bNU\bUM\bME\bER\bRI\bIC\bC
- This variable determines the locale category used for number
+ This variable determines the locale category used for number
formatting.
L\bLC\bC_\b_T\bTI\bIM\bME\bE
- This variable determines the locale category used for data and
+ This variable determines the locale category used for data and
time formatting.
- L\bLI\bIN\bNE\bES\bS Used by the s\bse\bel\ble\bec\bct\bt compound command to determine the column
- length for printing selection lists. Automatically set if the
- c\bch\bhe\bec\bck\bkw\bwi\bin\bns\bsi\biz\bze\be option is enabled or in an interactive shell upon
+ L\bLI\bIN\bNE\bES\bS Used by the s\bse\bel\ble\bec\bct\bt compound command to determine the column
+ length for printing selection lists. Automatically set if the
+ c\bch\bhe\bec\bck\bkw\bwi\bin\bns\bsi\biz\bze\be option is enabled or in an interactive shell upon
receipt of a S\bSI\bIG\bGW\bWI\bIN\bNC\bCH\bH.
M\bMA\bAI\bIL\bL If the value is set to a file or directory name and the M\bMA\bAI\bIL\bLP\bPA\bAT\bTH\bH
- variable is not set, b\bba\bas\bsh\bh informs the user of the arrival of
+ variable is not set, b\bba\bas\bsh\bh informs the user of the arrival of
mail in the specified file or Maildir-format directory.
M\bMA\bAI\bIL\bLC\bCH\bHE\bEC\bCK\bK
- Specifies how often (in seconds) b\bba\bas\bsh\bh checks for mail. The de-
- fault is 60 seconds. When it is time to check for mail, the
- shell does so before displaying the primary prompt. If this
- variable is unset, or set to a value that is not a number
+ Specifies how often (in seconds) b\bba\bas\bsh\bh checks for mail. The de-
+ fault is 60 seconds. When it is time to check for mail, the
+ shell does so before displaying the primary prompt. If this
+ variable is unset, or set to a value that is not a number
greater than or equal to zero, the shell disables mail checking.
M\bMA\bAI\bIL\bLP\bPA\bAT\bTH\bH
A colon-separated list of filenames to be checked for mail. The
message to be printed when mail arrives in a particular file may
- be specified by separating the filename from the message with a
- "?". When used in the text of the message, $\b$_\b_ expands to the
+ be specified by separating the filename from the message with a
+ "?". When used in the text of the message, $\b$_\b_ expands to the
name of the current mailfile. For example:
M\bMA\bAI\bIL\bLP\bPA\bAT\bTH\bH='/var/mail/bfox?"You have mail":~/shell-mail?"$_ has mail!"'
- B\bBa\bas\bsh\bh can be configured to supply a default value for this vari-
- able (there is no value by default), but the location of the
+ B\bBa\bas\bsh\bh can be configured to supply a default value for this vari-
+ able (there is no value by default), but the location of the
user mail files that it uses is system dependent (e.g.,
/var/mail/$\b$U\bUS\bSE\bER\bR).
O\bOP\bPT\bTE\bER\bRR\bR If set to the value 1, b\bba\bas\bsh\bh displays error messages generated by
- the g\bge\bet\bto\bop\bpt\bts\bs builtin command (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below).
- O\bOP\bPT\bTE\bER\bRR\bR is initialized to 1 each time the shell is invoked or a
+ the g\bge\bet\bto\bop\bpt\bts\bs builtin command (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below).
+ O\bOP\bPT\bTE\bER\bRR\bR is initialized to 1 each time the shell is invoked or a
shell script is executed.
- P\bPA\bAT\bTH\bH The search path for commands. It is a colon-separated list of
- directories in which the shell looks for commands (see C\bCO\bOM\bMM\bMA\bAN\bND\bD
- E\bEX\bXE\bEC\bCU\bUT\bTI\bIO\bON\bN below). A zero-length (null) directory name in the
+ P\bPA\bAT\bTH\bH The search path for commands. It is a colon-separated list of
+ directories in which the shell looks for commands (see C\bCO\bOM\bMM\bMA\bAN\bND\bD
+ E\bEX\bXE\bEC\bCU\bUT\bTI\bIO\bON\bN below). A zero-length (null) directory name in the
value of P\bPA\bAT\bTH\bH indicates the current directory. A null directory
- name may appear as two adjacent colons, or as an initial or
- trailing colon. The default path is system-dependent, and is
+ name may appear as two adjacent colons, or as an initial or
+ trailing colon. The default path is system-dependent, and is
set by the administrator who installs b\bba\bas\bsh\bh. A common value is
/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin
P\bPO\bOS\bSI\bIX\bXL\bLY\bY_\b_C\bCO\bOR\bRR\bRE\bEC\bCT\bT
- If this variable is in the environment when b\bba\bas\bsh\bh starts, the
- shell enters posix mode before reading the startup files, as if
- the -\b--\b-p\bpo\bos\bsi\bix\bx invocation option had been supplied. If it is set
- while the shell is running, b\bba\bas\bsh\bh enables posix mode, as if the
+ If this variable is in the environment when b\bba\bas\bsh\bh starts, the
+ shell enters posix mode before reading the startup files, as if
+ the -\b--\b-p\bpo\bos\bsi\bix\bx invocation option had been supplied. If it is set
+ while the shell is running, b\bba\bas\bsh\bh enables posix mode, as if the
command "set -o posix" had been executed. When the shell enters
posix mode, it sets this variable if it was not already set.
P\bPR\bRO\bOM\bMP\bPT\bT_\b_C\bCO\bOM\bMM\bMA\bAN\bND\bD
- If this variable is set, and is an array, the value of each set
- element is executed as a command prior to issuing each primary
- prompt. If this is set but not an array variable, its value is
+ If this variable is set, and is an array, the value of each set
+ element is executed as a command prior to issuing each primary
+ prompt. If this is set but not an array variable, its value is
used as a command to execute instead.
P\bPR\bRO\bOM\bMP\bPT\bT_\b_D\bDI\bIR\bRT\bTR\bRI\bIM\bM
- If set to a number greater than zero, the value is used as the
+ If set to a number greater than zero, the value is used as the
number of trailing directory components to retain when expanding
- the \\b\w\bw and \\b\W\bW prompt string escapes (see P\bPR\bRO\bOM\bMP\bPT\bTI\bIN\bNG\bG below).
+ the \\b\w\bw and \\b\W\bW prompt string escapes (see P\bPR\bRO\bOM\bMP\bPT\bTI\bIN\bNG\bG below).
Characters removed are replaced with an ellipsis.
- P\bPS\bS0\b0 The value of this parameter is expanded (see P\bPR\bRO\bOM\bMP\bPT\bTI\bIN\bNG\bG below)
- and displayed by interactive shells after reading a command and
+ P\bPS\bS0\b0 The value of this parameter is expanded (see P\bPR\bRO\bOM\bMP\bPT\bTI\bIN\bNG\bG below)
+ and displayed by interactive shells after reading a command and
before the command is executed.
- P\bPS\bS1\b1 The value of this parameter is expanded (see P\bPR\bRO\bOM\bMP\bPT\bTI\bIN\bNG\bG below)
- and used as the primary prompt string. The default value is
+ P\bPS\bS1\b1 The value of this parameter is expanded (see P\bPR\bRO\bOM\bMP\bPT\bTI\bIN\bNG\bG below)
+ and used as the primary prompt string. The default value is
"\s-\v\$ ".
- P\bPS\bS2\b2 The value of this parameter is expanded as with P\bPS\bS1\b1 and used as
+ P\bPS\bS2\b2 The value of this parameter is expanded as with P\bPS\bS1\b1 and used as
the secondary prompt string. The default is "> ".
P\bPS\bS3\b3 The value of this parameter is used as the prompt for the s\bse\bel\ble\bec\bct\bt
command (see S\bSH\bHE\bEL\bLL\bL G\bGR\bRA\bAM\bMM\bMA\bAR\bR above).
- P\bPS\bS4\b4 The value of this parameter is expanded as with P\bPS\bS1\b1 and the
+ P\bPS\bS4\b4 The value of this parameter is expanded as with P\bPS\bS1\b1 and the
value is printed before each command b\bba\bas\bsh\bh displays during an ex-
ecution trace. The first character of the expanded value of P\bPS\bS4\b4
is replicated multiple times, as necessary, to indicate multiple
levels of indirection. The default is "+ ".
- S\bSH\bHE\bEL\bLL\bL This variable expands to the full pathname to the shell. If it
- is not set when the shell starts, b\bba\bas\bsh\bh assigns to it the full
+ S\bSH\bHE\bEL\bLL\bL This variable expands to the full pathname to the shell. If it
+ is not set when the shell starts, b\bba\bas\bsh\bh assigns to it the full
pathname of the current user's login shell.
T\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT
- The value of this parameter is used as a format string specify-
- ing how the timing information for pipelines prefixed with the
- t\bti\bim\bme\be reserved word should be displayed. The %\b% character intro-
- duces an escape sequence that is expanded to a time value or
- other information. The escape sequences and their meanings are
+ The value of this parameter is used as a format string specify-
+ ing how the timing information for pipelines prefixed with the
+ t\bti\bim\bme\be reserved word should be displayed. The %\b% character intro-
+ duces an escape sequence that is expanded to a time value or
+ other information. The escape sequences and their meanings are
as follows; the brackets denote optional portions.
%\b%%\b% A literal %\b%.
%\b%[\b[_\bp]\b][\b[l\bl]\b]R\bR The elapsed time in seconds.
%\b%[\b[_\bp]\b][\b[l\bl]\b]S\bS The number of CPU seconds spent in system mode.
%\b%P\bP The CPU percentage, computed as (%U + %S) / %R.
- The optional _\bp is a digit specifying the _\bp_\br_\be_\bc_\bi_\bs_\bi_\bo_\bn, the number
+ The optional _\bp is a digit specifying the _\bp_\br_\be_\bc_\bi_\bs_\bi_\bo_\bn, the number
of fractional digits after a decimal point. A value of 0 causes
- no decimal point or fraction to be output. t\bti\bim\bme\be prints at most
- six digits after the decimal point; values of _\bp greater than 6
+ no decimal point or fraction to be output. t\bti\bim\bme\be prints at most
+ six digits after the decimal point; values of _\bp greater than 6
are changed to 6. If _\bp is not specified, t\bti\bim\bme\be prints three dig-
its after the decimal point.
- The optional l\bl specifies a longer format, including minutes, of
- the form _\bM_\bMm_\bS_\bS._\bF_\bFs. The value of _\bp determines whether or not
+ The optional l\bl specifies a longer format, including minutes, of
+ the form _\bM_\bMm_\bS_\bS._\bF_\bFs. The value of _\bp determines whether or not
the fraction is included.
- If this variable is not set, b\bba\bas\bsh\bh acts as if it had the value
- $\b$'\b'\\b\n\bnr\bre\bea\bal\bl\\b\t\bt%\b%3\b3l\blR\bR\\b\n\bnu\bus\bse\ber\br\\b\t\bt%\b%3\b3l\blU\bU\\b\n\bns\bsy\bys\bs\\b\t\bt%\b%3\b3l\blS\bS'\b'. If the value is null,
- b\bba\bas\bsh\bh does not display any timing information. A trailing new-
+ If this variable is not set, b\bba\bas\bsh\bh acts as if it had the value
+ $\b$'\b'\\b\n\bnr\bre\bea\bal\bl\\b\t\bt%\b%3\b3l\blR\bR\\b\n\bnu\bus\bse\ber\br\\b\t\bt%\b%3\b3l\blU\bU\\b\n\bns\bsy\bys\bs\\b\t\bt%\b%3\b3l\blS\bS'\b'. If the value is null,
+ b\bba\bas\bsh\bh does not display any timing information. A trailing new-
line is added when the format string is displayed.
- T\bTM\bMO\bOU\bUT\bT If set to a value greater than zero, the r\bre\bea\bad\bd builtin uses the
- value as its default timeout. The s\bse\bel\ble\bec\bct\bt command terminates if
- input does not arrive after T\bTM\bMO\bOU\bUT\bT seconds when input is coming
- from a terminal. In an interactive shell, the value is inter-
- preted as the number of seconds to wait for a line of input af-
- ter issuing the primary prompt. B\bBa\bas\bsh\bh terminates after waiting
- for that number of seconds if a complete line of input does not
+ T\bTM\bMO\bOU\bUT\bT If set to a value greater than zero, the r\bre\bea\bad\bd builtin uses the
+ value as its default timeout. The s\bse\bel\ble\bec\bct\bt command terminates if
+ input does not arrive after T\bTM\bMO\bOU\bUT\bT seconds when input is coming
+ from a terminal. In an interactive shell, the value is inter-
+ preted as the number of seconds to wait for a line of input af-
+ ter issuing the primary prompt. B\bBa\bas\bsh\bh terminates after waiting
+ for that number of seconds if a complete line of input does not
arrive.
- T\bTM\bMP\bPD\bDI\bIR\bR If set, b\bba\bas\bsh\bh uses its value as the name of a directory in which
+ T\bTM\bMP\bPD\bDI\bIR\bR If set, b\bba\bas\bsh\bh uses its value as the name of a directory in which
b\bba\bas\bsh\bh creates temporary files for the shell's use.
a\bau\but\bto\bo_\b_r\bre\bes\bsu\bum\bme\be
This variable controls how the shell interacts with the user and
- job control. If this variable is set, simple commands consist-
- ing of only a single word, without redirections, are treated as
- candidates for resumption of an existing stopped job. There is
- no ambiguity allowed; if there is more than one job beginning
- with or containing the word, this selects the most recently ac-
- cessed job. The _\bn_\ba_\bm_\be of a stopped job, in this context, is the
- command line used to start it, as displayed by j\bjo\bob\bbs\bs. If set to
- the value _\be_\bx_\ba_\bc_\bt, the word must match the name of a stopped job
- exactly; if set to _\bs_\bu_\bb_\bs_\bt_\br_\bi_\bn_\bg, the word needs to match a sub-
- string of the name of a stopped job. The _\bs_\bu_\bb_\bs_\bt_\br_\bi_\bn_\bg value pro-
+ job control. If this variable is set, simple commands consist-
+ ing of only a single word, without redirections, are treated as
+ candidates for resumption of an existing stopped job. There is
+ no ambiguity allowed; if there is more than one job beginning
+ with or containing the word, this selects the most recently ac-
+ cessed job. The _\bn_\ba_\bm_\be of a stopped job, in this context, is the
+ command line used to start it, as displayed by j\bjo\bob\bbs\bs. If set to
+ the value _\be_\bx_\ba_\bc_\bt, the word must match the name of a stopped job
+ exactly; if set to _\bs_\bu_\bb_\bs_\bt_\br_\bi_\bn_\bg, the word needs to match a sub-
+ string of the name of a stopped job. The _\bs_\bu_\bb_\bs_\bt_\br_\bi_\bn_\bg value pro-
vides functionality analogous to the %\b%?\b? job identifier (see J\bJO\bOB\bB
- C\bCO\bON\bNT\bTR\bRO\bOL\bL below). If set to any other value (e.g., _\bp_\br_\be_\bf_\bi_\bx), the
- word must be a prefix of a stopped job's name; this provides
+ C\bCO\bON\bNT\bTR\bRO\bOL\bL below). If set to any other value (e.g., _\bp_\br_\be_\bf_\bi_\bx), the
+ word must be a prefix of a stopped job's name; this provides
functionality analogous to the %\b%_\bs_\bt_\br_\bi_\bn_\bg job identifier.
h\bhi\bis\bst\btc\bch\bha\bar\brs\bs
- The two or three characters which control history expansion,
- quick substitution, and tokenization (see H\bHI\bIS\bST\bTO\bOR\bRY\bY E\bEX\bXP\bPA\bAN\bNS\bSI\bIO\bON\bN be-
- low). The first character is the _\bh_\bi_\bs_\bt_\bo_\br_\by _\be_\bx_\bp_\ba_\bn_\bs_\bi_\bo_\bn character,
- the character which begins a history expansion, normally "!\b!".
- The second character is the _\bq_\bu_\bi_\bc_\bk _\bs_\bu_\bb_\bs_\bt_\bi_\bt_\bu_\bt_\bi_\bo_\bn character, nor-
- mally "^\b^". When it appears as the first character on the line,
+ The two or three characters which control history expansion,
+ quick substitution, and tokenization (see H\bHI\bIS\bST\bTO\bOR\bRY\bY E\bEX\bXP\bPA\bAN\bNS\bSI\bIO\bON\bN be-
+ low). The first character is the _\bh_\bi_\bs_\bt_\bo_\br_\by _\be_\bx_\bp_\ba_\bn_\bs_\bi_\bo_\bn character,
+ the character which begins a history expansion, normally "!\b!".
+ The second character is the _\bq_\bu_\bi_\bc_\bk _\bs_\bu_\bb_\bs_\bt_\bi_\bt_\bu_\bt_\bi_\bo_\bn character, nor-
+ mally "^\b^". When it appears as the first character on the line,
history substitution repeats the previous command, replacing one
- string with another. The optional third character is the _\bh_\bi_\bs_\b-
- _\bt_\bo_\br_\by _\bc_\bo_\bm_\bm_\be_\bn_\bt character, normally "#\b#", which indicates that the
- remainder of the line is a comment when it appears as the first
- character of a word. The history comment character disables
- history substitution for the remaining words on the line. It
+ string with another. The optional third character is the _\bh_\bi_\bs_\b-
+ _\bt_\bo_\br_\by _\bc_\bo_\bm_\bm_\be_\bn_\bt character, normally "#\b#", which indicates that the
+ remainder of the line is a comment when it appears as the first
+ character of a word. The history comment character disables
+ history substitution for the remaining words on the line. It
does not necessarily cause the shell parser to treat the rest of
the line as a comment.
A\bAr\brr\bra\bay\bys\bs
- B\bBa\bas\bsh\bh provides one-dimensional indexed and associative array variables.
- Any variable may be used as an indexed array; the d\bde\bec\bcl\bla\bar\bre\be builtin ex-
- plicitly declares an array. There is no maximum limit on the size of
- an array, nor any requirement that members be indexed or assigned con-
- tiguously. Indexed arrays are referenced using arithmetic expressions
- that must expand to an integer (see A\bAR\bRI\bIT\bTH\bHM\bME\bET\bTI\bIC\bC E\bEV\bVA\bAL\bLU\bUA\bAT\bTI\bIO\bON\bN below) and
- are zero-based; associative arrays are referenced using arbitrary
- strings. Unless otherwise noted, indexed array indices must be non-
+ B\bBa\bas\bsh\bh provides one-dimensional indexed and associative array variables.
+ Any variable may be used as an indexed array; the d\bde\bec\bcl\bla\bar\bre\be builtin ex-
+ plicitly declares an array. There is no maximum limit on the size of
+ an array, nor any requirement that members be indexed or assigned con-
+ tiguously. Indexed arrays are referenced using arithmetic expressions
+ that must expand to an integer (see A\bAR\bRI\bIT\bTH\bHM\bME\bET\bTI\bIC\bC E\bEV\bVA\bAL\bLU\bUA\bAT\bTI\bIO\bON\bN below) and
+ are zero-based; associative arrays are referenced using arbitrary
+ strings. Unless otherwise noted, indexed array indices must be non-
negative integers.
- The shell performs parameter and variable expansion, arithmetic expan-
- sion, command substitution, and quote removal on indexed array sub-
+ The shell performs parameter and variable expansion, arithmetic expan-
+ sion, command substitution, and quote removal on indexed array sub-
scripts. Since this can potentially result in empty strings, subscript
indexing treats those as expressions that evaluate to 0.
- The shell performs tilde expansion, parameter and variable expansion,
- arithmetic expansion, command substitution, and quote removal on asso-
- ciative array subscripts. Empty strings cannot be used as associative
+ The shell performs tilde expansion, parameter and variable expansion,
+ arithmetic expansion, command substitution, and quote removal on asso-
+ ciative array subscripts. Empty strings cannot be used as associative
array keys.
B\bBa\bas\bsh\bh automatically creates an indexed array if any variable is assigned
to using the syntax
_\bn_\ba_\bm_\be[_\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt]=_\bv_\ba_\bl_\bu_\be .
The _\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt is treated as an arithmetic expression that must evaluate
- to a number greater than or equal to zero. To explicitly declare an
+ to a number greater than or equal to zero. To explicitly declare an
indexed array, use
d\bde\bec\bcl\bla\bar\bre\be -\b-a\ba _\bn_\ba_\bm_\be
(see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below).
r\bre\bea\bad\bdo\bon\bnl\bly\by builtins. Each attribute applies to all members of an array.
Arrays are assigned using compound assignments of the form _\bn_\ba_\bm_\be=(\b(value_\b1
- ... value_\bn)\b), where each _\bv_\ba_\bl_\bu_\be may be of the form [_\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt]=_\bs_\bt_\br_\bi_\bn_\bg.
- Indexed array assignments do not require anything but _\bs_\bt_\br_\bi_\bn_\bg. Each
- _\bv_\ba_\bl_\bu_\be in the list is expanded using the shell expansions described be-
+ ... value_\bn)\b), where each _\bv_\ba_\bl_\bu_\be may be of the form [_\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt]=_\bs_\bt_\br_\bi_\bn_\bg.
+ Indexed array assignments do not require anything but _\bs_\bt_\br_\bi_\bn_\bg. Each
+ _\bv_\ba_\bl_\bu_\be in the list is expanded using the shell expansions described be-
low under E\bEX\bXP\bPA\bAN\bNS\bSI\bIO\bON\bN, but _\bv_\ba_\bl_\bu_\bes that are valid variable assignments in-
- cluding the brackets and subscript do not undergo brace expansion and
+ cluding the brackets and subscript do not undergo brace expansion and
word splitting, as with individual variable assignments.
- When assigning to indexed arrays, if the optional brackets and sub-
- script are supplied, that index is assigned to; otherwise the index of
- the element assigned is the last index assigned to by the statement
+ When assigning to indexed arrays, if the optional brackets and sub-
+ script are supplied, that index is assigned to; otherwise the index of
+ the element assigned is the last index assigned to by the statement
plus one. Indexing starts at zero.
When assigning to an associative array, the words in a compound assign-
- ment may be either assignment statements, for which the subscript is
- required, or a list of words that is interpreted as a sequence of al-
- ternating keys and values: _\bn_\ba_\bm_\be=(\b( _\bk_\be_\by_\b1 _\bv_\ba_\bl_\bu_\be_\b1 _\bk_\be_\by_\b2 _\bv_\ba_\bl_\bu_\be_\b2 ...)\b). These
- are treated identically to _\bn_\ba_\bm_\be=(\b( [_\bk_\be_\by_\b1]=_\bv_\ba_\bl_\bu_\be_\b1 [_\bk_\be_\by_\b2]=_\bv_\ba_\bl_\bu_\be_\b2 ...)\b).
- The first word in the list determines how the remaining words are in-
- terpreted; all assignments in a list must be of the same type. When
- using key/value pairs, the keys may not be missing or empty; a final
+ ment may be either assignment statements, for which the subscript is
+ required, or a list of words that is interpreted as a sequence of al-
+ ternating keys and values: _\bn_\ba_\bm_\be=(\b( _\bk_\be_\by_\b1 _\bv_\ba_\bl_\bu_\be_\b1 _\bk_\be_\by_\b2 _\bv_\ba_\bl_\bu_\be_\b2 ...)\b). These
+ are treated identically to _\bn_\ba_\bm_\be=(\b( [_\bk_\be_\by_\b1]=_\bv_\ba_\bl_\bu_\be_\b1 [_\bk_\be_\by_\b2]=_\bv_\ba_\bl_\bu_\be_\b2 ...)\b).
+ The first word in the list determines how the remaining words are in-
+ terpreted; all assignments in a list must be of the same type. When
+ using key/value pairs, the keys may not be missing or empty; a final
missing value is treated like the empty string.
- This syntax is also accepted by the d\bde\bec\bcl\bla\bar\bre\be builtin. Individual array
- elements may be assigned to using the _\bn_\ba_\bm_\be[_\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt]=_\bv_\ba_\bl_\bu_\be syntax in-
+ This syntax is also accepted by the d\bde\bec\bcl\bla\bar\bre\be builtin. Individual array
+ elements may be assigned to using the _\bn_\ba_\bm_\be[_\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt]=_\bv_\ba_\bl_\bu_\be syntax in-
troduced above.
- When assigning to an indexed array, if _\bn_\ba_\bm_\be is subscripted by a nega-
+ When assigning to an indexed array, if _\bn_\ba_\bm_\be is subscripted by a nega-
tive number, that number is interpreted as relative to one greater than
- the maximum index of _\bn_\ba_\bm_\be, so negative indices count back from the end
+ the maximum index of _\bn_\ba_\bm_\be, so negative indices count back from the end
of the array, and an index of -1 references the last element.
The "+=" operator appends to an array variable when assigning using the
compound assignment syntax; see P\bPA\bAR\bRA\bAM\bME\bET\bTE\bER\bRS\bS above.
- An array element is referenced using ${_\bn_\ba_\bm_\be[_\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt]}. The braces
- are required to avoid conflicts with pathname expansion. If _\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt
+ An array element is referenced using ${_\bn_\ba_\bm_\be[_\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt]}. The braces
+ are required to avoid conflicts with pathname expansion. If _\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt
is @\b@ or *\b*, the word expands to all members of _\bn_\ba_\bm_\be, unless noted in the
- description of a builtin or word expansion. These subscripts differ
- only when the word appears within double quotes. If the word is dou-
- ble-quoted, ${_\bn_\ba_\bm_\be[*]} expands to a single word with the value of each
- array member separated by the first character of the I\bIF\bFS\bS special vari-
- able, and ${_\bn_\ba_\bm_\be[@]} expands each element of _\bn_\ba_\bm_\be to a separate word.
+ description of a builtin or word expansion. These subscripts differ
+ only when the word appears within double quotes. If the word is dou-
+ ble-quoted, ${_\bn_\ba_\bm_\be[*]} expands to a single word with the value of each
+ array member separated by the first character of the I\bIF\bFS\bS special vari-
+ able, and ${_\bn_\ba_\bm_\be[@]} expands each element of _\bn_\ba_\bm_\be to a separate word.
When there are no array members, ${_\bn_\ba_\bm_\be[@]} expands to nothing. If the
- double-quoted expansion occurs within a word, the expansion of the
- first parameter is joined with the beginning part of the expansion of
- the original word, and the expansion of the last parameter is joined
- with the last part of the expansion of the original word. This is
- analogous to the expansion of the special parameters *\b* and @\b@ (see S\bSp\bpe\be-\b-
+ double-quoted expansion occurs within a word, the expansion of the
+ first parameter is joined with the beginning part of the expansion of
+ the original word, and the expansion of the last parameter is joined
+ with the last part of the expansion of the original word. This is
+ analogous to the expansion of the special parameters *\b* and @\b@ (see S\bSp\bpe\be-\b-
c\bci\bia\bal\bl P\bPa\bar\bra\bam\bme\bet\bte\ber\brs\bs above).
- ${#_\bn_\ba_\bm_\be[_\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt]} expands to the length of ${_\bn_\ba_\bm_\be[_\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt]}. If
+ ${#_\bn_\ba_\bm_\be[_\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt]} expands to the length of ${_\bn_\ba_\bm_\be[_\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt]}. If
_\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt is *\b* or @\b@, the expansion is the number of elements in the ar-
ray.
If the _\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt used to reference an element of an indexed array eval-
- uates to a number less than zero, it is interpreted as relative to one
- greater than the maximum index of the array, so negative indices count
- back from the end of the array, and an index of -1 references the last
+ uates to a number less than zero, it is interpreted as relative to one
+ greater than the maximum index of the array, so negative indices count
+ back from the end of the array, and an index of -1 references the last
element.
Referencing an array variable without a subscript is equivalent to ref-
- erencing the array with a subscript of 0. Any reference to a variable
+ erencing the array with a subscript of 0. Any reference to a variable
using a valid subscript is valid; b\bba\bas\bsh\bh creates an array if necessary.
- An array variable is considered set if a subscript has been assigned a
+ An array variable is considered set if a subscript has been assigned a
value. The null string is a valid value.
- It is possible to obtain the keys (indices) of an array as well as the
- values. ${!\b!_\bn_\ba_\bm_\be[_\b@]} and ${!\b!_\bn_\ba_\bm_\be[_\b*]} expand to the indices assigned in
+ It is possible to obtain the keys (indices) of an array as well as the
+ values. ${!\b!_\bn_\ba_\bm_\be[_\b@]} and ${!\b!_\bn_\ba_\bm_\be[_\b*]} expand to the indices assigned in
array variable _\bn_\ba_\bm_\be. The treatment when in double quotes is similar to
the expansion of the special parameters _\b@ and _\b* within double quotes.
The u\bun\bns\bse\bet\bt builtin is used to destroy arrays. u\bun\bns\bse\bet\bt _\bn_\ba_\bm_\be[_\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt] un-
- sets the array element at index _\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt, for both indexed and asso-
- ciative arrays. Negative subscripts to indexed arrays are interpreted
- as described above. Unsetting the last element of an array variable
- does not unset the variable. u\bun\bns\bse\bet\bt _\bn_\ba_\bm_\be, where _\bn_\ba_\bm_\be is an array, re-
- moves the entire array. u\bun\bns\bse\bet\bt _\bn_\ba_\bm_\be[_\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt] behaves differently de-
- pending on whether _\bn_\ba_\bm_\be is an indexed or associative array when _\bs_\bu_\bb_\b-
+ sets the array element at index _\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt, for both indexed and asso-
+ ciative arrays. Negative subscripts to indexed arrays are interpreted
+ as described above. Unsetting the last element of an array variable
+ does not unset the variable. u\bun\bns\bse\bet\bt _\bn_\ba_\bm_\be, where _\bn_\ba_\bm_\be is an array, re-
+ moves the entire array. u\bun\bns\bse\bet\bt _\bn_\ba_\bm_\be[_\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt] behaves differently de-
+ pending on whether _\bn_\ba_\bm_\be is an indexed or associative array when _\bs_\bu_\bb_\b-
_\bs_\bc_\br_\bi_\bp_\bt is *\b* or @\b@. If _\bn_\ba_\bm_\be is an associative array, this unsets the el-
- ement with subscript *\b* or @\b@. If _\bn_\ba_\bm_\be is an indexed array, unset re-
+ ement with subscript *\b* or @\b@. If _\bn_\ba_\bm_\be is an indexed array, unset re-
moves all of the elements but does not remove the array itself.
- When using a variable name with a subscript as an argument to a com-
- mand, such as with u\bun\bns\bse\bet\bt, without using the word expansion syntax de-
- scribed above, (e.g., unset a[4]), the argument is subject to pathname
- expansion. Quote the argument if pathname expansion is not desired
+ When using a variable name with a subscript as an argument to a com-
+ mand, such as with u\bun\bns\bse\bet\bt, without using the word expansion syntax de-
+ scribed above, (e.g., unset a[4]), the argument is subject to pathname
+ expansion. Quote the argument if pathname expansion is not desired
(e.g., unset 'a[4]').
- The d\bde\bec\bcl\bla\bar\bre\be, l\blo\boc\bca\bal\bl, and r\bre\bea\bad\bdo\bon\bnl\bly\by builtins each accept a -\b-a\ba option to
- specify an indexed array and a -\b-A\bA option to specify an associative ar-
- ray. If both options are supplied, -\b-A\bA takes precedence. The r\bre\bea\bad\bd
- builtin accepts a -\b-a\ba option to assign a list of words read from the
+ The d\bde\bec\bcl\bla\bar\bre\be, l\blo\boc\bca\bal\bl, and r\bre\bea\bad\bdo\bon\bnl\bly\by builtins each accept a -\b-a\ba option to
+ specify an indexed array and a -\b-A\bA option to specify an associative ar-
+ ray. If both options are supplied, -\b-A\bA takes precedence. The r\bre\bea\bad\bd
+ builtin accepts a -\b-a\ba option to assign a list of words read from the
standard input to an array. The s\bse\bet\bt and d\bde\bec\bcl\bla\bar\bre\be builtins display array
- values in a way that allows them to be reused as assignments. Other
- builtins accept array name arguments as well (e.g., m\bma\bap\bpf\bfi\bil\ble\be); see the
- descriptions of individual builtins below for details. The shell pro-
+ values in a way that allows them to be reused as assignments. Other
+ builtins accept array name arguments as well (e.g., m\bma\bap\bpf\bfi\bil\ble\be); see the
+ descriptions of individual builtins below for details. The shell pro-
vides a number of builtin array variables.
E\bEX\bXP\bPA\bAN\bNS\bSI\bIO\bON\bN
_\bm_\be_\bt_\bi_\bc _\be_\bx_\bp_\ba_\bn_\bs_\bi_\bo_\bn, _\bw_\bo_\br_\bd _\bs_\bp_\bl_\bi_\bt_\bt_\bi_\bn_\bg, _\bp_\ba_\bt_\bh_\bn_\ba_\bm_\be _\be_\bx_\bp_\ba_\bn_\bs_\bi_\bo_\bn, and _\bq_\bu_\bo_\bt_\be _\br_\be_\bm_\bo_\bv_\ba_\bl.
The order of expansions is: brace expansion; tilde expansion, parameter
- and variable expansion, arithmetic expansion, and command substitution
- (done in a left-to-right fashion); word splitting; pathname expansion;
+ and variable expansion, arithmetic expansion, and command substitution
+ (done in a left-to-right fashion); word splitting; pathname expansion;
and quote removal.
On systems that can support it, there is an additional expansion avail-
- able: _\bp_\br_\bo_\bc_\be_\bs_\bs _\bs_\bu_\bb_\bs_\bt_\bi_\bt_\bu_\bt_\bi_\bo_\bn. This is performed at the same time as
- tilde, parameter, variable, and arithmetic expansion and command sub-
+ able: _\bp_\br_\bo_\bc_\be_\bs_\bs _\bs_\bu_\bb_\bs_\bt_\bi_\bt_\bu_\bt_\bi_\bo_\bn. This is performed at the same time as
+ tilde, parameter, variable, and arithmetic expansion and command sub-
stitution.
- _\bQ_\bu_\bo_\bt_\be _\br_\be_\bm_\bo_\bv_\ba_\bl is always performed last. It removes quote characters
- present in the original word, not ones resulting from one of the other
+ _\bQ_\bu_\bo_\bt_\be _\br_\be_\bm_\bo_\bv_\ba_\bl is always performed last. It removes quote characters
+ present in the original word, not ones resulting from one of the other
expansions, unless they have been quoted themselves.
- Only brace expansion, word splitting, and pathname expansion can in-
- crease the number of words of the expansion; other expansions expand a
- single word to a single word. The only exceptions to this are the ex-
+ Only brace expansion, word splitting, and pathname expansion can in-
+ crease the number of words of the expansion; other expansions expand a
+ single word to a single word. The only exceptions to this are the ex-
pansions of "\b"$\b$@\b@"\b" and "\b"$\b${\b{_\bn_\ba_\bm_\be[\b[@\b@]\b]}\b}"\b", and, in most cases, $\b$*\b* and
$\b${\b{_\bn_\ba_\bm_\be[\b[*\b*]\b]}\b} as explained above (see P\bPA\bAR\bRA\bAM\bME\bET\bTE\bER\bRS\bS).
B\bBr\bra\bac\bce\be E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn
- _\bB_\br_\ba_\bc_\be _\be_\bx_\bp_\ba_\bn_\bs_\bi_\bo_\bn is a mechanism to generate arbitrary strings sharing a
+ _\bB_\br_\ba_\bc_\be _\be_\bx_\bp_\ba_\bn_\bs_\bi_\bo_\bn is a mechanism to generate arbitrary strings sharing a
common prefix and suffix, either of which can be empty. This mechanism
- is similar to _\bp_\ba_\bt_\bh_\bn_\ba_\bm_\be _\be_\bx_\bp_\ba_\bn_\bs_\bi_\bo_\bn, but the filenames generated need not
- exist. Patterns to be brace expanded are formed from an optional _\bp_\br_\be_\b-
- _\ba_\bm_\bb_\bl_\be, followed by either a series of comma-separated strings or a se-
- quence expression between a pair of braces, followed by an optional
- _\bp_\bo_\bs_\bt_\bs_\bc_\br_\bi_\bp_\bt. The preamble is prefixed to each string contained within
- the braces, and the postscript is then appended to each resulting
+ is similar to _\bp_\ba_\bt_\bh_\bn_\ba_\bm_\be _\be_\bx_\bp_\ba_\bn_\bs_\bi_\bo_\bn, but the filenames generated need not
+ exist. Patterns to be brace expanded are formed from an optional _\bp_\br_\be_\b-
+ _\ba_\bm_\bb_\bl_\be, followed by either a series of comma-separated strings or a se-
+ quence expression between a pair of braces, followed by an optional
+ _\bp_\bo_\bs_\bt_\bs_\bc_\br_\bi_\bp_\bt. The preamble is prefixed to each string contained within
+ the braces, and the postscript is then appended to each resulting
string, expanding left to right.
- Brace expansions may be nested. The results of each expanded string
+ Brace expansions may be nested. The results of each expanded string
are not sorted; brace expansion preserves left to right order. For ex-
ample, a{\b{d,c,b}\b}e expands into "ade ace abe".
- A sequence expression takes the form _\bx.\b..\b._\by[\b[.\b..\b._\bi_\bn_\bc_\br]\b], where _\bx and _\by are
- either integers or single letters, and _\bi_\bn_\bc_\br, an optional increment, is
+ A sequence expression takes the form _\bx.\b..\b._\by[\b[.\b..\b._\bi_\bn_\bc_\br]\b], where _\bx and _\by are
+ either integers or single letters, and _\bi_\bn_\bc_\br, an optional increment, is
an integer. When integers are supplied, the expression expands to each
- number between _\bx and _\by, inclusive. If either _\bx or _\by begins with a
+ number between _\bx and _\by, inclusive. If either _\bx or _\by begins with a
zero, each generated term will contain the same number of digits, zero-
padding where necessary. When letters are supplied, the expression ex-
- pands to each character lexicographically between _\bx and _\by, inclusive,
- using the C locale. Note that both _\bx and _\by must be of the same type
+ pands to each character lexicographically between _\bx and _\by, inclusive,
+ using the C locale. Note that both _\bx and _\by 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 ap-
+ difference between each term. The default increment is 1 or -1 as ap-
propriate.
Brace expansion is performed before any other expansions, and any char-
- acters special to other expansions are preserved in the result. It is
- strictly textual. B\bBa\bas\bsh\bh does not apply any syntactic interpretation to
+ acters special to other expansions are preserved in the result. It is
+ strictly textual. B\bBa\bas\bsh\bh does not apply any syntactic interpretation to
the context of the expansion or the text between the braces.
- A correctly-formed brace expansion must contain unquoted opening and
+ A correctly-formed brace expansion must contain unquoted opening and
closing braces, and at least one unquoted comma or a valid sequence ex-
pression. Any incorrectly formed brace expansion is left unchanged.
- A "{" or Q , may be quoted with a backslash to prevent its being con-
- sidered part of a brace expression. To avoid conflicts with parameter
- expansion, the string "${" is not considered eligible for brace expan-
+ A "{" or Q , may be quoted with a backslash to prevent its being con-
+ sidered part of a brace expression. To avoid conflicts with parameter
+ expansion, the string "${" is not considered eligible for brace expan-
sion, and inhibits brace expansion until the closing "}".
This construct is typically used as shorthand when the common prefix of
or
chown root /usr/{ucb/{ex,edit},lib/{ex?.?*,how_ex}}
- Brace expansion introduces a slight incompatibility with historical
- versions of s\bsh\bh. s\bsh\bh does not treat opening or closing braces specially
- when they appear as part of a word, and preserves them in the output.
- B\bBa\bas\bsh\bh removes braces from words as a consequence of brace expansion.
+ Brace expansion introduces a slight incompatibility with historical
+ versions of s\bsh\bh. s\bsh\bh does not treat opening or closing braces specially
+ when they appear as part of a word, and preserves them in the output.
+ B\bBa\bas\bsh\bh removes braces from words as a consequence of brace expansion.
For example, a word entered to s\bsh\bh as "file{1,2}" appears identically in
the output. B\bBa\bas\bsh\bh outputs that word as "file1 file2" after brace expan-
- sion. Start b\bba\bas\bsh\bh with the +\b+B\bB option or disable brace expansion with
+ sion. Start b\bba\bas\bsh\bh with the +\b+B\bB option or disable brace expansion with
the +\b+B\bB option to the s\bse\bet\bt command (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below) for
strict s\bsh\bh compatibility.
T\bTi\bil\bld\bde\be E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn
- If a word begins with an unquoted tilde character ("~\b~"), all of the
- characters preceding the first unquoted slash (or all characters, if
- there is no unquoted slash) are considered a _\bt_\bi_\bl_\bd_\be_\b-_\bp_\br_\be_\bf_\bi_\bx. 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 _\bl_\bo_\bg_\bi_\bn _\bn_\ba_\bm_\be.
- If this login name is the null string, the tilde is replaced with the
+ If a word begins with an unquoted tilde character ("~\b~"), all of the
+ characters preceding the first unquoted slash (or all characters, if
+ there is no unquoted slash) are considered a _\bt_\bi_\bl_\bd_\be_\b-_\bp_\br_\be_\bf_\bi_\bx. 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 _\bl_\bo_\bg_\bi_\bn _\bn_\ba_\bm_\be.
+ If this login name is the null string, the tilde is replaced with the
value of the shell parameter H\bHO\bOM\bME\bE. If H\bHO\bOM\bME\bE is unset, the tilde expands
- to the home directory of the user executing the shell instead. Other-
- wise, the tilde-prefix is replaced with the home directory associated
+ to the home directory of the user executing the shell instead. Other-
+ wise, the tilde-prefix is replaced with the home directory associated
with the specified login name.
- If the tilde-prefix is a "~+", the value of the shell variable P\bPW\bWD\bD re-
+ If the tilde-prefix is a "~+", the value of the shell variable P\bPW\bWD\bD re-
places the tilde-prefix. If the tilde-prefix is a "~-", the shell sub-
- stitutes the value of the shell variable O\bOL\bLD\bDP\bPW\bWD\bD, if it is set. If the
- characters following the tilde in the tilde-prefix consist of a number
- _\bN, optionally prefixed by a "+" or a "-", the tilde-prefix is replaced
+ stitutes the value of the shell variable O\bOL\bLD\bDP\bPW\bWD\bD, if it is set. If the
+ characters following the tilde in the tilde-prefix consist of a number
+ _\bN, optionally prefixed by a "+" or a "-", the tilde-prefix is replaced
with the corresponding element from the directory stack, as it would be
displayed by the d\bdi\bir\brs\bs builtin invoked with the characters following the
- tilde in the tilde-prefix as an argument. If the characters following
+ tilde in the tilde-prefix as an argument. If the characters following
the tilde in the tilde-prefix consist of a number without a leading "+"
or "-", tilde expansion assumes "+".
- The results of tilde expansion are treated as if they were quoted, so
- the replacement is not subject to word splitting and pathname expan-
+ The results of tilde expansion are treated as if they were quoted, so
+ the replacement is not subject to word splitting and pathname expan-
sion.
- If the login name is invalid, or the tilde expansion fails, the tilde-
+ If the login name is invalid, or the tilde expansion fails, the tilde-
prefix is unchanged.
- B\bBa\bas\bsh\bh checks each variable assignment for unquoted tilde-prefixes imme-
- diately following a :\b: or the first =\b=, and performs tilde expansion in
- these cases. Consequently, one may use filenames with tildes in as-
- signments to P\bPA\bAT\bTH\bH, M\bMA\bAI\bIL\bLP\bPA\bAT\bTH\bH, and C\bCD\bDP\bPA\bAT\bTH\bH, and the shell assigns the ex-
+ B\bBa\bas\bsh\bh checks each variable assignment for unquoted tilde-prefixes imme-
+ diately following a :\b: or the first =\b=, and performs tilde expansion in
+ these cases. Consequently, one may use filenames with tildes in as-
+ signments to P\bPA\bAT\bTH\bH, M\bMA\bAI\bIL\bLP\bPA\bAT\bTH\bH, and C\bCD\bDP\bPA\bAT\bTH\bH, and the shell assigns the ex-
panded value.
- B\bBa\bas\bsh\bh also performs tilde expansion on words satisfying the conditions
+ B\bBa\bas\bsh\bh also performs tilde expansion on words satisfying the conditions
of variable assignments (as described above under P\bPA\bAR\bRA\bAM\bME\bET\bTE\bER\bRS\bS) when they
- appear as arguments to simple commands. B\bBa\bas\bsh\bh does not do this, except
+ appear as arguments to simple commands. B\bBa\bas\bsh\bh does not do this, except
for the _\bd_\be_\bc_\bl_\ba_\br_\ba_\bt_\bi_\bo_\bn commands listed above, when in posix mode.
P\bPa\bar\bra\bam\bme\bet\bte\ber\br E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn
The "$\b$" character introduces parameter expansion, command substitution,
- or arithmetic expansion. The parameter name or symbol to be expanded
- may be enclosed in braces, which are optional but serve to protect the
- variable to be expanded from characters immediately following it which
+ or arithmetic expansion. The parameter name or symbol to be expanded
+ may be enclosed in braces, which are optional but serve to protect the
+ variable to be expanded from characters immediately following it which
could be interpreted as part of the name.
- When braces are used, the matching ending brace is the first "}\b}" not
+ When braces are used, the matching ending brace is the first "}\b}" not
escaped by a backslash or within a quoted string, and not within an em-
- bedded arithmetic expansion, command substitution, or parameter expan-
+ bedded arithmetic expansion, command substitution, or parameter expan-
sion.
The basic form of parameter expansion is
${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br}
which substitutes the value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br. The braces are required when
- _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is a positional parameter with more than one digit, or when
- _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is followed by a character which is not to be interpreted as
- part of its name. The _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is a shell parameter as described
+ _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is a positional parameter with more than one digit, or when
+ _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is followed by a character which is not to be interpreted as
+ part of its name. The _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is a shell parameter as described
above P\bPA\bAR\bRA\bAM\bME\bET\bTE\bER\bRS\bS) or an array reference (A\bAr\brr\bra\bay\bys\bs).
- If the first character of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is an exclamation point (!\b!), and
+ If the first character of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is an exclamation point (!\b!), and
_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is not a _\bn_\ba_\bm_\be_\br_\be_\bf, it introduces a level of indirection. B\bBa\bas\bsh\bh
uses the value formed by expanding the rest of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br as the new _\bp_\ba_\b-
- _\br_\ba_\bm_\be_\bt_\be_\br; this new parameter is then expanded and that value is used in
- the rest of the expansion, rather than the expansion of the original
- _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br. This is known as _\bi_\bn_\bd_\bi_\br_\be_\bc_\bt _\be_\bx_\bp_\ba_\bn_\bs_\bi_\bo_\bn. The value is subject
- to tilde expansion, parameter expansion, command substitution, and
- arithmetic expansion. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is a nameref, this expands to the
+ _\br_\ba_\bm_\be_\bt_\be_\br; this new parameter is then expanded and that value is used in
+ the rest of the expansion, rather than the expansion of the original
+ _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br. This is known as _\bi_\bn_\bd_\bi_\br_\be_\bc_\bt _\be_\bx_\bp_\ba_\bn_\bs_\bi_\bo_\bn. The value is subject
+ to tilde expansion, parameter expansion, command substitution, and
+ arithmetic expansion. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is a nameref, this expands to the
name of the parameter referenced by _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br instead of performing the
complete indirect expansion, for compatibility. The exceptions to this
are the expansions of ${!\b!_\bp_\br_\be_\bf_\bi_\bx*\b*} and ${!\b!_\bn_\ba_\bm_\be[_\b@]} described below. The
- exclamation point must immediately follow the left brace in order to
+ exclamation point must immediately follow the left brace in order to
introduce indirection.
In each of the cases below, _\bw_\bo_\br_\bd is subject to tilde expansion, parame-
ter expansion, command substitution, and arithmetic expansion.
When not performing substring expansion, using the forms documented be-
- low (e.g., :\b:-\b-), b\bba\bas\bsh\bh tests for a parameter that is unset or null.
+ low (e.g., :\b:-\b-), b\bba\bas\bsh\bh tests for a parameter that is unset or null.
Omitting the colon tests only for a parameter that is unset.
${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br:\b:-\b-_\bw_\bo_\br_\bd}
- U\bUs\bse\be D\bDe\bef\bfa\bau\bul\blt\bt V\bVa\bal\blu\bue\bes\bs. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is unset or null, the expan-
- sion of _\bw_\bo_\br_\bd is substituted. Otherwise, the value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br
+ U\bUs\bse\be D\bDe\bef\bfa\bau\bul\blt\bt V\bVa\bal\blu\bue\bes\bs. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is unset or null, the expan-
+ sion of _\bw_\bo_\br_\bd is substituted. Otherwise, the value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br
is substituted.
${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br:\b:=\b=_\bw_\bo_\br_\bd}
- A\bAs\bss\bsi\big\bgn\bn D\bDe\bef\bfa\bau\bul\blt\bt V\bVa\bal\blu\bue\bes\bs. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is unset or null, the ex-
- pansion of _\bw_\bo_\br_\bd is assigned to _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br, and the expansion is
+ A\bAs\bss\bsi\big\bgn\bn D\bDe\bef\bfa\bau\bul\blt\bt V\bVa\bal\blu\bue\bes\bs. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is unset or null, the ex-
+ pansion of _\bw_\bo_\br_\bd is assigned to _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br, and the expansion is
the final value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br. Positional parameters and special
parameters may not be assigned in this way.
${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br:\b:?\b?_\bw_\bo_\br_\bd}
- D\bDi\bis\bsp\bpl\bla\bay\by E\bEr\brr\bro\bor\br i\bif\bf N\bNu\bul\bll\bl o\bor\br U\bUn\bns\bse\bet\bt. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is null or unset,
+ D\bDi\bis\bsp\bpl\bla\bay\by E\bEr\brr\bro\bor\br i\bif\bf N\bNu\bul\bll\bl o\bor\br U\bUn\bns\bse\bet\bt. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is null or unset,
the shell writes the expansion of _\bw_\bo_\br_\bd (or a message to that ef-
fect if _\bw_\bo_\br_\bd is not present) to the standard error and, if it is
- not interactive, exits with a non-zero status. An interactive
+ not interactive, exits with a non-zero status. An interactive
shell does not exit, but does not execute the command associated
- with the expansion. Otherwise, the value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is sub-
+ with the expansion. Otherwise, the value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is sub-
stituted.
${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br:\b:+\b+_\bw_\bo_\br_\bd}
- U\bUs\bse\be A\bAl\blt\bte\ber\brn\bna\bat\bte\be V\bVa\bal\blu\bue\be. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is null or unset, nothing is
- substituted, otherwise the expansion of _\bw_\bo_\br_\bd is substituted.
+ U\bUs\bse\be A\bAl\blt\bte\ber\brn\bna\bat\bte\be V\bVa\bal\blu\bue\be. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is null or unset, nothing is
+ substituted, otherwise the expansion of _\bw_\bo_\br_\bd is substituted.
The value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is not used.
${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br:\b:_\bo_\bf_\bf_\bs_\be_\bt}
${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br:\b:_\bo_\bf_\bf_\bs_\be_\bt:\b:_\bl_\be_\bn_\bg_\bt_\bh}
- S\bSu\bub\bbs\bst\btr\bri\bin\bng\bg E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn. Expands to up to _\bl_\be_\bn_\bg_\bt_\bh characters of the
- value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br starting at the character specified by _\bo_\bf_\bf_\b-
- _\bs_\be_\bt. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is @\b@ or *\b*, an indexed array subscripted by @\b@
- or *\b*, or an associative array name, the results differ as de-
- scribed below. If :\b:_\bl_\be_\bn_\bg_\bt_\bh is omitted (the first form above),
+ S\bSu\bub\bbs\bst\btr\bri\bin\bng\bg E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn. Expands to up to _\bl_\be_\bn_\bg_\bt_\bh characters of the
+ value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br starting at the character specified by _\bo_\bf_\bf_\b-
+ _\bs_\be_\bt. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is @\b@ or *\b*, an indexed array subscripted by @\b@
+ or *\b*, or an associative array name, the results differ as de-
+ scribed below. If :\b:_\bl_\be_\bn_\bg_\bt_\bh is omitted (the first form above),
this expands to the substring of the value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br starting
at the character specified by _\bo_\bf_\bf_\bs_\be_\bt and extending to the end of
the value. If _\bo_\bf_\bf_\bs_\be_\bt is omitted, it is treated as 0. If _\bl_\be_\bn_\bg_\bt_\bh
is omitted, but the colon after _\bo_\bf_\bf_\bs_\be_\bt is present, it is treated
- as 0. _\bl_\be_\bn_\bg_\bt_\bh and _\bo_\bf_\bf_\bs_\be_\bt are arithmetic expressions (see A\bAR\bRI\bIT\bTH\bH-\b-
+ as 0. _\bl_\be_\bn_\bg_\bt_\bh and _\bo_\bf_\bf_\bs_\be_\bt are arithmetic expressions (see A\bAR\bRI\bIT\bTH\bH-\b-
M\bME\bET\bTI\bIC\bC E\bEV\bVA\bAL\bLU\bUA\bAT\bTI\bIO\bON\bN below).
- If _\bo_\bf_\bf_\bs_\be_\bt evaluates to a number less than zero, the value is
+ If _\bo_\bf_\bf_\bs_\be_\bt evaluates to a number less than zero, the value is
used as an offset in characters from the end of the value of _\bp_\ba_\b-
- _\br_\ba_\bm_\be_\bt_\be_\br. If _\bl_\be_\bn_\bg_\bt_\bh evaluates to a number less than zero, it is
+ _\br_\ba_\bm_\be_\bt_\be_\br. If _\bl_\be_\bn_\bg_\bt_\bh evaluates to a number less than zero, it is
interpreted as an offset in characters from the end of the value
- of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br rather than a number of characters, and the expan-
- sion is the characters between _\bo_\bf_\bf_\bs_\be_\bt and that result. Note
- that a negative offset must be separated from the colon by at
+ of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br rather than a number of characters, and the expan-
+ sion is the characters between _\bo_\bf_\bf_\bs_\be_\bt and that result. Note
+ that a negative offset must be separated from the colon by at
least one space to avoid being confused with the :\b:-\b- expansion.
- If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is @\b@ or *\b*, the result is _\bl_\be_\bn_\bg_\bt_\bh positional parame-
- ters beginning at _\bo_\bf_\bf_\bs_\be_\bt. A negative _\bo_\bf_\bf_\bs_\be_\bt is taken relative
- to one greater than the greatest positional parameter, so an
+ If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is @\b@ or *\b*, the result is _\bl_\be_\bn_\bg_\bt_\bh positional parame-
+ ters beginning at _\bo_\bf_\bf_\bs_\be_\bt. A negative _\bo_\bf_\bf_\bs_\be_\bt is taken relative
+ to one greater than the greatest positional parameter, so an
offset of -1 evaluates to the last positional parameter (or 0 if
- there are no positional parameters). It is an expansion error
+ there are no positional parameters). It is an expansion error
if _\bl_\be_\bn_\bg_\bt_\bh evaluates to a number less than zero.
If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is an indexed array name subscripted by @ or *, the
result is the _\bl_\be_\bn_\bg_\bt_\bh members of the array beginning with ${_\bp_\ba_\br_\ba_\b-
- _\bm_\be_\bt_\be_\br[_\bo_\bf_\bf_\bs_\be_\bt]}. A negative _\bo_\bf_\bf_\bs_\be_\bt is taken relative to one
+ _\bm_\be_\bt_\be_\br[_\bo_\bf_\bf_\bs_\be_\bt]}. A negative _\bo_\bf_\bf_\bs_\be_\bt is taken relative to one
greater than the maximum index of the specified array. It is an
expansion error if _\bl_\be_\bn_\bg_\bt_\bh evaluates to a number less than zero.
Substring expansion applied to an associative array produces un-
defined results.
- Substring indexing is zero-based unless the positional parame-
- ters are used, in which case the indexing starts at 1 by de-
- fault. If _\bo_\bf_\bf_\bs_\be_\bt is 0, and the positional parameters are used,
+ Substring indexing is zero-based unless the positional parame-
+ ters are used, in which case the indexing starts at 1 by de-
+ fault. If _\bo_\bf_\bf_\bs_\be_\bt is 0, and the positional parameters are used,
$\b$0\b0 is prefixed to the list.
${!\b!_\bp_\br_\be_\bf_\bi_\bx*\b*}
${!\b!_\bp_\br_\be_\bf_\bi_\bx@\b@}
- N\bNa\bam\bme\bes\bs m\bma\bat\btc\bch\bhi\bin\bng\bg p\bpr\bre\bef\bfi\bix\bx. Expands to the names of variables whose
+ N\bNa\bam\bme\bes\bs m\bma\bat\btc\bch\bhi\bin\bng\bg p\bpr\bre\bef\bfi\bix\bx. Expands to the names of variables whose
names begin with _\bp_\br_\be_\bf_\bi_\bx, separated by the first character of the
- I\bIF\bFS\bS special variable. When _\b@ is used and the expansion appears
- within double quotes, each variable name expands to a separate
+ I\bIF\bFS\bS special variable. When _\b@ is used and the expansion appears
+ within double quotes, each variable name expands to a separate
word.
${!\b!_\bn_\ba_\bm_\be[_\b@]}
${!\b!_\bn_\ba_\bm_\be[_\b*]}
- L\bLi\bis\bst\bt o\bof\bf a\bar\brr\bra\bay\by k\bke\bey\bys\bs. If _\bn_\ba_\bm_\be is an array variable, expands to
- the list of array indices (keys) assigned in _\bn_\ba_\bm_\be. If _\bn_\ba_\bm_\be is
- not an array, expands to 0 if _\bn_\ba_\bm_\be is set and null otherwise.
- When _\b@ is used and the expansion appears within double quotes,
+ L\bLi\bis\bst\bt o\bof\bf a\bar\brr\bra\bay\by k\bke\bey\bys\bs. If _\bn_\ba_\bm_\be is an array variable, expands to
+ the list of array indices (keys) assigned in _\bn_\ba_\bm_\be. If _\bn_\ba_\bm_\be is
+ not an array, expands to 0 if _\bn_\ba_\bm_\be is set and null otherwise.
+ When _\b@ is used and the expansion appears within double quotes,
each key expands to a separate word.
${#\b#_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br}
- P\bPa\bar\bra\bam\bme\bet\bte\ber\br l\ble\ben\bng\bgt\bth\bh. Substitutes the length in characters of the
- expanded value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is *\b* or @\b@, the value
- substituted is the number of positional parameters. If _\bp_\ba_\br_\ba_\bm_\be_\b-
- _\bt_\be_\br is an array name subscripted by *\b* or @\b@, the value substi-
- tuted is the number of elements in the array. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is
- an indexed array name subscripted by a negative number, that
- number is interpreted as relative to one greater than the maxi-
- mum index of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br, so negative indices count back from the
- end of the array, and an index of -1 references the last ele-
+ P\bPa\bar\bra\bam\bme\bet\bte\ber\br l\ble\ben\bng\bgt\bth\bh. Substitutes the length in characters of the
+ expanded value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is *\b* or @\b@, the value
+ substituted is the number of positional parameters. If _\bp_\ba_\br_\ba_\bm_\be_\b-
+ _\bt_\be_\br is an array name subscripted by *\b* or @\b@, the value substi-
+ tuted is the number of elements in the array. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is
+ an indexed array name subscripted by a negative number, that
+ number is interpreted as relative to one greater than the maxi-
+ mum index of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br, so negative indices count back from the
+ end of the array, and an index of -1 references the last ele-
ment.
${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br#\b#_\bw_\bo_\br_\bd}
R\bRe\bem\bmo\bov\bve\be m\bma\bat\btc\bch\bhi\bin\bng\bg p\bpr\bre\bef\bfi\bix\bx p\bpa\bat\btt\bte\ber\brn\bn. The _\bw_\bo_\br_\bd is expanded to produce
a pattern just as in pathname expansion, and matched against the
expanded value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br using the rules described under P\bPa\bat\bt-\b-
- t\bte\ber\brn\bn M\bMa\bat\btc\bch\bhi\bin\bng\bg below. If the pattern matches the beginning of
- the value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br, then the result of the expansion is the
- expanded value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br with the shortest matching pattern
- (the "#" case) or the longest matching pattern (the "##" case)
- deleted. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is @\b@ or *\b*, the pattern removal operation
- is applied to each positional parameter in turn, and the expan-
- sion is the resultant list. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is an array variable
- subscripted with @\b@ or *\b*, the pattern removal operation is ap-
- plied to each member of the array in turn, and the expansion is
+ t\bte\ber\brn\bn M\bMa\bat\btc\bch\bhi\bin\bng\bg below. If the pattern matches the beginning of
+ the value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br, then the result of the expansion is the
+ expanded value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br with the shortest matching pattern
+ (the "#" case) or the longest matching pattern (the "##" case)
+ deleted. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is @\b@ or *\b*, the pattern removal operation
+ is applied to each positional parameter in turn, and the expan-
+ sion is the resultant list. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is an array variable
+ subscripted with @\b@ or *\b*, the pattern removal operation is ap-
+ plied to each member of the array in turn, and the expansion is
the resultant list.
${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br%\b%_\bw_\bo_\br_\bd}
R\bRe\bem\bmo\bov\bve\be m\bma\bat\btc\bch\bhi\bin\bng\bg s\bsu\buf\bff\bfi\bix\bx p\bpa\bat\btt\bte\ber\brn\bn. The _\bw_\bo_\br_\bd is expanded to produce
a pattern just as in pathname expansion, and matched against the
expanded value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br using the rules described under P\bPa\bat\bt-\b-
- t\bte\ber\brn\bn M\bMa\bat\btc\bch\bhi\bin\bng\bg below. If the pattern matches a trailing portion
- of the expanded value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br, then the result of the ex-
- pansion is the expanded value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br with the shortest
- matching pattern (the "%" case) or the longest matching pattern
- (the "%%" case) deleted. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is @\b@ or *\b*, the pattern
- removal operation is applied to each positional parameter in
- turn, and the expansion is the resultant list. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is
- an array variable subscripted with @\b@ or *\b*, the pattern removal
- operation is applied to each member of the array in turn, and
+ t\bte\ber\brn\bn M\bMa\bat\btc\bch\bhi\bin\bng\bg below. If the pattern matches a trailing portion
+ of the expanded value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br, then the result of the ex-
+ pansion is the expanded value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br with the shortest
+ matching pattern (the "%" case) or the longest matching pattern
+ (the "%%" case) deleted. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is @\b@ or *\b*, the pattern
+ removal operation is applied to each positional parameter in
+ turn, and the expansion is the resultant list. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is
+ an array variable subscripted with @\b@ or *\b*, the pattern removal
+ operation is applied to each member of the array in turn, and
the expansion is the resultant list.
${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br/\b/_\bp_\ba_\bt_\bt_\be_\br_\bn/\b/_\bs_\bt_\br_\bi_\bn_\bg}
${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br/\b/#\b#_\bp_\ba_\bt_\bt_\be_\br_\bn/\b/_\bs_\bt_\br_\bi_\bn_\bg}
${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br/\b/%\b%_\bp_\ba_\bt_\bt_\be_\br_\bn/\b/_\bs_\bt_\br_\bi_\bn_\bg}
P\bPa\bat\btt\bte\ber\brn\bn s\bsu\bub\bbs\bst\bti\bit\btu\but\bti\bio\bon\bn. The _\bp_\ba_\bt_\bt_\be_\br_\bn is expanded to produce a pat-
- tern and matched against the expanded value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br as de-
+ tern and matched against the expanded value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br as de-
scribed under P\bPa\bat\btt\bte\ber\brn\bn M\bMa\bat\btc\bch\bhi\bin\bng\bg below. The longest match of _\bp_\ba_\bt_\b-
- _\bt_\be_\br_\bn in the expanded value is replaced with _\bs_\bt_\br_\bi_\bn_\bg. _\bs_\bt_\br_\bi_\bn_\bg un-
+ _\bt_\be_\br_\bn in the expanded value is replaced with _\bs_\bt_\br_\bi_\bn_\bg. _\bs_\bt_\br_\bi_\bn_\bg un-
dergoes tilde expansion, parameter and variable expansion,
- arithmetic expansion, command and process substitution, and
+ arithmetic expansion, command and process substitution, and
quote removal.
- In the first form above, only the first match is replaced. If
+ In the first form above, only the first match is replaced. If
there are two slashes separating _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br and _\bp_\ba_\bt_\bt_\be_\br_\bn (the sec-
- ond form above), all matches of _\bp_\ba_\bt_\bt_\be_\br_\bn are replaced with
- _\bs_\bt_\br_\bi_\bn_\bg. If _\bp_\ba_\bt_\bt_\be_\br_\bn is preceded by #\b# (the third form above), it
- must match at the beginning of the expanded value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br.
- If _\bp_\ba_\bt_\bt_\be_\br_\bn is preceded by %\b% (the fourth form above), it must
+ ond form above), all matches of _\bp_\ba_\bt_\bt_\be_\br_\bn are replaced with
+ _\bs_\bt_\br_\bi_\bn_\bg. If _\bp_\ba_\bt_\bt_\be_\br_\bn is preceded by #\b# (the third form above), it
+ must match at the beginning of the expanded value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br.
+ If _\bp_\ba_\bt_\bt_\be_\br_\bn is preceded by %\b% (the fourth form above), it must
match at the end of the expanded value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br.
- If the expansion of _\bs_\bt_\br_\bi_\bn_\bg is null, matches of _\bp_\ba_\bt_\bt_\be_\br_\bn are
+ If the expansion of _\bs_\bt_\br_\bi_\bn_\bg is null, matches of _\bp_\ba_\bt_\bt_\be_\br_\bn are
deleted and the /\b/ following _\bp_\ba_\bt_\bt_\be_\br_\bn may be omitted.
- If the p\bpa\bat\bts\bsu\bub\bb_\b_r\bre\bep\bpl\bla\bac\bce\bem\bme\ben\bnt\bt shell option is enabled using s\bsh\bho\bop\bpt\bt,
- any unquoted instances of &\b& in _\bs_\bt_\br_\bi_\bn_\bg are replaced with the
+ If the p\bpa\bat\bts\bsu\bub\bb_\b_r\bre\bep\bpl\bla\bac\bce\bem\bme\ben\bnt\bt shell option is enabled using s\bsh\bho\bop\bpt\bt,
+ any unquoted instances of &\b& in _\bs_\bt_\br_\bi_\bn_\bg are replaced with the
matching portion of _\bp_\ba_\bt_\bt_\be_\br_\bn.
Quoting any part of _\bs_\bt_\br_\bi_\bn_\bg inhibits replacement in the expansion
- of the quoted portion, including replacement strings stored in
- shell variables. Backslash escapes &\b& in _\bs_\bt_\br_\bi_\bn_\bg; the backslash
- is removed in order to permit a literal &\b& in the replacement
- string. Backslash can also be used to escape a backslash; \\b\\\b\
+ of the quoted portion, including replacement strings stored in
+ shell variables. Backslash escapes &\b& in _\bs_\bt_\br_\bi_\bn_\bg; the backslash
+ is removed in order to permit a literal &\b& in the replacement
+ string. Backslash can also be used to escape a backslash; \\b\\\b\
results in a literal backslash in the replacement. Users should
- take care if _\bs_\bt_\br_\bi_\bn_\bg is double-quoted to avoid unwanted interac-
- tions between the backslash and double-quoting, since backslash
- has special meaning within double quotes. Pattern substitution
- performs the check for unquoted &\b& after expanding _\bs_\bt_\br_\bi_\bn_\bg; shell
- programmers should quote any occurrences of &\b& they want to be
+ take care if _\bs_\bt_\br_\bi_\bn_\bg is double-quoted to avoid unwanted interac-
+ tions between the backslash and double-quoting, since backslash
+ has special meaning within double quotes. Pattern substitution
+ performs the check for unquoted &\b& after expanding _\bs_\bt_\br_\bi_\bn_\bg; shell
+ programmers should quote any occurrences of &\b& they want to be
taken literally in the replacement and ensure any instances of &\b&
they want to be replaced are unquoted.
- Like the pattern removal operators, double quotes surrounding
+ Like the pattern removal operators, double quotes surrounding
the replacement string quote the expanded characters, while dou-
- ble quotes enclosing the entire parameter substitution do not,
- since the expansion is performed in a context that doesn't take
+ ble 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.
- If the n\bno\boc\bca\bas\bse\bem\bma\bat\btc\bch\bh shell option is enabled, the match is per-
+ If the n\bno\boc\bca\bas\bse\bem\bma\bat\btc\bch\bh shell option is enabled, the match is per-
formed without regard to the case of alphabetic characters.
If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is @\b@ or *\b*, the substitution operation is applied to
- each positional parameter in turn, and the expansion is the re-
- sultant list. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is an array variable subscripted
- with @\b@ or *\b*, the substitution operation is applied to each mem-
- ber of the array in turn, and the expansion is the resultant
+ each positional parameter in turn, and the expansion is the re-
+ sultant list. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is an array variable subscripted
+ with @\b@ or *\b*, the substitution operation is applied to each mem-
+ ber of the array in turn, and the expansion is the resultant
list.
${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br^\b^_\bp_\ba_\bt_\bt_\be_\br_\bn}
${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br^\b^^\b^_\bp_\ba_\bt_\bt_\be_\br_\bn}
${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br,\b,_\bp_\ba_\bt_\bt_\be_\br_\bn}
${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br,\b,,\b,_\bp_\ba_\bt_\bt_\be_\br_\bn}
- C\bCa\bas\bse\be m\bmo\bod\bdi\bif\bfi\bic\bca\bat\bti\bio\bon\bn. This expansion modifies the case of alpha-
- betic characters in _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br. First, the _\bp_\ba_\bt_\bt_\be_\br_\bn is expanded
- to produce a pattern as described below under P\bPa\bat\btt\bte\ber\brn\bn M\bMa\bat\btc\bch\bhi\bin\bng\bg.
+ C\bCa\bas\bse\be m\bmo\bod\bdi\bif\bfi\bic\bca\bat\bti\bio\bon\bn. This expansion modifies the case of alpha-
+ betic characters in _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br. First, the _\bp_\ba_\bt_\bt_\be_\br_\bn is expanded
+ to produce a pattern as described below under P\bPa\bat\btt\bte\ber\brn\bn M\bMa\bat\btc\bch\bhi\bin\bng\bg.
B\bBa\bas\bsh\bh then examines characters in the expanded value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br
- against _\bp_\ba_\bt_\bt_\be_\br_\bn as described below. If a character matches the
- pattern, its case is converted. The pattern should not attempt
+ against _\bp_\ba_\bt_\bt_\be_\br_\bn as described below. If a character matches the
+ pattern, its case is converted. The pattern should not attempt
to match more than one character.
- Using "^" converts lowercase letters matching _\bp_\ba_\bt_\bt_\be_\br_\bn to upper-
+ Using "^" converts lowercase letters matching _\bp_\ba_\bt_\bt_\be_\br_\bn to upper-
case; "," converts matching uppercase letters to lowercase. The
- ^\b^ and ,\b, variants examine the first character in the expanded
- value and convert its case if it matches _\bp_\ba_\bt_\bt_\be_\br_\bn; the ^\b^^\b^ and ,\b,,\b,
- variants examine all characters in the expanded value and con-
- vert each one that matches _\bp_\ba_\bt_\bt_\be_\br_\bn. If _\bp_\ba_\bt_\bt_\be_\br_\bn is omitted, it
+ ^\b^ and ,\b, variants examine the first character in the expanded
+ value and convert its case if it matches _\bp_\ba_\bt_\bt_\be_\br_\bn; the ^\b^^\b^ and ,\b,,\b,
+ variants examine all characters in the expanded value and con-
+ vert each one that matches _\bp_\ba_\bt_\bt_\be_\br_\bn. If _\bp_\ba_\bt_\bt_\be_\br_\bn is omitted, it
is treated like a ?\b?, which matches every character.
- If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is @\b@ or *\b*, the case modification operation is ap-
+ If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is @\b@ or *\b*, the case modification operation is ap-
plied to each positional parameter in turn, and the expansion is
- the resultant list. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is an array variable sub-
+ the resultant list. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is an array variable sub-
scripted with @\b@ or *\b*, the case modification operation is applied
- to each member of the array in turn, and the expansion is the
+ to each member of the array in turn, and the expansion is the
resultant list.
${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br@\b@_\bo_\bp_\be_\br_\ba_\bt_\bo_\br}
P\bPa\bar\bra\bam\bme\bet\bte\ber\br t\btr\bra\ban\bns\bsf\bfo\bor\brm\bma\bat\bti\bio\bon\bn. The expansion is either a transforma-
- tion of the value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br or information about _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br
- itself, depending on the value of _\bo_\bp_\be_\br_\ba_\bt_\bo_\br. Each _\bo_\bp_\be_\br_\ba_\bt_\bo_\br is a
+ tion of the value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br or information about _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br
+ itself, depending on the value of _\bo_\bp_\be_\br_\ba_\bt_\bo_\br. Each _\bo_\bp_\be_\br_\ba_\bt_\bo_\br is a
single letter:
- U\bU The expansion is a string that is the value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br
- with lowercase alphabetic characters converted to upper-
+ U\bU The expansion is a string that is the value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br
+ with lowercase alphabetic characters converted to upper-
case.
- u\bu The expansion is a string that is the value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br
+ u\bu The expansion is a string that is the value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br
with the first character converted to uppercase, if it is
alphabetic.
- L\bL The expansion is a string that is the value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br
- with uppercase alphabetic characters converted to lower-
+ L\bL The expansion is a string that is the value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br
+ with uppercase alphabetic characters converted to lower-
case.
- Q\bQ The expansion is a string that is the value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br
+ Q\bQ The expansion is a string that is the value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br
quoted in a format that can be reused as input.
- E\bE The expansion is a string that is the value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br
- with backslash escape sequences expanded as with the
+ E\bE The expansion is a string that is the value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br
+ with backslash escape sequences expanded as with the
$\b$'\b'...'\b' quoting mechanism.
P\bP The expansion is a string that is the result of expanding
the value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br as if it were a prompt string (see
P\bPR\bRO\bOM\bMP\bPT\bTI\bIN\bNG\bG below).
- A\bA The expansion is a string in the form of an assignment
- statement or d\bde\bec\bcl\bla\bar\bre\be command that, if evaluated, recre-
+ A\bA The expansion is a string in the form of an assignment
+ statement or d\bde\bec\bcl\bla\bar\bre\be command that, if evaluated, recre-
ates _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br with its attributes and value.
- K\bK Produces a possibly-quoted version of the value of _\bp_\ba_\br_\ba_\b-
- _\bm_\be_\bt_\be_\br, except that it prints the values of indexed and
- associative arrays as a sequence of quoted key-value
+ K\bK Produces a possibly-quoted version of the value of _\bp_\ba_\br_\ba_\b-
+ _\bm_\be_\bt_\be_\br, except that it prints the values of indexed and
+ associative arrays as a sequence of quoted key-value
pairs (see A\bAr\brr\bra\bay\bys\bs above). The keys and values are quoted
in a format that can be reused as input.
- a\ba The expansion is a string consisting of flag values rep-
+ a\ba The expansion is a string consisting of flag values rep-
resenting _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br's attributes.
- k\bk Like the K transformation, but expands the keys and val-
- ues of indexed and associative arrays to separate words
+ k\bk Like the K transformation, but expands the keys and val-
+ ues of indexed and associative arrays to separate words
after word splitting.
- If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is @\b@ or *\b*, the operation is applied to each posi-
- tional parameter in turn, and the expansion is the resultant
- list. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is an array variable subscripted with @\b@ or
+ If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is @\b@ or *\b*, the operation is applied to each posi-
+ tional parameter in turn, and the expansion is the resultant
+ list. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is an array variable subscripted with @\b@ or
*\b*, the operation is applied to each member of the array in turn,
and the expansion is the resultant list.
- The result of the expansion is subject to word splitting and
+ The result of the expansion is subject to word splitting and
pathname expansion as described below.
C\bCo\bom\bmm\bma\ban\bnd\bd S\bSu\bub\bbs\bst\bti\bit\btu\but\bti\bio\bon\bn
B\bBa\bas\bsh\bh performs the expansion by executing _\bc_\bo_\bm_\bm_\ba_\bn_\bd in a subshell environ-
ment and replacing the command substitution with the standard output of
the command, with any trailing newlines deleted. Embedded newlines are
- not deleted, but they may be removed during word splitting. The com-
- mand substitution $\b$(\b(c\bca\bat\bt _\bf_\bi_\bl_\be)\b) can be replaced by the equivalent but
+ not deleted, but they may be removed during word splitting. The com-
+ mand substitution $\b$(\b(c\bca\bat\bt _\bf_\bi_\bl_\be)\b) can be replaced by the equivalent but
faster $\b$(\b(<\b< _\bf_\bi_\bl_\be)\b).
- With the old-style backquote form of substitution, backslash retains
- its literal meaning except when followed by $\b$, `\b`, or \\b\. The first
- backquote not preceded by a backslash terminates the command substitu-
- tion. When using the $(_\bc_\bo_\bm_\bm_\ba_\bn_\bd) form, all characters between the
+ With the old-style backquote form of substitution, backslash retains
+ its literal meaning except when followed by $\b$, `\b`, or \\b\. The first
+ backquote not preceded by a backslash terminates the command substitu-
+ tion. When using the $(_\bc_\bo_\bm_\bm_\ba_\bn_\bd) form, all characters between the
parentheses make up the command; none are treated specially.
There is an alternate form of command substitution:
$\b${\b{_\bc _\bc_\bo_\bm_\bm_\ba_\bn_\bd;\b;}\b}
- which executes _\bc_\bo_\bm_\bm_\ba_\bn_\bd in the current execution environment and cap-
+ which executes _\bc_\bo_\bm_\bm_\ba_\bn_\bd in the current execution environment and cap-
tures its output, again with trailing newlines removed.
The character _\bc following the open brace must be a space, tab, newline,
- or |\b|, and the close brace must be in a position where a reserved word
- may appear (i.e., preceded by a command terminator such as semicolon).
+ or |\b|, and the close brace must be in a position where a reserved word
+ may appear (i.e., preceded by a command terminator such as semicolon).
B\bBa\bas\bsh\bh allows the close brace to be joined to the remaining characters in
- the word without being followed by a shell metacharacter as a reserved
+ the word without being followed by a shell metacharacter as a reserved
word would usually require.
Any side effects of _\bc_\bo_\bm_\bm_\ba_\bn_\bd take effect immediately in the current exe-
- cution environment and persist in the current environment after the
+ cution environment and persist in the current environment after the
command completes (e.g., the e\bex\bxi\bit\bt builtin exits the shell).
- This type of command substitution superficially resembles executing an
- unnamed shell function: local variables are created as when a shell
- function is executing, and the r\bre\bet\btu\bur\brn\bn builtin forces _\bc_\bo_\bm_\bm_\ba_\bn_\bd to com-
- plete; however, the rest of the execution environment, including the
+ This type of command substitution superficially resembles executing an
+ unnamed shell function: local variables are created as when a shell
+ function is executing, and the r\bre\bet\btu\bur\brn\bn builtin forces _\bc_\bo_\bm_\bm_\ba_\bn_\bd to com-
+ plete; however, the rest of the execution environment, including the
positional parameters, is shared with the caller.
- If the first character following the open brace is a |\b|, the construct
- expands to the value of the R\bRE\bEP\bPL\bLY\bY shell variable after _\bc_\bo_\bm_\bm_\ba_\bn_\bd exe-
- cutes, without removing any trailing newlines, and the standard output
- of _\bc_\bo_\bm_\bm_\ba_\bn_\bd remains the same as in the calling shell. B\bBa\bas\bsh\bh creates R\bRE\bE-\b-
+ If the first character following the open brace is a |\b|, the construct
+ expands to the value of the R\bRE\bEP\bPL\bLY\bY shell variable after _\bc_\bo_\bm_\bm_\ba_\bn_\bd exe-
+ cutes, without removing any trailing newlines, and the standard output
+ of _\bc_\bo_\bm_\bm_\ba_\bn_\bd remains the same as in the calling shell. B\bBa\bas\bsh\bh creates R\bRE\bE-\b-
P\bPL\bLY\bY as an initially-unset local variable when _\bc_\bo_\bm_\bm_\ba_\bn_\bd executes, and re-
- stores R\bRE\bEP\bPL\bLY\bY to the value it had before the command substitution after
+ stores R\bRE\bEP\bPL\bLY\bY to the value it had before the command substitution after
_\bc_\bo_\bm_\bm_\ba_\bn_\bd completes, as with any local variable.
Command substitutions may be nested. To nest when using the backquoted
$\b$(\b((\b(_\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn)\b))\b)
- The _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn undergoes the same expansions as if it were within dou-
+ The _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn undergoes the same expansions as if it were within dou-
ble quotes, but unescaped double quote characters in _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn are not
- treated specially and are removed. All tokens in the expression un-
+ treated specially and are removed. All tokens in the expression un-
dergo parameter and variable expansion, command substitution, and quote
- removal. The result is treated as the arithmetic expression to be
- evaluated. Since the way Bash handles double quotes can potentially
- result in empty strings, arithmetic expansion treats those as expres-
+ removal. The result is treated as the arithmetic expression to be
+ evaluated. Since the way Bash handles double quotes can potentially
+ result in empty strings, arithmetic expansion treats those as expres-
sions that evaluate to 0. Arithmetic expansions may be nested.
- The evaluation is performed according to the rules listed below under
+ The evaluation is performed according to the rules listed below under
A\bAR\bRI\bIT\bTH\bHM\bME\bET\bTI\bIC\bC E\bEV\bVA\bAL\bLU\bUA\bAT\bTI\bIO\bON\bN. If _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn is invalid, b\bba\bas\bsh\bh prints a message
- to standard error indicating failure, does not perform the substitu-
+ to standard error indicating failure, does not perform the substitu-
tion, and does not execute the command associated with the expansion.
P\bPr\bro\boc\bce\bes\bss\bs S\bSu\bub\bbs\bst\bti\bit\btu\but\bti\bio\bon\bn
- _\bP_\br_\bo_\bc_\be_\bs_\bs _\bs_\bu_\bb_\bs_\bt_\bi_\bt_\bu_\bt_\bi_\bo_\bn allows a process's input or output to be referred
- to using a filename. It takes the form of <\b<(\b(_\bl_\bi_\bs_\bt)\b) or >\b>(\b(_\bl_\bi_\bs_\bt)\b). The
- process _\bl_\bi_\bs_\bt is run asynchronously, and its input or output appears as
+ _\bP_\br_\bo_\bc_\be_\bs_\bs _\bs_\bu_\bb_\bs_\bt_\bi_\bt_\bu_\bt_\bi_\bo_\bn allows a process's input or output to be referred
+ to using a filename. It takes the form of <\b<(\b(_\bl_\bi_\bs_\bt)\b) or >\b>(\b(_\bl_\bi_\bs_\bt)\b). The
+ process _\bl_\bi_\bs_\bt is run asynchronously, and its input or output appears as
a filename. This filename is passed as an argument to the current com-
mand as the result of the expansion.
- If the >\b>(\b(_\bl_\bi_\bs_\bt)\b) form is used, writing to the file provides input for
+ If the >\b>(\b(_\bl_\bi_\bs_\bt)\b) form is used, writing to the file provides input for
_\bl_\bi_\bs_\bt. If the <\b<(\b(_\bl_\bi_\bs_\bt)\b) form is used, reading the file obtains the output
of _\bl_\bi_\bs_\bt. No space may appear between the <\b< or >\b> and the left parenthe-
sis, otherwise the construct would be interpreted as a redirection.
- Process substitution is supported on systems that support named pipes
+ Process substitution is supported on systems that support named pipes
(_\bF_\bI_\bF_\bO_\bs) or the _\b/_\bd_\be_\bv_\b/_\bf_\bd method of naming open files.
- When available, process substitution is performed simultaneously with
- parameter and variable expansion, command substitution, and arithmetic
+ When available, process substitution is performed simultaneously with
+ parameter and variable expansion, command substitution, and arithmetic
expansion.
W\bWo\bor\brd\bd S\bSp\bpl\bli\bit\btt\bti\bin\bng\bg
- The shell scans the results of parameter expansion, command substitu-
- tion, and arithmetic expansion that did not occur within double quotes
+ The shell scans the results of parameter expansion, command substitu-
+ tion, and arithmetic expansion that did not occur within double quotes
for _\bw_\bo_\br_\bd _\bs_\bp_\bl_\bi_\bt_\bt_\bi_\bn_\bg. Words that were not expanded are not split.
- The shell treats each character of I\bIF\bFS\bS as a delimiter, and splits the
- results of the other expansions into words using these characters as
+ The shell treats each character of I\bIF\bFS\bS as a delimiter, and splits the
+ results of the other expansions into words using these characters as
field terminators.
An _\bI_\bF_\bS _\bw_\bh_\bi_\bt_\be_\bs_\bp_\ba_\bc_\be character is whitespace as defined above (see D\bDe\bef\bfi\bin\bni\bi-\b-
- t\bti\bio\bon\bns\bs) that appears in the value of I\bIF\bFS\bS. Space, tab, and newline are
- always considered IFS whitespace, even if they don't appear in the lo-
+ t\bti\bio\bon\bns\bs) that appears in the value of I\bIF\bFS\bS. Space, tab, and newline are
+ always considered IFS whitespace, even if they don't appear in the lo-
cale's s\bsp\bpa\bac\bce\be category.
- If I\bIF\bFS\bS is unset, field splitting acts as if its value were
- <\b<s\bsp\bpa\bac\bce\be>\b><\b<t\bta\bab\bb>\b><\b<n\bne\bew\bwl\bli\bin\bne\be>\b>, and treats these characters as IFS whitespace.
- If the value of I\bIF\bFS\bS is null, no word splitting occurs, but implicit
+ If I\bIF\bFS\bS is unset, field splitting acts as if its value were
+ <\b<s\bsp\bpa\bac\bce\be>\b><\b<t\bta\bab\bb>\b><\b<n\bne\bew\bwl\bli\bin\bne\be>\b>, and treats these characters as IFS whitespace.
+ If the value of I\bIF\bFS\bS is null, no word splitting occurs, but implicit
null arguments (see below) are still removed.
- Word splitting begins by removing sequences of IFS whitespace charac-
- ters from the beginning and end of the results of the previous expan-
+ Word splitting begins by removing sequences of IFS whitespace charac-
+ ters from the beginning and end of the results of the previous expan-
sions, then splits the remaining words.
- If the value of I\bIF\bFS\bS consists solely of IFS whitespace, any sequence of
- IFS whitespace characters delimits a field, so a field consists of
+ If the value of I\bIF\bFS\bS consists solely of IFS whitespace, any sequence of
+ IFS whitespace characters delimits a field, so a field consists of
characters that are not unquoted IFS whitespace, and null fields result
only from quoting.
- If I\bIF\bFS\bS contains a non-whitespace character, then any character in the
- value of I\bIF\bFS\bS that is not IFS whitespace, along with any adjacent IFS
+ If I\bIF\bFS\bS contains a non-whitespace character, then any character in the
+ value of I\bIF\bFS\bS that is not IFS whitespace, along with any adjacent IFS
whitespace characters, delimits a field. This means that adjacent non-
- IFS-whitespace delimiters produce a null field. A sequence of IFS
+ IFS-whitespace delimiters produce a null field. A sequence of IFS
whitespace characters also delimits a field.
- Explicit null arguments ("\b""\b" or '\b''\b') are retained and passed to commands
+ Explicit null arguments ("\b""\b" or '\b''\b') are retained and passed to commands
as empty strings. Unquoted implicit null arguments, resulting from the
- expansion of parameters that have no values, are removed. Expanding a
- parameter with no value within double quotes produces a null field,
+ expansion of parameters that have no values, are removed. Expanding a
+ parameter with no value within double quotes produces a null field,
which is retained and passed to a command as an empty string.
- When a quoted null argument appears as part of a word whose expansion
- is non-null, word splitting removes the null argument portion, leaving
- the non-null expansion. That is, the word "-d''" becomes "-d" after
+ When a quoted null argument appears as part of a word whose expansion
+ is non-null, word splitting removes the null argument portion, leaving
+ the non-null expansion. That is, the word "-d''" becomes "-d" after
word splitting and null argument removal.
P\bPa\bat\bth\bhn\bna\bam\bme\be E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn
- After word splitting, unless the -\b-f\bf option has been set, b\bba\bas\bsh\bh scans
- each word for the characters *\b*, ?\b?, and [\b[. If one of these characters
+ After word splitting, unless the -\b-f\bf option has been set, b\bba\bas\bsh\bh scans
+ each word for the characters *\b*, ?\b?, and [\b[. If one of these characters
appears, and is not quoted, then the word is regarded as a _\bp_\ba_\bt_\bt_\be_\br_\bn, and
replaced with a sorted list of filenames matching the pattern (see P\bPa\bat\bt-\b-
- t\bte\ber\brn\bn M\bMa\bat\btc\bch\bhi\bin\bng\bg below) subject to the value of the G\bGL\bLO\bOB\bBS\bSO\bOR\bRT\bT shell vari-
+ t\bte\ber\brn\bn M\bMa\bat\btc\bch\bhi\bin\bng\bg below) subject to the value of the G\bGL\bLO\bOB\bBS\bSO\bOR\bRT\bT shell vari-
able.
- If no matching filenames are found, and the shell option n\bnu\bul\bll\blg\bgl\blo\bob\bb is
- not enabled, the word is left unchanged. If the n\bnu\bul\bll\blg\bgl\blo\bob\bb option is
- set, and no matches are found, the word is removed. If the f\bfa\bai\bil\blg\bgl\blo\bob\bb
- shell option is set, and no matches are found, b\bba\bas\bsh\bh prints an error
- message and does not execute the command. If the shell option n\bno\boc\bca\bas\bse\be-\b-
- g\bgl\blo\bob\bb is enabled, the match is performed without regard to the case of
+ If no matching filenames are found, and the shell option n\bnu\bul\bll\blg\bgl\blo\bob\bb is
+ not enabled, the word is left unchanged. If the n\bnu\bul\bll\blg\bgl\blo\bob\bb option is
+ set, and no matches are found, the word is removed. If the f\bfa\bai\bil\blg\bgl\blo\bob\bb
+ shell option is set, and no matches are found, b\bba\bas\bsh\bh prints an error
+ message and does not execute the command. If the shell option n\bno\boc\bca\bas\bse\be-\b-
+ g\bgl\blo\bob\bb is enabled, the match is performed without regard to the case of
alphabetic characters.
When a pattern is used for pathname expansion, the character "." at the
- start of a name or immediately following a slash must be matched ex-
- plicitly, unless the shell option d\bdo\bot\btg\bgl\blo\bob\bb is set. In order to match
- the filenames _\b. and _\b._\b., the pattern must begin with "." (for example,
+ start of a name or immediately following a slash must be matched ex-
+ plicitly, unless the shell option d\bdo\bot\btg\bgl\blo\bob\bb is set. In order to match
+ the filenames _\b. and _\b._\b., the pattern must begin with "." (for example,
".?"), even if d\bdo\bot\btg\bgl\blo\bob\bb is set. If the g\bgl\blo\bob\bbs\bsk\bki\bip\bpd\bdo\bot\bts\bs shell option is en-
- abled, the filenames _\b. and _\b._\b. never match, even if the pattern begins
- with a ".". When not matching pathnames, the "." character is not
+ abled, the filenames _\b. and _\b._\b. never match, even if the pattern begins
+ with a ".". When not matching pathnames, the "." character is not
treated specially.
- When matching a pathname, the slash character must always be matched
+ When matching a pathname, the slash character must always be matched
explicitly by a slash in the pattern, but in other matching contexts it
- can be matched by a special pattern character as described below under
+ can be matched by a special pattern character as described below under
P\bPa\bat\btt\bte\ber\brn\bn M\bMa\bat\btc\bch\bhi\bin\bng\bg.
- See the description of s\bsh\bho\bop\bpt\bt below under S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS for a
- description of the n\bno\boc\bca\bas\bse\beg\bgl\blo\bob\bb, n\bnu\bul\bll\blg\bgl\blo\bob\bb, g\bgl\blo\bob\bbs\bsk\bki\bip\bpd\bdo\bot\bts\bs, f\bfa\bai\bil\blg\bgl\blo\bob\bb, and
+ See the description of s\bsh\bho\bop\bpt\bt below under S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS for a
+ description of the n\bno\boc\bca\bas\bse\beg\bgl\blo\bob\bb, n\bnu\bul\bll\blg\bgl\blo\bob\bb, g\bgl\blo\bob\bbs\bsk\bki\bip\bpd\bdo\bot\bts\bs, f\bfa\bai\bil\blg\bgl\blo\bob\bb, and
d\bdo\bot\btg\bgl\blo\bob\bb shell options.
- The G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE shell variable may be used to restrict the set of file
- names matching a _\bp_\ba_\bt_\bt_\be_\br_\bn. If G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE is set, each matching file
- name that also matches one of the patterns in G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE is removed
- from the list of matches. If the n\bno\boc\bca\bas\bse\beg\bgl\blo\bob\bb option is set, the match-
- ing against the patterns in G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE is performed without regard to
+ The G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE shell variable may be used to restrict the set of file
+ names matching a _\bp_\ba_\bt_\bt_\be_\br_\bn. If G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE is set, each matching file
+ name that also matches one of the patterns in G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE is removed
+ from the list of matches. If the n\bno\boc\bca\bas\bse\beg\bgl\blo\bob\bb option is set, the match-
+ ing against the patterns in G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE is performed without regard to
case. The filenames _\b. and _\b._\b. are always ignored when G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE is set
- and not null. However, setting G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE to a non-null value has the
+ and not null. However, setting G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE to a non-null value has the
effect of enabling the d\bdo\bot\btg\bgl\blo\bob\bb shell option, so all other filenames be-
- ginning with a "." match. To get the old behavior of ignoring file-
- names beginning with a ".", make ".*" one of the patterns in G\bGL\bLO\bOB\bBI\bIG\bG-\b-
- N\bNO\bOR\bRE\bE. The d\bdo\bot\btg\bgl\blo\bob\bb option is disabled when G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE is unset. The
+ ginning with a "." match. To get the old behavior of ignoring file-
+ names beginning with a ".", make ".*" one of the patterns in G\bGL\bLO\bOB\bBI\bIG\bG-\b-
+ N\bNO\bOR\bRE\bE. The d\bdo\bot\btg\bgl\blo\bob\bb option is disabled when G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE is unset. The
G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE pattern matching honors the setting of the e\bex\bxt\btg\bgl\blo\bob\bb shell op-
tion.
- The value of the G\bGL\bLO\bOB\bBS\bSO\bOR\bRT\bT shell variable controls how the results of
- pathname expansion are sorted, as described above under S\bSh\bhe\bel\bll\bl V\bVa\bar\bri\bi-\b-
+ The value of the G\bGL\bLO\bOB\bBS\bSO\bOR\bRT\bT shell variable controls how the results of
+ pathname expansion are sorted, as described above under S\bSh\bhe\bel\bll\bl V\bVa\bar\bri\bi-\b-
a\bab\bbl\ble\bes\bs.
P\bPa\bat\btt\bte\ber\brn\bn M\bMa\bat\btc\bch\bhi\bin\bng\bg
Any character that appears in a pattern, other than the special pattern
- characters described below, matches itself. The NUL character may not
- occur in a pattern. A backslash escapes the following character; the
- escaping backslash is discarded when matching. The special pattern
+ characters described below, matches itself. The NUL character may not
+ occur in a pattern. A backslash escapes the following character; the
+ escaping backslash is discarded when matching. The special pattern
characters must be quoted if they are to be matched literally.
The special pattern characters have the following meanings:
- *\b* Matches any string, including the null string. When the
- g\bgl\blo\bob\bbs\bst\bta\bar\br shell option is enabled, and *\b* is used in a
- pathname expansion context, two adjacent *\b*s used as a
- single pattern match all files and zero or more directo-
- ries and subdirectories. If followed by a /\b/, two adja-
+ *\b* Matches any string, including the null string. When the
+ g\bgl\blo\bob\bbs\bst\bta\bar\br shell option is enabled, and *\b* is used in a
+ pathname expansion context, two adjacent *\b*s used as a
+ single pattern match all files and zero or more directo-
+ ries and subdirectories. If followed by a /\b/, two adja-
cent *\b*s match only directories and subdirectories.
?\b? Matches any single character.
- [\b[...]\b] Matches any one of the characters enclosed between the
- brackets. This is known as a _\bb_\br_\ba_\bc_\bk_\be_\bt _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn and
- matches a single character. A pair of characters sepa-
+ [\b[...]\b] Matches any one of the characters enclosed between the
+ brackets. This is known as a _\bb_\br_\ba_\bc_\bk_\be_\bt _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn and
+ matches a single character. A pair of characters sepa-
rated by a hyphen denotes a _\br_\ba_\bn_\bg_\be _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn; any charac-
- ter that falls between those two characters, inclusive,
+ ter that falls between those two characters, inclusive,
using the current locale's collating sequence and charac-
ter set, matches. If the first character following the [\b[
- is a !\b! or a ^\b^ then any character not within the range
- matches. To match a -\b-, include it as the first or last
- character in the set. To match a ]\b], include it as the
+ is a !\b! or a ^\b^ then any character not within the range
+ matches. To match a -\b-, include it as the first or last
+ character in the set. To match a ]\b], include it as the
first character in the set.
The 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 L\bLC\bC_\b_C\bCO\bOL\bLL\bLA\bAT\bTE\bE or
- L\bLC\bC_\b_A\bAL\bLL\bL shell variables, if set. To obtain the tradi-
- tional interpretation of range expressions, where [\b[a\ba-\b-d\bd]\b]
- is equivalent to [\b[a\bab\bbc\bcd\bd]\b], set the value of the L\bLC\bC_\b_C\bCO\bOL\bLL\bLA\bAT\bTE\bE
- or L\bLC\bC_\b_A\bAL\bLL\bL shell variables to C\bC, or enable the g\bgl\blo\bob\bba\bas\bsc\bci\bi-\b-
+ the characters included in the range, are determined by
+ the current locale and the values of the L\bLC\bC_\b_C\bCO\bOL\bLL\bLA\bAT\bTE\bE or
+ L\bLC\bC_\b_A\bAL\bLL\bL shell variables, if set. To obtain the tradi-
+ tional interpretation of range expressions, where [\b[a\ba-\b-d\bd]\b]
+ is equivalent to [\b[a\bab\bbc\bcd\bd]\b], set the value of the L\bLC\bC_\b_C\bCO\bOL\bLL\bLA\bAT\bTE\bE
+ or L\bLC\bC_\b_A\bAL\bLL\bL shell variables to C\bC, or enable the g\bgl\blo\bob\bba\bas\bsc\bci\bi-\b-
i\bir\bra\ban\bng\bge\bes\bs shell option.
- Within a bracket expression, _\bc_\bh_\ba_\br_\ba_\bc_\bt_\be_\br _\bc_\bl_\ba_\bs_\bs_\be_\bs can be
- specified using the syntax [\b[:\b:_\bc_\bl_\ba_\bs_\bs:\b:]\b], where _\bc_\bl_\ba_\bs_\bs is one
+ Within a bracket expression, _\bc_\bh_\ba_\br_\ba_\bc_\bt_\be_\br _\bc_\bl_\ba_\bs_\bs_\be_\bs can be
+ specified using the syntax [\b[:\b:_\bc_\bl_\ba_\bs_\bs:\b:]\b], where _\bc_\bl_\ba_\bs_\bs is one
of the following classes defined in the POSIX standard:
- a\bal\bln\bnu\bum\bm a\bal\blp\bph\bha\ba a\bas\bsc\bci\bii\bi b\bbl\bla\ban\bnk\bk c\bcn\bnt\btr\brl\bl d\bdi\big\bgi\bit\bt g\bgr\bra\bap\bph\bh l\blo\bow\bwe\ber\br p\bpr\bri\bin\bnt\bt
+ a\bal\bln\bnu\bum\bm a\bal\blp\bph\bha\ba a\bas\bsc\bci\bii\bi b\bbl\bla\ban\bnk\bk c\bcn\bnt\btr\brl\bl d\bdi\big\bgi\bit\bt g\bgr\bra\bap\bph\bh l\blo\bow\bwe\ber\br p\bpr\bri\bin\bnt\bt
p\bpu\bun\bnc\bct\bt s\bsp\bpa\bac\bce\be u\bup\bpp\bpe\ber\br w\bwo\bor\brd\bd x\bxd\bdi\big\bgi\bit\bt
A character class matches any character belonging to that
class. The w\bwo\bor\brd\bd character class matches letters, digits,
and the character _.
- Within a bracket expression, an _\be_\bq_\bu_\bi_\bv_\ba_\bl_\be_\bn_\bc_\be _\bc_\bl_\ba_\bs_\bs can be
+ Within a bracket expression, an _\be_\bq_\bu_\bi_\bv_\ba_\bl_\be_\bn_\bc_\be _\bc_\bl_\ba_\bs_\bs can be
specified using the syntax [\b[=\b=_\bc=\b=]\b], which matches all char-
- acters with the same collation weight (as defined by the
+ acters with the same collation weight (as defined by the
current locale) as the character _\bc.
- Within a bracket expression, the syntax [\b[.\b._\bs_\by_\bm_\bb_\bo_\bl.\b.]\b]
+ Within a bracket expression, the syntax [\b[.\b._\bs_\by_\bm_\bb_\bo_\bl.\b.]\b]
matches the collating symbol _\bs_\by_\bm_\bb_\bo_\bl.
- If the e\bex\bxt\btg\bgl\blo\bob\bb shell option is enabled using the s\bsh\bho\bop\bpt\bt builtin, the
- shell recognizes several extended pattern matching operators. In the
+ If the e\bex\bxt\btg\bgl\blo\bob\bb shell option is enabled using the s\bsh\bho\bop\bpt\bt builtin, the
+ shell recognizes several extended pattern matching operators. In the
following description, a _\bp_\ba_\bt_\bt_\be_\br_\bn_\b-_\bl_\bi_\bs_\bt is a list of one or more patterns
- separated by a |\b|. Composite patterns may be formed using one or more
+ separated by a |\b|. Composite patterns may be formed using one or more
of the following sub-patterns:
?\b?(\b(_\bp_\ba_\bt_\bt_\be_\br_\bn_\b-_\bl_\bi_\bs_\bt)\b)
Matches anything except one of the given patterns.
The e\bex\bxt\btg\bgl\blo\bob\bb option changes the behavior of the parser, since the paren-
- theses are normally treated as operators with syntactic meaning. To
- ensure that extended matching patterns are parsed correctly, make sure
- that e\bex\bxt\btg\bgl\blo\bob\bb is enabled before parsing constructs containing the pat-
+ theses are normally treated as operators with syntactic meaning. To
+ ensure that extended matching patterns are parsed correctly, make sure
+ that e\bex\bxt\btg\bgl\blo\bob\bb is enabled before parsing constructs containing the pat-
terns, including shell functions and command substitutions.
When matching filenames, the d\bdo\bot\btg\bgl\blo\bob\bb shell option determines the set of
- filenames that are tested: when d\bdo\bot\btg\bgl\blo\bob\bb is enabled, the set of file-
- names includes all files beginning with ".", but _\b. and _\b._\b. must be
- matched by a pattern or sub-pattern that begins with a dot; when it is
+ filenames that are tested: when d\bdo\bot\btg\bgl\blo\bob\bb is enabled, the set of file-
+ names includes all files beginning with ".", but _\b. and _\b._\b. 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 "." un-
less the pattern or sub-pattern begins with a ".". If the g\bgl\blo\bob\bbs\bsk\bki\bip\bpd\bdo\bot\bts\bs
- shell option is enabled, the filenames _\b. and _\b._\b. never appear in the
+ shell option is enabled, the filenames _\b. and _\b._\b. never appear in the
set. As above, "." only has a special meaning when matching filenames.
Complicated extended pattern matching against long strings is slow, es-
pecially when the patterns contain alternations and the strings contain
- multiple matches. Using separate matches against shorter strings, or
+ multiple matches. Using separate matches against shorter strings, or
using arrays of strings instead of a single long string, may be faster.
Q\bQu\buo\bot\bte\be R\bRe\bem\bmo\bov\bva\bal\bl
After the preceding expansions, all unquoted occurrences of the charac-
- ters \\b\, '\b', and "\b" that did not result from one of the above expansions
+ ters \\b\, '\b', and "\b" that did not result from one of the above expansions
are removed.
R\bRE\bED\bDI\bIR\bRE\bEC\bCT\bTI\bIO\bON\bN
- Before a command is executed, its input and output may be _\br_\be_\bd_\bi_\br_\be_\bc_\bt_\be_\bd
- using a special notation interpreted by the shell. _\bR_\be_\bd_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn allows
- commands' file handles to be duplicated, opened, closed, made to refer
+ Before a command is executed, its input and output may be _\br_\be_\bd_\bi_\br_\be_\bc_\bt_\be_\bd
+ using a special notation interpreted by the shell. _\bR_\be_\bd_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn 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. When used with the e\bex\bxe\bec\bc builtin, redirections modify file
- handles in the current shell execution environment. The following
- redirection operators may precede or appear anywhere within a _\bs_\bi_\bm_\bp_\bl_\be
+ writes to. When used with the e\bex\bxe\bec\bc builtin, redirections modify file
+ handles in the current shell execution environment. The following
+ redirection operators may precede or appear anywhere within a _\bs_\bi_\bm_\bp_\bl_\be
_\bc_\bo_\bm_\bm_\ba_\bn_\bd or may follow a _\bc_\bo_\bm_\bm_\ba_\bn_\bd. Redirections are processed in the or-
der they appear, from left to right.
- Each redirection that may be preceded by a file descriptor number may
+ Each redirection that may be preceded by a file descriptor number may
instead be preceded by a word of the form {_\bv_\ba_\br_\bn_\ba_\bm_\be}. In this case, for
- each redirection operator except >\b>&\b&-\b- and <\b<&\b&-\b-, the shell allocates a
- file descriptor greater than or equal to 10 and assigns it to _\bv_\ba_\br_\bn_\ba_\bm_\be.
+ each redirection operator except >\b>&\b&-\b- and <\b<&\b&-\b-, the shell allocates a
+ file descriptor greater than or equal to 10 and assigns it to _\bv_\ba_\br_\bn_\ba_\bm_\be.
If {_\bv_\ba_\br_\bn_\ba_\bm_\be} precedes >\b>&\b&-\b- or <\b<&\b&-\b-, the value of _\bv_\ba_\br_\bn_\ba_\bm_\be defines the file
- descriptor to close. If {_\bv_\ba_\br_\bn_\ba_\bm_\be} is supplied, the redirection per-
- sists beyond the scope of the command, which allows the shell program-
+ descriptor to close. If {_\bv_\ba_\br_\bn_\ba_\bm_\be} is supplied, the redirection per-
+ sists beyond the scope of the command, which allows the shell program-
mer to manage the file descriptor's lifetime manually without using the
e\bex\bxe\bec\bc builtin. The v\bva\bar\brr\bre\bed\bdi\bir\br_\b_c\bcl\blo\bos\bse\be shell option manages this behavior.
- In the following descriptions, if the file descriptor number is omit-
- ted, and the first character of the redirection operator is "<", the
- redirection refers to the standard input (file descriptor 0). If the
- first character of the redirection operator is ">", the redirection
+ In the following descriptions, if the file descriptor number is omit-
+ ted, and the first character of the redirection operator is "<", the
+ redirection refers to the standard input (file descriptor 0). If the
+ first character of the redirection operator is ">", the redirection
refers to the standard output (file descriptor 1).
- The _\bw_\bo_\br_\bd following the redirection operator in the following descrip-
- tions, unless otherwise noted, is subjected to brace expansion, tilde
- expansion, parameter and variable expansion, command substitution,
- arithmetic expansion, quote removal, pathname expansion, and word
+ The _\bw_\bo_\br_\bd following the redirection operator in the following descrip-
+ tions, unless otherwise noted, is subjected to brace expansion, tilde
+ expansion, parameter and variable expansion, command substitution,
+ arithmetic expansion, quote removal, pathname expansion, and word
splitting. If it expands to more than one word, b\bba\bas\bsh\bh reports an error.
The order of redirections is significant. For example, the command
ls >\b> dirlist 2>\b>&\b&1
- directs both standard output and standard error to the file _\bd_\bi_\br_\bl_\bi_\bs_\bt,
+ directs both standard output and standard error to the file _\bd_\bi_\br_\bl_\bi_\bs_\bt,
while the command
ls 2>\b>&\b&1 >\b> dirlist
- directs only the standard output to file _\bd_\bi_\br_\bl_\bi_\bs_\bt, because the standard
- error was directed to the standard output before the standard output
+ directs only the standard output to file _\bd_\bi_\br_\bl_\bi_\bs_\bt, because the standard
+ error was directed to the standard output before the standard output
was redirected to _\bd_\bi_\br_\bl_\bi_\bs_\bt.
B\bBa\bas\bsh\bh handles several filenames specially when they are used in redirec-
tions, as described in the following table. If the operating system on
- which b\bba\bas\bsh\bh is running provides these special files, b\bba\bas\bsh\bh uses them;
- otherwise it emulates them internally with the behavior described be-
+ which b\bba\bas\bsh\bh is running provides these special files, b\bba\bas\bsh\bh uses them;
+ otherwise it emulates them internally with the behavior described be-
low.
/\b/d\bde\bev\bv/\b/f\bfd\bd/\b/_\bf_\bd
File descriptor 2 is duplicated.
/\b/d\bde\bev\bv/\b/t\btc\bcp\bp/\b/_\bh_\bo_\bs_\bt/\b/_\bp_\bo_\br_\bt
If _\bh_\bo_\bs_\bt is a valid hostname or Internet address, and _\bp_\bo_\br_\bt
- is an integer port number or service name, b\bba\bas\bsh\bh attempts
+ is an integer port number or service name, b\bba\bas\bsh\bh attempts
to open the corresponding TCP socket.
/\b/d\bde\bev\bv/\b/u\bud\bdp\bp/\b/_\bh_\bo_\bs_\bt/\b/_\bp_\bo_\br_\bt
If _\bh_\bo_\bs_\bt is a valid hostname or Internet address, and _\bp_\bo_\br_\bt
- is an integer port number or service name, b\bba\bas\bsh\bh attempts
+ is an integer port number or service name, b\bba\bas\bsh\bh attempts
to open the corresponding UDP socket.
A failure to open or create a file causes the redirection to fail.
- Redirections using file descriptors greater than 9 should be used with
- care, as they may conflict with file descriptors the shell uses inter-
+ Redirections using file descriptors greater than 9 should be used with
+ care, as they may conflict with file descriptors the shell uses inter-
nally.
R\bRe\bed\bdi\bir\bre\bec\bct\bti\bin\bng\bg I\bIn\bnp\bpu\but\bt
- Redirecting input opens the file whose name results from the expansion
- of _\bw_\bo_\br_\bd for reading on file descriptor _\bn, or the standard input (file
+ Redirecting input opens the file whose name results from the expansion
+ of _\bw_\bo_\br_\bd for reading on file descriptor _\bn, or the standard input (file
descriptor 0) if _\bn is not specified.
The general format for redirecting input is:
R\bRe\bed\bdi\bir\bre\bec\bct\bti\bin\bng\bg O\bOu\but\btp\bpu\but\bt
Redirecting output opens the file whose name results from the expansion
- of _\bw_\bo_\br_\bd for writing on file descriptor _\bn, or the standard output (file
- descriptor 1) if _\bn is not specified. If the file does not exist it is
+ of _\bw_\bo_\br_\bd for writing on file descriptor _\bn, or the standard output (file
+ descriptor 1) if _\bn is not specified. If the file does not exist it is
created; if it does exist it is truncated to zero size.
The general format for redirecting output is:
[_\bn]>\b>_\bw_\bo_\br_\bd
- If the redirection operator is >\b>, and the n\bno\boc\bcl\blo\bob\bbb\bbe\ber\br option to the s\bse\bet\bt
- builtin command has been enabled, the redirection fails if the file
- whose name results from the expansion of _\bw_\bo_\br_\bd exists and is a regular
- file. If the redirection operator is >\b>|\b|, or the redirection operator
- is >\b> and the n\bno\boc\bcl\blo\bob\bbb\bbe\ber\br option to the s\bse\bet\bt builtin is not enabled, b\bba\bas\bsh\bh
+ If the redirection operator is >\b>, and the n\bno\boc\bcl\blo\bob\bbb\bbe\ber\br option to the s\bse\bet\bt
+ builtin command has been enabled, the redirection fails if the file
+ whose name results from the expansion of _\bw_\bo_\br_\bd exists and is a regular
+ file. If the redirection operator is >\b>|\b|, or the redirection operator
+ is >\b> and the n\bno\boc\bcl\blo\bob\bbb\bbe\ber\br option to the s\bse\bet\bt builtin is not enabled, b\bba\bas\bsh\bh
attempts the redirection even if the file named by _\bw_\bo_\br_\bd exists.
A\bAp\bpp\bpe\ben\bnd\bdi\bin\bng\bg R\bRe\bed\bdi\bir\bre\bec\bct\bte\bed\bd O\bOu\but\btp\bpu\but\bt
- Redirecting output in this fashion opens the file whose name results
- from the expansion of _\bw_\bo_\br_\bd for appending on file descriptor _\bn, or the
+ Redirecting output in this fashion opens the file whose name results
+ from the expansion of _\bw_\bo_\br_\bd for appending on file descriptor _\bn, or the
standard output (file descriptor 1) if _\bn is not specified. If the file
does not exist it is created.
[_\bn]>\b>>\b>_\bw_\bo_\br_\bd
R\bRe\bed\bdi\bir\bre\bec\bct\bti\bin\bng\bg S\bSt\bta\ban\bnd\bda\bar\brd\bd O\bOu\but\btp\bpu\but\bt a\ban\bnd\bd S\bSt\bta\ban\bnd\bda\bar\brd\bd E\bEr\brr\bro\bor\br
- This construct redirects both the standard output (file descriptor 1)
- and the standard error output (file descriptor 2) to the file whose
+ This construct redirects both the standard output (file descriptor 1)
+ and the standard error output (file descriptor 2) to the file whose
name is the expansion of _\bw_\bo_\br_\bd.
- There are two formats for redirecting standard output and standard er-
+ There are two formats for redirecting standard output and standard er-
ror:
&\b&>\b>_\bw_\bo_\br_\bd
>\b>_\bw_\bo_\br_\bd 2>\b>&\b&1
- When using the second form, _\bw_\bo_\br_\bd may not expand to a number or -\b-. If
- it does, other redirection operators apply (see D\bDu\bup\bpl\bli\bic\bca\bat\bti\bin\bng\bg F\bFi\bil\ble\be D\bDe\be-\b-
+ When using the second form, _\bw_\bo_\br_\bd may not expand to a number or -\b-. If
+ it does, other redirection operators apply (see D\bDu\bup\bpl\bli\bic\bca\bat\bti\bin\bng\bg F\bFi\bil\ble\be D\bDe\be-\b-
s\bsc\bcr\bri\bip\bpt\bto\bor\brs\bs below) for compatibility reasons.
A\bAp\bpp\bpe\ben\bnd\bdi\bin\bng\bg S\bSt\bta\ban\bnd\bda\bar\brd\bd O\bOu\but\btp\bpu\but\bt a\ban\bnd\bd S\bSt\bta\ban\bnd\bda\bar\brd\bd E\bEr\brr\bro\bor\br
(see D\bDu\bup\bpl\bli\bic\bca\bat\bti\bin\bng\bg F\bFi\bil\ble\be D\bDe\bes\bsc\bcr\bri\bip\bpt\bto\bor\brs\bs below).
H\bHe\ber\bre\be D\bDo\boc\bcu\bum\bme\ben\bnt\bts\bs
- This type of redirection instructs the shell to read input from the
+ This type of redirection instructs the shell to read input from the
current source until it reads a line containing only _\bd_\be_\bl_\bi_\bm_\bi_\bt_\be_\br (with no
- trailing blanks). All of the lines read up to that point then become
- the standard input (or file descriptor _\bn if _\bn is specified) for a com-
+ trailing blanks). All of the lines read up to that point then become
+ the standard input (or file descriptor _\bn if _\bn is specified) for a com-
mand.
The format of here-documents is:
_\bh_\be_\br_\be_\b-_\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt
_\bd_\be_\bl_\bi_\bm_\bi_\bt_\be_\br
- The shell does not perform parameter and variable expansion, command
+ The shell does not perform parameter and variable expansion, command
substitution, arithmetic expansion, or pathname expansion on _\bw_\bo_\br_\bd.
If any part of _\bw_\bo_\br_\bd is quoted, the _\bd_\be_\bl_\bi_\bm_\bi_\bt_\be_\br is the result of quote re-
moval on _\bw_\bo_\br_\bd, and the lines in the here-document are not expanded. If
- _\bw_\bo_\br_\bd is unquoted, the _\bd_\be_\bl_\bi_\bm_\bi_\bt_\be_\br is _\bw_\bo_\br_\bd itself, and the here-document
- text is treated similarly to a double-quoted string: all lines of the
- here-document are subjected to parameter expansion, command substitu-
- tion, and arithmetic expansion, the character sequence \\b\<\b<n\bne\bew\bwl\bli\bin\bne\be>\b> is
+ _\bw_\bo_\br_\bd is unquoted, the _\bd_\be_\bl_\bi_\bm_\bi_\bt_\be_\br is _\bw_\bo_\br_\bd itself, and the here-document
+ text is treated similarly to a double-quoted string: all lines of the
+ here-document are subjected to parameter expansion, command substitu-
+ tion, and arithmetic expansion, the character sequence \\b\<\b<n\bne\bew\bwl\bli\bin\bne\be>\b> is
treated literally, and \\b\ must be used to quote the characters \\b\, $\b$, and
`\b`; however, double quote characters have no special meaning.
- If the redirection operator is <\b<<\b<-\b-, then the shell strips all leading
- tab characters from input lines and the line containing _\bd_\be_\bl_\bi_\bm_\bi_\bt_\be_\br.
- This allows here-documents within shell scripts to be indented in a
+ If the redirection operator is <\b<<\b<-\b-, then the shell strips all leading
+ tab characters from input lines and the line containing _\bd_\be_\bl_\bi_\bm_\bi_\bt_\be_\br.
+ This allows here-documents within shell scripts to be indented in a
natural fashion.
- If the delimiter is not quoted, the \\b\<\b<n\bne\bew\bwl\bli\bin\bne\be>\b> sequence is treated as a
- line continuation: the two lines are joined and the backslash-newline
- is removed. This happens while reading the here-document, before the
- check for the ending delimiter, so joined lines can form the end delim-
- iter.
+ If the delimiter is not quoted, the shell treats the \\b\<\b<n\bne\bew\bwl\bli\bin\bne\be>\b> se-
+ quence as a line continuation: the two lines are joined and the back-
+ slash-newline is removed. This happens while reading the here-docu-
+ ment, before the check for the ending delimiter, so joined lines can
+ form the end delimiter.
H\bHe\ber\bre\be S\bSt\btr\bri\bin\bng\bgs\bs
A variant of here documents, the format is:
[_\bn]<\b<<\b<<\b<_\bw_\bo_\br_\bd
- The _\bw_\bo_\br_\bd undergoes tilde expansion, parameter and variable expansion,
- command substitution, arithmetic expansion, and quote removal. Path-
- name expansion and word splitting are not performed. The result is
+ The _\bw_\bo_\br_\bd undergoes tilde expansion, parameter and variable expansion,
+ command substitution, arithmetic expansion, and quote removal. Path-
+ name expansion and word splitting are not performed. The result is
supplied as a single string, with a newline appended, to the command on
its standard input (or file descriptor _\bn if _\bn is specified).
[_\bn]<\b<&\b&_\bw_\bo_\br_\bd
is used to duplicate input file descriptors. If _\bw_\bo_\br_\bd expands to one or
- more digits, file descriptor _\bn is made to be a copy of that file de-
+ more digits, file descriptor _\bn is made to be a copy of that file de-
scriptor. It is a redirection error if the digits in _\bw_\bo_\br_\bd do not spec-
ify a file descriptor open for input. If _\bw_\bo_\br_\bd evaluates to -\b-, file de-
- scriptor _\bn is closed. If _\bn is not specified, this uses the standard
+ scriptor _\bn is closed. If _\bn is not specified, this uses the standard
input (file descriptor 0).
The operator
[_\bn]>\b>&\b&_\bw_\bo_\br_\bd
- is used similarly to duplicate output file descriptors. If _\bn is not
- specified, this uses the standard output (file descriptor 1). It is a
- redirection error if the digits in _\bw_\bo_\br_\bd do not specify a file descrip-
- tor open for output. If _\bw_\bo_\br_\bd evaluates to -\b-, file descriptor _\bn is
- closed. As a special case, if _\bn is omitted, and _\bw_\bo_\br_\bd does not expand
- to one or more digits or -\b-, this redirects the standard output and
+ is used similarly to duplicate output file descriptors. If _\bn is not
+ specified, this uses the standard output (file descriptor 1). It is a
+ redirection error if the digits in _\bw_\bo_\br_\bd do not specify a file descrip-
+ tor open for output. If _\bw_\bo_\br_\bd evaluates to -\b-, file descriptor _\bn is
+ closed. As a special case, if _\bn is omitted, and _\bw_\bo_\br_\bd does not expand
+ to one or more digits or -\b-, this redirects the standard output and
standard error as described previously.
M\bMo\bov\bvi\bin\bng\bg F\bFi\bil\ble\be D\bDe\bes\bsc\bcr\bri\bip\bpt\bto\bor\brs\bs
[_\bn]<\b<&\b&_\bd_\bi_\bg_\bi_\bt-\b-
- moves the file descriptor _\bd_\bi_\bg_\bi_\bt to file descriptor _\bn, or the standard
+ moves the file descriptor _\bd_\bi_\bg_\bi_\bt to file descriptor _\bn, or the standard
input (file descriptor 0) if _\bn is not specified. _\bd_\bi_\bg_\bi_\bt is closed after
being duplicated to _\bn.
[_\bn]>\b>&\b&_\bd_\bi_\bg_\bi_\bt-\b-
- moves the file descriptor _\bd_\bi_\bg_\bi_\bt to file descriptor _\bn, or the standard
+ moves the file descriptor _\bd_\bi_\bg_\bi_\bt to file descriptor _\bn, or the standard
output (file descriptor 1) if _\bn is not specified.
O\bOp\bpe\ben\bni\bin\bng\bg F\bFi\bil\ble\be D\bDe\bes\bsc\bcr\bri\bip\bpt\bto\bor\brs\bs f\bfo\bor\br R\bRe\bea\bad\bdi\bin\bng\bg a\ban\bnd\bd W\bWr\bri\bit\bti\bin\bng\bg
ified. If the file does not exist, it is created.
A\bAL\bLI\bIA\bAS\bSE\bES\bS
- _\bA_\bl_\bi_\ba_\bs_\be_\bs allow a string to be substituted for a word that is in a posi-
- tion in the input where it can be the first word of a simple command.
- Aliases have names and corresponding values that are set and unset us-
- ing the a\bal\bli\bia\bas\bs and u\bun\bna\bal\bli\bia\bas\bs builtin commands (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS
+ _\bA_\bl_\bi_\ba_\bs_\be_\bs allow a string to be substituted for a word that is in a posi-
+ tion in the input where it can be the first word of a simple command.
+ Aliases have names and corresponding values that are set and unset us-
+ ing the a\bal\bli\bia\bas\bs and u\bun\bna\bal\bli\bia\bas\bs builtin commands (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS
below).
- If the shell reads an unquoted word in the right position, it checks
- the word to see if it matches an alias name. If it matches, the shell
- replaces the word with the alias value, and reads that value as if it
+ If the shell reads an unquoted word in the right position, it checks
+ the word to see if it matches an alias name. If it matches, the shell
+ replaces the word with the alias value, and reads that value as if it
had been read instead of the word. The shell doesn't look at any char-
acters following the word before attempting alias substitution.
- The characters /\b/, $\b$, `\b`, and =\b= and any of the shell _\bm_\be_\bt_\ba_\bc_\bh_\ba_\br_\ba_\bc_\bt_\be_\br_\bs or
- quoting characters listed above may not appear in an alias name. The
- replacement text may contain any valid shell input, including shell
- metacharacters. The first word of the replacement text is tested for
+ The characters /\b/, $\b$, `\b`, and =\b= and any of the shell _\bm_\be_\bt_\ba_\bc_\bh_\ba_\br_\ba_\bc_\bt_\be_\br_\bs or
+ quoting characters listed above may not appear in an alias name. The
+ replacement text may contain any valid shell input, including shell
+ metacharacters. The first word of the replacement text 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 l\bls\bs to l\bls\bs -\b-F\bF, for
- instance, and b\bba\bas\bsh\bh does not try to recursively expand the replacement
+ instance, and b\bba\bas\bsh\bh does not try to recursively expand the replacement
text.
- If the last character of the alias value is a _\bb_\bl_\ba_\bn_\bk, the shell checks
+ If the last character of the alias value is a _\bb_\bl_\ba_\bn_\bk, the shell checks
the next command word following the alias for alias expansion.
Aliases are created and listed with the a\bal\bli\bia\bas\bs command, and removed with
the u\bun\bna\bal\bli\bia\bas\bs command.
- There is no mechanism for using arguments in the replacement text. If
- arguments are needed, use a shell function (see F\bFU\bUN\bNC\bCT\bTI\bIO\bON\bNS\bS below) in-
+ There is no mechanism for using arguments in the replacement text. If
+ arguments are needed, use a shell function (see F\bFU\bUN\bNC\bCT\bTI\bIO\bON\bNS\bS below) in-
stead.
- Aliases are not expanded when the shell is not interactive, unless the
- e\bex\bxp\bpa\ban\bnd\bd_\b_a\bal\bli\bia\bas\bse\bes\bs shell option is set using s\bsh\bho\bop\bpt\bt (see the description of
+ Aliases are not expanded when the shell is not interactive, unless the
+ e\bex\bxp\bpa\ban\bnd\bd_\b_a\bal\bli\bia\bas\bse\bes\bs shell option is set using s\bsh\bho\bop\bpt\bt (see the description of
s\bsh\bho\bop\bpt\bt under S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below).
- The rules concerning the definition and use of aliases are somewhat
- confusing. B\bBa\bas\bsh\bh always reads at least one complete line of input, and
- all lines that make up a compound command, before executing any of the
- commands on that line or the compound command. Aliases are expanded
- when a command is read, not when it is executed. Therefore, an alias
- definition appearing on the same line as another command does not take
+ The rules concerning the definition and use of aliases are somewhat
+ confusing. B\bBa\bas\bsh\bh always reads at least one complete line of input, and
+ all lines that make up a compound command, before executing any of the
+ commands on that line or the compound command. Aliases are expanded
+ when a command is read, not when it is executed. Therefore, an alias
+ definition appearing on the same line as another command does not take
effect until the shell reads the next line of input, and an alias defi-
- nition in a compound command does not take effect until the shell
- parses and executes the entire compound command. The commands follow-
- ing the alias definition on that line, or in the rest of a compound
- command, are not affected by the new alias. This behavior is also an
- issue when functions are executed. Aliases are expanded when a func-
- tion definition is read, not when the function is executed, because a
+ nition in a compound command does not take effect until the shell
+ parses and executes the entire compound command. The commands follow-
+ ing the alias definition on that line, or in the rest of a compound
+ command, are not affected by the new alias. This behavior is also an
+ issue when functions are executed. Aliases are expanded when a func-
+ tion definition is read, not when the function is executed, because a
function definition is itself a command. As a consequence, aliases de-
fined in a function are not available until after that function is exe-
- cuted. To be safe, always put alias definitions on a separate line,
+ cuted. To be safe, always put alias definitions on a separate line,
and do not use a\bal\bli\bia\bas\bs in compound commands.
For almost every purpose, shell functions are preferable to aliases.
F\bFU\bUN\bNC\bCT\bTI\bIO\bON\bNS\bS
- A shell function, defined as described above under S\bSH\bHE\bEL\bLL\bL G\bGR\bRA\bAM\bMM\bMA\bAR\bR,
- stores a series of commands for later execution. When the name of a
+ A shell function, defined as described above under S\bSH\bHE\bEL\bLL\bL G\bGR\bRA\bAM\bMM\bMA\bAR\bR,
+ stores a series of commands for later execution. When the name of a
shell function is used as a simple command name, the shell executes the
list of commands associated with that function name. Functions are ex-
- ecuted in the context of the calling shell; there is no new process
- created to interpret them (contrast this with the execution of a shell
+ ecuted in the context of the calling shell; there is no new process
+ created to interpret them (contrast this with the execution of a shell
script).
- When a function is executed, the arguments to the function become the
+ When a function is executed, the arguments to the function become the
positional parameters during its execution. The special parameter #\b# is
- updated to reflect the new positional parameters. Special parameter 0\b0
+ updated to reflect the new positional parameters. Special parameter 0\b0
is unchanged. The first element of the F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE variable is set to the
name of the function while the function is executing.
- All other aspects of the shell execution environment are identical be-
- tween a function and its caller with these exceptions: the D\bDE\bEB\bBU\bUG\bG and
- R\bRE\bET\bTU\bUR\bRN\bN traps (see the description of the t\btr\bra\bap\bp builtin under S\bSH\bHE\bEL\bLL\bL
- B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below) are not inherited unless the function has been
- given the t\btr\bra\bac\bce\be attribute (see the description of the d\bde\bec\bcl\bla\bar\bre\be builtin
- below) or the -\b-o\bo f\bfu\bun\bnc\bct\btr\bra\bac\bce\be shell option has been enabled with the s\bse\bet\bt
- builtin (in which case all functions inherit the D\bDE\bEB\bBU\bUG\bG and R\bRE\bET\bTU\bUR\bRN\bN
- traps), and the E\bER\bRR\bR trap is not inherited unless the -\b-o\bo e\ber\brr\brt\btr\bra\bac\bce\be shell
+ All other aspects of the shell execution environment are identical be-
+ tween a function and its caller with these exceptions: the D\bDE\bEB\bBU\bUG\bG and
+ R\bRE\bET\bTU\bUR\bRN\bN traps (see the description of the t\btr\bra\bap\bp builtin under S\bSH\bHE\bEL\bLL\bL
+ B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below) are not inherited unless the function has been
+ given the t\btr\bra\bac\bce\be attribute (see the description of the d\bde\bec\bcl\bla\bar\bre\be builtin
+ below) or the -\b-o\bo f\bfu\bun\bnc\bct\btr\bra\bac\bce\be shell option has been enabled with the s\bse\bet\bt
+ builtin (in which case all functions inherit the D\bDE\bEB\bBU\bUG\bG and R\bRE\bET\bTU\bUR\bRN\bN
+ traps), and the E\bER\bRR\bR trap is not inherited unless the -\b-o\bo e\ber\brr\brt\btr\bra\bac\bce\be shell
option has been enabled.
- Variables local to the function are declared with the l\blo\boc\bca\bal\bl builtin
- command (_\bl_\bo_\bc_\ba_\bl _\bv_\ba_\br_\bi_\ba_\bb_\bl_\be_\bs). Ordinarily, variables and their values are
- shared between the function and its caller. If a variable is declared
- l\blo\boc\bca\bal\bl, the variable's visible scope is restricted to that function and
+ Variables local to the function are declared with the l\blo\boc\bca\bal\bl builtin
+ command (_\bl_\bo_\bc_\ba_\bl _\bv_\ba_\br_\bi_\ba_\bb_\bl_\be_\bs). Ordinarily, variables and their values are
+ shared between the function and its caller. If a variable is declared
+ l\blo\boc\bca\bal\bl, the variable's visible scope is restricted to that function and
its children (including the functions it calls).
In the following description, the _\bc_\bu_\br_\br_\be_\bn_\bt _\bs_\bc_\bo_\bp_\be is a currently- execut-
ing 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. A local variable at the current scope is a variable
- declared using the l\blo\boc\bca\bal\bl or d\bde\bec\bcl\bla\bar\bre\be builtins in the function that is
+ on, back to the "global" scope, where the shell is not executing any
+ shell function. A local variable at the current scope is a variable
+ declared using the l\blo\boc\bca\bal\bl or d\bde\bec\bcl\bla\bar\bre\be builtins in the function that is
currently executing.
- Local variables "shadow" variables with the same name declared at pre-
- vious scopes. For instance, a local variable declared in a function
+ Local variables "shadow" variables with the same name declared at pre-
+ vious scopes. For instance, a local variable declared in a function
hides variables with the same name declared at previous scopes, includ-
- ing global variables: references and assignments refer to the local
- variable, leaving the variables at previous scopes unmodified. When
+ ing global variables: references and assignments refer to the local
+ variable, leaving the variables at previous scopes unmodified. When
the function returns, the global variable is once again visible.
- The shell uses _\bd_\by_\bn_\ba_\bm_\bi_\bc _\bs_\bc_\bo_\bp_\bi_\bn_\bg 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 exe-
- cution to reach the current function. The value of a variable that a
- function sees depends on its value within its caller, if any, whether
- that caller is the global scope or another shell function. This is
+ The shell uses _\bd_\by_\bn_\ba_\bm_\bi_\bc _\bs_\bc_\bo_\bp_\bi_\bn_\bg 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 exe-
+ cution to reach the current function. The value of a variable that a
+ function sees depends on its value within its caller, if any, whether
+ 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 _\bv_\ba_\br is declared as local in function _\bf_\bu_\bn_\bc_\b1,
- and _\bf_\bu_\bn_\bc_\b1 calls another function _\bf_\bu_\bn_\bc_\b2, references to _\bv_\ba_\br made from
- within _\bf_\bu_\bn_\bc_\b2 resolve to the local variable _\bv_\ba_\br from _\bf_\bu_\bn_\bc_\b1, shadowing
+ For example, if a variable _\bv_\ba_\br is declared as local in function _\bf_\bu_\bn_\bc_\b1,
+ and _\bf_\bu_\bn_\bc_\b1 calls another function _\bf_\bu_\bn_\bc_\b2, references to _\bv_\ba_\br made from
+ within _\bf_\bu_\bn_\bc_\b2 resolve to the local variable _\bv_\ba_\br from _\bf_\bu_\bn_\bc_\b1, shadowing
any global variable named _\bv_\ba_\br.
The u\bun\bns\bse\bet\bt builtin also acts using the same dynamic scope: if a variable
- is local to the current scope, u\bun\bns\bse\bet\bt unsets 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 remains
- so (appearing as unset) until it is reset in that scope or until the
+ is local to the current scope, u\bun\bns\bse\bet\bt unsets 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 remains
+ so (appearing as unset) until it is reset in that scope or until the
function returns. Once the function returns, any instance of the vari-
able at a previous scope becomes visible. If the unset acts on a vari-
- able at a previous scope, any instance of a variable with that name
- that had been shadowed becomes visible (see below how the l\blo\boc\bca\bal\blv\bva\bar\br_\b_u\bun\bn-\b-
+ able at a previous scope, any instance of a variable with that name
+ that had been shadowed becomes visible (see below how the l\blo\boc\bca\bal\blv\bva\bar\br_\b_u\bun\bn-\b-
s\bse\bet\bt shell option changes this behavior).
- The F\bFU\bUN\bNC\bCN\bNE\bES\bST\bT variable, if set to a numeric value greater than 0, de-
- fines a maximum function nesting level. Function invocations that ex-
+ The F\bFU\bUN\bNC\bCN\bNE\bES\bST\bT variable, if set to a numeric value greater than 0, de-
+ fines a maximum function nesting level. Function invocations that ex-
ceed the limit cause the entire command to abort.
- If the builtin command r\bre\bet\btu\bur\brn\bn is executed in a function, the function
- completes and execution resumes with the next command after the func-
+ If the builtin command r\bre\bet\btu\bur\brn\bn is executed in a function, the function
+ completes and execution resumes with the next command after the func-
tion call. If r\bre\bet\btu\bur\brn\bn is supplied a numeric argument, that is the func-
- tion's return status; otherwise the function's return status is the
- exit status of the last command executed before the r\bre\bet\btu\bur\brn\bn. Any com-
- mand associated with the R\bRE\bET\bTU\bUR\bRN\bN trap is executed before execution re-
+ tion's return status; otherwise the function's return status is the
+ exit status of the last command executed before the r\bre\bet\btu\bur\brn\bn. Any com-
+ mand associated with the R\bRE\bET\bTU\bUR\bRN\bN trap is executed before execution re-
sumes. When a function completes, the values of the positional parame-
- ters and the special parameter #\b# are restored to the values they had
+ ters and the special parameter #\b# are restored to the values they had
prior to the function's execution.
The -\b-f\bf option to the d\bde\bec\bcl\bla\bar\bre\be or t\bty\byp\bpe\bes\bse\bet\bt builtin commands lists function
- names and definitions. The -\b-F\bF option to d\bde\bec\bcl\bla\bar\bre\be or t\bty\byp\bpe\bes\bse\bet\bt lists the
+ names and definitions. The -\b-F\bF option to d\bde\bec\bcl\bla\bar\bre\be or t\bty\byp\bpe\bes\bse\bet\bt lists the
function names only (and optionally the source file and line number, if
- the e\bex\bxt\btd\bde\beb\bbu\bug\bg shell option is enabled). Functions may be exported so
- that child shell processes (those created when executing a separate
+ the e\bex\bxt\btd\bde\beb\bbu\bug\bg shell 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 -\b-f\bf option to
the e\bex\bxp\bpo\bor\brt\bt builtin. The -\b-f\bf option to the u\bun\bns\bse\bet\bt builtin deletes a func-
tion definition.
Functions may be recursive. The F\bFU\bUN\bNC\bCN\bNE\bES\bST\bT variable may be used to limit
- the depth of the function call stack and restrict the number of func-
- tion invocations. By default, b\bba\bas\bsh\bh imposes no limit on the number of
+ the depth of the function call stack and restrict the number of func-
+ tion invocations. By default, b\bba\bas\bsh\bh imposes no limit on the number of
recursive calls.
A\bAR\bRI\bIT\bTH\bHM\bME\bET\bTI\bIC\bC E\bEV\bVA\bAL\bLU\bUA\bAT\bTI\bIO\bON\bN
- The shell allows arithmetic expressions to be evaluated, under certain
- circumstances (see the l\ble\bet\bt and d\bde\bec\bcl\bla\bar\bre\be builtin commands, the (\b((\b( com-
- pound command, the arithmetic f\bfo\bor\br command, the [\b[[\b[ conditional command,
+ The shell allows arithmetic expressions to be evaluated, under certain
+ circumstances (see the l\ble\bet\bt and d\bde\bec\bcl\bla\bar\bre\be builtin commands, the (\b((\b( com-
+ pound command, the arithmetic f\bfo\bor\br command, the [\b[[\b[ conditional command,
and A\bAr\bri\bit\bth\bhm\bme\bet\bti\bic\bc E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn).
- Evaluation is done in the largest fixed-width integers available, with
- no check for overflow, though division by 0 is trapped and flagged as
- an error. The operators and their precedence, associativity, and val-
+ Evaluation is done in the largest fixed-width integers available, with
+ no check for overflow, though division by 0 is trapped and flagged as
+ an error. The operators and their precedence, associativity, and val-
ues are the same as in the C language. The following list of operators
- is grouped into levels of equal-precedence operators. The levels are
+ is grouped into levels of equal-precedence operators. The levels are
listed in order of decreasing precedence.
_\bi_\bd+\b++\b+ _\bi_\bd-\b--\b-
_\be_\bx_\bp_\br_\b1 ,\b, _\be_\bx_\bp_\br_\b2
comma
- Shell variables are allowed as operands; parameter expansion is per-
+ Shell variables are allowed as operands; parameter expansion is per-
formed before the expression is evaluated. Within an expression, shell
- variables may also be referenced by name without using the parameter
+ variables may also be referenced by name without using the parameter
expansion syntax. This means you can use "x", where _\bx is a shell vari-
able name, in an arithmetic expression, and the shell will evaluate its
- value as an expression and use the result. A shell variable that is
+ value as an expression and use the result. A shell variable that is
null or unset evaluates to 0 when referenced by name in an expression.
- The value of a variable is evaluated as an arithmetic expression when
- it is referenced, or when a variable which has been given the _\bi_\bn_\bt_\be_\bg_\be_\br
+ The value of a variable is evaluated as an arithmetic expression when
+ it is referenced, or when a variable which has been given the _\bi_\bn_\bt_\be_\bg_\be_\br
attribute using d\bde\bec\bcl\bla\bar\bre\be -\b-i\bi is assigned a value. A null value evaluates
- to 0. A shell variable need not have its _\bi_\bn_\bt_\be_\bg_\be_\br attribute enabled to
+ to 0. A shell variable need not have its _\bi_\bn_\bt_\be_\bg_\be_\br attribute enabled to
be used in an expression.
Integer constants follow the C language definition, without suffixes or
character constants. Constants with a leading 0 are interpreted as oc-
- tal numbers. A leading 0x or 0X denotes hexadecimal. Otherwise, num-
- bers take the form [_\bb_\ba_\bs_\be_\b#]n, where the optional _\bb_\ba_\bs_\be is a decimal num-
- ber between 2 and 64 representing the arithmetic base, and _\bn is a num-
- ber in that base. If _\bb_\ba_\bs_\be_\b# is omitted, then base 10 is used. When
+ tal numbers. A leading 0x or 0X denotes hexadecimal. Otherwise, num-
+ bers take the form [_\bb_\ba_\bs_\be_\b#]n, where the optional _\bb_\ba_\bs_\be is a decimal num-
+ ber between 2 and 64 representing the arithmetic base, and _\bn is a num-
+ ber in that base. If _\bb_\ba_\bs_\be_\b# is omitted, then base 10 is used. When
specifying _\bn, if a non-digit is required, the digits greater than 9 are
- represented by the lowercase letters, the uppercase letters, @, and _,
- in that order. If _\bb_\ba_\bs_\be is less than or equal to 36, lowercase and up-
- percase letters may be used interchangeably to represent numbers be-
+ represented by the lowercase letters, the uppercase letters, @, and _,
+ in that order. If _\bb_\ba_\bs_\be is less than or equal to 36, lowercase and up-
+ percase letters may be used interchangeably to represent numbers be-
tween 10 and 35.
Operators are evaluated in precedence order. Sub-expressions in paren-
theses are evaluated first and may override the precedence rules above.
C\bCO\bON\bND\bDI\bIT\bTI\bIO\bON\bNA\bAL\bL E\bEX\bXP\bPR\bRE\bES\bSS\bSI\bIO\bON\bNS\bS
- Conditional expressions are used by the [\b[[\b[ compound command and the
- t\bte\bes\bst\bt and [\b[ builtin commands to test file attributes and perform string
- and arithmetic comparisons. The t\bte\bes\bst\bt and [\b[ commands determine their
- behavior based on the number of arguments; see the descriptions of
+ Conditional expressions are used by the [\b[[\b[ compound command and the
+ t\bte\bes\bst\bt and [\b[ builtin commands to test file attributes and perform string
+ and arithmetic comparisons. The t\bte\bes\bst\bt and [\b[ commands determine their
+ behavior based on the number of arguments; see the descriptions of
those commands for any other command-specific actions.
Expressions are formed from the unary or binary primaries listed below.
- Unary expressions are often used to examine the status of a file or
- shell variable. Binary operators are used for string, numeric, and
+ Unary expressions are often used to examine the status of a file or
+ shell variable. Binary operators are used for string, numeric, and
file attribute comparisons.
- B\bBa\bas\bsh\bh handles several filenames specially when they are used in expres-
+ B\bBa\bas\bsh\bh handles several filenames specially when they are used in expres-
sions. If the operating system on which b\bba\bas\bsh\bh is running provides these
- special files, bash will use them; otherwise it will emulate them in-
- ternally with this behavior: If any _\bf_\bi_\bl_\be argument to one of the pri-
- maries is of the form _\b/_\bd_\be_\bv_\b/_\bf_\bd_\b/_\bn, then b\bba\bas\bsh\bh checks file descriptor _\bn.
- If the _\bf_\bi_\bl_\be argument to one of the primaries is one of _\b/_\bd_\be_\bv_\b/_\bs_\bt_\bd_\bi_\bn,
- _\b/_\bd_\be_\bv_\b/_\bs_\bt_\bd_\bo_\bu_\bt, or _\b/_\bd_\be_\bv_\b/_\bs_\bt_\bd_\be_\br_\br, b\bba\bas\bsh\bh checks file descriptor 0, 1, or 2,
+ special files, bash will use them; otherwise it will emulate them in-
+ ternally with this behavior: If any _\bf_\bi_\bl_\be argument to one of the pri-
+ maries is of the form _\b/_\bd_\be_\bv_\b/_\bf_\bd_\b/_\bn, then b\bba\bas\bsh\bh checks file descriptor _\bn.
+ If the _\bf_\bi_\bl_\be argument to one of the primaries is one of _\b/_\bd_\be_\bv_\b/_\bs_\bt_\bd_\bi_\bn,
+ _\b/_\bd_\be_\bv_\b/_\bs_\bt_\bd_\bo_\bu_\bt, or _\b/_\bd_\be_\bv_\b/_\bs_\bt_\bd_\be_\br_\br, b\bba\bas\bsh\bh checks file descriptor 0, 1, or 2,
respectively.
Unless otherwise specified, primaries that operate on files follow sym-
bolic links and operate on the target of the link, rather than the link
itself.
- When used with [\b[[\b[, or when the shell is in posix mode, the <\b< and >\b> op-
- erators sort lexicographically using the current locale. When the
- shell is not in posix mode, the t\bte\bes\bst\bt command sorts using ASCII order-
+ When used with [\b[[\b[, or when the shell is in posix mode, the <\b< and >\b> op-
+ erators sort lexicographically using the current locale. When the
+ shell is not in posix mode, the t\bte\bes\bst\bt command sorts using ASCII order-
ing.
-\b-a\ba _\bf_\bi_\bl_\be
-\b-L\bL _\bf_\bi_\bl_\be
True if _\bf_\bi_\bl_\be exists and is a symbolic link.
-\b-N\bN _\bf_\bi_\bl_\be
- True if _\bf_\bi_\bl_\be exists and has been modified since it was last ac-
+ True if _\bf_\bi_\bl_\be exists and has been modified since it was last ac-
cessed.
-\b-O\bO _\bf_\bi_\bl_\be
True if _\bf_\bi_\bl_\be exists and is owned by the effective user id.
-\b-S\bS _\bf_\bi_\bl_\be
True if _\bf_\bi_\bl_\be exists and is a socket.
-\b-o\bo _\bo_\bp_\bt_\bn_\ba_\bm_\be
- True if the shell option _\bo_\bp_\bt_\bn_\ba_\bm_\be is enabled. See the list of
- options under the description of the -\b-o\bo option to the s\bse\bet\bt
+ True if the shell option _\bo_\bp_\bt_\bn_\ba_\bm_\be is enabled. See the list of
+ options under the description of the -\b-o\bo option to the s\bse\bet\bt
builtin below.
-\b-v\bv _\bv_\ba_\br_\bn_\ba_\bm_\be
- True if the shell variable _\bv_\ba_\br_\bn_\ba_\bm_\be is set (has been assigned a
- value). If _\bv_\ba_\br_\bn_\ba_\bm_\be is an indexed array variable name sub-
- scripted by _\b@ or _\b*, this returns true if the array has any set
+ True if the shell variable _\bv_\ba_\br_\bn_\ba_\bm_\be is set (has been assigned a
+ value). If _\bv_\ba_\br_\bn_\ba_\bm_\be is an indexed array variable name sub-
+ scripted by _\b@ or _\b*, this returns true if the array has any set
elements. If _\bv_\ba_\br_\bn_\ba_\bm_\be is an associative array variable name sub-
- scripted by _\b@ or _\b*, this returns true if an element with that
+ scripted by _\b@ or _\b*, this returns true if an element with that
key is set.
-\b-R\bR _\bv_\ba_\br_\bn_\ba_\bm_\be
- True if the shell variable _\bv_\ba_\br_\bn_\ba_\bm_\be is set and is a name refer-
+ True if the shell variable _\bv_\ba_\br_\bn_\ba_\bm_\be is set and is a name refer-
ence.
-\b-z\bz _\bs_\bt_\br_\bi_\bn_\bg
True if the length of _\bs_\bt_\br_\bi_\bn_\bg is zero.
_\bs_\bt_\br_\bi_\bn_\bg_\b1 =\b==\b= _\bs_\bt_\br_\bi_\bn_\bg_\b2
_\bs_\bt_\br_\bi_\bn_\bg_\b1 =\b= _\bs_\bt_\br_\bi_\bn_\bg_\b2
- True if the strings are equal. =\b= should be used with the t\bte\bes\bst\bt
- command for POSIX conformance. When used with the [\b[[\b[ command,
+ True if the strings are equal. =\b= should be used with the t\bte\bes\bst\bt
+ command for POSIX conformance. When used with the [\b[[\b[ command,
this performs pattern matching as described above (C\bCo\bom\bmp\bpo\bou\bun\bnd\bd C\bCo\bom\bm-\b-
m\bma\ban\bnd\bds\bs).
_\bs_\bt_\br_\bi_\bn_\bg_\b1 !\b!=\b= _\bs_\bt_\br_\bi_\bn_\bg_\b2
True if _\bs_\bt_\br_\bi_\bn_\bg_\b1 sorts after _\bs_\bt_\br_\bi_\bn_\bg_\b2 lexicographically.
_\bf_\bi_\bl_\be_\b1 -\b-e\bef\bf _\bf_\bi_\bl_\be_\b2
- True if _\bf_\bi_\bl_\be_\b1 and _\bf_\bi_\bl_\be_\b2 refer to the same device and inode num-
+ True if _\bf_\bi_\bl_\be_\b1 and _\bf_\bi_\bl_\be_\b2 refer to the same device and inode num-
bers.
_\bf_\bi_\bl_\be_\b1 -n\bnt\bt _\bf_\bi_\bl_\be_\b2
- True if _\bf_\bi_\bl_\be_\b1 is newer (according to modification date) than
+ True if _\bf_\bi_\bl_\be_\b1 is newer (according to modification date) than
_\bf_\bi_\bl_\be_\b2, or if _\bf_\bi_\bl_\be_\b1 exists and _\bf_\bi_\bl_\be_\b2 does not.
_\bf_\bi_\bl_\be_\b1 -o\bot\bt _\bf_\bi_\bl_\be_\b2
- True if _\bf_\bi_\bl_\be_\b1 is older than _\bf_\bi_\bl_\be_\b2, or if _\bf_\bi_\bl_\be_\b2 exists and _\bf_\bi_\bl_\be_\b1
+ True if _\bf_\bi_\bl_\be_\b1 is older than _\bf_\bi_\bl_\be_\b2, or if _\bf_\bi_\bl_\be_\b2 exists and _\bf_\bi_\bl_\be_\b1
does not.
_\ba_\br_\bg_\b1 O\bOP\bP _\ba_\br_\bg_\b2
- O\bOP\bP is one of -\b-e\beq\bq, -\b-n\bne\be, -\b-l\blt\bt, -\b-l\ble\be, -\b-g\bgt\bt, or -\b-g\bge\be. These arithmetic
- binary operators return true if _\ba_\br_\bg_\b1 is equal to, not equal to,
- less than, less than or equal to, greater than, or greater than
- or equal to _\ba_\br_\bg_\b2, respectively. _\ba_\br_\bg_\b1 and _\ba_\br_\bg_\b2 may be positive
- or negative integers. When used with the [\b[[\b[ command, _\ba_\br_\bg_\b1 and
- _\ba_\br_\bg_\b2 are evaluated as arithmetic expressions (see A\bAR\bRI\bIT\bTH\bHM\bME\bET\bTI\bIC\bC
+ O\bOP\bP is one of -\b-e\beq\bq, -\b-n\bne\be, -\b-l\blt\bt, -\b-l\ble\be, -\b-g\bgt\bt, or -\b-g\bge\be. These arithmetic
+ binary operators return true if _\ba_\br_\bg_\b1 is equal to, not equal to,
+ less than, less than or equal to, greater than, or greater than
+ or equal to _\ba_\br_\bg_\b2, respectively. _\ba_\br_\bg_\b1 and _\ba_\br_\bg_\b2 may be positive
+ or negative integers. When used with the [\b[[\b[ command, _\ba_\br_\bg_\b1 and
+ _\ba_\br_\bg_\b2 are evaluated as arithmetic expressions (see A\bAR\bRI\bIT\bTH\bHM\bME\bET\bTI\bIC\bC
E\bEV\bVA\bAL\bLU\bUA\bAT\bTI\bIO\bON\bN above). Since the expansions the [\b[[\b[ command performs
on _\ba_\br_\bg_\b1 and _\ba_\br_\bg_\b2 can potentially result in empty strings, arith-
- metic expression evaluation treats those as expressions that
+ metic expression evaluation treats those as expressions that
evaluate to 0.
S\bSI\bIM\bMP\bPL\bLE\bE C\bCO\bOM\bMM\bMA\bAN\bND\bD E\bEX\bXP\bPA\bAN\bNS\bSI\bIO\bON\bN
When the shell executes a simple command, it performs the following ex-
- pansions, assignments, and redirections, from left to right, in the
+ pansions, assignments, and redirections, from left to right, in the
following order.
- 1. The words that the parser has marked as variable assignments
- (those preceding the command name) and redirections are saved
+ 1. The words that the parser has marked as variable assignments
+ (those preceding the command name) and redirections are saved
for later processing.
- 2. The words that are not variable assignments or redirections are
- expanded. If any words remain after expansion, the first word
- is taken to be the name of the command and the remaining words
+ 2. The words that are not variable assignments or redirections are
+ expanded. If any words remain after expansion, the first word
+ is taken to be the name of the command and the remaining words
are the arguments.
3. Redirections are performed as described above under R\bRE\bED\bDI\bIR\bRE\bEC\bCT\bTI\bIO\bON\bN.
4. The text after the =\b= in each variable assignment undergoes tilde
expansion, parameter expansion, command substitution, arithmetic
- expansion, and quote removal before being assigned to the vari-
+ expansion, and quote removal before being assigned to the vari-
able.
If no command name results, the variable assignments affect the 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 cur-
+ 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 cur-
rent shell environment. If any of the assignments attempts to assign a
- value to a readonly variable, an error occurs, and the command exits
+ 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 af-
- fect the current shell environment. A redirection error causes the
+ If no command name results, redirections are performed, but do not af-
+ fect the current shell environment. A redirection error causes the
command to exit with a non-zero status.
- If there is a command name left after expansion, execution proceeds as
- described below. Otherwise, the command exits. If one of the expan-
- sions contained a command substitution, the exit status of the command
- is the exit status of the last command substitution performed. If
+ If there is a command name left after expansion, execution proceeds as
+ described below. Otherwise, the command exits. If one of the expan-
+ sions contained a command substitution, the exit status of the command
+ is the exit status of the last command substitution performed. If
there were no command substitutions, the command exits with a zero sta-
tus.
C\bCO\bOM\bMM\bMA\bAN\bND\bD E\bEX\bXE\bEC\bCU\bUT\bTI\bIO\bON\bN
- After a command has been split into words, if it results in a simple
- command and an optional list of arguments, the shell performs the fol-
+ After a command has been split into words, if it results in a simple
+ command and an optional list of arguments, the shell performs the fol-
lowing actions.
- If the command name contains no slashes, the shell attempts to locate
- it. If there exists a shell function by that name, that function is
- invoked as described above in F\bFU\bUN\bNC\bCT\bTI\bIO\bON\bNS\bS. If the name does not match a
- function, the shell searches for it in the list of shell builtins. If
+ If the command name contains no slashes, the shell attempts to locate
+ it. If there exists a shell function by that name, that function is
+ invoked as described above in F\bFU\bUN\bNC\bCT\bTI\bIO\bON\bNS\bS. If the name does not match a
+ function, the shell searches for it in the list of shell builtins. If
a match is found, that builtin is invoked.
- If the name is neither a shell function nor a builtin, and contains no
- slashes, b\bba\bas\bsh\bh searches each element of the P\bPA\bAT\bTH\bH for a directory con-
+ If the name is neither a shell function nor a builtin, and contains no
+ slashes, b\bba\bas\bsh\bh searches each element of the P\bPA\bAT\bTH\bH for a directory con-
taining an executable file by that name. B\bBa\bas\bsh\bh uses a hash table to re-
- member the full pathnames of executable files (see h\bha\bas\bsh\bh under S\bSH\bHE\bEL\bLL\bL
- B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below). Bash performs a full search of the directo-
- ries in P\bPA\bAT\bTH\bH only if the command is not found in the hash table. If
- the search is unsuccessful, the shell searches for a defined shell
- function named c\bco\bom\bmm\bma\ban\bnd\bd_\b_n\bno\bot\bt_\b_f\bfo\bou\bun\bnd\bd_\b_h\bha\ban\bnd\bdl\ble\be. If that function exists, it
- is invoked in a separate execution environment with the original com-
- mand and the original command's arguments as its arguments, and the
- function's exit status becomes the exit status of that subshell. If
+ member the full pathnames of executable files (see h\bha\bas\bsh\bh under S\bSH\bHE\bEL\bLL\bL
+ B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below). Bash performs a full search of the directo-
+ ries in P\bPA\bAT\bTH\bH only if the command is not found in the hash table. If
+ the search is unsuccessful, the shell searches for a defined shell
+ function named c\bco\bom\bmm\bma\ban\bnd\bd_\b_n\bno\bot\bt_\b_f\bfo\bou\bun\bnd\bd_\b_h\bha\ban\bnd\bdl\ble\be. If that function exists, it
+ is invoked in a separate execution environment with the original com-
+ mand and the original command's arguments as its arguments, and the
+ function's exit status becomes the exit status of that subshell. If
that function is not defined, the shell prints an error message and re-
turns an exit status of 127.
- If the search is successful, or if the command name contains one or
+ If the search is successful, or if the command name contains one or
more slashes, the shell executes the named program in a separate execu-
tion environment. Argument 0 is set to the name given, and the remain-
ing arguments to the command are set to the arguments given, if any.
- 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 _\bs_\bh_\be_\bl_\bl _\bs_\bc_\br_\bi_\bp_\bt, a
+ 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 _\bs_\bh_\be_\bl_\bl _\bs_\bc_\br_\bi_\bp_\bt, a
file containing shell commands, and the shell creates a new instance of
- itself to execute it. Bash tries to determine whether the file is a
- text file or a binary, and will not execute files it determines to be
+ itself to execute it. Bash tries to determine whether the file is a
+ text file or a binary, and will not execute files it determines to be
binaries. This subshell reinitializes itself, so that the effect is as
- if a new shell had been invoked to handle the script, with the excep-
- tion that the locations of commands remembered by the parent (see h\bha\bas\bsh\bh
+ if a new shell had been invoked to handle the script, with the excep-
+ tion that the locations of commands remembered by the parent (see h\bha\bas\bsh\bh
below under S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS are retained by the child.
- If the program is a file beginning with #\b#!\b!, the remainder of the first
- line specifies an interpreter for the program. The shell executes the
+ If the program is a file beginning with #\b#!\b!, the remainder of the first
+ line specifies an interpreter for the program. The shell executes the
specified interpreter on operating systems that do not handle this exe-
cutable format themselves. The arguments to the interpreter consist of
- a single optional argument following the interpreter name on the first
- line of the program, followed by the name of the program, followed by
+ a single optional argument following the interpreter name on the first
+ line of the program, followed by the name of the program, followed by
the command arguments, if any.
C\bCO\bOM\bMM\bMA\bAN\bND\bD E\bEX\bXE\bEC\bCU\bUT\bTI\bIO\bON\bN E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT
- The shell has an _\be_\bx_\be_\bc_\bu_\bt_\bi_\bo_\bn _\be_\bn_\bv_\bi_\br_\bo_\bn_\bm_\be_\bn_\bt, which consists of the follow-
+ The shell has an _\be_\bx_\be_\bc_\bu_\bt_\bi_\bo_\bn _\be_\bn_\bv_\bi_\br_\bo_\bn_\bm_\be_\bn_\bt, which consists of the follow-
ing:
- +\bo Open files inherited by the shell at invocation, as modified by
+ +\bo Open files inherited by the shell at invocation, as modified by
redirections supplied to the e\bex\bxe\bec\bc builtin.
- +\bo The current working directory as set by c\bcd\bd, p\bpu\bus\bsh\bhd\bd, or p\bpo\bop\bpd\bd, or
+ +\bo The current working directory as set by c\bcd\bd, p\bpu\bus\bsh\bhd\bd, or p\bpo\bop\bpd\bd, or
inherited by the shell at invocation.
- +\bo The file creation mode mask as set by u\bum\bma\bas\bsk\bk or inherited from
+ +\bo The file creation mode mask as set by u\bum\bma\bas\bsk\bk or inherited from
the shell's parent.
+\bo Current traps set by t\btr\bra\bap\bp.
+\bo Shell parameters that are set by variable assignment or with s\bse\bet\bt
or inherited from the shell's parent in the environment.
- +\bo Shell functions defined during execution or inherited from the
+ +\bo Shell functions defined during execution or inherited from the
shell's parent in the environment.
- +\bo Options enabled at invocation (either by default or with com-
+ +\bo Options enabled at invocation (either by default or with com-
mand-line arguments) or by s\bse\bet\bt.
+\bo Options enabled by s\bsh\bho\bop\bpt\bt.
+\bo Shell aliases defined with a\bal\bli\bia\bas\bs.
- +\bo Various process IDs, including those of background jobs, the
+ +\bo Various process IDs, including those of background jobs, the
value of $\b$$\b$, and the value of P\bPP\bPI\bID\bD.
- When a simple command other than a builtin or shell function is to be
- executed, it is invoked in a separate execution environment that con-
- sists of the following. Unless otherwise noted, the values are inher-
+ When a simple command other than a builtin or shell function is to be
+ executed, it is invoked in a separate execution environment that con-
+ sists of the following. Unless otherwise noted, the values are inher-
ited from the shell.
- +\bo The shell's open files, plus any modifications and additions
+ +\bo The shell's open files, plus any modifications and additions
specified by redirections to the command.
+\bo The current working directory.
+\bo The file creation mode mask.
- +\bo Shell variables and functions marked for export, along with
+ +\bo Shell variables and functions marked for export, along with
variables exported for the command, passed in the environment.
+\bo Traps caught by the shell are reset to the values inherited from
the shell's parent, and traps ignored by the shell are ignored.
- A command invoked in this separate environment cannot affect the
+ A command invoked in this separate environment cannot affect the
shell's execution environment.
A _\bs_\bu_\bb_\bs_\bh_\be_\bl_\bl is a copy of the shell process.
- Command substitution, commands grouped with parentheses, and asynchro-
+ Command substitution, commands grouped with parentheses, and asynchro-
nous commands are invoked in a subshell environment that is a duplicate
of the shell environment, except that traps caught by the shell are re-
- set to the values that the shell inherited from its parent at invoca-
- tion. Builtin commands that are invoked as part of a pipeline, except
- possibly in the last element depending on the value of the l\bla\bas\bst\btp\bpi\bip\bpe\be
- shell option, are also executed in a subshell environment. Changes
- made to the subshell environment cannot affect the shell's execution
+ set to the values that the shell inherited from its parent at invoca-
+ tion. Builtin commands that are invoked as part of a pipeline, except
+ possibly in the last element depending on the value of the l\bla\bas\bst\btp\bpi\bip\bpe\be
+ shell option, are also executed in a subshell environment. Changes
+ made to the subshell environment cannot affect the shell's execution
environment.
- When the shell is in posix mode, subshells spawned to execute command
- substitutions inherit the value of the -\b-e\be option from their parent
- shell. When not in posix mode, b\bba\bas\bsh\bh clears the -\b-e\be option in such sub-
- shells. See the description of the i\bin\bnh\bhe\ber\bri\bit\bt_\b_e\ber\brr\bre\bex\bxi\bit\bt shell option below
+ When the shell is in posix mode, subshells spawned to execute command
+ substitutions inherit the value of the -\b-e\be option from their parent
+ shell. When not in posix mode, b\bba\bas\bsh\bh clears the -\b-e\be option in such sub-
+ shells. See the description of the i\bin\bnh\bhe\ber\bri\bit\bt_\b_e\ber\brr\bre\bex\bxi\bit\bt shell option below
for how to control this behavior when not in posix mode.
- If a command is followed by a &\b& and job control is not active, the de-
+ If a command is followed by a &\b& and job control is not active, the de-
fault standard input for the command is the empty file _\b/_\bd_\be_\bv_\b/_\bn_\bu_\bl_\bl. Oth-
- erwise, the invoked command inherits the file descriptors of the call-
+ erwise, the invoked command inherits the file descriptors of the call-
ing shell as modified by redirections.
E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT
- When a program is invoked it is given an array of strings called the
+ When a program is invoked it is given an array of strings called the
_\be_\bn_\bv_\bi_\br_\bo_\bn_\bm_\be_\bn_\bt. This is a list of _\bn_\ba_\bm_\be-_\bv_\ba_\bl_\bu_\be pairs, of the form
_\bn_\ba_\bm_\be=_\bv_\ba_\bl_\bu_\be.
- The shell provides several ways to manipulate the environment. On in-
- vocation, the shell scans its own environment and creates a parameter
- for each name found, automatically marking it for _\be_\bx_\bp_\bo_\br_\bt to child
+ The shell provides several ways to manipulate the environment. On in-
+ vocation, the shell scans its own environment and creates a parameter
+ for each name found, automatically marking it for _\be_\bx_\bp_\bo_\br_\bt to child
processes. Executed commands inherit the environment. The e\bex\bxp\bpo\bor\brt\bt, d\bde\be-\b-
- c\bcl\bla\bar\bre\be -\b-x\bx, and u\bun\bns\bse\bet\bt commands modify the environment by adding and
- deleting parameters and functions. If the value of a parameter in the
- environment is modified, the new value automatically becomes part of
- the environment, replacing the old. The environment inherited by any
- executed command consists of the shell's initial environment, whose
- values may be modified in the shell, less any pairs removed by the u\bun\bn-\b-
- s\bse\bet\bt or e\bex\bxp\bpo\bor\brt\bt -\b-n\bn commands, plus any additions via the e\bex\bxp\bpo\bor\brt\bt and d\bde\be-\b-
+ c\bcl\bla\bar\bre\be -\b-x\bx, and u\bun\bns\bse\bet\bt commands modify the environment by adding and
+ deleting parameters and functions. If the value of a parameter in the
+ environment is modified, the new value automatically becomes part of
+ the environment, replacing the old. The environment inherited by any
+ executed command consists of the shell's initial environment, whose
+ values may be modified in the shell, less any pairs removed by the u\bun\bn-\b-
+ s\bse\bet\bt or e\bex\bxp\bpo\bor\brt\bt -\b-n\bn commands, plus any additions via the e\bex\bxp\bpo\bor\brt\bt and d\bde\be-\b-
c\bcl\bla\bar\bre\be -\b-x\bx commands.
- If any parameter assignments, as described above in P\bPA\bAR\bRA\bAM\bME\bET\bTE\bER\bRS\bS, appear
+ If any parameter assignments, as described above in P\bPA\bAR\bRA\bAM\bME\bET\bTE\bER\bRS\bS, appear
before a _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd, the variable assignments are part of that com-
mand's environment for as long as it executes. These assignment state-
- ments affect only the environment seen by that command. If these as-
- signments precede a call to a shell function, the variables are local
+ ments affect only the environment seen by that command. If these as-
+ signments precede a call to a shell function, the variables are local
to the function and exported to that function's children.
- If the -\b-k\bk option is set (see the s\bse\bet\bt builtin command below), then _\ba_\bl_\bl
- parameter assignments are placed in the environment for a command, not
+ If the -\b-k\bk option is set (see the s\bse\bet\bt builtin command below), then _\ba_\bl_\bl
+ parameter assignments are placed in the environment for a command, not
just those that precede the command name.
- When b\bba\bas\bsh\bh invokes an external command, the variable _\b_ is set to the
+ When b\bba\bas\bsh\bh invokes an external command, the variable _\b_ is set to the
full pathname of the command and passed to that command in its environ-
ment.
E\bEX\bXI\bIT\bT S\bST\bTA\bAT\bTU\bUS\bS
- The exit status of an executed command is the value returned by the
+ The exit status of an executed command is the value returned by the
_\bw_\ba_\bi_\bt_\bp_\bi_\bd system call or equivalent function. Exit statuses fall between
- 0 and 255, though, as explained below, the shell may use values above
+ 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. So while an exit status of zero indicates success, a
+ has succeeded. So while an exit status of zero indicates success, a
non-zero exit status indicates failure.
- When a command terminates on a fatal signal _\bN, b\bba\bas\bsh\bh uses the value of
+ When a command terminates on a fatal signal _\bN, b\bba\bas\bsh\bh uses the value of
128+_\bN as the exit status.
- If a command is not found, the child process created to execute it re-
- turns a status of 127. If a command is found but is not executable,
+ If a command is not found, the child process created to execute it re-
+ turns a status of 127. If a command is found but is not executable,
the return status is 126.
If a command fails because of an error during expansion or redirection,
the exit status is greater than zero.
- Shell builtin commands return a status of 0 (_\bt_\br_\bu_\be) if successful, and
- non-zero (_\bf_\ba_\bl_\bs_\be) if an error occurs while they execute. All builtins
- return an exit status of 2 to indicate incorrect usage, generally in-
+ Shell builtin commands return a status of 0 (_\bt_\br_\bu_\be) if successful, and
+ non-zero (_\bf_\ba_\bl_\bs_\be) if an error occurs while they execute. All builtins
+ return an exit status of 2 to indicate incorrect usage, generally in-
valid options or missing arguments.
The exit status of the last command is available in the special parame-
ter $?.
- B\bBa\bas\bsh\bh itself returns the exit status of the last command executed, un-
- less a syntax error occurs, in which case it exits with a non-zero
+ B\bBa\bas\bsh\bh itself returns the exit status of the last command executed, un-
+ less a syntax error occurs, in which case it exits with a non-zero
value. See also the e\bex\bxi\bit\bt builtin command below.
S\bSI\bIG\bGN\bNA\bAL\bLS\bS
- When b\bba\bas\bsh\bh is interactive, in the absence of any traps, it ignores
- S\bSI\bIG\bGT\bTE\bER\bRM\bM (so that k\bki\bil\bll\bl 0\b0 does not kill an interactive shell), and
+ When b\bba\bas\bsh\bh is interactive, in the absence of any traps, it ignores
+ S\bSI\bIG\bGT\bTE\bER\bRM\bM (so that k\bki\bil\bll\bl 0\b0 does not kill an interactive shell), and
catches and handles S\bSI\bIG\bGI\bIN\bNT\bT (so that the w\bwa\bai\bit\bt builtin is interruptible).
- When b\bba\bas\bsh\bh receives S\bSI\bIG\bGI\bIN\bNT\bT, it breaks out of any executing loops. In
+ When b\bba\bas\bsh\bh receives S\bSI\bIG\bGI\bIN\bNT\bT, it breaks out of any executing loops. In
all cases, b\bba\bas\bsh\bh ignores S\bSI\bIG\bGQ\bQU\bUI\bIT\bT. If job control is in effect, b\bba\bas\bsh\bh ig-
nores S\bSI\bIG\bGT\bTT\bTI\bIN\bN, S\bSI\bIG\bGT\bTT\bTO\bOU\bU, and S\bSI\bIG\bGT\bTS\bST\bTP\bP.
Non-builtin commands b\bba\bas\bsh\bh executes have signal handlers set to the val-
ues inherited by the shell from its parent, unless t\btr\bra\bap\bp sets them to be
- ignored, in which case the child process will ignore them as well.
- When job control is not in effect, asynchronous commands ignore S\bSI\bIG\bGI\bIN\bNT\bT
+ ignored, in which case the child process will ignore them as well.
+ When job control is not in effect, asynchronous commands ignore S\bSI\bIG\bGI\bIN\bNT\bT
and S\bSI\bIG\bGQ\bQU\bUI\bIT\bT in addition to these inherited handlers. Commands run as a
- result of command substitution ignore the keyboard-generated job con-
+ result of command substitution ignore the keyboard-generated job con-
trol signals S\bSI\bIG\bGT\bTT\bTI\bIN\bN, S\bSI\bIG\bGT\bTT\bTO\bOU\bU, and S\bSI\bIG\bGT\bTS\bST\bTP\bP.
- The shell exits by default upon receipt of a S\bSI\bIG\bGH\bHU\bUP\bP. Before exiting,
- an interactive shell resends the S\bSI\bIG\bGH\bHU\bUP\bP to all jobs, running or
- stopped. The shell sends S\bSI\bIG\bGC\bCO\bON\bNT\bT to stopped jobs to ensure that they
- receive the S\bSI\bIG\bGH\bHU\bUP\bP (see J\bJO\bOB\bB C\bCO\bON\bNT\bTR\bRO\bOL\bL below for more information about
- running and stopped jobs). To prevent the shell from sending the sig-
- nal to a particular job, remove it from the jobs table with the d\bdi\bis\bso\bow\bwn\bn
- builtin (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below) or mark it not to receive
+ The shell exits by default upon receipt of a S\bSI\bIG\bGH\bHU\bUP\bP. Before exiting,
+ an interactive shell resends the S\bSI\bIG\bGH\bHU\bUP\bP to all jobs, running or
+ stopped. The shell sends S\bSI\bIG\bGC\bCO\bON\bNT\bT to stopped jobs to ensure that they
+ receive the S\bSI\bIG\bGH\bHU\bUP\bP (see J\bJO\bOB\bB C\bCO\bON\bNT\bTR\bRO\bOL\bL below for more information about
+ running and stopped jobs). To prevent the shell from sending the sig-
+ nal to a particular job, remove it from the jobs table with the d\bdi\bis\bso\bow\bwn\bn
+ builtin (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below) or mark it not to receive
S\bSI\bIG\bGH\bHU\bUP\bP using d\bdi\bis\bso\bow\bwn\bn -\b-h\bh.
- If the h\bhu\bup\bpo\bon\bne\bex\bxi\bit\bt shell option has been set using s\bsh\bho\bop\bpt\bt, b\bba\bas\bsh\bh sends a
+ If the h\bhu\bup\bpo\bon\bne\bex\bxi\bit\bt shell option has been set using s\bsh\bho\bop\bpt\bt, b\bba\bas\bsh\bh sends a
S\bSI\bIG\bGH\bHU\bUP\bP to all jobs when an interactive login shell exits.
- If b\bba\bas\bsh\bh is waiting for a command to complete and receives a signal for
- which a trap has been set, it will not execute the trap until the com-
+ If b\bba\bas\bsh\bh is waiting for a command to complete and receives a signal for
+ which a trap has been set, it will not execute the trap until the com-
mand completes. If b\bba\bas\bsh\bh is waiting for an asynchronous command via the
- w\bwa\bai\bit\bt builtin, and it receives a signal for which a trap has been set,
- the w\bwa\bai\bit\bt builtin will return immediately with an exit status greater
+ w\bwa\bai\bit\bt builtin, and it receives a signal for which a trap has been set,
+ the w\bwa\bai\bit\bt builtin will return immediately with an exit status greater
than 128, immediately after which the shell executes the trap.
- When job control is not enabled, and b\bba\bas\bsh\bh is waiting for a foreground
+ When job control is not enabled, and b\bba\bas\bsh\bh is waiting for a foreground
command to complete, the shell receives keyboard-generated signals such
- as S\bSI\bIG\bGI\bIN\bNT\bT (usually generated by ^\b^C\bC) that users commonly intend to send
+ as S\bSI\bIG\bGI\bIN\bNT\bT (usually generated by ^\b^C\bC) 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 ^\b^C\bC sends S\bSI\bIG\bGI\bIN\bNT\bT to all
- processes in that process group. Since b\bba\bas\bsh\bh does not enable job con-
- trol by default when the shell is not interactive, this scenario is
+ the same process group as the terminal, and ^\b^C\bC sends S\bSI\bIG\bGI\bIN\bNT\bT to all
+ processes in that process group. Since b\bba\bas\bsh\bh does not enable job con-
+ trol by default when the shell is not interactive, this scenario is
most common in non-interactive shells.
- When job control is enabled, and b\bba\bas\bsh\bh is waiting for a foreground com-
- mand to complete, the shell does not receive keyboard-generated sig-
- nals, because it is not in the same process group as the terminal.
+ When job control is enabled, and b\bba\bas\bsh\bh is waiting for a foreground com-
+ mand to complete, the shell does not receive keyboard-generated sig-
+ nals, because it is not in the same process group as the terminal.
This scenario is most common in interactive shells, where b\bba\bas\bsh\bh attempts
- to enable job control by default. See J\bJO\bOB\bB C\bCO\bON\bNT\bTR\bRO\bOL\bL below for more in-
+ to enable job control by default. See J\bJO\bOB\bB C\bCO\bON\bNT\bTR\bRO\bOL\bL below for more in-
formation about process groups.
When job control is not enabled, and b\bba\bas\bsh\bh receives S\bSI\bIG\bGI\bIN\bNT\bT while waiting
1. If the command terminates due to the S\bSI\bIG\bGI\bIN\bNT\bT, b\bba\bas\bsh\bh concludes that
the user meant to send the S\bSI\bIG\bGI\bIN\bNT\bT to the shell as well, and acts
on the S\bSI\bIG\bGI\bIN\bNT\bT (e.g., by running a S\bSI\bIG\bGI\bIN\bNT\bT trap, exiting a non-in-
- teractive shell, or returning to the top level to read a new
+ teractive shell, or returning to the top level to read a new
command).
- 2. If the command does not terminate due to S\bSI\bIG\bGI\bIN\bNT\bT, the program
- handled the S\bSI\bIG\bGI\bIN\bNT\bT itself and did not treat it as a fatal sig-
- nal. In that case, b\bba\bas\bsh\bh does not treat S\bSI\bIG\bGI\bIN\bNT\bT as a fatal sig-
- nal, either, instead assuming that the S\bSI\bIG\bGI\bIN\bNT\bT was used as part
- of the program's normal operation (e.g., emacs uses it to abort
+ 2. If the command does not terminate due to S\bSI\bIG\bGI\bIN\bNT\bT, the program
+ handled the S\bSI\bIG\bGI\bIN\bNT\bT itself and did not treat it as a fatal sig-
+ nal. In that case, b\bba\bas\bsh\bh does not treat S\bSI\bIG\bGI\bIN\bNT\bT as a fatal sig-
+ nal, either, instead assuming that the S\bSI\bIG\bGI\bIN\bNT\bT was used as part
+ of the program's normal operation (e.g., emacs uses it to abort
editing commands) or deliberately discarded. However, b\bba\bas\bsh\bh will
- run any trap set on S\bSI\bIG\bGI\bIN\bNT\bT, as it does with any other trapped
- signal it receives while it is waiting for the foreground com-
+ run any trap set on S\bSI\bIG\bGI\bIN\bNT\bT, as it does with any other trapped
+ signal it receives while it is waiting for the foreground com-
mand to complete, for compatibility.
- When job control is enabled, b\bba\bas\bsh\bh does not receive keyboard-generated
- signals such as S\bSI\bIG\bGI\bIN\bNT\bT while it is waiting for a foreground command.
- An interactive shell does not pay attention to the S\bSI\bIG\bGI\bIN\bNT\bT, even if the
- foreground command terminates as a result, other than noting its exit
- status. If the shell is not interactive, and the foreground command
- terminates due to the S\bSI\bIG\bGI\bIN\bNT\bT, b\bba\bas\bsh\bh pretends it received the S\bSI\bIG\bGI\bIN\bNT\bT it-
+ When job control is enabled, b\bba\bas\bsh\bh does not receive keyboard-generated
+ signals such as S\bSI\bIG\bGI\bIN\bNT\bT while it is waiting for a foreground command.
+ An interactive shell does not pay attention to the S\bSI\bIG\bGI\bIN\bNT\bT, even if the
+ foreground command terminates as a result, other than noting its exit
+ status. If the shell is not interactive, and the foreground command
+ terminates due to the S\bSI\bIG\bGI\bIN\bNT\bT, b\bba\bas\bsh\bh pretends it received the S\bSI\bIG\bGI\bIN\bNT\bT it-
self (scenario 1 above), for compatibility.
J\bJO\bOB\bB C\bCO\bON\bNT\bTR\bRO\bOL\bL
_\bJ_\bo_\bb _\bc_\bo_\bn_\bt_\br_\bo_\bl refers to the ability to selectively stop (_\bs_\bu_\bs_\bp_\be_\bn_\bd) the ex-
- ecution of processes and continue (_\br_\be_\bs_\bu_\bm_\be) their execution at a later
- point. A user typically employs this facility via an interactive in-
+ ecution of processes and continue (_\br_\be_\bs_\bu_\bm_\be) their execution at a later
+ point. A user typically employs this facility via an interactive in-
terface supplied jointly by the operating system kernel's terminal dri-
ver and b\bba\bas\bsh\bh.
- The shell associates a _\bj_\bo_\bb with each pipeline. It keeps a table of
- currently executing jobs, which the j\bjo\bob\bbs\bs command will display. Each
- job has a _\bj_\bo_\bb _\bn_\bu_\bm_\bb_\be_\br, which j\bjo\bob\bbs\bs displays between brackets. Job num-
- bers start at 1. When b\bba\bas\bsh\bh starts a job asynchronously (in the _\bb_\ba_\bc_\bk_\b-
+ The shell associates a _\bj_\bo_\bb with each pipeline. It keeps a table of
+ currently executing jobs, which the j\bjo\bob\bbs\bs command will display. Each
+ job has a _\bj_\bo_\bb _\bn_\bu_\bm_\bb_\be_\br, which j\bjo\bob\bbs\bs displays between brackets. Job num-
+ bers start at 1. When b\bba\bas\bsh\bh starts a job asynchronously (in the _\bb_\ba_\bc_\bk_\b-
_\bg_\br_\bo_\bu_\bn_\bd), it prints a line that looks like:
[1] 25647
indicating that this job is job number 1 and that the process ID of the
last process in the pipeline associated with this job is 25647. All of
- the processes in a single pipeline are members of the same job. B\bBa\bas\bsh\bh
+ the processes in a single pipeline are members of the same job. B\bBa\bas\bsh\bh
uses the _\bj_\bo_\bb abstraction as the basis for job control.
- To facilitate the implementation of the user interface to job control,
+ To facilitate the implementation of the user interface to job control,
each process has a _\bp_\br_\bo_\bc_\be_\bs_\bs _\bg_\br_\bo_\bu_\bp _\bI_\bD, and the operating system maintains
- the notion of a _\bc_\bu_\br_\br_\be_\bn_\bt _\bt_\be_\br_\bm_\bi_\bn_\ba_\bl _\bp_\br_\bo_\bc_\be_\bs_\bs _\bg_\br_\bo_\bu_\bp _\bI_\bD. This terminal
+ the notion of a _\bc_\bu_\br_\br_\be_\bn_\bt _\bt_\be_\br_\bm_\bi_\bn_\ba_\bl _\bp_\br_\bo_\bc_\be_\bs_\bs _\bg_\br_\bo_\bu_\bp _\bI_\bD. This terminal
process group ID is associated with the _\bc_\bo_\bn_\bt_\br_\bo_\bl_\bl_\bi_\bn_\bg _\bt_\be_\br_\bm_\bi_\bn_\ba_\bl.
- Processes that have the same process group ID are said to be part of
- the same _\bp_\br_\bo_\bc_\be_\bs_\bs _\bg_\br_\bo_\bu_\bp. Members of the _\bf_\bo_\br_\be_\bg_\br_\bo_\bu_\bn_\bd process group
- (processes whose process group ID is equal to the current terminal
- process group ID) receive keyboard-generated signals such as S\bSI\bIG\bGI\bIN\bNT\bT.
- Processes in the foreground process group are said to be _\bf_\bo_\br_\be_\bg_\br_\bo_\bu_\bn_\bd
- processes. _\bB_\ba_\bc_\bk_\bg_\br_\bo_\bu_\bn_\bd processes are those whose process group ID dif-
+ Processes that have the same process group ID are said to be part of
+ the same _\bp_\br_\bo_\bc_\be_\bs_\bs _\bg_\br_\bo_\bu_\bp. Members of the _\bf_\bo_\br_\be_\bg_\br_\bo_\bu_\bn_\bd process group
+ (processes whose process group ID is equal to the current terminal
+ process group ID) receive keyboard-generated signals such as S\bSI\bIG\bGI\bIN\bNT\bT.
+ Processes in the foreground process group are said to be _\bf_\bo_\br_\be_\bg_\br_\bo_\bu_\bn_\bd
+ processes. _\bB_\ba_\bc_\bk_\bg_\br_\bo_\bu_\bn_\bd processes are those whose process group ID dif-
fers from the controlling terminal's; such processes are immune to key-
board-generated signals. Only foreground processes are allowed to read
from or, if the user so specifies with "stty tostop", write to the con-
- trolling terminal. The system sends a S\bSI\bIG\bGT\bTT\bTI\bIN\bN (\b(S\bSI\bIG\bGT\bTT\bTO\bOU\bU)\b) signal to
+ trolling terminal. The system sends a S\bSI\bIG\bGT\bTT\bTI\bIN\bN (\b(S\bSI\bIG\bGT\bTT\bTO\bOU\bU)\b) signal to
background processes which attempt to read from (write to when "tostop"
is in effect) the terminal, which, unless caught, suspends the process.
- If the operating system on which b\bba\bas\bsh\bh is running supports job control,
+ If the operating system on which b\bba\bas\bsh\bh is running supports job control,
b\bba\bas\bsh\bh contains facilities to use it. Typing the _\bs_\bu_\bs_\bp_\be_\bn_\bd character (typ-
ically ^\b^Z\bZ, Control-Z) while a process is running stops that process and
- returns control to b\bba\bas\bsh\bh. Typing the _\bd_\be_\bl_\ba_\by_\be_\bd _\bs_\bu_\bs_\bp_\be_\bn_\bd character (typi-
- cally ^\b^Y\bY, Control-Y) causes the process stop when it attempts to read
- input from the terminal, and returns control to b\bba\bas\bsh\bh. The user then
- manipulates the state of this job, using the b\bbg\bg command to continue it
- in the background, the f\bfg\bg command to continue it in the foreground, or
- the k\bki\bil\bll\bl command to kill it. The suspend character takes effect imme-
- diately, and has the additional side effect of discarding any pending
+ returns control to b\bba\bas\bsh\bh. Typing the _\bd_\be_\bl_\ba_\by_\be_\bd _\bs_\bu_\bs_\bp_\be_\bn_\bd character (typi-
+ cally ^\b^Y\bY, Control-Y) causes the process stop when it attempts to read
+ input from the terminal, and returns control to b\bba\bas\bsh\bh. The user then
+ manipulates the state of this job, using the b\bbg\bg command to continue it
+ in the background, the f\bfg\bg command to continue it in the foreground, or
+ the k\bki\bil\bll\bl command to kill it. The suspend character takes effect imme-
+ diately, and has the additional side effect of discarding any pending
output and typeahead. To force a background process to stop, or stop a
- process that's not associated with the current terminal session, send
+ process that's not associated with the current terminal session, send
it the S\bSI\bIG\bGS\bST\bTO\bOP\bP signal using k\bki\bil\bll\bl.
There are a number of ways to refer to a job in the shell. The %\b% char-
acter introduces a job specification (jobspec).
- Job number _\bn may be referred to as %\b%n\bn. A job may also be referred to
- using a prefix of the name used to start it, or using a substring that
- appears in its command line. For example, %\b%c\bce\be refers to a job whose
- command name begins with c\bce\be. Using %\b%?\b?c\bce\be, on the other hand, refers to
+ Job number _\bn may be referred to as %\b%n\bn. A job may also be referred to
+ using a prefix of the name used to start it, or using a substring that
+ appears in its command line. For example, %\b%c\bce\be refers to a job whose
+ command name begins with c\bce\be. Using %\b%?\b?c\bce\be, on the other hand, refers to
any job containing the string c\bce\be in its command line. If the prefix or
substring matches more than one job, b\bba\bas\bsh\bh reports an error.
- The symbols %\b%%\b% and %\b%+\b+ refer to the shell's notion of the _\bc_\bu_\br_\br_\be_\bn_\bt _\bj_\bo_\bb.
- A single % (with no accompanying job specification) also refers to the
- current job. %\b%-\b- refers to the _\bp_\br_\be_\bv_\bi_\bo_\bu_\bs _\bj_\bo_\bb. When a job starts in the
+ The symbols %\b%%\b% and %\b%+\b+ refer to the shell's notion of the _\bc_\bu_\br_\br_\be_\bn_\bt _\bj_\bo_\bb.
+ A single % (with no accompanying job specification) also refers to the
+ current job. %\b%-\b- refers to the _\bp_\br_\be_\bv_\bi_\bo_\bu_\bs _\bj_\bo_\bb. When a job starts in the
background, a job stops while in the foreground, or a job is resumed in
- the background, it becomes the current job. The job that was the cur-
- rent job becomes the previous job. When the current job terminates,
- the previous job becomes the current job. If there is only a single
- job, %\b%+\b+ and %\b%-\b- can both be used to refer to that job. In output per-
+ the background, it becomes the current job. The job that was the cur-
+ rent job becomes the previous job. When the current job terminates,
+ the previous job becomes the current job. If there is only a single
+ job, %\b%+\b+ and %\b%-\b- can both be used to refer to that job. In output per-
taining to jobs (e.g., the output of the j\bjo\bob\bbs\bs command), the current job
is always marked with a +\b+, and the previous job with a -\b-.
- Simply naming a job can be used to bring it into the foreground: %\b%1\b1 is
- a synonym for "fg %1", bringing job 1 from the background into the
+ Simply naming a job can be used to bring it into the foreground: %\b%1\b1 is
+ a synonym for "fg %1", bringing job 1 from the background into the
foreground. Similarly, "%1 &" resumes job 1 in the background, equiva-
lent to "bg %1".
- The shell learns immediately whenever a job changes state. Normally,
- b\bba\bas\bsh\bh waits until it is about to print a prompt before notifying the
- user about changes in a job's status so as to not interrupt any other
- output, though it will notify of changes in a job's status after a
- foreground command in a list completes, before executing the next com-
- mand in the list. If the -\b-b\bb option to the s\bse\bet\bt builtin command is en-
+ The shell learns immediately whenever a job changes state. Normally,
+ b\bba\bas\bsh\bh waits until it is about to print a prompt before notifying the
+ user about changes in a job's status so as to not interrupt any other
+ output, though it will notify of changes in a job's status after a
+ foreground command in a list completes, before executing the next com-
+ mand in the list. If the -\b-b\bb option to the s\bse\bet\bt builtin command is en-
abled, b\bba\bas\bsh\bh reports status changes immediately. B\bBa\bas\bsh\bh executes any trap
on S\bSI\bIG\bGC\bCH\bHL\bLD\bD for each child that terminates.
When a job terminates and b\bba\bas\bsh\bh notifies the user about it, b\bba\bas\bsh\bh removes
- the job from the table. It will not appear in j\bjo\bob\bbs\bs output, but w\bwa\bai\bit\bt
- will report its exit status, as long as it's supplied the process ID
- associated with the job as an argument. When the table is empty, job
+ the job from the table. It will not appear in j\bjo\bob\bbs\bs output, but w\bwa\bai\bit\bt
+ will report its exit status, as long as it's supplied the process ID
+ associated with the job as an argument. When the table is empty, job
numbers start over at 1.
- If a user attempts to exit b\bba\bas\bsh\bh while jobs are stopped (or, if the
- c\bch\bhe\bec\bck\bkj\bjo\bob\bbs\bs shell option has been enabled using the s\bsh\bho\bop\bpt\bt builtin, run-
+ If a user attempts to exit b\bba\bas\bsh\bh while jobs are stopped (or, if the
+ c\bch\bhe\bec\bck\bkj\bjo\bob\bbs\bs shell option has been enabled using the s\bsh\bho\bop\bpt\bt builtin, run-
ning), the shell prints a warning message, and, if the c\bch\bhe\bec\bck\bkj\bjo\bob\bbs\bs option
- is enabled, lists the jobs and their statuses. The j\bjo\bob\bbs\bs command may
+ is enabled, lists the jobs and their statuses. The j\bjo\bob\bbs\bs command may
then be used to inspect their status. If the user immediately attempts
- to exit again, without an intervening command, b\bba\bas\bsh\bh does not print an-
+ to exit again, without an intervening command, b\bba\bas\bsh\bh does not print an-
other warning, and terminates any stopped jobs.
- When the shell is waiting for a job or process using the w\bwa\bai\bit\bt builtin,
- and job control is enabled, w\bwa\bai\bit\bt will return when the job changes
+ When the shell is waiting for a job or process using the w\bwa\bai\bit\bt builtin,
+ and job control is enabled, w\bwa\bai\bit\bt will return when the job changes
state. The -\b-f\bf option causes w\bwa\bai\bit\bt to wait until the job or process ter-
minates before returning.
P\bPR\bRO\bOM\bMP\bPT\bTI\bIN\bNG\bG
When executing interactively, b\bba\bas\bsh\bh displays the primary prompt P\bPS\bS1\b1 when
- it is ready to read a command, and the secondary prompt P\bPS\bS2\b2 when it
+ it is ready to read a command, and the secondary prompt P\bPS\bS2\b2 when it
needs more input to complete a command.
- B\bBa\bas\bsh\bh examines the value of the array variable P\bPR\bRO\bOM\bMP\bPT\bT_\b_C\bCO\bOM\bMM\bMA\bAN\bND\bD just be-
- fore printing each primary prompt. If any elements in P\bPR\bRO\bOM\bMP\bPT\bT_\b_C\bCO\bOM\bMM\bMA\bAN\bND\bD
- are set and non-null, Bash executes each value, in numeric order, just
- as if it had been typed on the command line. B\bBa\bas\bsh\bh displays P\bPS\bS0\b0 after
+ B\bBa\bas\bsh\bh examines the value of the array variable P\bPR\bRO\bOM\bMP\bPT\bT_\b_C\bCO\bOM\bMM\bMA\bAN\bND\bD just be-
+ fore printing each primary prompt. If any elements in P\bPR\bRO\bOM\bMP\bPT\bT_\b_C\bCO\bOM\bMM\bMA\bAN\bND\bD
+ are set and non-null, Bash executes each value, in numeric order, just
+ as if it had been typed on the command line. B\bBa\bas\bsh\bh displays P\bPS\bS0\b0 after
it reads a command but before executing it.
- B\bBa\bas\bsh\bh displays P\bPS\bS4\b4 as described above before tracing each command when
+ B\bBa\bas\bsh\bh displays P\bPS\bS4\b4 as described above before tracing each command when
the -\b-x\bx option is enabled.
B\bBa\bas\bsh\bh allows the prompt strings P\bPS\bS0\b0, P\bPS\bS1\b1, P\bPS\bS2\b2, and P\bPS\bS4\b4, to be customized
- by inserting a number of backslash-escaped special characters that are
+ by inserting a number of backslash-escaped special characters that are
decoded as follows:
\\b\a\ba An ASCII bell character (07).
- \\b\d\bd The date in "Weekday Month Date" format (e.g., "Tue May
+ \\b\d\bd The date in "Weekday Month Date" format (e.g., "Tue May
26").
\\b\D\bD{\b{_\bf_\bo_\br_\bm_\ba_\bt}\b}
The _\bf_\bo_\br_\bm_\ba_\bt is passed to _\bs_\bt_\br_\bf_\bt_\bi_\bm_\be(3) and the result is in-
serted into the prompt string; an empty _\bf_\bo_\br_\bm_\ba_\bt results in
- a locale-specific time representation. The braces are
+ a locale-specific time representation. The braces are
required.
\\b\e\be An ASCII escape character (033).
\\b\h\bh The hostname up to the first ".".
\\b\H\bH The hostname.
\\b\j\bj The number of jobs currently managed by the shell.
- \\b\l\bl The basename of the shell's terminal device name (e.g.,
+ \\b\l\bl The basename of the shell's terminal device name (e.g.,
"ttys0").
\\b\n\bn A newline.
\\b\r\br A carriage return.
- \\b\s\bs The name of the shell: the basename of $\b$0\b0 (the portion
+ \\b\s\bs The name of the shell: the basename of $\b$0\b0 (the portion
following the final slash).
\\b\t\bt The current time in 24-hour HH:MM:SS format.
\\b\T\bT The current time in 12-hour HH:MM:SS format.
\\b\u\bu The username of the current user.
\\b\v\bv The b\bba\bas\bsh\bh version (e.g., 2.00).
\\b\V\bV The b\bba\bas\bsh\bh release, version + patch level (e.g., 2.00.0)
- \\b\w\bw The value of the P\bPW\bWD\bD shell variable ($\b$P\bPW\bWD\bD), with $\b$H\bHO\bOM\bME\bE
- abbreviated with a tilde (uses the value of the
+ \\b\w\bw The value of the P\bPW\bWD\bD shell variable ($\b$P\bPW\bWD\bD), with $\b$H\bHO\bOM\bME\bE
+ abbreviated with a tilde (uses the value of the
P\bPR\bRO\bOM\bMP\bPT\bT_\b_D\bDI\bIR\bRT\bTR\bRI\bIM\bM variable).
- \\b\W\bW The basename of $\b$P\bPW\bWD\bD, with $\b$H\bHO\bOM\bME\bE abbreviated with a
+ \\b\W\bW The basename of $\b$P\bPW\bWD\bD, with $\b$H\bHO\bOM\bME\bE abbreviated with a
tilde.
\\b\!\b! The history number of this command.
\\b\#\b# The command number of this command.
\\b\$\b$ If the effective UID is 0, a #\b#, otherwise a $\b$.
\\b\_\bn_\bn_\bn The character corresponding to the octal number _\bn_\bn_\bn.
\\b\\\b\ A backslash.
- \\b\[\b[ Begin a sequence of non-printing characters, which could
- be used to embed a terminal control sequence into the
+ \\b\[\b[ Begin a sequence of non-printing characters, which could
+ be used to embed a terminal control sequence into the
prompt.
\\b\]\b] End a sequence of non-printing characters.
- The command number and the history number are usually different: the
- history number of a command is its position in the history list, which
- may include commands restored from the history file (see H\bHI\bIS\bST\bTO\bOR\bRY\bY be-
- low), while the command number is the position in the sequence of com-
- mands executed during the current shell session. After the string is
- decoded, it is expanded via parameter expansion, command substitution,
- arithmetic expansion, and quote removal, subject to the value of the
+ The command number and the history number are usually different: the
+ history number of a command is its position in the history list, which
+ may include commands restored from the history file (see H\bHI\bIS\bST\bTO\bOR\bRY\bY be-
+ low), while the command number is the position in the sequence of com-
+ mands executed during the current shell session. After the string is
+ decoded, it is expanded via parameter expansion, command substitution,
+ arithmetic expansion, and quote removal, subject to the value of the
p\bpr\bro\bom\bmp\bpt\btv\bva\bar\brs\bs shell option (see the description of the s\bsh\bho\bop\bpt\bt command under
- S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below). This can have unwanted side effects if
- escaped portions of the string appear within command substitution or
+ S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below). This can have unwanted side effects if
+ escaped portions of the string appear within command substitution or
contain characters special to word expansion.
R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE
- This is the library that handles reading input when using an interac-
- tive shell, unless the -\b--\b-n\bno\boe\bed\bdi\bit\bti\bin\bng\bg option is supplied at shell invoca-
- tion. Line editing is also used when using the -\b-e\be option to the r\bre\bea\bad\bd
+ This is the library that handles reading input when using an interac-
+ tive shell, unless the -\b--\b-n\bno\boe\bed\bdi\bit\bti\bin\bng\bg option is supplied at shell invoca-
+ tion. Line editing is also used when using the -\b-e\be option to the r\bre\bea\bad\bd
builtin. By default, the line editing commands are similar to those of
emacs; a vi-style line editing interface is also available. Line edit-
- ing can be enabled at any time using the -\b-o\bo e\bem\bma\bac\bcs\bs or -\b-o\bo v\bvi\bi options to
- the s\bse\bet\bt builtin (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below). To turn off line
- editing after the shell is running, use the +\b+o\bo e\bem\bma\bac\bcs\bs or +\b+o\bo v\bvi\bi options
+ ing can be enabled at any time using the -\b-o\bo e\bem\bma\bac\bcs\bs or -\b-o\bo v\bvi\bi options to
+ the s\bse\bet\bt builtin (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below). To turn off line
+ editing after the shell is running, use the +\b+o\bo e\bem\bma\bac\bcs\bs or +\b+o\bo v\bvi\bi options
to the s\bse\bet\bt builtin.
R\bRe\bea\bad\bdl\bli\bin\bne\be N\bNo\bot\bta\bat\bti\bio\bon\bn
- This section uses Emacs-style editing concepts and uses its notation
- for keystrokes. Control keys are denoted by C-_\bk_\be_\by, e.g., C-n means
- Control-N. Similarly, _\bm_\be_\bt_\ba keys are denoted by M-_\bk_\be_\by, so M-x means
+ This section uses Emacs-style editing concepts and uses its notation
+ for keystrokes. Control keys are denoted by C-_\bk_\be_\by, e.g., C-n means
+ Control-N. Similarly, _\bm_\be_\bt_\ba keys are denoted by M-_\bk_\be_\by, so M-x means
Meta-X. The Meta key is often labeled "Alt" or "Option".
- On keyboards without a _\bM_\be_\bt_\ba key, M-_\bx means ESC _\bx, i.e., press and re-
- lease the Escape key, then press and release the _\bx key, in sequence.
- This makes ESC the _\bm_\be_\bt_\ba _\bp_\br_\be_\bf_\bi_\bx. The combination M-C-_\bx means ESC Con-
- trol-_\bx: press and release the Escape key, then press and hold the Con-
+ On keyboards without a _\bM_\be_\bt_\ba key, M-_\bx means ESC _\bx, i.e., press and re-
+ lease the Escape key, then press and release the _\bx key, in sequence.
+ This makes ESC the _\bm_\be_\bt_\ba _\bp_\br_\be_\bf_\bi_\bx. The combination M-C-_\bx means ESC Con-
+ trol-_\bx: press and release the Escape key, then press and hold the Con-
trol key while pressing the _\bx key, then release both.
- On some keyboards, the Meta key modifier produces characters with the
- eighth bit (0200) set. You can use the e\ben\bna\bab\bbl\ble\be-\b-m\bme\bet\bta\ba-\b-k\bke\bey\by variable to
- control whether or not it does this, if the keyboard allows it. On
- many others, the terminal or terminal emulator converts the metafied
- key to a key sequence beginning with ESC as described in the preceding
+ On some keyboards, the Meta key modifier produces characters with the
+ eighth bit (0200) set. You can use the e\ben\bna\bab\bbl\ble\be-\b-m\bme\bet\bta\ba-\b-k\bke\bey\by variable to
+ control whether or not it does this, if the keyboard allows it. On
+ many others, the terminal or terminal emulator converts the metafied
+ key to a key sequence beginning with ESC as described in the preceding
paragraph.
- If your _\bM_\be_\bt_\ba key produces a key sequence with the ESC meta prefix, you
- can make M-_\bk_\be_\by key bindings you specify (see R\bRe\bea\bad\bdl\bli\bin\bne\be K\bKe\bey\by B\bBi\bin\bnd\bdi\bin\bng\bgs\bs be-
+ If your _\bM_\be_\bt_\ba key produces a key sequence with the ESC meta prefix, you
+ can make M-_\bk_\be_\by key bindings you specify (see R\bRe\bea\bad\bdl\bli\bin\bne\be K\bKe\bey\by B\bBi\bin\bnd\bdi\bin\bng\bgs\bs be-
low) do the same thing by setting the f\bfo\bor\brc\bce\be-\b-m\bme\bet\bta\ba-\b-p\bpr\bre\bef\bfi\bix\bx variable.
R\bRe\bea\bad\bdl\bli\bin\bne\be commands may be given numeric _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs, which normally act as
- a repeat count. Sometimes, however, it is the sign of the argument
- that is significant. Passing a negative argument to a command that
- acts in the forward direction (e.g., k\bki\bil\bll\bl-\b-l\bli\bin\bne\be) makes that command act
- in a backward direction. Commands whose behavior with arguments devi-
+ a repeat count. Sometimes, however, it is the sign of the argument
+ that is significant. Passing a negative argument to a command that
+ acts in the forward direction (e.g., k\bki\bil\bll\bl-\b-l\bli\bin\bne\be) makes that command act
+ in a backward direction. Commands whose behavior with arguments devi-
ates from this are noted below.
- The _\bp_\bo_\bi_\bn_\bt is the current cursor position, and _\bm_\ba_\br_\bk refers to a saved
+ The _\bp_\bo_\bi_\bn_\bt is the current cursor position, and _\bm_\ba_\br_\bk refers to a saved
cursor position. The text between the point and mark is referred to as
the _\br_\be_\bg_\bi_\bo_\bn. R\bRe\bea\bad\bdl\bli\bin\bne\be has the concept of an _\ba_\bc_\bt_\bi_\bv_\be _\br_\be_\bg_\bi_\bo_\bn: when the re-
- gion is active, r\bre\bea\bad\bdl\bli\bin\bne\be redisplay highlights the region using the
+ gion is active, r\bre\bea\bad\bdl\bli\bin\bne\be redisplay highlights the region using the
value of the a\bac\bct\bti\biv\bve\be-\b-r\bre\beg\bgi\bio\bon\bn-\b-s\bst\bta\bar\brt\bt-\b-c\bco\bol\blo\bor\br variable. The e\ben\bna\bab\bbl\ble\be-\b-a\bac\bct\bti\biv\bve\be-\b-r\bre\be-\b-
- g\bgi\bio\bon\bn variable turns this on and off. Several commands set the region
+ g\bgi\bio\bon\bn variable turns this on and off. Several commands set the region
to active; those are noted below.
- When a command is described as _\bk_\bi_\bl_\bl_\bi_\bn_\bg text, the text deleted is saved
+ When a command is described as _\bk_\bi_\bl_\bl_\bi_\bn_\bg text, the text deleted is saved
for possible future retrieval (_\by_\ba_\bn_\bk_\bi_\bn_\bg). The killed text is saved in a
- _\bk_\bi_\bl_\bl _\br_\bi_\bn_\bg. Consecutive kills accumulate the deleted text into one
+ _\bk_\bi_\bl_\bl _\br_\bi_\bn_\bg. Consecutive kills accumulate the deleted text into one
unit, which can be yanked all at once. Commands which do not kill text
separate the chunks of text on the kill ring.
R\bRe\bea\bad\bdl\bli\bin\bne\be I\bIn\bni\bit\bti\bia\bal\bli\biz\bza\bat\bti\bio\bon\bn
- R\bRe\bea\bad\bdl\bli\bin\bne\be is customized by putting commands in an initialization file
- (the _\bi_\bn_\bp_\bu_\bt_\br_\bc file). The name of this file is taken from the value of
- the I\bIN\bNP\bPU\bUT\bTR\bRC\bC shell variable. If that variable is unset, the default is
- _\b~_\b/_\b._\bi_\bn_\bp_\bu_\bt_\br_\bc. If that file does not exist or cannot be read, r\bre\bea\bad\bdl\bli\bin\bne\be
- looks for _\b/_\be_\bt_\bc_\b/_\bi_\bn_\bp_\bu_\bt_\br_\bc. When a program that uses the r\bre\bea\bad\bdl\bli\bin\bne\be library
- starts up, r\bre\bea\bad\bdl\bli\bin\bne\be reads the initialization file and sets the key
+ R\bRe\bea\bad\bdl\bli\bin\bne\be is customized by putting commands in an initialization file
+ (the _\bi_\bn_\bp_\bu_\bt_\br_\bc file). The name of this file is taken from the value of
+ the I\bIN\bNP\bPU\bUT\bTR\bRC\bC shell variable. If that variable is unset, the default is
+ _\b~_\b/_\b._\bi_\bn_\bp_\bu_\bt_\br_\bc. If that file does not exist or cannot be read, r\bre\bea\bad\bdl\bli\bin\bne\be
+ looks for _\b/_\be_\bt_\bc_\b/_\bi_\bn_\bp_\bu_\bt_\br_\bc. When a program that uses the r\bre\bea\bad\bdl\bli\bin\bne\be library
+ starts up, r\bre\bea\bad\bdl\bli\bin\bne\be reads the initialization file and sets the key
bindings and variables found there, before reading any user input.
- There are only a few basic constructs allowed in the inputrc file.
+ There are only a few basic constructs allowed in the inputrc file.
Blank lines are ignored. Lines beginning with a #\b# are comments. Lines
beginning with a $\b$ indicate conditional constructs. Other lines denote
key bindings and variable settings.
The default key-bindings in this section may be changed using key bind-
- ing commands in the _\bi_\bn_\bp_\bu_\bt_\br_\bc file. Programs that use the r\bre\bea\bad\bdl\bli\bin\bne\be li-
+ ing commands in the _\bi_\bn_\bp_\bu_\bt_\br_\bc file. Programs that use the r\bre\bea\bad\bdl\bli\bin\bne\be li-
brary, including b\bba\bas\bsh\bh, may add their own commands and bindings.
For example, placing
or
C-Meta-u: universal-argument
- into the _\bi_\bn_\bp_\bu_\bt_\br_\bc would make M-C-u execute the r\bre\bea\bad\bdl\bli\bin\bne\be command _\bu_\bn_\bi_\bv_\be_\br_\b-
+ into the _\bi_\bn_\bp_\bu_\bt_\br_\bc would make M-C-u execute the r\bre\bea\bad\bdl\bli\bin\bne\be command _\bu_\bn_\bi_\bv_\be_\br_\b-
_\bs_\ba_\bl_\b-_\ba_\br_\bg_\bu_\bm_\be_\bn_\bt.
- Key bindings may contain the following symbolic character names: _\bD_\bE_\bL,
- _\bE_\bS_\bC, _\bE_\bS_\bC_\bA_\bP_\bE, _\bL_\bF_\bD, _\bN_\bE_\bW_\bL_\bI_\bN_\bE, _\bR_\bE_\bT, _\bR_\bE_\bT_\bU_\bR_\bN, _\bR_\bU_\bB_\bO_\bU_\bT (a destructive back-
+ Key bindings may contain the following symbolic character names: _\bD_\bE_\bL,
+ _\bE_\bS_\bC, _\bE_\bS_\bC_\bA_\bP_\bE, _\bL_\bF_\bD, _\bN_\bE_\bW_\bL_\bI_\bN_\bE, _\bR_\bE_\bT, _\bR_\bE_\bT_\bU_\bR_\bN, _\bR_\bU_\bB_\bO_\bU_\bT (a destructive back-
space), _\bS_\bP_\bA_\bC_\bE, _\bS_\bP_\bC, and _\bT_\bA_\bB.
- In addition to command names, r\bre\bea\bad\bdl\bli\bin\bne\be allows keys to be bound to a
+ In addition to command names, r\bre\bea\bad\bdl\bli\bin\bne\be allows keys to be bound to a
string that is inserted when the key is pressed (a _\bm_\ba_\bc_\br_\bo). The differ-
- ence between a macro and a command is that a macro is enclosed in sin-
+ ence between a macro and a command is that a macro is enclosed in sin-
gle or double quotes.
R\bRe\bea\bad\bdl\bli\bin\bne\be K\bKe\bey\by B\bBi\bin\bnd\bdi\bin\bng\bgs\bs
- The syntax for controlling key bindings in the _\bi_\bn_\bp_\bu_\bt_\br_\bc file is simple.
- All that is required is the name of the command or the text of a macro
- and a key sequence to which it should be bound. The key sequence may
- be specified in one of two ways: as a symbolic key name, possibly with
- _\bM_\be_\bt_\ba_\b- or _\bC_\bo_\bn_\bt_\br_\bo_\bl_\b- prefixes, or as a key sequence composed of one or
- more characters enclosed in double quotes. The key sequence and name
- are separated by a colon. There can be no whitespace between the name
+ The syntax for controlling key bindings in the _\bi_\bn_\bp_\bu_\bt_\br_\bc file is simple.
+ All that is required is the name of the command or the text of a macro
+ and a key sequence to which it should be bound. The key sequence may
+ be specified in one of two ways: as a symbolic key name, possibly with
+ _\bM_\be_\bt_\ba_\b- or _\bC_\bo_\bn_\bt_\br_\bo_\bl_\b- prefixes, or as a key sequence composed of one or
+ more characters enclosed in double quotes. The key sequence and name
+ are separated by a colon. There can be no whitespace between the name
and the colon.
When using the form k\bke\bey\byn\bna\bam\bme\be:_\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be or _\bm_\ba_\bc_\br_\bo, _\bk_\be_\by_\bn_\ba_\bm_\be is the name
Meta-Rubout: backward-kill-word
Control-o: "> output"
- In the above example, _\bC_\b-_\bu is bound to the function u\bun\bni\biv\bve\ber\brs\bsa\bal\bl-\b-a\bar\brg\bgu\bum\bme\ben\bnt\bt,
- _\bM_\b-_\bD_\bE_\bL is bound to the function b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-k\bki\bil\bll\bl-\b-w\bwo\bor\brd\bd, and _\bC_\b-_\bo is bound to
- run the macro expressed on the right hand side (that is, to insert the
+ In the above example, _\bC_\b-_\bu is bound to the function u\bun\bni\biv\bve\ber\brs\bsa\bal\bl-\b-a\bar\brg\bgu\bum\bme\ben\bnt\bt,
+ _\bM_\b-_\bD_\bE_\bL is bound to the function b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-k\bki\bil\bll\bl-\b-w\bwo\bor\brd\bd, and _\bC_\b-_\bo is bound to
+ run the macro expressed on the right hand side (that is, to insert the
text "> output" into the line).
- In the second form, "\b"k\bke\bey\bys\bse\beq\bq"\b":_\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be or _\bm_\ba_\bc_\br_\bo, k\bke\bey\bys\bse\beq\bq differs
- from k\bke\bey\byn\bna\bam\bme\be above in that strings denoting an entire key sequence may
- be specified by placing the sequence within double quotes. Some GNU
- Emacs style key escapes can be used, as in the following example, but
+ In the second form, "\b"k\bke\bey\bys\bse\beq\bq"\b":_\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be or _\bm_\ba_\bc_\br_\bo, k\bke\bey\bys\bse\beq\bq differs
+ from k\bke\bey\byn\bna\bam\bme\be above in that strings denoting an entire key sequence may
+ be specified by placing the sequence within double quotes. Some GNU
+ Emacs style key escapes can be used, as in the following example, but
none of the symbolic character names are recognized.
"\C-u": universal-argument
"\e[11~": "Function Key 1"
In this example, _\bC_\b-_\bu is again bound to the function u\bun\bni\biv\bve\ber\brs\bsa\bal\bl-\b-a\bar\brg\bgu\bum\bme\ben\bnt\bt.
- _\bC_\b-_\bx _\bC_\b-_\br is bound to the function r\bre\be-\b-r\bre\bea\bad\bd-\b-i\bin\bni\bit\bt-\b-f\bfi\bil\ble\be, and _\bE_\bS_\bC _\b[ _\b1 _\b1 _\b~ is
+ _\bC_\b-_\bx _\bC_\b-_\br is bound to the function r\bre\be-\b-r\bre\bea\bad\bd-\b-i\bin\bni\bit\bt-\b-f\bfi\bil\ble\be, and _\bE_\bS_\bC _\b[ _\b1 _\b1 _\b~ is
bound to insert the text "Function Key 1".
- The full set of GNU Emacs style escape sequences available when speci-
+ The full set of GNU Emacs style escape sequences available when speci-
fying key sequences is
\\b\C\bC-\b- A control prefix.
- \\b\M\bM-\b- Adding the meta prefix or converting the following char-
- acter to a meta character, as described below under
+ \\b\M\bM-\b- Adding the meta prefix or converting the following char-
+ acter to a meta character, as described below under
f\bfo\bor\brc\bce\be-\b-m\bme\bet\bta\ba-\b-p\bpr\bre\bef\bfi\bix\bx.
\\b\e\be An escape character.
\\b\\\b\ Backslash.
\\b\"\b" Literal ", a double quote.
\\b\'\b' Literal ', a single quote.
- In addition to the GNU Emacs style escape sequences, a second set of
+ In addition to the GNU Emacs style escape sequences, a second set of
backslash escapes is available:
\\b\a\ba alert (bell)
\\b\b\bb backspace
\\b\r\br carriage return
\\b\t\bt horizontal tab
\\b\v\bv vertical tab
- \\b\_\bn_\bn_\bn The eight-bit character whose value is the octal value
+ \\b\_\bn_\bn_\bn The eight-bit character whose value is the octal value
_\bn_\bn_\bn (one to three digits).
- \\b\x\bx_\bH_\bH The eight-bit character whose value is the hexadecimal
+ \\b\x\bx_\bH_\bH The eight-bit character whose value is the hexadecimal
value _\bH_\bH (one or two hex digits).
When entering the text of a macro, single or double quotes must be used
to indicate a macro definition. Unquoted text is assumed to be a func-
- tion name. The backslash escapes described above are expanded in the
- macro body. Backslash quotes any other character in the macro text,
+ tion name. The backslash escapes described above are expanded in the
+ macro body. Backslash quotes any other character in the macro text,
including " and '.
- B\bBa\bas\bsh\bh will display or modify the current r\bre\bea\bad\bdl\bli\bin\bne\be key bindings with the
+ B\bBa\bas\bsh\bh will display or modify the current r\bre\bea\bad\bdl\bli\bin\bne\be key bindings with the
b\bbi\bin\bnd\bd builtin command. The -\b-o\bo e\bem\bma\bac\bcs\bs or -\b-o\bo v\bvi\bi options to the s\bse\bet\bt builtin
- (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below) change the editing mode during in-
+ (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below) change the editing mode during in-
teractive use.
R\bRe\bea\bad\bdl\bli\bin\bne\be V\bVa\bar\bri\bia\bab\bbl\ble\bes\bs
s\bse\bet\bt _\bv_\ba_\br_\bi_\ba_\bb_\bl_\be_\b-_\bn_\ba_\bm_\be _\bv_\ba_\bl_\bu_\be
or using the b\bbi\bin\bnd\bd builtin command (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below).
- Except where noted, r\bre\bea\bad\bdl\bli\bin\bne\be variables can take the values O\bOn\bn or O\bOf\bff\bf
- (without regard to case). Unrecognized variable names are ignored.
+ Except where noted, r\bre\bea\bad\bdl\bli\bin\bne\be variables can take the values O\bOn\bn or O\bOf\bff\bf
+ (without regard to case). Unrecognized variable names are ignored.
When r\bre\bea\bad\bdl\bli\bin\bne\be reads a variable value, empty or null values, "on" (case-
- insensitive), and "1" are equivalent to O\bOn\bn. All other values are
+ insensitive), and "1" are equivalent to O\bOn\bn. All other values are
equivalent to O\bOf\bff\bf.
- The b\bbi\bin\bnd\bd -\b-V\bV command lists the current r\bre\bea\bad\bdl\bli\bin\bne\be variable names and val-
+ The b\bbi\bin\bnd\bd -\b-V\bV command lists the current r\bre\bea\bad\bdl\bli\bin\bne\be variable names and val-
ues (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below).
The variables and their default values are:
a\bac\bct\bti\biv\bve\be-\b-r\bre\beg\bgi\bio\bon\bn-\b-s\bst\bta\bar\brt\bt-\b-c\bco\bol\blo\bor\br
- A string variable that controls the text color and background
- when displaying the text in the active region (see the descrip-
- tion of e\ben\bna\bab\bbl\ble\be-\b-a\bac\bct\bti\biv\bve\be-\b-r\bre\beg\bgi\bio\bon\bn below). This string must not take
+ A string variable that controls the text color and background
+ when displaying the text in the active region (see the descrip-
+ tion of e\ben\bna\bab\bbl\ble\be-\b-a\bac\bct\bti\biv\bve\be-\b-r\bre\beg\bgi\bio\bon\bn 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 ter-
+ 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 ter-
minfo description. A sample value might be "\e[01;33m".
a\bac\bct\bti\biv\bve\be-\b-r\bre\beg\bgi\bio\bon\bn-\b-e\ben\bnd\bd-\b-c\bco\bol\blo\bor\br
- A string variable that "undoes" the effects of a\bac\bct\bti\biv\bve\be-\b-r\bre\be-\b-
- g\bgi\bio\bon\bn-\b-s\bst\bta\bar\brt\bt-\b-c\bco\bol\blo\bor\br and restores "normal" terminal display appear-
- ance after displaying text in the active region. This string
- must not take up any physical character positions on the dis-
- play, 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 ob-
+ A string variable that "undoes" the effects of a\bac\bct\bti\biv\bve\be-\b-r\bre\be-\b-
+ g\bgi\bio\bon\bn-\b-s\bst\bta\bar\brt\bt-\b-c\bco\bol\blo\bor\br and restores "normal" terminal display appear-
+ ance after displaying text in the active region. This string
+ must not take up any physical character positions on the dis-
+ play, 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 ob-
tained from the terminal's terminfo description. A sample value
might be "\e[0m".
b\bbe\bel\bll\bl-\b-s\bst\bty\byl\ble\be (\b(a\bau\bud\bdi\bib\bbl\ble\be)\b)
- Controls what happens when r\bre\bea\bad\bdl\bli\bin\bne\be wants to ring the terminal
+ Controls what happens when r\bre\bea\bad\bdl\bli\bin\bne\be wants to ring the terminal
bell. If set to n\bno\bon\bne\be, r\bre\bea\bad\bdl\bli\bin\bne\be never rings the bell. If set to
- v\bvi\bis\bsi\bib\bbl\ble\be, r\bre\bea\bad\bdl\bli\bin\bne\be uses a visible bell if one is available. If
+ v\bvi\bis\bsi\bib\bbl\ble\be, r\bre\bea\bad\bdl\bli\bin\bne\be uses a visible bell if one is available. If
set to a\bau\bud\bdi\bib\bbl\ble\be, r\bre\bea\bad\bdl\bli\bin\bne\be attempts to ring the terminal's bell.
b\bbi\bin\bnd\bd-\b-t\btt\bty\by-\b-s\bsp\bpe\bec\bci\bia\bal\bl-\b-c\bch\bha\bar\brs\bs (\b(O\bOn\bn)\b)
- If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be attempts to bind the control characters
- that are treated specially by the kernel's terminal driver to
+ If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be attempts to bind the control characters
+ that are treated specially by the kernel's terminal driver to
their r\bre\bea\bad\bdl\bli\bin\bne\be equivalents. These override the default r\bre\bea\bad\bdl\bli\bin\bne\be
bindings described here. Type "stty -a" at a b\bba\bas\bsh\bh prompt to see
- your current terminal settings, including the special control
- characters (usually c\bcc\bch\bha\bar\brs\bs). This binding takes place on each
+ your current terminal settings, including the special control
+ characters (usually c\bcc\bch\bha\bar\brs\bs). This binding takes place on each
call to r\bre\bea\bad\bdl\bli\bin\bne\be, so changes made by "stty" can take effect.
b\bbl\bli\bin\bnk\bk-\b-m\bma\bat\btc\bch\bhi\bin\bng\bg-\b-p\bpa\bar\bre\ben\bn (\b(O\bOf\bff\bf)\b)
If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be attempts to briefly move the cursor to an
opening parenthesis when a closing parenthesis is inserted.
c\bco\bol\blo\bor\bre\bed\bd-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn-\b-p\bpr\bre\bef\bfi\bix\bx (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, when listing completions, r\bre\bea\bad\bdl\bli\bin\bne\be displays the
+ If set to O\bOn\bn, when listing completions, r\bre\bea\bad\bdl\bli\bin\bne\be displays the
common prefix of the set of possible completions using a differ-
- ent color. The color definitions are taken from the value of
+ ent color. The color definitions are taken from the value of
the L\bLS\bS_\b_C\bCO\bOL\bLO\bOR\bRS\bS environment variable. If there is a color defini-
tion in $\b$L\bLS\bS_\b_C\bCO\bOL\bLO\bOR\bRS\bS for the custom suffix ".readline-colored-com-
- pletion-prefix", r\bre\bea\bad\bdl\bli\bin\bne\be uses this color for the common prefix
+ pletion-prefix", r\bre\bea\bad\bdl\bli\bin\bne\be uses this color for the common prefix
instead of its default.
c\bco\bol\blo\bor\bre\bed\bd-\b-s\bst\bta\bat\bts\bs (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be displays possible completions using dif-
- ferent colors to indicate their file type. The color defini-
- tions are taken from the value of the L\bLS\bS_\b_C\bCO\bOL\bLO\bOR\bRS\bS environment
+ If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be displays possible completions using dif-
+ ferent colors to indicate their file type. The color defini-
+ tions are taken from the value of the L\bLS\bS_\b_C\bCO\bOL\bLO\bOR\bRS\bS environment
variable.
c\bco\bom\bmm\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bn (\b("#\b#")\b)
- The string that the r\bre\bea\bad\bdl\bli\bin\bne\be i\bin\bns\bse\ber\brt\bt-\b-c\bco\bom\bmm\bme\ben\bnt\bt command inserts.
- This command is bound to M\bM-\b-#\b# in emacs mode and to #\b# in vi com-
+ The string that the r\bre\bea\bad\bdl\bli\bin\bne\be i\bin\bns\bse\ber\brt\bt-\b-c\bco\bom\bmm\bme\ben\bnt\bt command inserts.
+ This command is bound to M\bM-\b-#\b# in emacs mode and to #\b# in vi com-
mand mode.
c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn-\b-d\bdi\bis\bsp\bpl\bla\bay\by-\b-w\bwi\bid\bdt\bth\bh (\b(-\b-1\b1)\b)
- The number of screen columns used to display possible matches
- when performing completion. The value is ignored if it is less
- than 0 or greater than the terminal screen width. A value of 0
- causes matches to be displayed one per line. The default value
+ The number of screen columns used to display possible matches
+ when performing completion. The value is ignored if it is less
+ than 0 or greater than the terminal screen width. A value of 0
+ causes matches to be displayed one per line. The default value
is -1.
c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn-\b-i\big\bgn\bno\bor\bre\be-\b-c\bca\bas\bse\be (\b(O\bOf\bff\bf)\b)
If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be performs filename matching and completion
in a case-insensitive fashion.
c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn-\b-m\bma\bap\bp-\b-c\bca\bas\bse\be (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, and c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn-\b-i\big\bgn\bno\bor\bre\be-\b-c\bca\bas\bse\be is enabled, r\bre\bea\bad\bdl\bli\bin\bne\be
- treats hyphens (_\b-) and underscores (_\b_) as equivalent when per-
+ If set to O\bOn\bn, and c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn-\b-i\big\bgn\bno\bor\bre\be-\b-c\bca\bas\bse\be is enabled, r\bre\bea\bad\bdl\bli\bin\bne\be
+ treats hyphens (_\b-) and underscores (_\b_) as equivalent when per-
forming case-insensitive filename matching and completion.
c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn-\b-p\bpr\bre\bef\bfi\bix\bx-\b-d\bdi\bis\bsp\bpl\bla\bay\by-\b-l\ble\ben\bng\bgt\bth\bh (\b(0\b0)\b)
- The maximum length in characters of the common prefix of a list
- of possible completions that is displayed without modification.
- When set to a value greater than zero, r\bre\bea\bad\bdl\bli\bin\bne\be replaces common
+ The maximum length in characters of the common prefix of a list
+ of possible completions that is displayed without modification.
+ When set to a value greater than zero, r\bre\bea\bad\bdl\bli\bin\bne\be replaces common
prefixes longer than this value with an ellipsis when displaying
possible completions. If a completion begins with a period, and
- e\bea\bad\bdl\bli\bin\bne\be is completing filenames, it uses three underscores in-
+ e\bea\bad\bdl\bli\bin\bne\be is completing filenames, it uses three underscores in-
stead of an ellipsis.
c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn-\b-q\bqu\bue\ber\bry\by-\b-i\bit\bte\bem\bms\bs (\b(1\b10\b00\b0)\b)
- This determines when the user is queried about viewing the num-
- ber of possible completions generated by the p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-c\bco\bom\bmp\bpl\ble\be-\b-
- t\bti\bio\bon\bns\bs command. It may be set to any integer value greater than
- or equal to zero. If the number of possible completions is
- greater than or equal to the value of this variable, r\bre\bea\bad\bdl\bli\bin\bne\be
- asks whether or not the user wishes to view them; otherwise
- r\bre\bea\bad\bdl\bli\bin\bne\be simply lists them on the terminal. A zero value means
+ This determines when the user is queried about viewing the num-
+ ber of possible completions generated by the p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-c\bco\bom\bmp\bpl\ble\be-\b-
+ t\bti\bio\bon\bns\bs command. It may be set to any integer value greater than
+ or equal to zero. If the number of possible completions is
+ greater than or equal to the value of this variable, r\bre\bea\bad\bdl\bli\bin\bne\be
+ asks whether or not the user wishes to view them; otherwise
+ r\bre\bea\bad\bdl\bli\bin\bne\be simply lists them on the terminal. A zero value means
r\bre\bea\bad\bdl\bli\bin\bne\be should never ask; negative values are treated as zero.
c\bco\bon\bnv\bve\ber\brt\bt-\b-m\bme\bet\bta\ba (\b(O\bOn\bn)\b)
- If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be converts characters it reads that have
- the eighth bit set to an ASCII key sequence by clearing the
+ If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be converts characters it reads that have
+ the eighth bit set to an ASCII key sequence by clearing the
eighth bit and prefixing it with an escape character (converting
- the character to have the meta prefix). The default is _\bO_\bn, but
- r\bre\bea\bad\bdl\bli\bin\bne\be sets it to _\bO_\bf_\bf if the locale contains characters whose
+ the character to have the meta prefix). The default is _\bO_\bn, but
+ r\bre\bea\bad\bdl\bli\bin\bne\be sets it to _\bO_\bf_\bf if the locale contains characters whose
encodings may include bytes with the eighth bit set. This vari-
- able is dependent on the L\bLC\bC_\b_C\bCT\bTY\bYP\bPE\bE locale category, and may
- change if the locale changes. This variable also affects key
+ able is dependent on the L\bLC\bC_\b_C\bCT\bTY\bYP\bPE\bE locale category, and may
+ change if the locale changes. This variable also affects key
bindings; see the description of f\bfo\bor\brc\bce\be-\b-m\bme\bet\bta\ba-\b-p\bpr\bre\bef\bfi\bix\bx below.
d\bdi\bis\bsa\bab\bbl\ble\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be inhibits word completion. Completion
+ If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be inhibits word completion. Completion
characters are inserted into the line as if they had been mapped
to s\bse\bel\blf\bf-\b-i\bin\bns\bse\ber\brt\bt.
e\bec\bch\bho\bo-\b-c\bco\bon\bnt\btr\bro\bol\bl-\b-c\bch\bha\bar\bra\bac\bct\bte\ber\brs\bs (\b(O\bOn\bn)\b)
- When set to O\bOn\bn, on operating systems that indicate they support
+ When set to O\bOn\bn, on operating systems that indicate they support
it, r\bre\bea\bad\bdl\bli\bin\bne\be echoes a character corresponding to a signal gener-
ated from the keyboard.
e\bed\bdi\bit\bti\bin\bng\bg-\b-m\bmo\bod\bde\be (\b(e\bem\bma\bac\bcs\bs)\b)
- Controls whether r\bre\bea\bad\bdl\bli\bin\bne\be uses a set of key bindings similar to
+ Controls whether r\bre\bea\bad\bdl\bli\bin\bne\be uses a set of key bindings similar to
_\bE_\bm_\ba_\bc_\bs or _\bv_\bi. e\bed\bdi\bit\bti\bin\bng\bg-\b-m\bmo\bod\bde\be can be set to either e\bem\bma\bac\bcs\bs or v\bvi\bi.
e\bem\bma\bac\bcs\bs-\b-m\bmo\bod\bde\be-\b-s\bst\btr\bri\bin\bng\bg (\b(@\b@)\b)
- If the _\bs_\bh_\bo_\bw_\b-_\bm_\bo_\bd_\be_\b-_\bi_\bn_\b-_\bp_\br_\bo_\bm_\bp_\bt variable is enabled, this string is
+ If the _\bs_\bh_\bo_\bw_\b-_\bm_\bo_\bd_\be_\b-_\bi_\bn_\b-_\bp_\br_\bo_\bm_\bp_\bt variable is enabled, this string is
displayed immediately before the last line of the primary prompt
when emacs editing mode is active. The value is expanded like a
- key binding, so the standard set of meta- and control- prefixes
- and backslash escape sequences is available. The \1 and \2 es-
- capes begin and end sequences of non-printing characters, which
- can be used to embed a terminal control sequence into the mode
+ key binding, so the standard set of meta- and control- prefixes
+ and backslash escape sequences is available. The \1 and \2 es-
+ capes begin and end sequences of non-printing characters, which
+ can be used to embed a terminal control sequence into the mode
string.
e\ben\bna\bab\bbl\ble\be-\b-a\bac\bct\bti\biv\bve\be-\b-r\bre\beg\bgi\bio\bon\bn (\b(O\bOn\bn)\b)
- When this variable is set to _\bO_\bn, r\bre\bea\bad\bdl\bli\bin\bne\be allows certain com-
+ When this variable is set to _\bO_\bn, r\bre\bea\bad\bdl\bli\bin\bne\be allows certain com-
mands to designate the region as _\ba_\bc_\bt_\bi_\bv_\be. When the region is ac-
tive, r\bre\bea\bad\bdl\bli\bin\bne\be highlights the text in the region using the value
of the a\bac\bct\bti\biv\bve\be-\b-r\bre\beg\bgi\bio\bon\bn-\b-s\bst\bta\bar\brt\bt-\b-c\bco\bol\blo\bor\br variable, which defaults to the
- string that enables the terminal's standout mode. The active
+ string that enables the terminal's standout mode. The active
region shows the text inserted by bracketed-paste and any match-
ing text found by incremental and non-incremental history
searches.
e\ben\bna\bab\bbl\ble\be-\b-b\bbr\bra\bac\bck\bke\bet\bte\bed\bd-\b-p\bpa\bas\bst\bte\be (\b(O\bOn\bn)\b)
- When set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be 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 _\bb_\br_\ba_\bc_\bk_\be_\bt_\be_\bd_\b-_\bp_\ba_\bs_\bt_\be _\bm_\bo_\bd_\be; it prevents
- r\bre\bea\bad\bdl\bli\bin\bne\be from executing any editing commands bound to key se-
+ When set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be 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 _\bb_\br_\ba_\bc_\bk_\be_\bt_\be_\bd_\b-_\bp_\ba_\bs_\bt_\be _\bm_\bo_\bd_\be; it prevents
+ r\bre\bea\bad\bdl\bli\bin\bne\be from executing any editing commands bound to key se-
quences appearing in the pasted text.
e\ben\bna\bab\bbl\ble\be-\b-k\bke\bey\byp\bpa\bad\bd (\b(O\bOf\bff\bf)\b)
When set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be tries to enable the application keypad
- when it is called. Some systems need this to enable the arrow
+ when it is called. Some systems need this to enable the arrow
keys.
e\ben\bna\bab\bbl\ble\be-\b-m\bme\bet\bta\ba-\b-k\bke\bey\by (\b(O\bOn\bn)\b)
- When set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be tries to enable any meta modifier key
+ When set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be tries to enable any meta modifier key
the terminal claims to support. On many terminals, the Meta key
- is used to send eight-bit characters; this variable checks for
- the terminal capability that indicates the terminal can enable
- and disable a mode that sets the eighth bit of a character
- (0200) if the Meta key is held down when the character is typed
+ is used to send eight-bit characters; this variable checks for
+ the terminal capability that indicates the terminal can enable
+ and disable a mode that sets the eighth bit of a character
+ (0200) if the Meta key is held down when the character is typed
(a meta character).
e\bex\bxp\bpa\ban\bnd\bd-\b-t\bti\bil\bld\bde\be (\b(O\bOf\bff\bf)\b)
If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be performs tilde expansion when it attempts
word completion.
f\bfo\bor\brc\bce\be-\b-m\bme\bet\bta\ba-\b-p\bpr\bre\bef\bfi\bix\bx (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be modifies its behavior when binding key
- sequences containing \M- or Meta- (see K\bKe\bey\by B\bBi\bin\bnd\bdi\bin\bng\bgs\bs above) by
+ If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be modifies its behavior when binding key
+ sequences containing \M- or Meta- (see K\bKe\bey\by B\bBi\bin\bnd\bdi\bin\bng\bgs\bs above) by
converting a key sequence of the form \M-_\bC or Meta-_\bC to the two-
- character sequence E\bES\bSC\bC _\bC (adding the meta prefix). If
+ character sequence E\bES\bSC\bC _\bC (adding the meta prefix). If
f\bfo\bor\brc\bce\be-\b-m\bme\bet\bta\ba-\b-p\bpr\bre\bef\bfi\bix\bx is set to O\bOf\bff\bf (the default), r\bre\bea\bad\bdl\bli\bin\bne\be uses the
- value of the c\bco\bon\bnv\bve\ber\brt\bt-\b-m\bme\bet\bta\ba variable to determine whether to per-
- form this conversion: if c\bco\bon\bnv\bve\ber\brt\bt-\b-m\bme\bet\bta\ba is O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be performs
- the conversion described above; if it is O\bOf\bff\bf, r\bre\bea\bad\bdl\bli\bin\bne\be converts
+ value of the c\bco\bon\bnv\bve\ber\brt\bt-\b-m\bme\bet\bta\ba variable to determine whether to per-
+ form this conversion: if c\bco\bon\bnv\bve\ber\brt\bt-\b-m\bme\bet\bta\ba is O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be performs
+ the conversion described above; if it is O\bOf\bff\bf, r\bre\bea\bad\bdl\bli\bin\bne\be converts
_\bC to a meta character by setting the eighth bit (0200).
h\bhi\bis\bst\bto\bor\bry\by-\b-p\bpr\bre\bes\bse\ber\brv\bve\be-\b-p\bpo\boi\bin\bnt\bt (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, the history code attempts to place point at the
- same location on each history line retrieved with p\bpr\bre\bev\bvi\bio\bou\bus\bs-\b-h\bhi\bis\bs-\b-
+ If set to O\bOn\bn, the history code attempts to place point at the
+ same location on each history line retrieved with p\bpr\bre\bev\bvi\bio\bou\bus\bs-\b-h\bhi\bis\bs-\b-
t\bto\bor\bry\by or n\bne\bex\bxt\bt-\b-h\bhi\bis\bst\bto\bor\bry\by.
h\bhi\bis\bst\bto\bor\bry\by-\b-s\bsi\biz\bze\be (\b(u\bun\bns\bse\bet\bt)\b)
- Set the maximum number of history entries saved in the history
- list. If set to zero, any existing history entries are deleted
+ Set the maximum number of history entries saved in the history
+ list. If set to zero, any existing history entries are deleted
and no new entries are saved. If set to a value less than zero,
- the number of history entries is not limited. By default, b\bba\bas\bsh\bh
- sets the maximum number of history entries to the value of the
- H\bHI\bIS\bST\bTS\bSI\bIZ\bZE\bE shell variable. Setting _\bh_\bi_\bs_\bt_\bo_\br_\by_\b-_\bs_\bi_\bz_\be to a non-numeric
+ the number of history entries is not limited. By default, b\bba\bas\bsh\bh
+ sets the maximum number of history entries to the value of the
+ H\bHI\bIS\bST\bTS\bSI\bIZ\bZE\bE shell variable. Setting _\bh_\bi_\bs_\bt_\bo_\br_\by_\b-_\bs_\bi_\bz_\be to a non-numeric
value will set the maximum number of history entries to 500.
h\bho\bor\bri\biz\bzo\bon\bnt\bta\bal\bl-\b-s\bsc\bcr\bro\bol\bll\bl-\b-m\bmo\bod\bde\be (\b(O\bOf\bff\bf)\b)
Setting this variable to O\bOn\bn makes r\bre\bea\bad\bdl\bli\bin\bne\be use a single line for
- display, scrolling the input horizontally on a single screen
- line when it becomes longer than the screen width rather than
- wrapping to a new line. This setting is automatically enabled
+ display, scrolling the input horizontally on a single screen
+ line when it becomes longer than the screen width rather than
+ wrapping to a new line. This setting is automatically enabled
for terminals of height 1.
i\bin\bnp\bpu\but\bt-\b-m\bme\bet\bta\ba (\b(O\bOf\bff\bf)\b)
If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be enables eight-bit input (that is, it does
not clear the eighth bit in the characters it reads), regardless
of what the terminal claims it can support. The default is _\bO_\bf_\bf,
- but r\bre\bea\bad\bdl\bli\bin\bne\be sets it to _\bO_\bn if the locale contains characters
+ but r\bre\bea\bad\bdl\bli\bin\bne\be sets it to _\bO_\bn if the locale contains characters
whose encodings may include bytes with the eighth bit set. This
- variable is dependent on the L\bLC\bC_\b_C\bCT\bTY\bYP\bPE\bE locale category, and its
+ variable is dependent on the L\bLC\bC_\b_C\bCT\bTY\bYP\bPE\bE locale category, and its
value may change if the locale changes. The name m\bme\bet\bta\ba-\b-f\bfl\bla\bag\bg is a
synonym for i\bin\bnp\bpu\but\bt-\b-m\bme\bet\bta\ba.
i\bis\bse\bea\bar\brc\bch\bh-\b-t\bte\ber\brm\bmi\bin\bna\bat\bto\bor\brs\bs (\b("C\bC-\b-[\b[C\bC-\b-j\bj")\b)
- The string of characters that should terminate an incremental
- search without subsequently executing the character as a com-
- mand. If this variable has not been given a value, the charac-
+ The string of characters that should terminate an incremental
+ search without subsequently executing the character as a com-
+ mand. If this variable has not been given a value, the charac-
ters _\bE_\bS_\bC and C\bC-\b-j\bj terminate an incremental search.
k\bke\bey\bym\bma\bap\bp (\b(e\bem\bma\bac\bcs\bs)\b)
- Set the current r\bre\bea\bad\bdl\bli\bin\bne\be keymap. The set of valid keymap names
- is _\be_\bm_\ba_\bc_\bs_\b, _\be_\bm_\ba_\bc_\bs_\b-_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd_\b, _\be_\bm_\ba_\bc_\bs_\b-_\bm_\be_\bt_\ba_\b, _\be_\bm_\ba_\bc_\bs_\b-_\bc_\bt_\bl_\bx_\b, _\bv_\bi_\b, _\bv_\bi_\b-_\bc_\bo_\bm_\b-
- _\bm_\ba_\bn_\bd, and _\bv_\bi_\b-_\bi_\bn_\bs_\be_\br_\bt. _\bv_\bi is equivalent to _\bv_\bi_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd; _\be_\bm_\ba_\bc_\bs is
- equivalent to _\be_\bm_\ba_\bc_\bs_\b-_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd. The default value is _\be_\bm_\ba_\bc_\bs; the
+ Set the current r\bre\bea\bad\bdl\bli\bin\bne\be keymap. The set of valid keymap names
+ is _\be_\bm_\ba_\bc_\bs_\b, _\be_\bm_\ba_\bc_\bs_\b-_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd_\b, _\be_\bm_\ba_\bc_\bs_\b-_\bm_\be_\bt_\ba_\b, _\be_\bm_\ba_\bc_\bs_\b-_\bc_\bt_\bl_\bx_\b, _\bv_\bi_\b, _\bv_\bi_\b-_\bc_\bo_\bm_\b-
+ _\bm_\ba_\bn_\bd, and _\bv_\bi_\b-_\bi_\bn_\bs_\be_\br_\bt. _\bv_\bi is equivalent to _\bv_\bi_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd; _\be_\bm_\ba_\bc_\bs is
+ equivalent to _\be_\bm_\ba_\bc_\bs_\b-_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd. The default value is _\be_\bm_\ba_\bc_\bs; the
value of e\bed\bdi\bit\bti\bin\bng\bg-\b-m\bmo\bod\bde\be also affects the default keymap.
k\bke\bey\bys\bse\beq\bq-\b-t\bti\bim\bme\beo\bou\but\bt (\b(5\b50\b00\b0)\b)
- Specifies the duration r\bre\bea\bad\bdl\bli\bin\bne\be will wait for a character when
- reading an ambiguous key sequence (one that can form a complete
+ Specifies the duration r\bre\bea\bad\bdl\bli\bin\bne\be will wait for a character when
+ reading an ambiguous key sequence (one that can form a complete
key sequence using the input read so far, or can take additional
- input to complete a longer key sequence). If r\bre\bea\bad\bdl\bli\bin\bne\be does not
- receive any input within the timeout, it uses the shorter but
- complete key sequence. The value is specified in milliseconds,
- so a value of 1000 means that r\bre\bea\bad\bdl\bli\bin\bne\be will wait one second for
- additional input. If this variable is set to a value less than
- or equal to zero, or to a non-numeric value, r\bre\bea\bad\bdl\bli\bin\bne\be waits un-
- til another key is pressed to decide which key sequence to com-
+ input to complete a longer key sequence). If r\bre\bea\bad\bdl\bli\bin\bne\be does not
+ receive any input within the timeout, it uses the shorter but
+ complete key sequence. The value is specified in milliseconds,
+ so a value of 1000 means that r\bre\bea\bad\bdl\bli\bin\bne\be will wait one second for
+ additional input. If this variable is set to a value less than
+ or equal to zero, or to a non-numeric value, r\bre\bea\bad\bdl\bli\bin\bne\be waits un-
+ til another key is pressed to decide which key sequence to com-
plete.
m\bma\bar\brk\bk-\b-d\bdi\bir\bre\bec\bct\bto\bor\bri\bie\bes\bs (\b(O\bOn\bn)\b)
If set to O\bOn\bn, completed directory names have a slash appended.
m\bma\bar\brk\bk-\b-m\bmo\bod\bdi\bif\bfi\bie\bed\bd-\b-l\bli\bin\bne\bes\bs (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be displays history lines that have been
+ If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be displays history lines that have been
modified with a preceding asterisk (*\b*).
m\bma\bar\brk\bk-\b-s\bsy\bym\bml\bli\bin\bnk\bke\bed\bd-\b-d\bdi\bir\bre\bec\bct\bto\bor\bri\bie\bes\bs (\b(O\bOf\bff\bf)\b)
If set to O\bOn\bn, completed names which are symbolic links to direc-
- tories have a slash appended, subject to the value of m\bma\bar\brk\bk-\b-d\bdi\bi-\b-
+ tories have a slash appended, subject to the value of m\bma\bar\brk\bk-\b-d\bdi\bi-\b-
r\bre\bec\bct\bto\bor\bri\bie\bes\bs.
m\bma\bat\btc\bch\bh-\b-h\bhi\bid\bdd\bde\ben\bn-\b-f\bfi\bil\ble\bes\bs (\b(O\bOn\bn)\b)
- This variable, when set to O\bOn\bn, forces r\bre\bea\bad\bdl\bli\bin\bne\be to match files
- whose names begin with a "." (hidden files) when performing
- filename completion. If set to O\bOf\bff\bf, the user must include the
+ This variable, when set to O\bOn\bn, forces r\bre\bea\bad\bdl\bli\bin\bne\be to match files
+ whose names begin with a "." (hidden files) when performing
+ filename completion. If set to O\bOf\bff\bf, the user must include the
leading "." in the filename to be completed.
m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-d\bdi\bis\bsp\bpl\bla\bay\by-\b-p\bpr\bre\bef\bfi\bix\bx (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, menu completion displays the common prefix of the
+ If set to O\bOn\bn, menu completion displays the common prefix of the
list of possible completions (which may be empty) before cycling
through the list.
o\bou\but\btp\bpu\but\bt-\b-m\bme\bet\bta\ba (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be displays characters with the eighth bit
- set directly rather than as a meta-prefixed escape sequence.
- The default is _\bO_\bf_\bf, but r\bre\bea\bad\bdl\bli\bin\bne\be sets it to _\bO_\bn if the locale
- contains characters whose encodings may include bytes with the
- eighth bit set. This variable is dependent on the L\bLC\bC_\b_C\bCT\bTY\bYP\bPE\bE lo-
+ If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be displays characters with the eighth bit
+ set directly rather than as a meta-prefixed escape sequence.
+ The default is _\bO_\bf_\bf, but r\bre\bea\bad\bdl\bli\bin\bne\be sets it to _\bO_\bn if the locale
+ contains characters whose encodings may include bytes with the
+ eighth bit set. This variable is dependent on the L\bLC\bC_\b_C\bCT\bTY\bYP\bPE\bE lo-
cale category, and its value may change if the locale changes.
p\bpa\bag\bge\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs (\b(O\bOn\bn)\b)
If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be uses an internal pager resembling _\bm_\bo_\br_\be(1)
p\bpr\bre\bef\bfe\ber\br-\b-v\bvi\bis\bsi\bib\bbl\ble\be-\b-b\bbe\bel\bll\bl
See b\bbe\bel\bll\bl-\b-s\bst\bty\byl\ble\be.
p\bpr\bri\bin\bnt\bt-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs-\b-h\bho\bor\bri\biz\bzo\bon\bnt\bta\bal\bll\bly\by (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be displays completions with matches sorted
+ If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be displays completions with matches sorted
horizontally in alphabetical order, rather than down the screen.
r\bre\bev\bve\ber\brt\bt-\b-a\bal\bll\bl-\b-a\bat\bt-\b-n\bne\bew\bwl\bli\bin\bne\be (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be will undo all changes to history lines
- before returning when executing a\bac\bcc\bce\bep\bpt\bt-\b-l\bli\bin\bne\be. By default, his-
- tory lines may be modified and retain individual undo lists
+ If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be will undo all changes to history lines
+ before returning when executing a\bac\bcc\bce\bep\bpt\bt-\b-l\bli\bin\bne\be. By default, his-
+ tory lines may be modified and retain individual undo lists
across calls to r\bre\bea\bad\bdl\bli\bin\bne\be.
s\bse\bea\bar\brc\bch\bh-\b-i\big\bgn\bno\bor\bre\be-\b-c\bca\bas\bse\be (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be performs incremental and non-incremental
+ If set to O\bOn\bn, r\bre\bea\bad\bdl\bli\bin\bne\be performs incremental and non-incremental
history list searches in a case-insensitive fashion.
s\bsh\bho\bow\bw-\b-a\bal\bll\bl-\b-i\bif\bf-\b-a\bam\bmb\bbi\big\bgu\buo\bou\bus\bs (\b(O\bOf\bff\bf)\b)
- This alters the default behavior of the completion functions.
+ This alters the default behavior of the completion functions.
If set to O\bOn\bn, words which have more than one possible completion
- cause the matches to be listed immediately instead of ringing
+ cause the matches to be listed immediately instead of ringing
the bell.
s\bsh\bho\bow\bw-\b-a\bal\bll\bl-\b-i\bif\bf-\b-u\bun\bnm\bmo\bod\bdi\bif\bfi\bie\bed\bd (\b(O\bOf\bff\bf)\b)
- This alters the default behavior of the completion functions in
+ This alters the default behavior of the completion functions in
a fashion similar to s\bsh\bho\bow\bw-\b-a\bal\bll\bl-\b-i\bif\bf-\b-a\bam\bmb\bbi\big\bgu\buo\bou\bus\bs. If set to O\bOn\bn, words
- which have more than one possible completion without any possi-
- ble partial completion (the possible completions don't share a
- common prefix) cause the matches to be listed immediately in-
+ which have more than one possible completion without any possi-
+ ble partial completion (the possible completions don't share a
+ common prefix) cause the matches to be listed immediately in-
stead of ringing the bell.
s\bsh\bho\bow\bw-\b-m\bmo\bod\bde\be-\b-i\bin\bn-\b-p\bpr\bro\bom\bmp\bpt\bt (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, add a string to the beginning of the prompt indi-
- cating the editing mode: emacs, vi command, or vi insertion.
+ If set to O\bOn\bn, add a string to the beginning of the prompt indi-
+ cating the editing mode: emacs, vi command, or vi insertion.
The mode strings are user-settable (e.g., _\be_\bm_\ba_\bc_\bs_\b-_\bm_\bo_\bd_\be_\b-_\bs_\bt_\br_\bi_\bn_\bg).
s\bsk\bki\bip\bp-\b-c\bco\bom\bmp\bpl\ble\bet\bte\bed\bd-\b-t\bte\bex\bxt\bt (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, 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,
- r\bre\bea\bad\bdl\bli\bin\bne\be does not insert characters from the completion that
- match characters after point in the word being completed, so
+ If set to O\bOn\bn, 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,
+ r\bre\bea\bad\bdl\bli\bin\bne\be 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.
v\bvi\bi-\b-c\bcm\bmd\bd-\b-m\bmo\bod\bde\be-\b-s\bst\btr\bri\bin\bng\bg (\b((\b(c\bcm\bmd\bd)\b))\b)
- If the _\bs_\bh_\bo_\bw_\b-_\bm_\bo_\bd_\be_\b-_\bi_\bn_\b-_\bp_\br_\bo_\bm_\bp_\bt variable is enabled, this string is
+ If the _\bs_\bh_\bo_\bw_\b-_\bm_\bo_\bd_\be_\b-_\bi_\bn_\b-_\bp_\br_\bo_\bm_\bp_\bt variable is enabled, this string is
displayed immediately before the last line of the primary prompt
- when vi editing mode is active and in command mode. The value
+ when vi editing mode is active and in command mode. The value
is expanded like a key binding, so the standard set of meta- and
- control- prefixes and backslash escape sequences is available.
- The \1 and \2 escapes begin and end sequences of non-printing
- characters, which can be used to embed a terminal control se-
+ control- prefixes and backslash escape sequences is available.
+ The \1 and \2 escapes begin and end sequences of non-printing
+ characters, which can be used to embed a terminal control se-
quence into the mode string.
v\bvi\bi-\b-i\bin\bns\bs-\b-m\bmo\bod\bde\be-\b-s\bst\btr\bri\bin\bng\bg (\b((\b(i\bin\bns\bs)\b))\b)
- If the _\bs_\bh_\bo_\bw_\b-_\bm_\bo_\bd_\be_\b-_\bi_\bn_\b-_\bp_\br_\bo_\bm_\bp_\bt variable is enabled, this string is
+ If the _\bs_\bh_\bo_\bw_\b-_\bm_\bo_\bd_\be_\b-_\bi_\bn_\b-_\bp_\br_\bo_\bm_\bp_\bt variable is enabled, this string is
displayed immediately before the last line of the primary prompt
when vi editing mode is active and in insertion mode. The value
is expanded like a key binding, so the standard set of meta- and
- control- prefixes and backslash escape sequences is available.
- The \1 and \2 escapes begin and end sequences of non-printing
- characters, which can be used to embed a terminal control se-
+ control- prefixes and backslash escape sequences is available.
+ The \1 and \2 escapes begin and end sequences of non-printing
+ characters, which can be used to embed a terminal control se-
quence into the mode string.
v\bvi\bis\bsi\bib\bbl\ble\be-\b-s\bst\bta\bat\bts\bs (\b(O\bOf\bff\bf)\b)
- If set to O\bOn\bn, a character denoting a file's type as reported by
- _\bs_\bt_\ba_\bt(2) is appended to the filename when listing possible com-
+ If set to O\bOn\bn, a character denoting a file's type as reported by
+ _\bs_\bt_\ba_\bt(2) is appended to the filename when listing possible com-
pletions.
R\bRe\bea\bad\bdl\bli\bin\bne\be C\bCo\bon\bnd\bdi\bit\bti\bio\bon\bna\bal\bl C\bCo\bon\bns\bst\btr\bru\buc\bct\bts\bs
- R\bRe\bea\bad\bdl\bli\bin\bne\be implements a facility similar in spirit to the conditional
- compilation features of the C preprocessor which allows key bindings
- and variable settings to be performed as the result of tests. There
+ R\bRe\bea\bad\bdl\bli\bin\bne\be implements a facility similar in spirit to the conditional
+ compilation features of the C preprocessor which allows key bindings
+ and variable settings to be performed as the result of tests. There
are four parser directives available.
- $\b$i\bif\bf The $\b$i\bif\bf construct allows bindings to be made based on the edit-
- ing mode, the terminal being used, or the application using
- r\bre\bea\bad\bdl\bli\bin\bne\be. The text of the test, after any comparison operator,
+ $\b$i\bif\bf The $\b$i\bif\bf construct allows bindings to be made based on the edit-
+ ing mode, the terminal being used, or the application using
+ r\bre\bea\bad\bdl\bli\bin\bne\be. The text of the test, after any comparison operator,
extends to the end of the line; unless otherwise noted, no char-
acters are required to isolate it.
- m\bmo\bod\bde\be The m\bmo\bod\bde\be=\b= form of the $\b$i\bif\bf directive is used to test
- whether r\bre\bea\bad\bdl\bli\bin\bne\be is in emacs or vi mode. This may be
- used in conjunction with the s\bse\bet\bt k\bke\bey\bym\bma\bap\bp command, for in-
- stance, to set bindings in the _\be_\bm_\ba_\bc_\bs_\b-_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd and
- _\be_\bm_\ba_\bc_\bs_\b-_\bc_\bt_\bl_\bx keymaps only if r\bre\bea\bad\bdl\bli\bin\bne\be is starting out in
+ m\bmo\bod\bde\be The m\bmo\bod\bde\be=\b= form of the $\b$i\bif\bf directive is used to test
+ whether r\bre\bea\bad\bdl\bli\bin\bne\be is in emacs or vi mode. This may be
+ used in conjunction with the s\bse\bet\bt k\bke\bey\bym\bma\bap\bp command, for in-
+ stance, to set bindings in the _\be_\bm_\ba_\bc_\bs_\b-_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd and
+ _\be_\bm_\ba_\bc_\bs_\b-_\bc_\bt_\bl_\bx keymaps only if r\bre\bea\bad\bdl\bli\bin\bne\be is starting out in
emacs mode.
- t\bte\ber\brm\bm The t\bte\ber\brm\bm=\b= form may be used to include terminal-specific
+ t\bte\ber\brm\bm The t\bte\ber\brm\bm=\b= form may be used to include terminal-specific
key bindings, perhaps to bind the key sequences output by
the terminal's function keys. The word on the right side
of the =\b= is tested against both the full name of the ter-
- minal and the portion of the terminal name before the
- first -\b-. This allows _\bx_\bt_\be_\br_\bm to match both _\bx_\bt_\be_\br_\bm and
+ minal and the portion of the terminal name before the
+ first -\b-. This allows _\bx_\bt_\be_\br_\bm to match both _\bx_\bt_\be_\br_\bm and
_\bx_\bt_\be_\br_\bm_\b-_\b2_\b5_\b6_\bc_\bo_\bl_\bo_\br, for instance.
v\bve\ber\brs\bsi\bio\bon\bn
- The v\bve\ber\brs\bsi\bio\bon\bn test may be used to perform comparisons
- against specific r\bre\bea\bad\bdl\bli\bin\bne\be versions. The v\bve\ber\brs\bsi\bio\bon\bn expands
- to the current r\bre\bea\bad\bdl\bli\bin\bne\be version. The set of comparison
- operators includes =\b=, (and =\b==\b=), !\b!=\b=, <\b<=\b=, >\b>=\b=, <\b<, and >\b>.
- The version number supplied on the right side of the op-
- erator consists of a major version number, an optional
+ The v\bve\ber\brs\bsi\bio\bon\bn test may be used to perform comparisons
+ against specific r\bre\bea\bad\bdl\bli\bin\bne\be versions. The v\bve\ber\brs\bsi\bio\bon\bn expands
+ to the current r\bre\bea\bad\bdl\bli\bin\bne\be version. The set of comparison
+ operators includes =\b=, (and =\b==\b=), !\b!=\b=, <\b<=\b=, >\b>=\b=, <\b<, and >\b>.
+ The version number supplied on the right side of the op-
+ erator consists of a major version number, an optional
decimal point, and an optional minor version (e.g., 7\b7.\b.1\b1).
- If the minor version is omitted, it defaults to 0\b0. The
- operator may be separated from the string v\bve\ber\brs\bsi\bio\bon\bn and
+ If the minor version is omitted, it defaults to 0\b0. The
+ operator may be separated from the string v\bve\ber\brs\bsi\bio\bon\bn and
from the version number argument by whitespace.
_\ba_\bp_\bp_\bl_\bi_\bc_\ba_\bt_\bi_\bo_\bn
The _\ba_\bp_\bp_\bl_\bi_\bc_\ba_\bt_\bi_\bo_\bn construct is used to include application-
- specific settings. Each program using the r\bre\bea\bad\bdl\bli\bin\bne\be li-
- brary sets the _\ba_\bp_\bp_\bl_\bi_\bc_\ba_\bt_\bi_\bo_\bn _\bn_\ba_\bm_\be, and an initialization
+ specific settings. Each program using the r\bre\bea\bad\bdl\bli\bin\bne\be li-
+ brary sets the _\ba_\bp_\bp_\bl_\bi_\bc_\ba_\bt_\bi_\bo_\bn _\bn_\ba_\bm_\be, and an initialization
file can test for a particular value. This could be used
- to bind key sequences to functions useful for a specific
- program. For instance, the following command adds a key
- sequence that quotes the current or previous word in
+ to bind key sequences to functions useful for a specific
+ program. For instance, the following command adds a key
+ sequence that quotes the current or previous word in
b\bba\bas\bsh\bh:
$\b$i\bif\bf Bash
_\bv_\ba_\br_\bi_\ba_\bb_\bl_\be
The _\bv_\ba_\br_\bi_\ba_\bb_\bl_\be construct provides simple equality tests for
- r\bre\bea\bad\bdl\bli\bin\bne\be variables and values. The permitted comparison
- operators are _\b=, _\b=_\b=, and _\b!_\b=. The variable name must be
+ r\bre\bea\bad\bdl\bli\bin\bne\be variables and values. The permitted comparison
+ operators are _\b=, _\b=_\b=, and _\b!_\b=. The variable name must be
separated from the comparison operator by whitespace; the
- operator may be separated from the value on the right
- hand side by whitespace. String and boolean variables
- may be tested. Boolean variables must be tested against
+ operator may be separated from the value on the right
+ hand side by whitespace. String and boolean variables
+ may be tested. Boolean variables must be tested against
the values _\bo_\bn and _\bo_\bf_\bf.
$\b$e\bel\bls\bse\be Commands in this branch of the $\b$i\bif\bf directive are executed if the
command.
$\b$i\bin\bnc\bcl\blu\bud\bde\be
- This directive takes a single filename as an argument and reads
+ This directive takes a single filename as an argument and reads
commands and key bindings from that file. For example, the fol-
lowing directive would read _\b/_\be_\bt_\bc_\b/_\bi_\bn_\bp_\bu_\bt_\br_\bc:
$\b$i\bin\bnc\bcl\blu\bud\bde\be _\b/_\be_\bt_\bc_\b/_\bi_\bn_\bp_\bu_\bt_\br_\bc
S\bSe\bea\bar\brc\bch\bhi\bin\bng\bg
- R\bRe\bea\bad\bdl\bli\bin\bne\be provides commands for searching through the command history
+ R\bRe\bea\bad\bdl\bli\bin\bne\be provides commands for searching through the command history
(see H\bHI\bIS\bST\bTO\bOR\bRY\bY below) for lines containing a specified string. There are
two search modes: _\bi_\bn_\bc_\br_\be_\bm_\be_\bn_\bt_\ba_\bl and _\bn_\bo_\bn_\b-_\bi_\bn_\bc_\br_\be_\bm_\be_\bn_\bt_\ba_\bl.
- Incremental searches begin before the user has finished typing the
- search string. As each character of the search string is typed, r\bre\bea\bad\bd-\b-
+ Incremental searches begin before the user has finished typing the
+ search string. As each character of the search string is typed, r\bre\bea\bad\bd-\b-
l\bli\bin\bne\be displays the next entry from the history matching the string typed
- so far. An incremental search requires only as many characters as
- needed to find the desired history entry. When using emacs editing
- mode, type C\bC-\b-r\br to search backward in the history for a particular
- string. Typing C\bC-\b-s\bs searches forward through the history. The charac-
- ters present in the value of the i\bis\bse\bea\bar\brc\bch\bh-\b-t\bte\ber\brm\bmi\bin\bna\bat\bto\bor\brs\bs variable are used
- to terminate an incremental search. If that variable has not been as-
- signed a value, _\bE_\bS_\bC and C\bC-\b-j\bj terminate an incremental search. C\bC-\b-g\bg
- aborts an incremental search and restores the original line. When the
- search is terminated, the history entry containing the search string
+ so far. An incremental search requires only as many characters as
+ needed to find the desired history entry. When using emacs editing
+ mode, type C\bC-\b-r\br to search backward in the history for a particular
+ string. Typing C\bC-\b-s\bs searches forward through the history. The charac-
+ ters present in the value of the i\bis\bse\bea\bar\brc\bch\bh-\b-t\bte\ber\brm\bmi\bin\bna\bat\bto\bor\brs\bs variable are used
+ to terminate an incremental search. If that variable has not been as-
+ signed a value, _\bE_\bS_\bC and C\bC-\b-j\bj terminate an incremental search. C\bC-\b-g\bg
+ aborts an incremental search and restores the original line. When the
+ search is terminated, the history entry containing the search string
becomes the current line.
- To find other matching entries in the history list, type C\bC-\b-r\br or C\bC-\b-s\bs as
- appropriate. This searches backward or forward in the history for the
- next entry matching the search string typed so far. Any other key se-
- quence bound to a r\bre\bea\bad\bdl\bli\bin\bne\be command terminates the search and executes
- that command. For instance, a newline terminates the search and ac-
+ To find other matching entries in the history list, type C\bC-\b-r\br or C\bC-\b-s\bs as
+ appropriate. This searches backward or forward in the history for the
+ next entry matching the search string typed so far. Any other key se-
+ quence bound to a r\bre\bea\bad\bdl\bli\bin\bne\be command terminates the search and executes
+ that command. For instance, a newline terminates the search and ac-
cepts the line, thereby executing the command from the history list. A
- movement command will terminate the search, make the last line found
+ movement command will terminate the search, make the last line found
the current line, and begin editing.
R\bRe\bea\bad\bdl\bli\bin\bne\be remembers the last incremental search string. If two C\bC-\b-r\brs are
- typed without any intervening characters defining a new search string,
+ typed without any intervening characters defining a new search string,
r\bre\bea\bad\bdl\bli\bin\bne\be uses any remembered search string.
- Non-incremental searches read the entire search string before starting
+ Non-incremental searches read the entire search string before starting
to search for matching history entries. The search string may be typed
by the user or be part of the contents of the current line.
R\bRe\bea\bad\bdl\bli\bin\bne\be C\bCo\bom\bmm\bma\ban\bnd\bd N\bNa\bam\bme\bes\bs
- The following is a list of the names of the commands and the default
+ The following is a list of the names of the commands and the default
key sequences to which they are bound. Command names without an accom-
panying key sequence are unbound by default.
In the following descriptions, _\bp_\bo_\bi_\bn_\bt refers to the current cursor posi-
- tion, and _\bm_\ba_\br_\bk refers to a cursor position saved by the s\bse\bet\bt-\b-m\bma\bar\brk\bk com-
- mand. The text between the point and mark is referred to as the _\br_\be_\b-
+ tion, and _\bm_\ba_\br_\bk refers to a cursor position saved by the s\bse\bet\bt-\b-m\bma\bar\brk\bk com-
+ mand. The text between the point and mark is referred to as the _\br_\be_\b-
_\bg_\bi_\bo_\bn. R\bRe\bea\bad\bdl\bli\bin\bne\be has the concept of an _\ba_\bc_\bt_\bi_\bv_\be _\br_\be_\bg_\bi_\bo_\bn: when the region is
active, r\bre\bea\bad\bdl\bli\bin\bne\be redisplay highlights the region using the value of the
- a\bac\bct\bti\biv\bve\be-\b-r\bre\beg\bgi\bio\bon\bn-\b-s\bst\bta\bar\brt\bt-\b-c\bco\bol\blo\bor\br variable. The e\ben\bna\bab\bbl\ble\be-\b-a\bac\bct\bti\biv\bve\be-\b-r\bre\beg\bgi\bio\bon\bn r\bre\bea\bad\bdl\bli\bin\bne\be
+ a\bac\bct\bti\biv\bve\be-\b-r\bre\beg\bgi\bio\bon\bn-\b-s\bst\bta\bar\brt\bt-\b-c\bco\bol\blo\bor\br variable. The e\ben\bna\bab\bbl\ble\be-\b-a\bac\bct\bti\biv\bve\be-\b-r\bre\beg\bgi\bio\bon\bn r\bre\bea\bad\bdl\bli\bin\bne\be
variable turns this on and off. Several commands set the region to ac-
tive; those are noted below.
C\bCo\bom\bmm\bma\ban\bnd\bds\bs f\bfo\bor\br M\bMo\bov\bvi\bin\bng\bg
b\bbe\beg\bgi\bin\bnn\bni\bin\bng\bg-\b-o\bof\bf-\b-l\bli\bin\bne\be (\b(C\bC-\b-a\ba)\b)
- Move to the start of the current line. This may also be bound
+ Move to the start of the current line. This may also be bound
to the Home key on some keyboards.
e\ben\bnd\bd-\b-o\bof\bf-\b-l\bli\bin\bne\be (\b(C\bC-\b-e\be)\b)
- Move to the end of the line. This may also be bound to the End
+ Move to the end of the line. This may also be bound to the End
key on some keyboards.
f\bfo\bor\brw\bwa\bar\brd\bd-\b-c\bch\bha\bar\br (\b(C\bC-\b-f\bf)\b)
- Move forward a character. This may also be bound to the right
+ Move forward a character. This may also be bound to the right
arrow key on some keyboards.
b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-c\bch\bha\bar\br (\b(C\bC-\b-b\bb)\b)
Move back a character. This may also be bound to the left arrow
Move forward to the end of the next word. Words are composed of
alphanumeric characters (letters and digits).
b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-b\bb)\b)
- Move back to the start of the current or previous word. Words
+ Move back to the start of the current or previous word. Words
are composed of alphanumeric characters (letters and digits).
s\bsh\bhe\bel\bll\bl-\b-f\bfo\bor\brw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-C\bC-\b-f\bf)\b)
- Move forward to the end of the next word. Words are delimited
+ Move forward to the end of the next word. Words are delimited
by non-quoted shell metacharacters.
s\bsh\bhe\bel\bll\bl-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-C\bC-\b-b\bb)\b)
- Move back to the start of the current or previous word. Words
+ Move back to the start of the current or previous word. Words
are delimited by non-quoted shell metacharacters.
p\bpr\bre\bev\bvi\bio\bou\bus\bs-\b-s\bsc\bcr\bre\bee\ben\bn-\b-l\bli\bin\bne\be
- Attempt to move point to the same physical screen column on the
- previous physical screen line. This will not have the desired
- effect if the current r\bre\bea\bad\bdl\bli\bin\bne\be line does not take up more than
- one physical line or if point is not greater than the length of
+ Attempt to move point to the same physical screen column on the
+ previous physical screen line. This will not have the desired
+ effect if the current r\bre\bea\bad\bdl\bli\bin\bne\be line does not take up more than
+ one physical line or if point is not greater than the length of
the prompt plus the screen width.
n\bne\bex\bxt\bt-\b-s\bsc\bcr\bre\bee\ben\bn-\b-l\bli\bin\bne\be
- Attempt to move point to the same physical screen column on the
- next physical screen line. This will not have the desired ef-
+ Attempt to move point to the same physical screen column on the
+ next physical screen line. This will not have the desired ef-
fect if the current r\bre\bea\bad\bdl\bli\bin\bne\be line does not take up more than one
- physical line or if the length of the current r\bre\bea\bad\bdl\bli\bin\bne\be line is
+ physical line or if the length of the current r\bre\bea\bad\bdl\bli\bin\bne\be line is
not greater than the length of the prompt plus the screen width.
c\bcl\ble\bea\bar\br-\b-d\bdi\bis\bsp\bpl\bla\bay\by (\b(M\bM-\b-C\bC-\b-l\bl)\b)
- Clear the screen and, if possible, the terminal's scrollback
- buffer, then redraw the current line, leaving the current line
+ Clear the screen and, if possible, the terminal's scrollback
+ buffer, then redraw the current line, leaving the current line
at the top of the screen.
c\bcl\ble\bea\bar\br-\b-s\bsc\bcr\bre\bee\ben\bn (\b(C\bC-\b-l\bl)\b)
Clear the screen, then redraw the current line, leaving the cur-
- rent line at the top of the screen. With a numeric argument,
+ rent line at the top of the screen. With a numeric argument,
refresh the current line without clearing the screen.
r\bre\bed\bdr\bra\baw\bw-\b-c\bcu\bur\brr\bre\ben\bnt\bt-\b-l\bli\bin\bne\be
Refresh the current line.
C\bCo\bom\bmm\bma\ban\bnd\bds\bs f\bfo\bor\br M\bMa\ban\bni\bip\bpu\bul\bla\bat\bti\bin\bng\bg t\bth\bhe\be H\bHi\bis\bst\bto\bor\bry\by
a\bac\bcc\bce\bep\bpt\bt-\b-l\bli\bin\bne\be (\b(N\bNe\bew\bwl\bli\bin\bne\be,\b, R\bRe\bet\btu\bur\brn\bn)\b)
Accept the line regardless of where the cursor is. If this line
- is non-empty, add it to the history list according to the state
- of the H\bHI\bIS\bST\bTC\bCO\bON\bNT\bTR\bRO\bOL\bL and H\bHI\bIS\bST\bTI\bIG\bGN\bNO\bOR\bRE\bE variables. If the line is a
- modified history line, restore the history line to its original
+ is non-empty, add it to the history list according to the state
+ of the H\bHI\bIS\bST\bTC\bCO\bON\bNT\bTR\bRO\bOL\bL and H\bHI\bIS\bST\bTI\bIG\bGN\bNO\bOR\bRE\bE variables. If the line is a
+ modified history line, restore the history line to its original
state.
p\bpr\bre\bev\bvi\bio\bou\bus\bs-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(C\bC-\b-p\bp)\b)
Fetch the previous command from the history list, moving back in
- the list. This may also be bound to the up arrow key on some
+ the list. This may also be bound to the up arrow key on some
keyboards.
n\bne\bex\bxt\bt-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(C\bC-\b-n\bn)\b)
- Fetch the next command from the history list, moving forward in
- the list. This may also be bound to the down arrow key on some
+ Fetch the next command from the history list, moving forward in
+ the list. This may also be bound to the down arrow key on some
keyboards.
b\bbe\beg\bgi\bin\bnn\bni\bin\bng\bg-\b-o\bof\bf-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(M\bM-\b-<\b<)\b)
Move to the first line in the history.
e\ben\bnd\bd-\b-o\bof\bf-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(M\bM-\b->\b>)\b)
- Move to the end of the input history, i.e., the line currently
+ Move to the end of the input history, i.e., the line currently
being entered.
o\bop\bpe\ber\bra\bat\bte\be-\b-a\ban\bnd\bd-\b-g\bge\bet\bt-\b-n\bne\bex\bxt\bt (\b(C\bC-\b-o\bo)\b)
- Accept the current line for execution as if a newline had been
- entered, and fetch the next line relative to the current line
- from the history for editing. A numeric argument, if supplied,
+ Accept the current line for execution as if a newline had been
+ entered, and fetch the next line relative to the current line
+ from the history for editing. A numeric argument, if supplied,
specifies the history entry to use instead of the current line.
f\bfe\bet\btc\bch\bh-\b-h\bhi\bis\bst\bto\bor\bry\by
- With a numeric argument, fetch that entry from the history list
+ 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.
r\bre\bev\bve\ber\brs\bse\be-\b-s\bse\bea\bar\brc\bch\bh-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(C\bC-\b-r\br)\b)
- Search backward starting at the current line and moving "up"
- through the history as necessary. This is an incremental
- search. This command sets the region to the matched text and
- activates the region.
- f\bfo\bor\brw\bwa\bar\brd\bd-\b-s\bse\bea\bar\brc\bch\bh-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(C\bC-\b-s\bs)\b)
- Search forward starting at the current line and moving "down"
+ Search backward starting at the current line and moving "up"
through the history as necessary. This is an incremental
search. This command sets the region to the matched text and
activates the region.
+ f\bfo\bor\brw\bwa\bar\brd\bd-\b-s\bse\bea\bar\brc\bch\bh-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(C\bC-\b-s\bs)\b)
+ Search forward starting at the current line and moving "down"
+ through the history as necessary. This is an incremental
+ search. This command sets the region to the matched text and
+ activates the region.
n\bno\bon\bn-\b-i\bin\bnc\bcr\bre\bem\bme\ben\bnt\bta\bal\bl-\b-r\bre\bev\bve\ber\brs\bse\be-\b-s\bse\bea\bar\brc\bch\bh-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(M\bM-\b-p\bp)\b)
Search backward through the history starting at the current line
- using a non-incremental search for a string supplied by the
+ using a non-incremental search for a string supplied by the
user. The search string may match anywhere in a history line.
n\bno\bon\bn-\b-i\bin\bnc\bcr\bre\bem\bme\ben\bnt\bta\bal\bl-\b-f\bfo\bor\brw\bwa\bar\brd\bd-\b-s\bse\bea\bar\brc\bch\bh-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(M\bM-\b-n\bn)\b)
- Search forward through the history using a non-incremental
+ Search forward through the history using a non-incremental
search for a string supplied by the user. The search string may
match anywhere in a history line.
h\bhi\bis\bst\bto\bor\bry\by-\b-s\bse\bea\bar\brc\bch\bh-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd
non-incremental search. This may be bound to the Page Up key on
some keyboards.
h\bhi\bis\bst\bto\bor\bry\by-\b-s\bse\bea\bar\brc\bch\bh-\b-f\bfo\bor\brw\bwa\bar\brd\bd
- Search forward through the history for the string of characters
+ Search forward through the history for the string of characters
between the start of the current line and the point. The search
string must match at the beginning of a history line. This is a
- non-incremental search. This may be bound to the Page Down key
+ non-incremental search. This may be bound to the Page Down key
on some keyboards.
h\bhi\bis\bst\bto\bor\bry\by-\b-s\bsu\bub\bbs\bst\btr\bri\bin\bng\bg-\b-s\bse\bea\bar\brc\bch\bh-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd
Search backward through the history for the string of characters
between the start of the current line and the point. The search
- string may match anywhere in a history line. This is a non-in-
+ string may match anywhere in a history line. This is a non-in-
cremental search.
h\bhi\bis\bst\bto\bor\bry\by-\b-s\bsu\bub\bbs\bst\btr\bri\bin\bng\bg-\b-s\bse\bea\bar\brc\bch\bh-\b-f\bfo\bor\brw\bwa\bar\brd\bd
- Search forward through the history for the string of characters
+ Search forward through the history for the string of characters
between the start of the current line and the point. The search
- string may match anywhere in a history line. This is a non-in-
+ string may match anywhere in a history line. This is a non-in-
cremental search.
y\bya\ban\bnk\bk-\b-n\bnt\bth\bh-\b-a\bar\brg\bg (\b(M\bM-\b-C\bC-\b-y\by)\b)
- Insert the first argument to the previous command (usually the
+ Insert the first argument to the previous command (usually the
second word on the previous line) at point. With an argument _\bn,
- insert the _\bnth word from the previous command (the words in the
- previous command begin with word 0). A negative argument in-
- serts the _\bnth word from the end of the previous command. Once
- the argument _\bn is computed, this uses the history expansion fa-
- cilities to extract the _\bnth word, as if the "!_\bn" history expan-
+ insert the _\bnth word from the previous command (the words in the
+ previous command begin with word 0). A negative argument in-
+ serts the _\bnth word from the end of the previous command. Once
+ the argument _\bn is computed, this uses the history expansion fa-
+ cilities to extract the _\bnth word, as if the "!_\bn" history expan-
sion had been specified.
y\bya\ban\bnk\bk-\b-l\bla\bas\bst\bt-\b-a\bar\brg\bg (\b(M\bM-\b-.\b.,\b, M\bM-\b-_\b_)\b)
- Insert the last argument to the previous command (the last word
+ Insert the last argument to the previous command (the last word
of the previous history entry). With a numeric argument, behave
- exactly like y\bya\ban\bnk\bk-\b-n\bnt\bth\bh-\b-a\bar\brg\bg. Successive calls to y\bya\ban\bnk\bk-\b-l\bla\bas\bst\bt-\b-a\bar\brg\bg
- move back through the history list, inserting the last word (or
- the word specified by the argument to the first call) of each
+ exactly like y\bya\ban\bnk\bk-\b-n\bnt\bth\bh-\b-a\bar\brg\bg. Successive calls to y\bya\ban\bnk\bk-\b-l\bla\bas\bst\bt-\b-a\bar\brg\bg
+ move back through the history list, inserting the last word (or
+ the word specified by the argument to the first call) of each
line in turn. Any numeric argument supplied to these successive
- calls determines the direction to move through the history. A
- negative argument switches the direction through the history
- (back or forward). This uses the history expansion facilities
- to extract the last word, as if the "!$" history expansion had
+ calls determines the direction to move through the history. A
+ negative argument switches the direction through the history
+ (back or forward). This uses the history expansion facilities
+ to extract the last word, as if the "!$" history expansion had
been specified.
s\bsh\bhe\bel\bll\bl-\b-e\bex\bxp\bpa\ban\bnd\bd-\b-l\bli\bin\bne\be (\b(M\bM-\b-C\bC-\b-e\be)\b)
- Expand the line by performing shell word expansions. This per-
+ Expand the line by performing shell word expansions. This per-
forms alias and history expansion, $\b$'_\bs_\bt_\br_\bi_\bn_\bg' and $\b$"_\bs_\bt_\br_\bi_\bn_\bg" quot-
- ing, tilde expansion, parameter and variable expansion, arith-
- metic expansion, command and process substitution, word split-
- ting, and quote removal. An explicit argument suppresses com-
- mand and process substitution. See H\bHI\bIS\bST\bTO\bOR\bRY\bY E\bEX\bXP\bPA\bAN\bNS\bSI\bIO\bON\bN below for
+ ing, tilde expansion, parameter and variable expansion, arith-
+ metic expansion, command and process substitution, word split-
+ ting, and quote removal. An explicit argument suppresses com-
+ mand and process substitution. See H\bHI\bIS\bST\bTO\bOR\bRY\bY E\bEX\bXP\bPA\bAN\bNS\bSI\bIO\bON\bN below for
a description of history expansion.
h\bhi\bis\bst\bto\bor\bry\by-\b-e\bex\bxp\bpa\ban\bnd\bd-\b-l\bli\bin\bne\be (\b(M\bM-\b-^\b^)\b)
- Perform history expansion on the current line. See H\bHI\bIS\bST\bTO\bOR\bRY\bY E\bEX\bX-\b-
+ Perform history expansion on the current line. See H\bHI\bIS\bST\bTO\bOR\bRY\bY E\bEX\bX-\b-
P\bPA\bAN\bNS\bSI\bIO\bON\bN below for a description of history expansion.
m\bma\bag\bgi\bic\bc-\b-s\bsp\bpa\bac\bce\be
- Perform history expansion on the current line and insert a
+ Perform history expansion on the current line and insert a
space. See H\bHI\bIS\bST\bTO\bOR\bRY\bY E\bEX\bXP\bPA\bAN\bNS\bSI\bIO\bON\bN below for a description of history
expansion.
a\bal\bli\bia\bas\bs-\b-e\bex\bxp\bpa\ban\bnd\bd-\b-l\bli\bin\bne\be
- Perform alias expansion on the current line. See A\bAL\bLI\bIA\bAS\bSE\bES\bS above
+ Perform alias expansion on the current line. See A\bAL\bLI\bIA\bAS\bSE\bES\bS above
for a description of alias expansion.
h\bhi\bis\bst\bto\bor\bry\by-\b-a\ban\bnd\bd-\b-a\bal\bli\bia\bas\bs-\b-e\bex\bxp\bpa\ban\bnd\bd-\b-l\bli\bin\bne\be
Perform history and alias expansion on the current line.
i\bin\bns\bse\ber\brt\bt-\b-l\bla\bas\bst\bt-\b-a\bar\brg\bgu\bum\bme\ben\bnt\bt (\b(M\bM-\b-.\b.,\b, M\bM-\b-_\b_)\b)
A synonym for y\bya\ban\bnk\bk-\b-l\bla\bas\bst\bt-\b-a\bar\brg\bg.
e\bed\bdi\bit\bt-\b-a\ban\bnd\bd-\b-e\bex\bxe\bec\bcu\but\bte\be-\b-c\bco\bom\bmm\bma\ban\bnd\bd (\b(C\bC-\b-x\bx C\bC-\b-e\be)\b)
- Invoke an editor on the current command line, and execute the
+ Invoke an editor on the current command line, and execute the
result as shell commands. B\bBa\bas\bsh\bh attempts to invoke $\b$V\bVI\bIS\bSU\bUA\bAL\bL, $\b$E\bED\bD-\b-
I\bIT\bTO\bOR\bR, and _\be_\bm_\ba_\bc_\bs as the editor, in that order.
C\bCo\bom\bmm\bma\ban\bnd\bds\bs f\bfo\bor\br C\bCh\bha\ban\bng\bgi\bin\bng\bg T\bTe\bex\bxt\bt
_\be_\bn_\bd_\b-_\bo_\bf_\b-_\bf_\bi_\bl_\be (\b(u\bus\bsu\bua\bal\bll\bly\by C\bC-\b-d\bd)\b)
- The character indicating end-of-file as set, for example, by
+ The character indicating end-of-file as set, for example, by
_\bs_\bt_\bt_\by(1). If this character is read when there are no characters
on the line, and point is at the beginning of the line, r\bre\bea\bad\bdl\bli\bin\bne\be
interprets it as the end of input and returns E\bEO\bOF\bF.
above for the effects. This may also be bound to the Delete key
on some keyboards.
b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br (\b(R\bRu\bub\bbo\bou\but\bt)\b)
- Delete the character behind the cursor. When given a numeric
+ Delete the character behind the cursor. When given a numeric
argument, save the deleted text on the kill ring.
f\bfo\bor\brw\bwa\bar\brd\bd-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br
- Delete the character under the cursor, unless the cursor is at
+ Delete the character under the cursor, unless the cursor is at
the end of the line, in which case the character behind the cur-
sor is deleted.
q\bqu\buo\bot\bte\bed\bd-\b-i\bin\bns\bse\ber\brt\bt (\b(C\bC-\b-q\bq,\b, C\bC-\b-v\bv)\b)
- Add the next character typed to the line verbatim. This is how
+ Add the next character typed to the line verbatim. This is how
to insert characters like C\bC-\b-q\bq, for example.
t\bta\bab\bb-\b-i\bin\bns\bse\ber\brt\bt (\b(C\bC-\b-v\bv T\bTA\bAB\bB)\b)
Insert a tab character.
s\bse\bel\blf\bf-\b-i\bin\bns\bse\ber\brt\bt (\b(a\ba,\b, b\bb,\b, A\bA,\b, 1\b1,\b, !\b!,\b, ...)\b)
Insert the character typed.
b\bbr\bra\bac\bck\bke\bet\bte\bed\bd-\b-p\bpa\bas\bst\bte\be-\b-b\bbe\beg\bgi\bin\bn
- This function is intended to be bound to the "bracketed paste"
- escape sequence sent by some terminals, and such a binding is
- assigned by default. It allows r\bre\bea\bad\bdl\bli\bin\bne\be to insert the pasted
- text as a single unit without treating each character as if it
- had been read from the keyboard. The pasted characters are in-
- serted as if each one was bound to s\bse\bel\blf\bf-\b-i\bin\bns\bse\ber\brt\bt instead of exe-
+ This function is intended to be bound to the "bracketed paste"
+ escape sequence sent by some terminals, and such a binding is
+ assigned by default. It allows r\bre\bea\bad\bdl\bli\bin\bne\be to insert the pasted
+ text as a single unit without treating each character as if it
+ had been read from the keyboard. The pasted characters are in-
+ serted as if each one was bound to s\bse\bel\blf\bf-\b-i\bin\bns\bse\ber\brt\bt instead of exe-
cuting any editing commands.
- Bracketed paste sets the region to the inserted text and acti-
+ Bracketed paste sets the region to the inserted text and acti-
vates the region.
t\btr\bra\ban\bns\bsp\bpo\bos\bse\be-\b-c\bch\bha\bar\brs\bs (\b(C\bC-\b-t\bt)\b)
- Drag the character before point forward over the character at
- point, moving point forward as well. If point is at the end of
- the line, then this transposes the two characters before point.
+ Drag the character before point forward over the character at
+ point, moving point forward as well. If point is at the end of
+ the line, then this transposes the two characters before point.
Negative arguments have no effect.
t\btr\bra\ban\bns\bsp\bpo\bos\bse\be-\b-w\bwo\bor\brd\bds\bs (\b(M\bM-\b-t\bt)\b)
- Drag the word before point past the word after point, moving
- point past that word as well. If point is at the end of the
+ Drag the word before point past the word after point, moving
+ point past that word as well. If point is at the end of the
line, this transposes the last two words on the line.
s\bsh\bhe\bel\bll\bl-\b-t\btr\bra\ban\bns\bsp\bpo\bos\bse\be-\b-w\bwo\bor\brd\bds\bs (\b(M\bM-\b-C\bC-\b-t\bt)\b)
- Drag the word before point past the word after point, moving
- point past that word as well. If the insertion point is at the
+ Drag the word before point past the word after point, moving
+ point past that word as well. If the insertion point is at the
end of the line, this transposes the last two words on the line.
- Word boundaries are the same as s\bsh\bhe\bel\bll\bl-\b-f\bfo\bor\brw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd and
+ Word boundaries are the same as s\bsh\bhe\bel\bll\bl-\b-f\bfo\bor\brw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd and
s\bsh\bhe\bel\bll\bl-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
u\bup\bpc\bca\bas\bse\be-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-u\bu)\b)
- Uppercase the current (or following) word. With a negative ar-
+ Uppercase the current (or following) word. With a negative ar-
gument, uppercase the previous word, but do not move point.
d\bdo\bow\bwn\bnc\bca\bas\bse\be-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-l\bl)\b)
- Lowercase the current (or following) word. With a negative ar-
+ Lowercase the current (or following) word. With a negative ar-
gument, lowercase the previous word, but do not move point.
c\bca\bap\bpi\bit\bta\bal\bli\biz\bze\be-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-c\bc)\b)
Capitalize the current (or following) word. With a negative ar-
gument, capitalize the previous word, but do not move point.
o\bov\bve\ber\brw\bwr\bri\bit\bte\be-\b-m\bmo\bod\bde\be
- Toggle overwrite mode. With an explicit positive numeric argu-
+ Toggle overwrite mode. With an explicit positive numeric argu-
ment, switches to overwrite mode. With an explicit non-positive
numeric argument, switches to insert mode. This command affects
- only e\bem\bma\bac\bcs\bs mode; v\bvi\bi mode does overwrite differently. Each call
+ only e\bem\bma\bac\bcs\bs mode; v\bvi\bi mode does overwrite differently. Each call
to _\br_\be_\ba_\bd_\bl_\bi_\bn_\be_\b(_\b) starts in insert mode.
- In overwrite mode, characters bound to s\bse\bel\blf\bf-\b-i\bin\bns\bse\ber\brt\bt replace the
- text at point rather than pushing the text to the right. Char-
- acters bound to b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br replace the character be-
- fore point with a space. By default, this command is unbound,
+ In overwrite mode, characters bound to s\bse\bel\blf\bf-\b-i\bin\bns\bse\ber\brt\bt replace the
+ text at point rather than pushing the text to the right. Char-
+ acters bound to b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br replace the character be-
+ fore point with a space. By default, this command is unbound,
but may be bound to the Insert key on some keyboards.
K\bKi\bil\bll\bli\bin\bng\bg a\ban\bnd\bd Y\bYa\ban\bnk\bki\bin\bng\bg
k\bki\bil\bll\bl-\b-l\bli\bin\bne\be (\b(C\bC-\b-k\bk)\b)
Kill the text from point to the end of the current line. With a
- negative numeric argument, kill backward from the cursor to the
+ negative numeric argument, kill backward from the cursor to the
beginning of the line.
b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-k\bki\bil\bll\bl-\b-l\bli\bin\bne\be (\b(C\bC-\b-x\bx R\bRu\bub\bbo\bou\but\bt)\b)
Kill backward to the beginning of the current line. With a neg-
- ative numeric argument, kill forward from the cursor to the end
+ ative numeric argument, kill forward from the cursor to the end
of the line.
u\bun\bni\bix\bx-\b-l\bli\bin\bne\be-\b-d\bdi\bis\bsc\bca\bar\brd\bd (\b(C\bC-\b-u\bu)\b)
- Kill backward from point to the beginning of the line, saving
+ Kill backward from point to the beginning of the line, saving
the killed text on the kill-ring.
k\bki\bil\bll\bl-\b-w\bwh\bho\bol\ble\be-\b-l\bli\bin\bne\be
- Kill all characters on the current line, no matter where point
+ Kill all characters on the current line, no matter where point
is.
k\bki\bil\bll\bl-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-d\bd)\b)
- Kill from point to the end of the current word, or if between
- words, to the end of the next word. Word boundaries are the
+ Kill from point to the end of the current word, or if between
+ words, to the end of the next word. Word boundaries are the
same as those used by f\bfo\bor\brw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-k\bki\bil\bll\bl-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-R\bRu\bub\bbo\bou\but\bt)\b)
- Kill the word behind point. Word boundaries are the same as
+ Kill the word behind point. Word boundaries are the same as
those used by b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
s\bsh\bhe\bel\bll\bl-\b-k\bki\bil\bll\bl-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-C\bC-\b-d\bd)\b)
- Kill from point to the end of the current word, or if between
- words, to the end of the next word. Word boundaries are the
+ Kill from point to the end of the current word, or if between
+ words, to the end of the next word. Word boundaries are the
same as those used by s\bsh\bhe\bel\bll\bl-\b-f\bfo\bor\brw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
s\bsh\bhe\bel\bll\bl-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-k\bki\bil\bll\bl-\b-w\bwo\bor\brd\bd
- Kill the word behind point. Word boundaries are the same as
+ Kill the word behind point. Word boundaries are the same as
those used by s\bsh\bhe\bel\bll\bl-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
u\bun\bni\bix\bx-\b-w\bwo\bor\brd\bd-\b-r\bru\bub\bbo\bou\but\bt (\b(C\bC-\b-w\bw)\b)
- Kill the word behind point, using white space as a word bound-
+ Kill the word behind point, using white space as a word bound-
ary, saving the killed text on the kill-ring.
u\bun\bni\bix\bx-\b-f\bfi\bil\ble\ben\bna\bam\bme\be-\b-r\bru\bub\bbo\bou\but\bt
- Kill the word behind point, using white space and the slash
- character as the word boundaries, saving the killed text on the
+ Kill the word behind point, using white space and the slash
+ character as the word boundaries, saving the killed text on the
kill-ring.
d\bde\bel\ble\bet\bte\be-\b-h\bho\bor\bri\biz\bzo\bon\bnt\bta\bal\bl-\b-s\bsp\bpa\bac\bce\be (\b(M\bM-\b-\\b\)\b)
Delete all spaces and tabs around point.
k\bki\bil\bll\bl-\b-r\bre\beg\bgi\bio\bon\bn
Kill the text in the current region.
c\bco\bop\bpy\by-\b-r\bre\beg\bgi\bio\bon\bn-\b-a\bas\bs-\b-k\bki\bil\bll\bl
- Copy the text in the region to the kill buffer, so it can be
+ Copy the text in the region to the kill buffer, so it can be
yanked immediately.
c\bco\bop\bpy\by-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd
- Copy the word before point to the kill buffer. The word bound-
+ Copy the word before point to the kill buffer. The word bound-
aries are the same as b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
c\bco\bop\bpy\by-\b-f\bfo\bor\brw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd
- Copy the word following point to the kill buffer. The word
+ Copy the word following point to the kill buffer. The word
boundaries are the same as f\bfo\bor\brw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
y\bya\ban\bnk\bk (\b(C\bC-\b-y\by)\b)
Yank the top of the kill ring into the buffer at point.
y\bya\ban\bnk\bk-\b-p\bpo\bop\bp (\b(M\bM-\b-y\by)\b)
- Rotate the kill ring, and yank the new top. Only works follow-
+ Rotate the kill ring, and yank the new top. Only works follow-
ing y\bya\ban\bnk\bk or y\bya\ban\bnk\bk-\b-p\bpo\bop\bp.
N\bNu\bum\bme\ber\bri\bic\bc A\bAr\brg\bgu\bum\bme\ben\bnt\bts\bs
d\bdi\big\bgi\bit\bt-\b-a\bar\brg\bgu\bum\bme\ben\bnt\bt (\b(M\bM-\b-0\b0,\b, M\bM-\b-1\b1,\b, ...,\b, M\bM-\b--\b-)\b)
- Add this digit to the argument already accumulating, or start a
+ Add this digit to the argument already accumulating, or start a
new argument. M-- starts a negative argument.
u\bun\bni\biv\bve\ber\brs\bsa\bal\bl-\b-a\bar\brg\bgu\bum\bme\ben\bnt\bt
- This is another way to specify an argument. If this command is
- followed by one or more digits, optionally with a leading minus
- sign, those digits define the argument. If the command is fol-
+ This is another way to specify an argument. If this command is
+ followed by one or more digits, optionally with a leading minus
+ sign, those digits define the argument. If the command is fol-
lowed by digits, executing u\bun\bni\biv\bve\ber\brs\bsa\bal\bl-\b-a\bar\brg\bgu\bum\bme\ben\bnt\bt again ends the nu-
meric argument, but is otherwise ignored. As a special case, if
this command is immediately followed by a character that is nei-
- ther a digit nor minus sign, the argument count for the next
- command is multiplied by four. The argument count is initially
- one, so executing this function the first time makes the argu-
+ ther a digit nor minus sign, the argument count for the next
+ command is multiplied by four. The argument count is initially
+ one, so executing this function the first time makes the argu-
ment count four, a second time makes the argument count sixteen,
and so on.
C\bCo\bom\bmp\bpl\ble\bet\bti\bin\bng\bg
c\bco\bom\bmp\bpl\ble\bet\bte\be (\b(T\bTA\bAB\bB)\b)
- Attempt to perform completion on the text before point. B\bBa\bas\bsh\bh
- attempts completion by first checking for any programmable com-
- pletions for the command word (see P\bPr\bro\bog\bgr\bra\bam\bmm\bma\bab\bbl\ble\be C\bCo\bom\bmp\bpl\ble\bet\bti\bio\bon\bn be-
+ Attempt to perform completion on the text before point. B\bBa\bas\bsh\bh
+ attempts completion by first checking for any programmable com-
+ pletions for the command word (see P\bPr\bro\bog\bgr\bra\bam\bmm\bma\bab\bbl\ble\be C\bCo\bom\bmp\bpl\ble\bet\bti\bio\bon\bn be-
low), otherwise treating the text as a variable (if the text be-
gins with $\b$), username (if the text begins with ~\b~), hostname (if
- the text begins with @\b@), or command (including aliases, func-
- tions, and builtins) in turn. If none of these produces a
+ the text begins with @\b@), or command (including aliases, func-
+ tions, and builtins) in turn. If none of these produces a
match, it falls back to filename completion.
p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs (\b(M\bM-\b-?\b?)\b)
- List the possible completions of the text before point. When
+ List the possible completions of the text before point. When
displaying completions, r\bre\bea\bad\bdl\bli\bin\bne\be sets the number of columns used
- for display to the value of c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn-\b-d\bdi\bis\bsp\bpl\bla\bay\by-\b-w\bwi\bid\bdt\bth\bh, the value
- of the shell variable C\bCO\bOL\bLU\bUM\bMN\bNS\bS, or the screen width, in that or-
+ for display to the value of c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn-\b-d\bdi\bis\bsp\bpl\bla\bay\by-\b-w\bwi\bid\bdt\bth\bh, the value
+ of the shell variable C\bCO\bOL\bLU\bUM\bMN\bNS\bS, or the screen width, in that or-
der.
i\bin\bns\bse\ber\brt\bt-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs (\b(M\bM-\b-*\b*)\b)
- Insert all completions of the text before point that would have
+ Insert all completions of the text before point that would have
been generated by p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs, separated by a space.
m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be
- Similar to c\bco\bom\bmp\bpl\ble\bet\bte\be, but replaces the word to be completed with
- a single match from the list of possible completions. Repeat-
- edly executing m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be steps through the list of possible
- completions, inserting each match in turn. At the end of the
- list of completions, m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be rings the bell (subject to
- the setting of b\bbe\bel\bll\bl-\b-s\bst\bty\byl\ble\be) and restores the original text. An
- argument of _\bn moves _\bn positions forward in the list of matches;
- a negative argument moves backward through the list. This com-
+ Similar to c\bco\bom\bmp\bpl\ble\bet\bte\be, but replaces the word to be completed with
+ a single match from the list of possible completions. Repeat-
+ edly executing m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be steps through the list of possible
+ completions, inserting each match in turn. At the end of the
+ list of completions, m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be rings the bell (subject to
+ the setting of b\bbe\bel\bll\bl-\b-s\bst\bty\byl\ble\be) and restores the original text. An
+ argument of _\bn moves _\bn positions forward in the list of matches;
+ a negative argument moves backward through the list. This com-
mand is intended to be bound to T\bTA\bAB\bB, but is unbound by default.
m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd
- Identical to m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be, but moves backward through the list
- of possible completions, as if m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be had been given a
+ Identical to m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be, but moves backward through the list
+ of possible completions, as if m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be had been given a
negative argument. This command is unbound by default.
e\bex\bxp\bpo\bor\brt\bt-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs
- Perform completion on the word before point as described above
- and write the list of possible completions to r\bre\bea\bad\bdl\bli\bin\bne\be's output
- stream using the following format, writing information on sepa-
+ Perform completion on the word before point as described above
+ and write the list of possible completions to r\bre\bea\bad\bdl\bli\bin\bne\be's output
+ stream using the following format, writing information on sepa-
rate lines:
+\bo the number of matches _\bN;
+\bo the word being completed;
- +\bo _\bS:_\bE, where _\bS and _\bE are the start and end offsets of the
+ +\bo _\bS:_\bE, where _\bS and _\bE are the start and end offsets of the
word in the r\bre\bea\bad\bdl\bli\bin\bne\be line buffer; then
+\bo each match, one per line
- If there are no matches, the first line will be "0", and this
- command does not print any output after the _\bS:_\bE. If there is
- only a single match, this prints a single line containing it.
- If there is more than one match, this prints the common prefix
- of the matches, which may be empty, on the first line after the
+ If there are no matches, the first line will be "0", and this
+ command does not print any output after the _\bS:_\bE. If there is
+ only a single match, this prints a single line containing it.
+ If there is more than one match, this prints the common prefix
+ of the matches, which may be empty, on the first line after the
_\bS:_\bE, then the matches on subsequent lines. In this case, _\bN will
include the first line with the common prefix.
The user or application should be able to accommodate the possi-
bility of a blank line. The intent is that the user or applica-
- tion reads _\bN lines after the line containing _\bS:_\bE to obtain the
+ tion reads _\bN lines after the line containing _\bS:_\bE to obtain the
match list. This command is unbound by default.
d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br-\b-o\bor\br-\b-l\bli\bis\bst\bt
- Deletes the character under the cursor if not at the beginning
- or end of the line (like d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br). At the end of the line,
+ Deletes the character under the cursor if not at the beginning
+ or end of the line (like d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br). At the end of the line,
it behaves identically to p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs. This command is
unbound by default.
it as a filename.
c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-u\bus\bse\ber\brn\bna\bam\bme\be (\b(M\bM-\b-~\b~)\b)
- Attempt completion on the text before point, treating it as a
+ Attempt completion on the text before point, treating it as a
username.
p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-u\bus\bse\ber\brn\bna\bam\bme\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs (\b(C\bC-\b-x\bx ~\b~)\b)
it as a username.
c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-v\bva\bar\bri\bia\bab\bbl\ble\be (\b(M\bM-\b-$\b$)\b)
- Attempt completion on the text before point, treating it as a
+ Attempt completion on the text before point, treating it as a
shell variable.
p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-v\bva\bar\bri\bia\bab\bbl\ble\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs (\b(C\bC-\b-x\bx $\b$)\b)
it as a shell variable.
c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-h\bho\bos\bst\btn\bna\bam\bme\be (\b(M\bM-\b-@\b@)\b)
- Attempt completion on the text before point, treating it as a
+ Attempt completion on the text before point, treating it as a
hostname.
p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-h\bho\bos\bst\btn\bna\bam\bme\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs (\b(C\bC-\b-x\bx @\b@)\b)
it as a hostname.
c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-c\bco\bom\bmm\bma\ban\bnd\bd (\b(M\bM-\b-!\b!)\b)
- Attempt completion on the text before point, treating it as a
- command name. Command completion attempts to match the text
- against aliases, reserved words, shell functions, shell
+ Attempt completion on the text before point, treating it as a
+ command name. Command completion attempts to match the text
+ against aliases, reserved words, shell functions, shell
builtins, and finally executable filenames, in that order.
p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-c\bco\bom\bmm\bma\ban\bnd\bd-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs (\b(C\bC-\b-x\bx !\b!)\b)
it as a command name.
d\bdy\byn\bna\bam\bmi\bic\bc-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(M\bM-\b-T\bTA\bAB\bB)\b)
- Attempt completion on the text before point, comparing the text
+ Attempt completion on the text before point, comparing the text
against history list entries for possible completion matches.
d\bda\bab\bbb\bbr\bre\bev\bv-\b-e\bex\bxp\bpa\ban\bnd\bd
- Attempt menu completion on the text before point, comparing the
+ Attempt menu completion on the text before point, comparing the
text against lines from the history list for possible completion
matches.
c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-i\bin\bnt\bto\bo-\b-b\bbr\bra\bac\bce\bes\bs (\b(M\bM-\b-{\b{)\b)
Perform filename completion and insert the list of possible com-
- pletions enclosed within braces so the list is available to the
+ pletions enclosed within braces so the list is available to the
shell (see B\bBr\bra\bac\bce\be E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn above).
K\bKe\bey\byb\bbo\boa\bar\brd\bd M\bMa\bac\bcr\bro\bos\bs
s\bst\bta\bar\brt\bt-\b-k\bkb\bbd\bd-\b-m\bma\bac\bcr\bro\bo (\b(C\bC-\b-x\bx (\b()\b)
- Begin saving the characters typed into the current keyboard
+ Begin saving the characters typed into the current keyboard
macro.
e\ben\bnd\bd-\b-k\bkb\bbd\bd-\b-m\bma\bac\bcr\bro\bo (\b(C\bC-\b-x\bx )\b))\b)
Stop saving the characters typed into the current keyboard macro
and store the definition.
c\bca\bal\bll\bl-\b-l\bla\bas\bst\bt-\b-k\bkb\bbd\bd-\b-m\bma\bac\bcr\bro\bo (\b(C\bC-\b-x\bx e\be)\b)
- Re-execute the last keyboard macro defined, by making the char-
+ Re-execute the last keyboard macro defined, by making the char-
acters in the macro appear as if typed at the keyboard.
p\bpr\bri\bin\bnt\bt-\b-l\bla\bas\bst\bt-\b-k\bkb\bbd\bd-\b-m\bma\bac\bcr\bro\bo (\b()\b)
- Print the last keyboard macro defined in a format suitable for
+ Print the last keyboard macro defined in a format suitable for
the _\bi_\bn_\bp_\bu_\bt_\br_\bc file.
M\bMi\bis\bsc\bce\bel\bll\bla\ban\bne\beo\bou\bus\bs
r\bre\be-\b-r\bre\bea\bad\bd-\b-i\bin\bni\bit\bt-\b-f\bfi\bil\ble\be (\b(C\bC-\b-x\bx C\bC-\b-r\br)\b)
- Read in the contents of the _\bi_\bn_\bp_\bu_\bt_\br_\bc file, and incorporate any
+ Read in the contents of the _\bi_\bn_\bp_\bu_\bt_\br_\bc file, and incorporate any
bindings or variable assignments found there.
a\bab\bbo\bor\brt\bt (\b(C\bC-\b-g\bg)\b)
- Abort the current editing command and ring the terminal's bell
+ Abort the current editing command and ring the terminal's bell
(subject to the setting of b\bbe\bel\bll\bl-\b-s\bst\bty\byl\ble\be).
d\bdo\bo-\b-l\blo\bow\bwe\ber\brc\bca\bas\bse\be-\b-v\bve\ber\brs\bsi\bio\bon\bn (\b(M\bM-\b-A\bA,\b, M\bM-\b-B\bB,\b, M\bM-\b-_\bx,\b, ...)\b)
- If the metafied character _\bx is uppercase, run the command that
+ If the metafied character _\bx is uppercase, run the command that
is bound to the corresponding metafied lowercase character. The
behavior is undefined if _\bx is already lowercase.
p\bpr\bre\bef\bfi\bix\bx-\b-m\bme\bet\bta\ba (\b(E\bES\bSC\bC)\b)
u\bun\bnd\bdo\bo (\b(C\bC-\b-_\b_,\b, C\bC-\b-x\bx C\bC-\b-u\bu)\b)
Incremental undo, separately remembered for each line.
r\bre\bev\bve\ber\brt\bt-\b-l\bli\bin\bne\be (\b(M\bM-\b-r\br)\b)
- Undo all changes made to this line. This is like executing the
- u\bun\bnd\bdo\bo command enough times to return the line to its initial
+ Undo all changes made to this line. This is like executing the
+ u\bun\bnd\bdo\bo command enough times to return the line to its initial
state.
t\bti\bil\bld\bde\be-\b-e\bex\bxp\bpa\ban\bnd\bd (\b(M\bM-\b-&\b&)\b)
Perform tilde expansion on the current word.
s\bse\bet\bt-\b-m\bma\bar\brk\bk (\b(C\bC-\b-@\b@,\b, M\bM-\b-<\b<s\bsp\bpa\bac\bce\be>\b>)\b)
- Set the mark to the point. If a numeric argument is supplied,
+ Set the mark to the point. If a numeric argument is supplied,
set the mark to that position.
e\bex\bxc\bch\bha\ban\bng\bge\be-\b-p\bpo\boi\bin\bnt\bt-\b-a\ban\bnd\bd-\b-m\bma\bar\brk\bk (\b(C\bC-\b-x\bx C\bC-\b-x\bx)\b)
- Swap the point with the mark. Set the current cursor position
+ Swap the point with the mark. Set the current cursor position
to the saved position, then set the mark to the old cursor posi-
tion.
c\bch\bha\bar\bra\bac\bct\bte\ber\br-\b-s\bse\bea\bar\brc\bch\bh (\b(C\bC-\b-]\b])\b)
- Read a character and move point to the next occurrence of that
- character. A negative argument searches for previous occur-
+ Read a character and move point to the next occurrence of that
+ character. A negative argument searches for previous occur-
rences.
c\bch\bha\bar\bra\bac\bct\bte\ber\br-\b-s\bse\bea\bar\brc\bch\bh-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd (\b(M\bM-\b-C\bC-\b-]\b])\b)
- Read a character and move point to the previous occurrence of
+ Read a character and move point to the previous occurrence of
that character. A negative argument searches for subsequent oc-
currences.
s\bsk\bki\bip\bp-\b-c\bcs\bsi\bi-\b-s\bse\beq\bqu\bue\ben\bnc\bce\be
- Read enough characters to consume a multi-key sequence such as
- those defined for keys like Home and End. CSI sequences begin
+ Read enough characters to consume a multi-key sequence such as
+ those defined for keys like Home and End. CSI sequences begin
with a Control Sequence Indicator (CSI), usually _\bE_\bS_\bC _\b[. If this
sequence is bound to "\e[", keys producing CSI sequences have no
effect unless explicitly bound to a r\bre\bea\bad\bdl\bli\bin\bne\be command, instead of
inserting stray characters into the editing buffer. This is un-
bound by default, but usually bound to _\bE_\bS_\bC _\b[.
i\bin\bns\bse\ber\brt\bt-\b-c\bco\bom\bmm\bme\ben\bnt\bt (\b(M\bM-\b-#\b#)\b)
- Without a numeric argument, insert the value of the r\bre\bea\bad\bdl\bli\bin\bne\be
+ Without a numeric argument, insert the value of the r\bre\bea\bad\bdl\bli\bin\bne\be
c\bco\bom\bmm\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bn variable at the beginning of the current line. If
- a numeric argument is supplied, this command acts as a toggle:
- if the characters at the beginning of the line do not match the
- value of c\bco\bom\bmm\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bn, insert the value; otherwise delete the
- characters in c\bco\bom\bmm\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bn from the beginning of the line. In
- either case, the line is accepted as if a newline had been
- typed. The default value of c\bco\bom\bmm\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bn causes this command
+ a numeric argument is supplied, this command acts as a toggle:
+ if the characters at the beginning of the line do not match the
+ value of c\bco\bom\bmm\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bn, insert the value; otherwise delete the
+ characters in c\bco\bom\bmm\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bn from the beginning of the line. In
+ either case, the line is accepted as if a newline had been
+ typed. The default value of c\bco\bom\bmm\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bn causes this command
to make the current line a shell comment. If a numeric argument
causes the comment character to be removed, the line will be ex-
ecuted by the shell.
s\bsp\bpe\bel\bll\bl-\b-c\bco\bor\brr\bre\bec\bct\bt-\b-w\bwo\bor\brd\bd (\b(C\bC-\b-x\bx s\bs)\b)
- Perform spelling correction on the current word, treating it as
- a directory or filename, in the same way as the c\bcd\bds\bsp\bpe\bel\bll\bl shell
- option. Word boundaries are the same as those used by
+ Perform spelling correction on the current word, treating it as
+ a directory or filename, in the same way as the c\bcd\bds\bsp\bpe\bel\bll\bl shell
+ option. Word boundaries are the same as those used by
s\bsh\bhe\bel\bll\bl-\b-f\bfo\bor\brw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
g\bgl\blo\bob\bb-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-g\bg)\b)
Treat the word before point as a pattern for pathname expansion,
- with an asterisk implicitly appended, then use the pattern to
+ with an asterisk implicitly appended, then use the pattern to
generate a list of matching file names for possible completions.
g\bgl\blo\bob\bb-\b-e\bex\bxp\bpa\ban\bnd\bd-\b-w\bwo\bor\brd\bd (\b(C\bC-\b-x\bx *\b*)\b)
Treat the word before point as a pattern for pathname expansion,
- and insert the list of matching file names, replacing the word.
- If a numeric argument is supplied, append a *\b* before pathname
+ and insert the list of matching file names, replacing the word.
+ If a numeric argument is supplied, append a *\b* before pathname
expansion.
g\bgl\blo\bob\bb-\b-l\bli\bis\bst\bt-\b-e\bex\bxp\bpa\ban\bns\bsi\bio\bon\bns\bs (\b(C\bC-\b-x\bx g\bg)\b)
Display the list of expansions that would have been generated by
- g\bgl\blo\bob\bb-\b-e\bex\bxp\bpa\ban\bnd\bd-\b-w\bwo\bor\brd\bd and redisplay the line. If a numeric argument
+ g\bgl\blo\bob\bb-\b-e\bex\bxp\bpa\ban\bnd\bd-\b-w\bwo\bor\brd\bd and redisplay the line. If a numeric argument
is supplied, append a *\b* before pathname expansion.
d\bdu\bum\bmp\bp-\b-f\bfu\bun\bnc\bct\bti\bio\bon\bns\bs
- Print all of the functions and their key bindings to the r\bre\bea\bad\bd-\b-
+ Print all of the functions and their key bindings to the r\bre\bea\bad\bd-\b-
l\bli\bin\bne\be output stream. If a numeric argument is supplied, the out-
- put is formatted in such a way that it can be made part of an
+ put is formatted in such a way that it can be made part of an
_\bi_\bn_\bp_\bu_\bt_\br_\bc file.
d\bdu\bum\bmp\bp-\b-v\bva\bar\bri\bia\bab\bbl\ble\bes\bs
Print all of the settable r\bre\bea\bad\bdl\bli\bin\bne\be variables and their values to
- the r\bre\bea\bad\bdl\bli\bin\bne\be output stream. If a numeric argument is supplied,
- the output is formatted in such a way that it can be made part
+ the r\bre\bea\bad\bdl\bli\bin\bne\be output stream. If a numeric argument is supplied,
+ the output is formatted in such a way that it can be made part
of an _\bi_\bn_\bp_\bu_\bt_\br_\bc file.
d\bdu\bum\bmp\bp-\b-m\bma\bac\bcr\bro\bos\bs
- Print all of the r\bre\bea\bad\bdl\bli\bin\bne\be key sequences bound to macros and the
+ Print all of the r\bre\bea\bad\bdl\bli\bin\bne\be key sequences bound to macros and the
strings they output to the r\bre\bea\bad\bdl\bli\bin\bne\be output stream. If a numeric
argument is supplied, the output is formatted in such a way that
it can be made part of an _\bi_\bn_\bp_\bu_\bt_\br_\bc file.
e\bex\bxe\bec\bcu\but\bte\be-\b-n\bna\bam\bme\bed\bd-\b-c\bco\bom\bmm\bma\ban\bnd\bd (\b(M\bM-\b-x\bx)\b)
Read a bindable r\bre\bea\bad\bdl\bli\bin\bne\be command name from the input and execute
- the function to which it's bound, as if the key sequence to
- which it was bound appeared in the input. If this function is
+ the function to which it's bound, as if the key sequence to
+ which it was bound appeared in the input. If this function is
supplied with a numeric argument, it passes that argument to the
function it executes.
d\bdi\bis\bsp\bpl\bla\bay\by-\b-s\bsh\bhe\bel\bll\bl-\b-v\bve\ber\brs\bsi\bio\bon\bn (\b(C\bC-\b-x\bx C\bC-\b-v\bv)\b)
Display version information about the current instance of b\bba\bas\bsh\bh.
P\bPr\bro\bog\bgr\bra\bam\bmm\bma\bab\bbl\ble\be C\bCo\bom\bmp\bpl\ble\bet\bti\bio\bon\bn
- When a user attempts word completion for a command or an argument to a
- command for which a completion specification (a _\bc_\bo_\bm_\bp_\bs_\bp_\be_\bc) has been de-
- fined using the c\bco\bom\bmp\bpl\ble\bet\bte\be builtin (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below),
+ When a user attempts word completion for a command or an argument to a
+ command for which a completion specification (a _\bc_\bo_\bm_\bp_\bs_\bp_\be_\bc) has been de-
+ fined using the c\bco\bom\bmp\bpl\ble\bet\bte\be builtin (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below),
r\bre\bea\bad\bdl\bli\bin\bne\be invokes the programmable completion facilities.
- First, b\bba\bas\bsh\bh identifies the command name. If a compspec has been de-
- fined for that command, the compspec is used to generate the list of
- possible completions for the word. If the command word is the empty
- string (completion attempted at the beginning of an empty line), b\bba\bas\bsh\bh
- uses any compspec defined with the -\b-E\bE option to c\bco\bom\bmp\bpl\ble\bet\bte\be. The -\b-I\bI op-
- tion to c\bco\bom\bmp\bpl\ble\bet\bte\be indicates that the command word is the first non-as-
+ First, b\bba\bas\bsh\bh identifies the command name. If a compspec has been de-
+ fined for that command, the compspec is used to generate the list of
+ possible completions for the word. If the command word is the empty
+ string (completion attempted at the beginning of an empty line), b\bba\bas\bsh\bh
+ uses any compspec defined with the -\b-E\bE option to c\bco\bom\bmp\bpl\ble\bet\bte\be. The -\b-I\bI op-
+ tion to c\bco\bom\bmp\bpl\ble\bet\bte\be indicates that the command word is the first non-as-
signment word on the line, or after a command delimiter such as ;\b; or |\b|.
This usually indicates command name completion.
- If the command word is a full pathname, b\bba\bas\bsh\bh searches for a compspec
- for the full pathname first. If there is no compspec for the full
- pathname, b\bba\bas\bsh\bh attempts to find a compspec for the portion following
- the final slash. If those searches do not result in a compspec, or if
- there is no compspec for the command word, b\bba\bas\bsh\bh uses any compspec de-
- fined with the -\b-D\bD option to c\bco\bom\bmp\bpl\ble\bet\bte\be as the default. If there is no
- default compspec, b\bba\bas\bsh\bh performs alias expansion on the command word as
- a final resort, and attempts to find a compspec for the command word
+ If the command word is a full pathname, b\bba\bas\bsh\bh searches for a compspec
+ for the full pathname first. If there is no compspec for the full
+ pathname, b\bba\bas\bsh\bh attempts to find a compspec for the portion following
+ the final slash. If those searches do not result in a compspec, or if
+ there is no compspec for the command word, b\bba\bas\bsh\bh uses any compspec de-
+ fined with the -\b-D\bD option to c\bco\bom\bmp\bpl\ble\bet\bte\be as the default. If there is no
+ default compspec, b\bba\bas\bsh\bh performs alias expansion on the command word as
+ a final resort, and attempts to find a compspec for the command word
resulting from any successful expansion.
If a compspec is not found, b\bba\bas\bsh\bh performs its default completion as de-
- scribed above under C\bCo\bom\bmp\bpl\ble\bet\bti\bin\bng\bg. Otherwise, once a compspec has been
+ scribed above under C\bCo\bom\bmp\bpl\ble\bet\bti\bin\bng\bg. Otherwise, once a compspec has been
found, b\bba\bas\bsh\bh uses it to generate the list of matching words.
- First, b\bba\bas\bsh\bh performs the _\ba_\bc_\bt_\bi_\bo_\bn_\bs specified by the compspec. This only
- returns matches which are prefixes of the word being completed. When
- the -\b-f\bf or -\b-d\bd option is used for filename or directory name completion,
+ First, b\bba\bas\bsh\bh performs the _\ba_\bc_\bt_\bi_\bo_\bn_\bs specified by the compspec. This only
+ returns matches which are prefixes of the word being completed. When
+ the -\b-f\bf or -\b-d\bd option is used for filename or directory name completion,
b\bba\bas\bsh\bh uses the shell variable F\bFI\bIG\bGN\bNO\bOR\bRE\bE to filter the matches.
Next, programmable completion generates matches specified by a pathname
- expansion pattern supplied as an argument to the -\b-G\bG option. The words
+ expansion pattern supplied as an argument to the -\b-G\bG option. The words
generated by the pattern need not match the word being completed. B\bBa\bas\bsh\bh
- uses the F\bFI\bIG\bGN\bNO\bOR\bRE\bE variable to filter the matches, but does not use the
+ uses the F\bFI\bIG\bGN\bNO\bOR\bRE\bE variable to filter the matches, but does not use the
G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE shell variable.
- Next, completion considers the string specified as the argument to the
- -\b-W\bW option. The string is first split using the characters in the I\bIF\bFS\bS
- special variable as delimiters. This honors shell quoting within the
- string, in order to provide a mechanism for the words to contain shell
- metacharacters or characters in the value of I\bIF\bFS\bS. Each word is then
+ Next, completion considers the string specified as the argument to the
+ -\b-W\bW option. The string is first split using the characters in the I\bIF\bFS\bS
+ special variable as delimiters. This honors shell quoting within the
+ string, in order to provide a mechanism for the words to contain shell
+ metacharacters or characters in the value of I\bIF\bFS\bS. Each word is then
expanded using brace expansion, tilde expansion, parameter and variable
expansion, command substitution, and arithmetic expansion, as described
above under E\bEX\bXP\bPA\bAN\bNS\bSI\bIO\bON\bN. The results are split using the rules described
- above under W\bWo\bor\brd\bd S\bSp\bpl\bli\bit\btt\bti\bin\bng\bg. The results of the expansion are prefix-
+ above under W\bWo\bor\brd\bd S\bSp\bpl\bli\bit\btt\bti\bin\bng\bg. The results of the expansion are prefix-
matched against the word being completed, and the matching words become
possible completions.
- After these matches have been generated, b\bba\bas\bsh\bh executes any shell func-
+ After these matches have been generated, b\bba\bas\bsh\bh executes any shell func-
tion or command specified with the -\b-F\bF and -\b-C\bC options. When the command
- or function is invoked, b\bba\bas\bsh\bh assigns values to the C\bCO\bOM\bMP\bP_\b_L\bLI\bIN\bNE\bE,
- C\bCO\bOM\bMP\bP_\b_P\bPO\bOI\bIN\bNT\bT, C\bCO\bOM\bMP\bP_\b_K\bKE\bEY\bY, and C\bCO\bOM\bMP\bP_\b_T\bTY\bYP\bPE\bE variables as described above under
- S\bSh\bhe\bel\bll\bl V\bVa\bar\bri\bia\bab\bbl\ble\bes\bs. If a shell function is being invoked, b\bba\bas\bsh\bh also sets
- the C\bCO\bOM\bMP\bP_\b_W\bWO\bOR\bRD\bDS\bS and C\bCO\bOM\bMP\bP_\b_C\bCW\bWO\bOR\bRD\bD variables. When the function or command
- is invoked, the first argument ($\b$1\b1) is the name of the command whose
+ or function is invoked, b\bba\bas\bsh\bh assigns values to the C\bCO\bOM\bMP\bP_\b_L\bLI\bIN\bNE\bE,
+ C\bCO\bOM\bMP\bP_\b_P\bPO\bOI\bIN\bNT\bT, C\bCO\bOM\bMP\bP_\b_K\bKE\bEY\bY, and C\bCO\bOM\bMP\bP_\b_T\bTY\bYP\bPE\bE variables as described above under
+ S\bSh\bhe\bel\bll\bl V\bVa\bar\bri\bia\bab\bbl\ble\bes\bs. If a shell function is being invoked, b\bba\bas\bsh\bh also sets
+ the C\bCO\bOM\bMP\bP_\b_W\bWO\bOR\bRD\bDS\bS and C\bCO\bOM\bMP\bP_\b_C\bCW\bWO\bOR\bRD\bD variables. When the function or command
+ is invoked, the first argument ($\b$1\b1) is the name of the command whose
arguments are being completed, the second argument ($\b$2\b2) is the word be-
- ing completed, and the third argument ($\b$3\b3) is the word preceding the
- word being completed on the current command line. There is no filter-
- ing of the generated completions against the word being completed; the
- function or command has complete freedom in generating the matches and
+ ing completed, and the third argument ($\b$3\b3) is the word preceding the
+ word being completed on the current command line. There is no filter-
+ ing of the generated completions against the word being completed; the
+ function or command has complete freedom in generating the matches and
they do not need to match a prefix of the word.
- Any function specified with -\b-F\bF is invoked first. The function may use
+ Any function specified with -\b-F\bF is invoked first. The function may use
any of the shell facilities, including the c\bco\bom\bmp\bpg\bge\ben\bn and c\bco\bom\bmp\bpo\bop\bpt\bt builtins
- described below, to generate the matches. It must put the possible
+ described below, to generate the matches. It must put the possible
completions in the C\bCO\bOM\bMP\bPR\bRE\bEP\bPL\bLY\bY array variable, one per array element.
- Next, any command specified with the -\b-C\bC option is invoked in an envi-
- ronment equivalent to command substitution. It should print a list of
- completions, one per line, to the standard output. Backslash will es-
- cape a newline, if necessary. These are added to the set of possible
+ Next, any command specified with the -\b-C\bC option is invoked in an envi-
+ ronment equivalent to command substitution. It should print a list of
+ completions, one per line, to the standard output. Backslash will es-
+ cape a newline, if necessary. These are added to the set of possible
completions.
- External commands that are invoked to generate completions ( "external
+ External commands that are invoked to generate completions ( "external
completers") receive the word preceding the completion word as an argu-
ment, as described above. This provides context that is sometimes use-
- ful, but may include information that is considered sensitive or part
- of a word expansion that will not appear in the command line after ex-
- pansion. That word may be visible in process listings or in audit
- logs. This may be a concern to users and completion specification au-
- thors if there is sensitive information on the command line before ex-
- pansion, since completion takes place before words are expanded. If
- this is an issue, completion authors should use functions as wrappers
- around external commands and pass context information to the external
+ ful, but may include information that is considered sensitive or part
+ of a word expansion that will not appear in the command line after ex-
+ pansion. That word may be visible in process listings or in audit
+ logs. This may be a concern to users and completion specification au-
+ thors if there is sensitive information on the command line before ex-
+ pansion, since completion takes place before words are expanded. If
+ this is an issue, completion authors should use functions as wrappers
+ around external commands and pass context information to the external
command in a different way. External completers can infer context from
- the C\bCO\bOM\bMP\bP_\b_L\bLI\bIN\bNE\bE and C\bCO\bOM\bMP\bP_\b_P\bPO\bOI\bIN\bNT\bT environment variables, but they need to
- ensure they break words in the same way r\bre\bea\bad\bdl\bli\bin\bne\be does, using the
+ the C\bCO\bOM\bMP\bP_\b_L\bLI\bIN\bNE\bE and C\bCO\bOM\bMP\bP_\b_P\bPO\bOI\bIN\bNT\bT environment variables, but they need to
+ ensure they break words in the same way r\bre\bea\bad\bdl\bli\bin\bne\be does, using the
C\bCO\bOM\bMP\bP_\b_W\bWO\bOR\bRD\bDB\bBR\bRE\bEA\bAK\bKS\bS variable.
After generating all of the possible completions, b\bba\bas\bsh\bh applies any fil-
- ter specified with the -\b-X\bX option to the completions in the list. The
- filter is a pattern as used for pathname expansion; a &\b& in the pattern
+ ter specified with the -\b-X\bX option to the completions in the list. The
+ filter is a pattern as used for pathname expansion; a &\b& in the pattern
is replaced with the text of the word being completed. A literal &\b& may
be escaped with a backslash; the backslash is removed before attempting
- a match. Any completion that matches the pattern is removed from the
- list. A leading !\b! negates the pattern; in this case b\bba\bas\bsh\bh removes any
- completion that does not match the pattern. If the n\bno\boc\bca\bas\bse\bem\bma\bat\btc\bch\bh shell
- option is enabled, b\bba\bas\bsh\bh performs the match without regard to the case
+ a match. Any completion that matches the pattern is removed from the
+ list. A leading !\b! negates the pattern; in this case b\bba\bas\bsh\bh removes any
+ completion that does not match the pattern. If the n\bno\boc\bca\bas\bse\bem\bma\bat\btc\bch\bh shell
+ option is enabled, b\bba\bas\bsh\bh performs the match without regard to the case
of alphabetic characters.
- Finally, programmable completion adds any prefix and suffix specified
- with the -\b-P\bP and -\b-S\bS options, respectively, to each completion, and re-
+ Finally, programmable completion adds any prefix and suffix specified
+ with the -\b-P\bP and -\b-S\bS options, respectively, to each completion, and re-
turns the result to r\bre\bea\bad\bdl\bli\bin\bne\be as the list of possible completions.
- If the previously-applied actions do not generate any matches, and the
- -\b-o\bo d\bdi\bir\brn\bna\bam\bme\bes\bs option was supplied to c\bco\bom\bmp\bpl\ble\bet\bte\be when the compspec was de-
+ If the previously-applied actions do not generate any matches, and the
+ -\b-o\bo d\bdi\bir\brn\bna\bam\bme\bes\bs option was supplied to c\bco\bom\bmp\bpl\ble\bet\bte\be when the compspec was de-
fined, b\bba\bas\bsh\bh attempts directory name completion.
- If the -\b-o\bo p\bpl\blu\bus\bsd\bdi\bir\brs\bs option was supplied to c\bco\bom\bmp\bpl\ble\bet\bte\be when the compspec
- was defined, b\bba\bas\bsh\bh attempts directory name completion and adds any
+ If the -\b-o\bo p\bpl\blu\bus\bsd\bdi\bir\brs\bs option was supplied to c\bco\bom\bmp\bpl\ble\bet\bte\be when the compspec
+ was defined, b\bba\bas\bsh\bh attempts directory name completion and adds any
matches to the set of possible completions.
- By default, if a compspec is found, whatever it generates is returned
- to the completion code as the full set of possible completions. The
- default b\bba\bas\bsh\bh completions and the r\bre\bea\bad\bdl\bli\bin\bne\be default of filename comple-
- tion are disabled. If the -\b-o\bo b\bba\bas\bsh\bhd\bde\bef\bfa\bau\bul\blt\bt option was supplied to c\bco\bom\bm-\b-
- p\bpl\ble\bet\bte\be when the compspec was defined, and the compspec generates no
- matches, b\bba\bas\bsh\bh attempts its default completions. If the compspec and,
+ By default, if a compspec is found, whatever it generates is returned
+ to the completion code as the full set of possible completions. The
+ default b\bba\bas\bsh\bh completions and the r\bre\bea\bad\bdl\bli\bin\bne\be default of filename comple-
+ tion are disabled. If the -\b-o\bo b\bba\bas\bsh\bhd\bde\bef\bfa\bau\bul\blt\bt option was supplied to c\bco\bom\bm-\b-
+ p\bpl\ble\bet\bte\be when the compspec was defined, and the compspec generates no
+ matches, b\bba\bas\bsh\bh attempts its default completions. If the compspec and,
if attempted, the default b\bba\bas\bsh\bh completions generate no matches, and the
- -\b-o\bo d\bde\bef\bfa\bau\bul\blt\bt option was supplied to c\bco\bom\bmp\bpl\ble\bet\bte\be when the compspec was de-
+ -\b-o\bo d\bde\bef\bfa\bau\bul\blt\bt option was supplied to c\bco\bom\bmp\bpl\ble\bet\bte\be when the compspec was de-
fined, programmable completion performs r\bre\bea\bad\bdl\bli\bin\bne\be's default completion.
- The options supplied to c\bco\bom\bmp\bpl\ble\bet\bte\be and c\bco\bom\bmp\bpo\bop\bpt\bt can control how r\bre\bea\bad\bdl\bli\bin\bne\be
- treats the completions. For instance, the _\b-_\bo _\bf_\bu_\bl_\bl_\bq_\bu_\bo_\bt_\be option tells
- r\bre\bea\bad\bdl\bli\bin\bne\be to quote the matches as if they were filenames. See the de-
+ The options supplied to c\bco\bom\bmp\bpl\ble\bet\bte\be and c\bco\bom\bmp\bpo\bop\bpt\bt can control how r\bre\bea\bad\bdl\bli\bin\bne\be
+ treats the completions. For instance, the _\b-_\bo _\bf_\bu_\bl_\bl_\bq_\bu_\bo_\bt_\be option tells
+ r\bre\bea\bad\bdl\bli\bin\bne\be to quote the matches as if they were filenames. See the de-
scription of c\bco\bom\bmp\bpl\ble\bet\bte\be below for details.
- When a compspec indicates that it wants directory name completion, the
- programmable completion functions force r\bre\bea\bad\bdl\bli\bin\bne\be to append a slash to
+ When a compspec indicates that it wants directory name completion, the
+ programmable completion functions force r\bre\bea\bad\bdl\bli\bin\bne\be to append a slash to
completed names which are symbolic links to directories, subject to the
value of the m\bma\bar\brk\bk-\b-d\bdi\bir\bre\bec\bct\bto\bor\bri\bie\bes\bs r\bre\bea\bad\bdl\bli\bin\bne\be variable, regardless of the set-
ting of the m\bma\bar\brk\bk-\b-s\bsy\bym\bml\bli\bin\bnk\bke\bed\bd-\b-d\bdi\bir\bre\bec\bct\bto\bor\bri\bie\bes\bs r\bre\bea\bad\bdl\bli\bin\bne\be variable.
- There is some support for dynamically modifying completions. This is
- most useful when used in combination with a default completion speci-
- fied with c\bco\bom\bmp\bpl\ble\bet\bte\be -\b-D\bD. It's possible for shell functions executed as
- completion functions to indicate that completion should be retried by
- returning an exit status of 124. If a shell function returns 124, and
+ There is some support for dynamically modifying completions. This is
+ most useful when used in combination with a default completion speci-
+ fied with c\bco\bom\bmp\bpl\ble\bet\bte\be -\b-D\bD. It's possible for shell functions executed as
+ completion functions to indicate that completion should be retried by
+ returning an exit status of 124. If a shell function returns 124, and
changes the compspec associated with the command on which completion is
- being attempted (supplied as the first argument when the function is
+ being attempted (supplied as the first argument when the function is
executed), programmable completion restarts from the beginning, with an
- attempt to find a new compspec for that command. This can be used to
- build a set of completions dynamically as completion is attempted,
+ attempt to find a new compspec for that command. This can be used to
+ build a set of completions dynamically as completion is attempted,
rather than loading them all at once.
- For instance, assuming that there is a library of compspecs, each kept
- in a file corresponding to the name of the command, the following de-
+ For instance, assuming that there is a library of compspecs, each kept
+ in a file corresponding to the name of the command, the following de-
fault completion function would load completions dynamically:
_completion_loader()
{
-o bashdefault -o default
H\bHI\bIS\bST\bTO\bOR\bRY\bY
- When the -\b-o\bo h\bhi\bis\bst\bto\bor\bry\by option to the s\bse\bet\bt builtin is enabled, the shell
+ When the -\b-o\bo h\bhi\bis\bst\bto\bor\bry\by option to the s\bse\bet\bt builtin is enabled, the shell
provides access to the _\bc_\bo_\bm_\bm_\ba_\bn_\bd _\bh_\bi_\bs_\bt_\bo_\br_\by, the list of commands previously
- typed. The value of the H\bHI\bIS\bST\bTS\bSI\bIZ\bZE\bE variable is used as the number of
- commands to save in a history list: the shell saves the text of the
+ typed. The value of the H\bHI\bIS\bST\bTS\bSI\bIZ\bZE\bE variable is used as the number of
+ commands to save in a history list: the shell saves the text of the
last H\bHI\bIS\bST\bTS\bSI\bIZ\bZE\bE commands (default 500). The shell stores each command in
- the history list prior to parameter and variable expansion (see E\bEX\bXP\bPA\bAN\bN-\b-
- S\bSI\bIO\bON\bN above) but after history expansion is performed, subject to the
+ the history list prior to parameter and variable expansion (see E\bEX\bXP\bPA\bAN\bN-\b-
+ S\bSI\bIO\bON\bN above) but after history expansion is performed, subject to the
values of the shell variables H\bHI\bIS\bST\bTI\bIG\bGN\bNO\bOR\bRE\bE and H\bHI\bIS\bST\bTC\bCO\bON\bNT\bTR\bRO\bOL\bL.
- On startup, b\bba\bas\bsh\bh initializes the history list by reading history en-
- tries from the file named by the H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE variable (default
- _\b~_\b/_\b._\bb_\ba_\bs_\bh_\b__\bh_\bi_\bs_\bt_\bo_\br_\by). That file is referred to as the _\bh_\bi_\bs_\bt_\bo_\br_\by _\bf_\bi_\bl_\be. The
- history file is truncated, if necessary, to contain no more than the
- number of history entries specified by the value of the H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bES\bSI\bIZ\bZE\bE
- variable. If H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bES\bSI\bIZ\bZE\bE is unset, or set to null, a non-numeric
+ On startup, b\bba\bas\bsh\bh initializes the history list by reading history en-
+ tries from the file named by the H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE variable (default
+ _\b~_\b/_\b._\bb_\ba_\bs_\bh_\b__\bh_\bi_\bs_\bt_\bo_\br_\by). That file is referred to as the _\bh_\bi_\bs_\bt_\bo_\br_\by _\bf_\bi_\bl_\be. The
+ history file is truncated, if necessary, to contain no more than the
+ number of history entries specified by the value of the H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bES\bSI\bIZ\bZE\bE
+ variable. If H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bES\bSI\bIZ\bZE\bE is unset, or set to null, a non-numeric
value, or a numeric value less than zero, the history file is not trun-
cated.
When the history file is read, lines beginning with the history comment
character followed immediately by a digit are interpreted as timestamps
- for the following history line. These timestamps are optionally dis-
- played depending on the value of the H\bHI\bIS\bST\bTT\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT variable. When
- present, history timestamps delimit history entries, making multi-line
+ for the following history line. These timestamps are optionally dis-
+ played depending on the value of the H\bHI\bIS\bST\bTT\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT variable. When
+ present, history timestamps delimit history entries, making multi-line
entries possible.
When a shell with history enabled exits, b\bba\bas\bsh\bh copies the last $\b$H\bHI\bIS\bST\bTS\bSI\bIZ\bZE\bE
- entries from the history list to $\b$H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE. If the h\bhi\bis\bst\bta\bap\bpp\bpe\ben\bnd\bd shell
- option is enabled (see the description of s\bsh\bho\bop\bpt\bt under S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN
- C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below), b\bba\bas\bsh\bh appends the entries to the history file, other-
- wise it overwrites the history file. If H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE is unset or null, or
- if the history file is unwritable, the history is not saved. After
- saving the history, b\bba\bas\bsh\bh truncates the history file to contain no more
+ entries from the history list to $\b$H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE. If the h\bhi\bis\bst\bta\bap\bpp\bpe\ben\bnd\bd shell
+ option is enabled (see the description of s\bsh\bho\bop\bpt\bt under S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN
+ C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below), b\bba\bas\bsh\bh appends the entries to the history file, other-
+ wise it overwrites the history file. If H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE is unset or null, or
+ if the history file is unwritable, the history is not saved. After
+ saving the history, b\bba\bas\bsh\bh truncates the history file to contain no more
than H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bES\bSI\bIZ\bZE\bE lines as described above.
- If the H\bHI\bIS\bST\bTT\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT variable is set, the shell writes the timestamp
- information associated with each history entry to the history file,
- marked with the history comment character, so timestamps are preserved
+ If the H\bHI\bIS\bST\bTT\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT variable is set, the shell writes the timestamp
+ information associated with each history entry to the history file,
+ marked with the history comment character, so timestamps are preserved
across shell sessions. This uses the history comment character to dis-
- tinguish timestamps from other history lines. As above, when using
+ tinguish timestamps from other history lines. As above, when using
H\bHI\bIS\bST\bTT\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT, the timestamps delimit multi-line history entries.
- The f\bfc\bc builtin command (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below) will list or
+ The f\bfc\bc builtin command (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below) will list or
edit and re-execute a portion of the history list. The h\bhi\bis\bst\bto\bor\bry\by builtin
can display or modify the history list and manipulate the history file.
- When using command-line editing, search commands are available in each
+ When using command-line editing, search commands are available in each
editing mode that provide access to the history list.
- The shell allows control over which commands are saved on the history
+ The shell allows control over which commands are saved on the history
list. The H\bHI\bIS\bST\bTC\bCO\bON\bNT\bTR\bRO\bOL\bL and H\bHI\bIS\bST\bTI\bIG\bGN\bNO\bOR\bRE\bE variables are used to save only a
- subset of the commands entered. If the c\bcm\bmd\bdh\bhi\bis\bst\bt shell option is en-
- abled, the shell attempts to save each line of a multi-line command in
- the same history entry, adding semicolons where necessary to preserve
- syntactic correctness. The l\bli\bit\bth\bhi\bis\bst\bt shell option modifies c\bcm\bmd\bdh\bhi\bis\bst\bt by
- saving the command with embedded newlines instead of semicolons. See
+ subset of the commands entered. If the c\bcm\bmd\bdh\bhi\bis\bst\bt shell option is en-
+ abled, the shell attempts to save each line of a multi-line command in
+ the same history entry, adding semicolons where necessary to preserve
+ syntactic correctness. The l\bli\bit\bth\bhi\bis\bst\bt shell option modifies c\bcm\bmd\bdh\bhi\bis\bst\bt by
+ saving the command with embedded newlines instead of semicolons. See
the description of the s\bsh\bho\bop\bpt\bt builtin below under S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS
for information on setting and unsetting shell options.
H\bHI\bIS\bST\bTO\bOR\bRY\bY E\bEX\bXP\bPA\bAN\bNS\bSI\bIO\bON\bN
- The shell supports a history expansion feature that is similar to the
- history expansion in c\bcs\bsh\bh. This section describes what syntax features
+ The shell supports a history expansion feature that is similar to the
+ history expansion in c\bcs\bsh\bh. This section describes what syntax features
are available.
History expansion is enabled by default for interactive shells, and can
- be disabled using the +\b+H\bH option to the s\bse\bet\bt builtin command (see S\bSH\bHE\bEL\bLL\bL
+ be disabled using the +\b+H\bH option to the s\bse\bet\bt builtin command (see S\bSH\bHE\bEL\bLL\bL
B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below). Non-interactive shells do not perform history
expansion by default, but it can be enabled with "set -H".
History expansions introduce words from the history list into the input
- stream, making it easy to repeat commands, insert the arguments to a
+ stream, making it easy to repeat commands, insert the arguments to a
previous command into the current input line, or fix errors in previous
commands quickly.
- History expansion is performed immediately after a complete line is
- read, before the shell breaks it into words, and is performed on each
- line individually. The shell attempts to inform the history expansion
+ History expansion is performed immediately after a complete line is
+ read, before the shell breaks it into words, and is performed on each
+ line individually. The shell attempts to inform the history expansion
functions about quoting still in effect from previous lines.
- It takes place in two parts. The first is to determine which history
- list entry to use during substitution. The second is to select por-
+ It takes place in two parts. The first is to determine which history
+ list entry to use during substitution. The second is to select por-
tions of that entry to include into the current one.
- The entry selected from the history is the _\be_\bv_\be_\bn_\bt, and the portions of
+ The entry selected from the history is the _\be_\bv_\be_\bn_\bt, and the portions of
that entry that are acted upon are _\bw_\bo_\br_\bd_\bs. Various _\bm_\bo_\bd_\bi_\bf_\bi_\be_\br_\bs are avail-
- able to manipulate the selected words. The entry is split into words
- in the same fashion as when reading input, so that several _\bm_\be_\bt_\ba_\bc_\bh_\ba_\br_\ba_\bc_\b-
- _\bt_\be_\br-separated words surrounded by quotes are considered one word. The
- _\be_\bv_\be_\bn_\bt _\bd_\be_\bs_\bi_\bg_\bn_\ba_\bt_\bo_\br selects the event, the optional _\bw_\bo_\br_\bd _\bd_\be_\bs_\bi_\bg_\bn_\ba_\bt_\bo_\br se-
- lects words from the event, and various optional _\bm_\bo_\bd_\bi_\bf_\bi_\be_\br_\bs are avail-
+ able to manipulate the selected words. The entry is split into words
+ in the same fashion as when reading input, so that several _\bm_\be_\bt_\ba_\bc_\bh_\ba_\br_\ba_\bc_\b-
+ _\bt_\be_\br-separated words surrounded by quotes are considered one word. The
+ _\be_\bv_\be_\bn_\bt _\bd_\be_\bs_\bi_\bg_\bn_\ba_\bt_\bo_\br selects the event, the optional _\bw_\bo_\br_\bd _\bd_\be_\bs_\bi_\bg_\bn_\ba_\bt_\bo_\br se-
+ lects words from the event, and various optional _\bm_\bo_\bd_\bi_\bf_\bi_\be_\br_\bs are avail-
able to manipulate the selected words.
- History expansions are introduced by the appearance of the history ex-
- pansion character, which is !\b! by default. History expansions may ap-
+ History expansions are introduced by the appearance of the history ex-
+ pansion character, which is !\b! by default. History expansions may ap-
pear anywhere in the input, but do not nest.
- Only backslash (\\b\) and single quotes can quote the history expansion
- character, but the history expansion character is also treated as
+ Only backslash (\\b\) and single quotes can quote the history expansion
+ character, but the history expansion character is also treated as
quoted if it immediately precedes the closing double quote in a double-
quoted string.
- Several characters inhibit history expansion if found immediately fol-
- lowing the history expansion character, even if it is unquoted: space,
- tab, newline, carriage return, =\b=, and the other shell metacharacters
+ Several characters inhibit history expansion if found immediately fol-
+ lowing the history expansion character, even if it is unquoted: space,
+ tab, newline, carriage return, =\b=, and the other shell metacharacters
defined above.
There is a special abbreviation for substitution, active when the _\bq_\bu_\bi_\bc_\bk
- _\bs_\bu_\bb_\bs_\bt_\bi_\bt_\bu_\bt_\bi_\bo_\bn character (described above under h\bhi\bis\bst\btc\bch\bha\bar\brs\bs) is the first
+ _\bs_\bu_\bb_\bs_\bt_\bi_\bt_\bu_\bt_\bi_\bo_\bn character (described above under h\bhi\bis\bst\btc\bch\bha\bar\brs\bs) is the first
character on the line. It selects the previous history list entry, us-
- ing an event designator equivalent to !\b!!\b!, and substitutes one string
- for another in that entry. It is described below under E\bEv\bve\ben\bnt\bt D\bDe\bes\bsi\big\bgn\bna\ba-\b-
- t\bto\bor\brs\bs. This is the only history expansion that does not begin with the
+ ing an event designator equivalent to !\b!!\b!, and substitutes one string
+ for another in that entry. It is described below under E\bEv\bve\ben\bnt\bt D\bDe\bes\bsi\big\bgn\bna\ba-\b-
+ t\bto\bor\brs\bs. This is the only history expansion that does not begin with the
history expansion character.
- Several shell options settable with the s\bsh\bho\bop\bpt\bt builtin will modify his-
- tory expansion behavior (see the description of the s\bsh\bho\bop\bpt\bt builtin be-
+ Several shell options settable with the s\bsh\bho\bop\bpt\bt builtin will modify his-
+ tory expansion behavior (see the description of the s\bsh\bho\bop\bpt\bt builtin be-
low).and If the h\bhi\bis\bst\btv\bve\ber\bri\bif\bfy\by shell option is enabled, and r\bre\bea\bad\bdl\bli\bin\bne\be is be-
ing used, history substitutions are not immediately passed to the shell
parser. Instead, the expanded line is reloaded into the r\bre\bea\bad\bdl\bli\bin\bne\be edit-
- ing buffer for further modification. If r\bre\bea\bad\bdl\bli\bin\bne\be is being used, and
- the h\bhi\bis\bst\btr\bre\bee\bed\bdi\bit\bt shell option is enabled, a failed history substitution
+ ing buffer for further modification. If r\bre\bea\bad\bdl\bli\bin\bne\be is being used, and
+ the h\bhi\bis\bst\btr\bre\bee\bed\bdi\bit\bt shell option is enabled, a failed history substitution
is reloaded into the r\bre\bea\bad\bdl\bli\bin\bne\be editing buffer for correction.
- The -\b-p\bp option to the h\bhi\bis\bst\bto\bor\bry\by builtin command shows what a history ex-
- pansion will do before using it. The -\b-s\bs option to the h\bhi\bis\bst\bto\bor\bry\by builtin
- will add commands to the end of the history list without actually exe-
+ The -\b-p\bp option to the h\bhi\bis\bst\bto\bor\bry\by builtin command shows what a history ex-
+ pansion will do before using it. The -\b-s\bs option to the h\bhi\bis\bst\bto\bor\bry\by builtin
+ will add commands to the end of the history list without actually exe-
cuting them, so that they are available for subsequent recall.
- The shell allows control of the various characters used by the history
+ The shell allows control of the various characters used by the history
expansion mechanism (see the description of h\bhi\bis\bst\btc\bch\bha\bar\brs\bs above under S\bSh\bhe\bel\bll\bl
- V\bVa\bar\bri\bia\bab\bbl\ble\bes\bs). The shell uses the history comment character to mark his-
+ V\bVa\bar\bri\bia\bab\bbl\ble\bes\bs). The shell uses the history comment character to mark his-
tory timestamps when writing the history file.
E\bEv\bve\ben\bnt\bt D\bDe\bes\bsi\big\bgn\bna\bat\bto\bor\brs\bs
- An event designator is a reference to an entry in the history list.
+ An event designator is a reference to an entry in the history list.
The event designator consists of the portion of the word beginning with
- the history expansion character and ending with the word designator if
- present, or the end of the word. Unless the reference is absolute,
+ the history expansion character and ending with the word designator if
+ present, or the end of the word. Unless the reference is absolute,
events are relative to the current position in the history list.
- !\b! Start a history substitution, except when followed by a b\bbl\bla\ban\bnk\bk,
- newline, carriage return, =, or, when the e\bex\bxt\btg\bgl\blo\bob\bb shell option
+ !\b! Start a history substitution, except when followed by a b\bbl\bla\ban\bnk\bk,
+ newline, carriage return, =, or, when the e\bex\bxt\btg\bgl\blo\bob\bb shell option
is enabled using the s\bsh\bho\bop\bpt\bt builtin, (.
!\b!_\bn Refer to history list entry _\bn.
!\b!-\b-_\bn Refer to the current entry minus _\bn.
!\b!!\b! Refer to the previous entry. This is a synonym for "!-1".
!\b!_\bs_\bt_\br_\bi_\bn_\bg
- Refer to the most recent command preceding the current position
+ Refer to the most recent command preceding the current position
in the history list starting with _\bs_\bt_\br_\bi_\bn_\bg.
!\b!?\b?_\bs_\bt_\br_\bi_\bn_\bg[\b[?\b?]\b]
- Refer to the most recent command preceding the current position
- in the history list containing _\bs_\bt_\br_\bi_\bn_\bg. The trailing ?\b? may be
- omitted if _\bs_\bt_\br_\bi_\bn_\bg is followed immediately by a newline. If
- _\bs_\bt_\br_\bi_\bn_\bg is missing, this uses the string from the most recent
+ Refer to the most recent command preceding the current position
+ in the history list containing _\bs_\bt_\br_\bi_\bn_\bg. The trailing ?\b? may be
+ omitted if _\bs_\bt_\br_\bi_\bn_\bg is followed immediately by a newline. If
+ _\bs_\bt_\br_\bi_\bn_\bg is missing, this uses the string from the most recent
search; it is an error if there is no previous search string.
^\b^_\bs_\bt_\br_\bi_\bn_\bg_\b1^\b^_\bs_\bt_\br_\bi_\bn_\bg_\b2^\b^
- Quick substitution. Repeat the previous command, replacing
- _\bs_\bt_\br_\bi_\bn_\bg_\b1 with _\bs_\bt_\br_\bi_\bn_\bg_\b2. Equivalent to "!!:s^_\bs_\bt_\br_\bi_\bn_\bg_\b1^_\bs_\bt_\br_\bi_\bn_\bg_\b2^"
+ Quick substitution. Repeat the previous command, replacing
+ _\bs_\bt_\br_\bi_\bn_\bg_\b1 with _\bs_\bt_\br_\bi_\bn_\bg_\b2. Equivalent to "!!:s^_\bs_\bt_\br_\bi_\bn_\bg_\b1^_\bs_\bt_\br_\bi_\bn_\bg_\b2^"
(see M\bMo\bod\bdi\bif\bfi\bie\ber\brs\bs below).
!\b!#\b# The entire command line typed so far.
Word designators are used to select desired words from the event. They
are optional; if the word designator isn't supplied, the history expan-
sion uses the entire event. A :\b: separates the event specification from
- the word designator. It may be omitted if the word designator begins
- with a ^\b^, $\b$, *\b*, -\b-, or %\b%. Words are numbered from the beginning of the
- line, with the first word being denoted by 0 (zero). Words are in-
+ the word designator. It may be omitted if the word designator begins
+ with a ^\b^, $\b$, *\b*, -\b-, or %\b%. Words are numbered from the beginning of the
+ line, with the first word being denoted by 0 (zero). Words are in-
serted into the current line separated by single spaces.
0\b0 (\b(z\bze\ber\bro\bo)\b)
The zeroth word. For the shell, this is the command word.
_\bn The _\bnth word.
^\b^ The first argument: word 1.
- $\b$ The last word. This is usually the last argument, but will ex-
+ $\b$ The last word. This is usually the last argument, but will ex-
pand to the zeroth word if there is only one word in the line.
%\b% The first word matched by the most recent "?_\bs_\bt_\br_\bi_\bn_\bg?" search, if
- the search string begins with a character that is part of a
- word. By default, searches begin at the end of each line and
- proceed to the beginning, so the first word matched is the one
+ the search string begins with a character that is part of a
+ word. By default, searches begin at the end of each line and
+ proceed to the beginning, so the first word matched is the one
closest to the end of the line.
_\bx-\b-_\by A range of words; "-_\by" abbreviates "0-_\by".
- *\b* All of the words but the zeroth. This is a synonym for "_\b1_\b-_\b$".
- It is not an error to use *\b* if there is just one word in the
+ *\b* All of the words but the zeroth. This is a synonym for "_\b1_\b-_\b$".
+ It is not an error to use *\b* if there is just one word in the
event; it expands to the empty string in that case.
x\bx*\b* Abbreviates _\bx_\b-_\b$.
x\bx-\b- Abbreviates _\bx_\b-_\b$ like x\bx*\b*, but omits the last word. If x\bx is miss-
ing, it defaults to 0.
- If a word designator is supplied without an event specification, the
+ If a word designator is supplied without an event specification, the
previous command is used as the event, equivalent to !\b!!\b!.
M\bMo\bod\bdi\bif\bfi\bie\ber\brs\bs
- After the optional word designator, the expansion may include a se-
- quence of one or more of the following modifiers, each preceded by a
- ":". These modify, or edit, the word or words selected from the his-
+ After the optional word designator, the expansion may include a se-
+ quence of one or more of the following modifiers, each preceded by a
+ ":". These modify, or edit, the word or words selected from the his-
tory event.
h\bh Remove a trailing pathname component, leaving only the head.
e\be Remove all but the trailing suffix.
p\bp Print the new command but do not execute it.
q\bq Quote the substituted words, escaping further substitutions.
- x\bx Quote the substituted words as with q\bq, but break into words at
- b\bbl\bla\ban\bnk\bks\bs and newlines. The q\bq and x\bx modifiers are mutually exclu-
+ x\bx Quote the substituted words as with q\bq, but break into words at
+ b\bbl\bla\ban\bnk\bks\bs and newlines. The q\bq and x\bx modifiers are mutually exclu-
sive; expansion uses the last one supplied.
s\bs/\b/_\bo_\bl_\bd/\b/_\bn_\be_\bw/\b/
- Substitute _\bn_\be_\bw for the first occurrence of _\bo_\bl_\bd in the event
+ Substitute _\bn_\be_\bw for the first occurrence of _\bo_\bl_\bd in the event
line. Any character may be used as the delimiter in place of /.
- The final delimiter is optional if it is the last character of
- the event line. A single backslash quotes the delimiter in _\bo_\bl_\bd
- and _\bn_\be_\bw. If & appears in _\bn_\be_\bw, it is replaced with _\bo_\bl_\bd. A sin-
- gle backslash quotes the &. If _\bo_\bl_\bd is null, it is set to the
- last _\bo_\bl_\bd substituted, or, if no previous history substitutions
+ The final delimiter is optional if it is the last character of
+ the event line. A single backslash quotes the delimiter in _\bo_\bl_\bd
+ and _\bn_\be_\bw. If & appears in _\bn_\be_\bw, it is replaced with _\bo_\bl_\bd. A sin-
+ gle backslash quotes the &. If _\bo_\bl_\bd is null, it is set to the
+ last _\bo_\bl_\bd substituted, or, if no previous history substitutions
took place, the last _\bs_\bt_\br_\bi_\bn_\bg in a !\b!?\b?_\bs_\bt_\br_\bi_\bn_\bg[\b[?\b?]\b] search. If _\bn_\be_\bw is
null, each matching _\bo_\bl_\bd is deleted.
&\b& Repeat the previous substitution.
g\bg Cause changes to be applied over the entire event line. This is
- used in conjunction with ":\b:s\bs" (e.g., ":\b:g\bgs\bs/\b/_\bo_\bl_\bd/\b/_\bn_\be_\bw/\b/") or ":\b:&\b&".
- If used with ":\b:s\bs", any delimiter can be used in place of /, and
- the final delimiter is optional if it is the last character of
+ used in conjunction with ":\b:s\bs" (e.g., ":\b:g\bgs\bs/\b/_\bo_\bl_\bd/\b/_\bn_\be_\bw/\b/") or ":\b:&\b&".
+ If used with ":\b:s\bs", any delimiter can be used in place of /, and
+ the final delimiter is optional if it is the last character of
the event line. An a\ba may be used as a synonym for g\bg.
G\bG Apply the following "s\bs" or "&\b&" modifier once to each word in the
event line.
Unless otherwise noted, each builtin command documented in this section
as accepting options preceded by -\b- accepts -\b--\b- to signify the end of the
options. The :\b:, t\btr\bru\bue\be, f\bfa\bal\bls\bse\be, and t\bte\bes\bst\bt/[\b[ builtins do not accept options
- and do not treat -\b--\b- specially. The e\bex\bxi\bit\bt, l\blo\bog\bgo\bou\but\bt, r\bre\bet\btu\bur\brn\bn, b\bbr\bre\bea\bak\bk, c\bco\bon\bn-\b-
- t\bti\bin\bnu\bue\be, l\ble\bet\bt, and s\bsh\bhi\bif\bft\bt builtins accept and process arguments beginning
- with -\b- without requiring -\b--\b-. Other builtins that accept arguments but
- are not specified as accepting options interpret arguments beginning
- with -\b- as invalid options and require -\b--\b- to prevent this interpreta-
+ and do not treat -\b--\b- specially. The e\bex\bxi\bit\bt, l\blo\bog\bgo\bou\but\bt, r\bre\bet\btu\bur\brn\bn, b\bbr\bre\bea\bak\bk, c\bco\bon\bn-\b-
+ t\bti\bin\bnu\bue\be, l\ble\bet\bt, and s\bsh\bhi\bif\bft\bt builtins accept and process arguments beginning
+ with -\b- without requiring -\b--\b-. Other builtins that accept arguments but
+ are not specified as accepting options interpret arguments beginning
+ with -\b- as invalid options and require -\b--\b- to prevent this interpreta-
tion.
:\b: [_\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs]
- No effect; the command does nothing beyond expanding _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs
+ No effect; the command does nothing beyond expanding _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs
and performing any specified redirections. The return status is
zero.
.\b. [-\b-p\bp _\bp_\ba_\bt_\bh] _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be [_\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs]
s\bso\bou\bur\brc\bce\be [-\b-p\bp _\bp_\ba_\bt_\bh] _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be [_\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs]
- The .\b. command (s\bso\bou\bur\brc\bce\be) reads and execute commands from _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
- in the current shell environment and returns the exit status of
+ The .\b. command (s\bso\bou\bur\brc\bce\be) reads and execute commands from _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
+ in the current shell environment and returns the exit status of
the last command executed from _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be.
If _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be does not contain a slash, .\b. searches for it. If the
- -\b-p\bp option is supplied, .\b. treats _\bp_\ba_\bt_\bh as a colon-separated list
- of directories in which to find _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be; otherwise, .\b. uses the
- entries in P\bPA\bAT\bTH\bH to find the directory containing _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be.
- _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be does not need to be executable. When b\bba\bas\bsh\bh is not in
+ -\b-p\bp option is supplied, .\b. treats _\bp_\ba_\bt_\bh as a colon-separated list
+ of directories in which to find _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be; otherwise, .\b. uses the
+ entries in P\bPA\bAT\bTH\bH to find the directory containing _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be.
+ _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be does not need to be executable. When b\bba\bas\bsh\bh is not in
posix mode, it searches the current directory if _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be is not
- found in P\bPA\bAT\bTH\bH, but does not search the current directory if -\b-p\bp
+ found in P\bPA\bAT\bTH\bH, but does not search the current directory if -\b-p\bp
is supplied. If the s\bso\bou\bur\brc\bce\bep\bpa\bat\bth\bh option to the s\bsh\bho\bop\bpt\bt builtin com-
mand is turned off, .\b. does not search P\bPA\bAT\bTH\bH.
- If any _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs are supplied, they become the positional para-
- meters when _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be is executed. Otherwise the positional pa-
+ If any _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs are supplied, they become the positional para-
+ meters when _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be is executed. Otherwise the positional pa-
rameters are unchanged.
If the -\b-T\bT option is enabled, .\b. inherits any trap on D\bDE\bEB\bBU\bUG\bG; if it
- is not, any D\bDE\bEB\bBU\bUG\bG trap string is saved and restored around the
+ is not, any D\bDE\bEB\bBU\bUG\bG trap string is saved and restored around the
call to .\b., and .\b. unsets the D\bDE\bEB\bBU\bUG\bG trap while it executes. If -\b-T\bT
is not set, and the sourced file changes the D\bDE\bEB\bBU\bUG\bG trap, the new
value persists after .\b. completes. The return status is the sta-
tus of the last command executed from _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be (0 if no commands
- are executed), and non-zero if _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be is not found or cannot
+ are executed), and non-zero if _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be is not found or cannot
be read.
a\bal\bli\bia\bas\bs [-\b-p\bp] [_\bn_\ba_\bm_\be[=_\bv_\ba_\bl_\bu_\be] ...]
- With no arguments or with the -\b-p\bp option, a\bal\bli\bia\bas\bs prints the list
- of aliases in the form a\bal\bli\bia\bas\bs _\bn_\ba_\bm_\be=_\bv_\ba_\bl_\bu_\be on standard output.
+ With no arguments or with the -\b-p\bp option, a\bal\bli\bia\bas\bs prints the list
+ of aliases in the form a\bal\bli\bia\bas\bs _\bn_\ba_\bm_\be=_\bv_\ba_\bl_\bu_\be on standard output.
When arguments are supplied, define an alias for each _\bn_\ba_\bm_\be whose
- _\bv_\ba_\bl_\bu_\be is given. A trailing space in _\bv_\ba_\bl_\bu_\be causes the next word
- to be checked for alias substitution when the alias is expanded
- during command parsing. For each _\bn_\ba_\bm_\be in the argument list for
- which no _\bv_\ba_\bl_\bu_\be is supplied, print the name and value of the
- alias _\bn_\ba_\bm_\be. a\bal\bli\bia\bas\bs returns true unless a _\bn_\ba_\bm_\be is given (without
+ _\bv_\ba_\bl_\bu_\be is given. A trailing space in _\bv_\ba_\bl_\bu_\be causes the next word
+ to be checked for alias substitution when the alias is expanded
+ during command parsing. For each _\bn_\ba_\bm_\be in the argument list for
+ which no _\bv_\ba_\bl_\bu_\be is supplied, print the name and value of the
+ alias _\bn_\ba_\bm_\be. a\bal\bli\bia\bas\bs returns true unless a _\bn_\ba_\bm_\be is given (without
a corresponding =_\bv_\ba_\bl_\bu_\be) for which no alias has been defined.
b\bbg\bg [_\bj_\bo_\bb_\bs_\bp_\be_\bc ...]
- Resume each suspended job _\bj_\bo_\bb_\bs_\bp_\be_\bc in the background, as if it
- had been started with &\b&. If _\bj_\bo_\bb_\bs_\bp_\be_\bc is not present, the shell
+ Resume each suspended job _\bj_\bo_\bb_\bs_\bp_\be_\bc in the background, as if it
+ had been started with &\b&. If _\bj_\bo_\bb_\bs_\bp_\be_\bc is not present, the shell
uses its notion of the _\bc_\bu_\br_\br_\be_\bn_\bt _\bj_\bo_\bb. b\bbg\bg _\bj_\bo_\bb_\bs_\bp_\be_\bc returns 0 unless
- run when job control is disabled or, when run with job control
- enabled, any specified _\bj_\bo_\bb_\bs_\bp_\be_\bc was not found or was started
+ run when job control is disabled or, when run with job control
+ enabled, any specified _\bj_\bo_\bb_\bs_\bp_\be_\bc was not found or was started
without job control.
b\bbi\bin\bnd\bd [-\b-m\bm _\bk_\be_\by_\bm_\ba_\bp] [-\b-l\bls\bsv\bvS\bSV\bVX\bX]
b\bbi\bin\bnd\bd [-\b-m\bm _\bk_\be_\by_\bm_\ba_\bp] -\b-p\bp|-\b-P\bP [_\br_\be_\ba_\bd_\bl_\bi_\bn_\be_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd]
b\bbi\bin\bnd\bd [-\b-m\bm _\bk_\be_\by_\bm_\ba_\bp] _\bk_\be_\by_\bs_\be_\bq:_\br_\be_\ba_\bd_\bl_\bi_\bn_\be_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd
b\bbi\bin\bnd\bd _\br_\be_\ba_\bd_\bl_\bi_\bn_\be_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd_\b-_\bl_\bi_\bn_\be
- Display current r\bre\bea\bad\bdl\bli\bin\bne\be key and function bindings, bind a key
- sequence to a r\bre\bea\bad\bdl\bli\bin\bne\be function or macro or to a shell command,
- or set a r\bre\bea\bad\bdl\bli\bin\bne\be variable. Each non-option argument is a key
- binding or command as it would appear in a r\bre\bea\bad\bdl\bli\bin\bne\be initializa-
- tion file such as _\b._\bi_\bn_\bp_\bu_\bt_\br_\bc, but each binding or command must be
- passed as a separate argument; e.g., '"\C-x\C-r":
- re-read-init-file'. In the following descriptions, output
- available to be re-read is formatted as commands that would ap-
+ Display current r\bre\bea\bad\bdl\bli\bin\bne\be key and function bindings, bind a key
+ sequence to a r\bre\bea\bad\bdl\bli\bin\bne\be function or macro or to a shell command,
+ or set a r\bre\bea\bad\bdl\bli\bin\bne\be variable. Each non-option argument is a key
+ binding or command as it would appear in a r\bre\bea\bad\bdl\bli\bin\bne\be initializa-
+ tion file such as _\b._\bi_\bn_\bp_\bu_\bt_\br_\bc, but each binding or command must be
+ passed as a separate argument; e.g., '"\C-x\C-r":
+ re-read-init-file'. In the following descriptions, output
+ available to be re-read is formatted as commands that would ap-
pear in a r\bre\bea\bad\bdl\bli\bin\bne\be initialization file or that would be supplied
- as individual arguments to a b\bbi\bin\bnd\bd command. Options, if sup-
+ as individual arguments to a b\bbi\bin\bnd\bd command. Options, if sup-
plied, have the following meanings:
-\b-m\bm _\bk_\be_\by_\bm_\ba_\bp
Use _\bk_\be_\by_\bm_\ba_\bp as the keymap to be affected by the subsequent
bindings. Acceptable _\bk_\be_\by_\bm_\ba_\bp names are _\be_\bm_\ba_\bc_\bs_\b, _\be_\bm_\ba_\bc_\bs_\b-_\bs_\bt_\ba_\bn_\b-
- _\bd_\ba_\br_\bd_\b, _\be_\bm_\ba_\bc_\bs_\b-_\bm_\be_\bt_\ba_\b, _\be_\bm_\ba_\bc_\bs_\b-_\bc_\bt_\bl_\bx_\b, _\bv_\bi_\b, _\bv_\bi_\b-_\bm_\bo_\bv_\be_\b, _\bv_\bi_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd,
- and _\bv_\bi_\b-_\bi_\bn_\bs_\be_\br_\bt. _\bv_\bi is equivalent to _\bv_\bi_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd (_\bv_\bi_\b-_\bm_\bo_\bv_\be
- is also a synonym); _\be_\bm_\ba_\bc_\bs is equivalent to _\be_\bm_\ba_\bc_\bs_\b-_\bs_\bt_\ba_\bn_\b-
+ _\bd_\ba_\br_\bd_\b, _\be_\bm_\ba_\bc_\bs_\b-_\bm_\be_\bt_\ba_\b, _\be_\bm_\ba_\bc_\bs_\b-_\bc_\bt_\bl_\bx_\b, _\bv_\bi_\b, _\bv_\bi_\b-_\bm_\bo_\bv_\be_\b, _\bv_\bi_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd,
+ and _\bv_\bi_\b-_\bi_\bn_\bs_\be_\br_\bt. _\bv_\bi is equivalent to _\bv_\bi_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd (_\bv_\bi_\b-_\bm_\bo_\bv_\be
+ is also a synonym); _\be_\bm_\ba_\bc_\bs is equivalent to _\be_\bm_\ba_\bc_\bs_\b-_\bs_\bt_\ba_\bn_\b-
_\bd_\ba_\br_\bd.
-\b-l\bl List the names of all r\bre\bea\bad\bdl\bli\bin\bne\be functions.
- -\b-p\bp Display r\bre\bea\bad\bdl\bli\bin\bne\be function names and bindings in such a
- way that they can be used as an argument to a subsequent
- b\bbi\bin\bnd\bd command or in a r\bre\bea\bad\bdl\bli\bin\bne\be initialization file. If
- arguments remain after option processing, b\bbi\bin\bnd\bd treats
- them as r\bre\bea\bad\bdl\bli\bin\bne\be command names and restricts output to
- those names.
- -\b-P\bP List current r\bre\bea\bad\bdl\bli\bin\bne\be function names and bindings. If
+ -\b-p\bp Display r\bre\bea\bad\bdl\bli\bin\bne\be function names and bindings in such a
+ way that they can be used as an argument to a subsequent
+ b\bbi\bin\bnd\bd command or in a r\bre\bea\bad\bdl\bli\bin\bne\be initialization file. If
arguments remain after option processing, b\bbi\bin\bnd\bd treats
them as r\bre\bea\bad\bdl\bli\bin\bne\be command names and restricts output to
those names.
- -\b-s\bs Display r\bre\bea\bad\bdl\bli\bin\bne\be key sequences bound to macros and the
- strings they output in such a way that they can be used
+ -\b-P\bP List current r\bre\bea\bad\bdl\bli\bin\bne\be function names and bindings. If
+ arguments remain after option processing, b\bbi\bin\bnd\bd treats
+ them as r\bre\bea\bad\bdl\bli\bin\bne\be command names and restricts output to
+ those names.
+ -\b-s\bs Display r\bre\bea\bad\bdl\bli\bin\bne\be key sequences bound to macros and the
+ strings they output in such a way that they can be used
as an argument to a subsequent b\bbi\bin\bnd\bd command or in a r\bre\bea\bad\bd-\b-
l\bli\bin\bne\be initialization file.
- -\b-S\bS Display r\bre\bea\bad\bdl\bli\bin\bne\be key sequences bound to macros and the
+ -\b-S\bS Display r\bre\bea\bad\bdl\bli\bin\bne\be key sequences bound to macros and the
strings they output.
- -\b-v\bv Display r\bre\bea\bad\bdl\bli\bin\bne\be variable names and values in such a way
+ -\b-v\bv Display r\bre\bea\bad\bdl\bli\bin\bne\be variable names and values in such a way
that they can be used as an argument to a subsequent b\bbi\bin\bnd\bd
command or in a r\bre\bea\bad\bdl\bli\bin\bne\be initialization file.
-\b-V\bV List current r\bre\bea\bad\bdl\bli\bin\bne\be variable names and values.
-\b-f\bf _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
Read key bindings from _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be.
-\b-q\bq _\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn
- Display key sequences that invoke the named r\bre\bea\bad\bdl\bli\bin\bne\be
+ Display key sequences that invoke the named r\bre\bea\bad\bdl\bli\bin\bne\be
_\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn.
-\b-u\bu _\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn
- Unbind all key sequences bound to the named r\bre\bea\bad\bdl\bli\bin\bne\be
+ Unbind all key sequences bound to the named r\bre\bea\bad\bdl\bli\bin\bne\be
_\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn.
-\b-r\br _\bk_\be_\by_\bs_\be_\bq
Remove any current binding for _\bk_\be_\by_\bs_\be_\bq.
-\b-x\bx _\bk_\be_\by_\bs_\be_\bq[\b[:\b: ]\b]_\bs_\bh_\be_\bl_\bl_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd
Cause _\bs_\bh_\be_\bl_\bl_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd to be executed whenever _\bk_\be_\by_\bs_\be_\bq is en-
tered. The separator between _\bk_\be_\by_\bs_\be_\bq and _\bs_\bh_\be_\bl_\bl_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd is
- either whitespace or a colon optionally followed by
- whitespace. If the separator is whitespace, _\bs_\bh_\be_\bl_\bl_\b-_\bc_\bo_\bm_\b-
- _\bm_\ba_\bn_\bd must be enclosed in double quotes and r\bre\bea\bad\bdl\bli\bin\bne\be ex-
- pands any of its special backslash-escapes in _\bs_\bh_\be_\bl_\bl_\b-_\bc_\bo_\bm_\b-
- _\bm_\ba_\bn_\bd before saving it. If the separator is a colon, any
- enclosing double quotes are optional, and r\bre\bea\bad\bdl\bli\bin\bne\be does
- not expand the command string before saving it. Since
- the entire key binding expression must be a single argu-
- ment, it should be enclosed in single quotes. When
- _\bs_\bh_\be_\bl_\bl_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd is executed, the shell sets the R\bRE\bEA\bAD\bD-\b-
- L\bLI\bIN\bNE\bE_\b_L\bLI\bIN\bNE\bE variable to the contents of the r\bre\bea\bad\bdl\bli\bin\bne\be line
+ either whitespace or a colon optionally followed by
+ whitespace. If the separator is whitespace, _\bs_\bh_\be_\bl_\bl_\b-_\bc_\bo_\bm_\b-
+ _\bm_\ba_\bn_\bd must be enclosed in double quotes and r\bre\bea\bad\bdl\bli\bin\bne\be ex-
+ pands any of its special backslash-escapes in _\bs_\bh_\be_\bl_\bl_\b-_\bc_\bo_\bm_\b-
+ _\bm_\ba_\bn_\bd before saving it. If the separator is a colon, any
+ enclosing double quotes are optional, and r\bre\bea\bad\bdl\bli\bin\bne\be does
+ not expand the command string before saving it. Since
+ the entire key binding expression must be a single argu-
+ ment, it should be enclosed in single quotes. When
+ _\bs_\bh_\be_\bl_\bl_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd is executed, the shell sets the R\bRE\bEA\bAD\bD-\b-
+ L\bLI\bIN\bNE\bE_\b_L\bLI\bIN\bNE\bE variable to the contents of the r\bre\bea\bad\bdl\bli\bin\bne\be line
buffer and the R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE_\b_P\bPO\bOI\bIN\bNT\bT and R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE_\b_M\bMA\bAR\bRK\bK variables
- to the current location of the insertion point and the
- saved insertion point (the mark), respectively. The
- shell assigns any numeric argument the user supplied to
- the R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE_\b_A\bAR\bRG\bGU\bUM\bME\bEN\bNT\bT variable. If there was no argu-
- ment, that variable is not set. If the executed command
- changes the value of any of R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE_\b_L\bLI\bIN\bNE\bE, R\bRE\bEA\bAD\bD-\b-
- L\bLI\bIN\bNE\bE_\b_P\bPO\bOI\bIN\bNT\bT, or R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE_\b_M\bMA\bAR\bRK\bK, those new values will be
+ to the current location of the insertion point and the
+ saved insertion point (the mark), respectively. The
+ shell assigns any numeric argument the user supplied to
+ the R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE_\b_A\bAR\bRG\bGU\bUM\bME\bEN\bNT\bT variable. If there was no argu-
+ ment, that variable is not set. If the executed command
+ changes the value of any of R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE_\b_L\bLI\bIN\bNE\bE, R\bRE\bEA\bAD\bD-\b-
+ L\bLI\bIN\bNE\bE_\b_P\bPO\bOI\bIN\bNT\bT, or R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE_\b_M\bMA\bAR\bRK\bK, those new values will be
reflected in the editing state.
- -\b-X\bX List all key sequences bound to shell commands and the
- associated commands in a format that can be reused as an
+ -\b-X\bX List all key sequences bound to shell commands and the
+ associated commands in a format that can be reused as an
argument to a subsequent b\bbi\bin\bnd\bd command.
- The return value is 0 unless an unrecognized option is supplied
+ The return value is 0 unless an unrecognized option is supplied
or an error occurred.
b\bbr\bre\bea\bak\bk [_\bn]
- Exit from within a f\bfo\bor\br, w\bwh\bhi\bil\ble\be, u\bun\bnt\bti\bil\bl, or s\bse\bel\ble\bec\bct\bt loop. If _\bn is
+ Exit from within a f\bfo\bor\br, w\bwh\bhi\bil\ble\be, u\bun\bnt\bti\bil\bl, or s\bse\bel\ble\bec\bct\bt loop. If _\bn is
specified, b\bbr\bre\bea\bak\bk exits _\bn enclosing loops. _\bn must be >= 1. If _\bn
- is greater than the number of enclosing loops, all enclosing
+ is greater than the number of enclosing loops, all enclosing
loops are exited. The return value is 0 unless _\bn is not greater
than or equal to 1.
b\bbu\bui\bil\blt\bti\bin\bn _\bs_\bh_\be_\bl_\bl_\b-_\bb_\bu_\bi_\bl_\bt_\bi_\bn [_\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs]
- Execute the specified shell builtin _\bs_\bh_\be_\bl_\bl_\b-_\bb_\bu_\bi_\bl_\bt_\bi_\bn, passing it
- _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs, and return its exit status. This is useful when
- defining a function whose name is the same as a shell builtin,
- retaining the functionality of the builtin within the function.
- The c\bcd\bd builtin is commonly redefined this way. The return sta-
+ Execute the specified shell builtin _\bs_\bh_\be_\bl_\bl_\b-_\bb_\bu_\bi_\bl_\bt_\bi_\bn, passing it
+ _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs, and return its exit status. This is useful when
+ defining a function whose name is the same as a shell builtin,
+ retaining the functionality of the builtin within the function.
+ The c\bcd\bd builtin is commonly redefined this way. The return sta-
tus is false if _\bs_\bh_\be_\bl_\bl_\b-_\bb_\bu_\bi_\bl_\bt_\bi_\bn is not a shell builtin command.
c\bca\bal\bll\ble\ber\br [_\be_\bx_\bp_\br]
Returns the context of any active subroutine call (a shell func-
tion or a script executed with the .\b. or s\bso\bou\bur\brc\bce\be builtins).
- Without _\be_\bx_\bp_\br, c\bca\bal\bll\ble\ber\br displays the line number and source file-
- name of the current subroutine call. If a non-negative integer
+ Without _\be_\bx_\bp_\br, c\bca\bal\bll\ble\ber\br displays the line number and source file-
+ name of the current subroutine call. If a non-negative integer
is supplied as _\be_\bx_\bp_\br, c\bca\bal\bll\ble\ber\br displays the line number, subroutine
name, and source file corresponding to that position in the cur-
- rent execution call stack. This extra information may be used,
+ rent execution call stack. This extra information may be used,
for example, to print a stack trace. The current frame is frame
0.
- The return value is 0 unless the shell is not executing a sub-
- routine call or _\be_\bx_\bp_\br does not correspond to a valid position in
+ The return value is 0 unless the shell is not executing a sub-
+ routine call or _\be_\bx_\bp_\br does not correspond to a valid position in
the call stack.
c\bcd\bd [-\b-L\bL] [-\b-@\b@] [_\bd_\bi_\br]
c\bcd\bd -\b-P\bP [-\b-e\be] [-\b-@\b@] [_\bd_\bi_\br]
- Change the current directory to _\bd_\bi_\br. if _\bd_\bi_\br is not supplied,
- the value of the H\bHO\bOM\bME\bE shell variable is used as _\bd_\bi_\br. If _\bd_\bi_\br is
+ Change the current directory to _\bd_\bi_\br. if _\bd_\bi_\br is not supplied,
+ the value of the H\bHO\bOM\bME\bE shell variable is used as _\bd_\bi_\br. If _\bd_\bi_\br is
the empty string, c\bcd\bd treats it as an error. The variable C\bCD\bDP\bPA\bAT\bTH\bH
exists, and _\bd_\bi_\br does not begin with a slash (/), c\bcd\bd uses it as a
- search path: the shell searches each directory name in C\bCD\bDP\bPA\bAT\bTH\bH
+ search path: the shell searches each directory name in C\bCD\bDP\bPA\bAT\bTH\bH
for _\bd_\bi_\br. Alternative directory names in C\bCD\bDP\bPA\bAT\bTH\bH are separated by
a colon (:). A null directory name in C\bCD\bDP\bPA\bAT\bTH\bH is the same as the
current directory, i.e., ".".
- The -\b-P\bP option causes c\bcd\bd to use the physical directory structure
+ The -\b-P\bP option causes c\bcd\bd to use the physical directory structure
by resolving symbolic links while traversing _\bd_\bi_\br and before pro-
- cessing instances of _\b._\b. in _\bd_\bi_\br (see also the -\b-P\bP option to the
+ cessing instances of _\b._\b. in _\bd_\bi_\br (see also the -\b-P\bP option to the
s\bse\bet\bt builtin command).
- The -\b-L\bL option forces c\bcd\bd to follow symbolic links by resolving
+ The -\b-L\bL option forces c\bcd\bd to follow symbolic links by resolving
the link after processing instances of _\b._\b. in _\bd_\bi_\br. If _\b._\b. appears
- in _\bd_\bi_\br, c\bcd\bd processes it by removing the immediately previous
+ in _\bd_\bi_\br, c\bcd\bd processes it by removing the immediately previous
pathname component from _\bd_\bi_\br, back to a slash or the beginning of
- _\bd_\bi_\br, and verifying that the portion of _\bd_\bi_\br it has processed to
- that point is still a valid directory name after removing the
+ _\bd_\bi_\br, and verifying that the portion of _\bd_\bi_\br it has processed to
+ that point is still a valid directory name after removing the
pathname component. If it is not a valid directory name, c\bcd\bd re-
- turns a non-zero status. If neither -\b-L\bL nor -\b-P\bP is supplied, c\bcd\bd
+ turns a non-zero status. If neither -\b-L\bL nor -\b-P\bP is supplied, c\bcd\bd
behaves as if -\b-L\bL had been supplied.
If the -\b-e\be option is supplied with -\b-P\bP, and c\bcd\bd cannot successfully
- determine the current working directory after a successful di-
+ determine the current working directory after a successful di-
rectory change, it returns a non-zero status.
- On systems that support it, the -\b-@\b@ option presents the extended
+ On systems that support it, the -\b-@\b@ option presents the extended
attributes associated with a file as a directory.
- An argument of -\b- is converted to $\b$O\bOL\bLD\bDP\bPW\bWD\bD before attempting the
+ An argument of -\b- is converted to $\b$O\bOL\bLD\bDP\bPW\bWD\bD before attempting the
directory change.
- If c\bcd\bd uses a non-empty directory name from C\bCD\bDP\bPA\bAT\bTH\bH, or if -\b- is
- the first argument, and the directory change is successful, c\bcd\bd
+ If c\bcd\bd uses a non-empty directory name from C\bCD\bDP\bPA\bAT\bTH\bH, or if -\b- is
+ the first argument, and the directory change is successful, c\bcd\bd
writes the absolute pathname of the new working directory to the
standard output.
- If the directory change is successful, c\bcd\bd sets the value of the
+ If the directory change is successful, c\bcd\bd sets the value of the
P\bPW\bWD\bD environment variable to the new directory name, and sets the
- O\bOL\bLD\bDP\bPW\bWD\bD environment variable to the value of the current working
+ O\bOL\bLD\bDP\bPW\bWD\bD environment variable to the value of the current working
directory before the change.
- The return value is true if the directory was successfully
+ The return value is true if the directory was successfully
changed; false otherwise.
c\bco\bom\bmm\bma\ban\bnd\bd [-\b-p\bpV\bVv\bv] _\bc_\bo_\bm_\bm_\ba_\bn_\bd [_\ba_\br_\bg ...]
- The c\bco\bom\bmm\bma\ban\bnd\bd builtin runs _\bc_\bo_\bm_\bm_\ba_\bn_\bd with _\ba_\br_\bg_\bs suppressing the nor-
+ The c\bco\bom\bmm\bma\ban\bnd\bd builtin runs _\bc_\bo_\bm_\bm_\ba_\bn_\bd with _\ba_\br_\bg_\bs suppressing the nor-
mal shell function lookup for _\bc_\bo_\bm_\bm_\ba_\bn_\bd. Only builtin commands or
- commands found in the P\bPA\bAT\bTH\bH named _\bc_\bo_\bm_\bm_\ba_\bn_\bd are executed. If the
+ commands found in the P\bPA\bAT\bTH\bH named _\bc_\bo_\bm_\bm_\ba_\bn_\bd are executed. If the
-\b-p\bp option is supplied, the search for _\bc_\bo_\bm_\bm_\ba_\bn_\bd is performed using
- a default value for P\bPA\bAT\bTH\bH that is guaranteed to find all of the
+ a default value for P\bPA\bAT\bTH\bH that is guaranteed to find all of the
standard utilities.
- If either the -\b-V\bV or -\b-v\bv option is supplied, c\bco\bom\bmm\bma\ban\bnd\bd prints a de-
- scription of _\bc_\bo_\bm_\bm_\ba_\bn_\bd. The -\b-v\bv option displays a single word in-
- dicating the command or filename used to invoke _\bc_\bo_\bm_\bm_\ba_\bn_\bd; the -\b-V\bV
+ If either the -\b-V\bV or -\b-v\bv option is supplied, c\bco\bom\bmm\bma\ban\bnd\bd prints a de-
+ scription of _\bc_\bo_\bm_\bm_\ba_\bn_\bd. The -\b-v\bv option displays a single word in-
+ dicating the command or filename used to invoke _\bc_\bo_\bm_\bm_\ba_\bn_\bd; the -\b-V\bV
option produces a more verbose description.
- If the -\b-V\bV or -\b-v\bv option is supplied, the exit status is zero if
- _\bc_\bo_\bm_\bm_\ba_\bn_\bd was found, and non-zero if not. If neither option is
- supplied and an error occurred or _\bc_\bo_\bm_\bm_\ba_\bn_\bd cannot be found, the
- exit status is 127. Otherwise, the exit status of the c\bco\bom\bmm\bma\ban\bnd\bd
+ If the -\b-V\bV or -\b-v\bv option is supplied, the exit status is zero if
+ _\bc_\bo_\bm_\bm_\ba_\bn_\bd was found, and non-zero if not. If neither option is
+ supplied and an error occurred or _\bc_\bo_\bm_\bm_\ba_\bn_\bd cannot be found, the
+ exit status is 127. Otherwise, the exit status of the c\bco\bom\bmm\bma\ban\bnd\bd
builtin is the exit status of _\bc_\bo_\bm_\bm_\ba_\bn_\bd.
c\bco\bom\bmp\bpg\bge\ben\bn [-\b-V\bV _\bv_\ba_\br_\bn_\ba_\bm_\be] [_\bo_\bp_\bt_\bi_\bo_\bn] [_\bw_\bo_\br_\bd]
- Generate possible completion matches for _\bw_\bo_\br_\bd according to the
- _\bo_\bp_\bt_\bi_\bo_\bns, which may be any option accepted by the c\bco\bom\bmp\bpl\ble\bet\bte\be
+ Generate possible completion matches for _\bw_\bo_\br_\bd according to the
+ _\bo_\bp_\bt_\bi_\bo_\bns, which may be any option accepted by the c\bco\bom\bmp\bpl\ble\bet\bte\be
builtin with the exceptions of -\b-p\bp, -\b-r\br, -\b-D\bD, -\b-E\bE, and -\b-I\bI, and write
the matches to the standard output.
- If the -\b-V\bV option is supplied, c\bco\bom\bmp\bpg\bge\ben\bn stores the generated com-
- pletions into the indexed array variable _\bv_\ba_\br_\bn_\ba_\bm_\be instead of
+ If the -\b-V\bV option is supplied, c\bco\bom\bmp\bpg\bge\ben\bn stores the generated com-
+ pletions into the indexed array variable _\bv_\ba_\br_\bn_\ba_\bm_\be instead of
writing them to the standard output.
When using the -\b-F\bF or -\b-C\bC options, the various shell variables set
The matches will be generated in the same way as if the program-
mable completion code had generated them directly from a comple-
- tion specification with the same flags. If _\bw_\bo_\br_\bd is specified,
- only those completions matching _\bw_\bo_\br_\bd will be displayed or
+ tion specification with the same flags. If _\bw_\bo_\br_\bd is specified,
+ only those completions matching _\bw_\bo_\br_\bd will be displayed or
stored.
- The return value is true unless an invalid option is supplied,
+ The return value is true unless an invalid option is supplied,
or no matches were generated.
c\bco\bom\bmp\bpl\ble\bet\bte\be [-\b-a\bab\bbc\bcd\bde\bef\bfg\bgj\bjk\bks\bsu\buv\bv] [-\b-o\bo _\bc_\bo_\bm_\bp_\b-_\bo_\bp_\bt_\bi_\bo_\bn] [-\b-D\bDE\bEI\bI] [-\b-A\bA _\ba_\bc_\bt_\bi_\bo_\bn]
Specify how arguments to each _\bn_\ba_\bm_\be should be completed.
If the -\b-p\bp option is supplied, or if no options or _\bn_\ba_\bm_\bes are sup-
- plied, print existing completion specifications in a way that
+ plied, print existing completion specifications in a way that
allows them to be reused as input. The -\b-r\br option removes a com-
- pletion specification for each _\bn_\ba_\bm_\be, or, if no _\bn_\ba_\bm_\bes are sup-
+ pletion specification for each _\bn_\ba_\bm_\be, or, if no _\bn_\ba_\bm_\bes are sup-
plied, all completion specifications.
- The -\b-D\bD option indicates that other supplied options and actions
- should apply to the "default" command completion; that is, com-
- pletion attempted on a command for which no completion has pre-
- viously been defined. The -\b-E\bE option indicates that other sup-
- plied options and actions should apply to "empty" command com-
- pletion; that is, completion attempted on a blank line. The -\b-I\bI
- option indicates that other supplied options and actions should
- apply to completion on the initial non-assignment word on the
+ The -\b-D\bD option indicates that other supplied options and actions
+ should apply to the "default" command completion; that is, com-
+ pletion attempted on a command for which no completion has pre-
+ viously been defined. The -\b-E\bE option indicates that other sup-
+ plied options and actions should apply to "empty" command com-
+ pletion; that is, completion attempted on a blank line. The -\b-I\bI
+ option indicates that other supplied options and actions should
+ apply to completion on the initial non-assignment word on the
line, or after a command delimiter such as ;\b; or |\b|, which is usu-
ally command name completion. If multiple options are supplied,
the -\b-D\bD option takes precedence over -\b-E\bE, and both take precedence
- over -\b-I\bI. If any of -\b-D\bD, -\b-E\bE, or -\b-I\bI are supplied, any other _\bn_\ba_\bm_\be
- arguments are ignored; these completions only apply to the case
+ over -\b-I\bI. If any of -\b-D\bD, -\b-E\bE, or -\b-I\bI are supplied, any other _\bn_\ba_\bm_\be
+ arguments are ignored; these completions only apply to the case
specified by the option.
The process of applying these completion specifications when at-
- tempting word completion is described above under P\bPr\bro\bog\bgr\bra\bam\bmm\bma\bab\bbl\ble\be
+ tempting word completion is described above under P\bPr\bro\bog\bgr\bra\bam\bmm\bma\bab\bbl\ble\be
C\bCo\bom\bmp\bpl\ble\bet\bti\bio\bon\bn.
- Other options, if specified, have the following meanings. The
- arguments to the -\b-G\bG, -\b-W\bW, and -\b-X\bX options (and, if necessary, the
- -\b-P\bP and -\b-S\bS options) should be quoted to protect them from expan-
+ Other options, if specified, have the following meanings. The
+ arguments to the -\b-G\bG, -\b-W\bW, and -\b-X\bX options (and, if necessary, the
+ -\b-P\bP and -\b-S\bS options) should be quoted to protect them from expan-
sion before the c\bco\bom\bmp\bpl\ble\bet\bte\be builtin is invoked.
-\b-o\bo _\bc_\bo_\bm_\bp_\b-_\bo_\bp_\bt_\bi_\bo_\bn
- The _\bc_\bo_\bm_\bp_\b-_\bo_\bp_\bt_\bi_\bo_\bn controls several aspects of the comp-
- spec's behavior beyond the simple generation of comple-
+ The _\bc_\bo_\bm_\bp_\b-_\bo_\bp_\bt_\bi_\bo_\bn controls several aspects of the comp-
+ spec's behavior beyond the simple generation of comple-
tions. _\bc_\bo_\bm_\bp_\b-_\bo_\bp_\bt_\bi_\bo_\bn may be one of:
b\bba\bas\bsh\bhd\bde\bef\bfa\bau\bul\blt\bt
Perform the rest of the default b\bba\bas\bsh\bh completions
if the compspec generates no matches.
- d\bde\bef\bfa\bau\bul\blt\bt Use r\bre\bea\bad\bdl\bli\bin\bne\be's default filename completion if
+ d\bde\bef\bfa\bau\bul\blt\bt Use r\bre\bea\bad\bdl\bli\bin\bne\be's default filename completion if
the compspec generates no matches.
d\bdi\bir\brn\bna\bam\bme\bes\bs
- Perform directory name completion if the comp-
+ Perform directory name completion if the comp-
spec generates no matches.
f\bfi\bil\ble\ben\bna\bam\bme\bes\bs
- Tell r\bre\bea\bad\bdl\bli\bin\bne\be that the compspec generates file-
- names, so it can perform any filename-specific
- processing (such as adding a slash to directory
- names, quoting special characters, or suppress-
- ing trailing spaces). This is intended to be
+ Tell r\bre\bea\bad\bdl\bli\bin\bne\be that the compspec generates file-
+ names, so it can perform any filename-specific
+ processing (such as adding a slash to directory
+ names, quoting special characters, or suppress-
+ ing trailing spaces). This is intended to be
used with shell functions.
f\bfu\bul\bll\blq\bqu\buo\bot\bte\be
- Tell r\bre\bea\bad\bdl\bli\bin\bne\be to quote all the completed words
+ Tell r\bre\bea\bad\bdl\bli\bin\bne\be to quote all the completed words
even if they are not filenames.
- n\bno\boq\bqu\buo\bot\bte\be Tell r\bre\bea\bad\bdl\bli\bin\bne\be not to quote the completed words
- if they are filenames (quoting filenames is the
+ n\bno\boq\bqu\buo\bot\bte\be Tell r\bre\bea\bad\bdl\bli\bin\bne\be not to quote the completed words
+ if they are filenames (quoting filenames is the
default).
- n\bno\bos\bso\bor\brt\bt Tell r\bre\bea\bad\bdl\bli\bin\bne\be not to sort the list of possible
+ n\bno\bos\bso\bor\brt\bt Tell r\bre\bea\bad\bdl\bli\bin\bne\be not to sort the list of possible
completions alphabetically.
- n\bno\bos\bsp\bpa\bac\bce\be Tell r\bre\bea\bad\bdl\bli\bin\bne\be not to append a space (the de-
- fault) to words completed at the end of the
+ n\bno\bos\bsp\bpa\bac\bce\be Tell r\bre\bea\bad\bdl\bli\bin\bne\be not to append a space (the de-
+ fault) to words completed at the end of the
line.
p\bpl\blu\bus\bsd\bdi\bir\brs\bs
- After generating any matches defined by the
- compspec, attempt directory name completion and
- add any matches to the results of the other ac-
+ After generating any matches defined by the
+ compspec, attempt directory name completion and
+ add any matches to the results of the other ac-
tions.
-\b-A\bA _\ba_\bc_\bt_\bi_\bo_\bn
- The _\ba_\bc_\bt_\bi_\bo_\bn may be one of the following to generate a
+ The _\ba_\bc_\bt_\bi_\bo_\bn may be one of the following to generate a
list of possible completions:
a\bal\bli\bia\bas\bs Alias names. May also be specified as -\b-a\ba.
a\bar\brr\bra\bay\byv\bva\bar\br
Array variable names.
b\bbi\bin\bnd\bdi\bin\bng\bg R\bRe\bea\bad\bdl\bli\bin\bne\be key binding names.
- b\bbu\bui\bil\blt\bti\bin\bn Names of shell builtin commands. May also be
+ b\bbu\bui\bil\blt\bti\bin\bn Names of shell builtin commands. May also be
specified as -\b-b\bb.
c\bco\bom\bmm\bma\ban\bnd\bd Command names. May also be specified as -\b-c\bc.
d\bdi\bir\bre\bec\bct\bto\bor\bry\by
d\bdi\bis\bsa\bab\bbl\ble\bed\bd
Names of disabled shell builtins.
e\ben\bna\bab\bbl\ble\bed\bd Names of enabled shell builtins.
- e\bex\bxp\bpo\bor\brt\bt Names of exported shell variables. May also be
+ e\bex\bxp\bpo\bor\brt\bt Names of exported shell variables. May also be
specified as -\b-e\be.
- f\bfi\bil\ble\be File and directory names, similar to r\bre\bea\bad\bdl\bli\bin\bne\be's
- filename completion. May also be specified as
+ f\bfi\bil\ble\be File and directory names, similar to r\bre\bea\bad\bdl\bli\bin\bne\be's
+ filename completion. May also be specified as
-\b-f\bf.
f\bfu\bun\bnc\bct\bti\bio\bon\bn
Names of shell functions.
h\bhe\bel\blp\bpt\bto\bop\bpi\bic\bc
Help topics as accepted by the h\bhe\bel\blp\bp builtin.
h\bho\bos\bst\btn\bna\bam\bme\be
- Hostnames, as taken from the file specified by
+ Hostnames, as taken from the file specified by
the H\bHO\bOS\bST\bTF\bFI\bIL\bLE\bE shell variable.
- j\bjo\bob\bb Job names, if job control is active. May also
+ j\bjo\bob\bb Job names, if job control is active. May also
be specified as -\b-j\bj.
- k\bke\bey\byw\bwo\bor\brd\bd Shell reserved words. May also be specified as
+ k\bke\bey\byw\bwo\bor\brd\bd Shell reserved words. May also be specified as
-\b-k\bk.
r\bru\bun\bnn\bni\bin\bng\bg Names of running jobs, if job control is active.
s\bse\ber\brv\bvi\bic\bce\be Service names. May also be specified as -\b-s\bs.
- s\bse\bet\bto\bop\bpt\bt Valid arguments for the -\b-o\bo option to the s\bse\bet\bt
+ s\bse\bet\bto\bop\bpt\bt Valid arguments for the -\b-o\bo option to the s\bse\bet\bt
builtin.
- s\bsh\bho\bop\bpt\bt Shell option names as accepted by the s\bsh\bho\bop\bpt\bt
+ s\bsh\bho\bop\bpt\bt Shell option names as accepted by the s\bsh\bho\bop\bpt\bt
builtin.
s\bsi\big\bgn\bna\bal\bl Signal names.
s\bst\bto\bop\bpp\bpe\bed\bd Names of stopped jobs, if job control is active.
Names of all shell variables. May also be spec-
ified as -\b-v\bv.
-\b-C\bC _\bc_\bo_\bm_\bm_\ba_\bn_\bd
- _\bc_\bo_\bm_\bm_\ba_\bn_\bd is executed in a subshell environment, and its
- output is used as the possible completions. Arguments
+ _\bc_\bo_\bm_\bm_\ba_\bn_\bd is executed in a subshell environment, and its
+ output is used as the possible completions. Arguments
are passed as with the -\b-F\bF option.
-\b-F\bF _\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn
- The shell function _\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn is executed in the current
- shell environment. When the function is executed, the
+ The shell function _\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn is executed in the current
+ shell environment. When the function is executed, the
first argument ($\b$1\b1) is the name of the command whose ar-
guments are being completed, the second argument ($\b$2\b2) is
the word being completed, and the third argument ($\b$3\b3) is
- the word preceding the word being completed on the cur-
+ the word preceding the word being completed on the cur-
rent command line. When _\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn finishes, programmable
- completion retrieves the possible completions from the
+ completion retrieves the possible completions from the
value of the C\bCO\bOM\bMP\bPR\bRE\bEP\bPL\bLY\bY array variable.
-\b-G\bG _\bg_\bl_\bo_\bb_\bp_\ba_\bt
- Expand the pathname expansion pattern _\bg_\bl_\bo_\bb_\bp_\ba_\bt to gener-
+ Expand the pathname expansion pattern _\bg_\bl_\bo_\bb_\bp_\ba_\bt to gener-
ate the possible completions.
-\b-P\bP _\bp_\br_\be_\bf_\bi_\bx
- Add _\bp_\br_\be_\bf_\bi_\bx to the beginning of each possible completion
+ Add _\bp_\br_\be_\bf_\bi_\bx to the beginning of each possible completion
after all other options have been applied.
-\b-S\bS _\bs_\bu_\bf_\bf_\bi_\bx
- Append _\bs_\bu_\bf_\bf_\bi_\bx to each possible completion after all
+ Append _\bs_\bu_\bf_\bf_\bi_\bx to each possible completion after all
other options have been applied.
-\b-W\bW _\bw_\bo_\br_\bd_\bl_\bi_\bs_\bt
- Split the _\bw_\bo_\br_\bd_\bl_\bi_\bs_\bt using the characters in the I\bIF\bFS\bS spe-
- cial variable as delimiters, and expand each resulting
- word. Shell quoting is honored within _\bw_\bo_\br_\bd_\bl_\bi_\bs_\bt, in or-
- der to provide a mechanism for the words to contain
- shell metacharacters or characters in the value of I\bIF\bFS\bS.
- The possible completions are the members of the resul-
- tant list which match a prefix of the word being com-
+ Split the _\bw_\bo_\br_\bd_\bl_\bi_\bs_\bt using the characters in the I\bIF\bFS\bS spe-
+ cial variable as delimiters, and expand each resulting
+ word. Shell quoting is honored within _\bw_\bo_\br_\bd_\bl_\bi_\bs_\bt, in or-
+ der to provide a mechanism for the words to contain
+ shell metacharacters or characters in the value of I\bIF\bFS\bS.
+ The possible completions are the members of the resul-
+ tant list which match a prefix of the word being com-
pleted.
-\b-X\bX _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt
- _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt is a pattern as used for pathname expansion.
+ _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt is a pattern as used for pathname expansion.
It is applied to the list of possible completions gener-
- ated by the preceding options and arguments, and each
- completion matching _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt is removed from the list.
- A leading !\b! in _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt negates the pattern; in this
+ ated by the preceding options and arguments, and each
+ completion matching _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt is removed from the list.
+ A leading !\b! in _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt negates the pattern; in this
case, any completion not matching _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt is removed.
- The return value is true unless an invalid option is supplied,
+ The return value is true unless an invalid option is supplied,
an option other than -\b-p\bp, -\b-r\br, -\b-D\bD, -\b-E\bE, or -\b-I\bI is supplied without a
- _\bn_\ba_\bm_\be argument, an attempt is made to remove a completion speci-
+ _\bn_\ba_\bm_\be argument, an attempt is made to remove a completion speci-
fication for a _\bn_\ba_\bm_\be for which no specification exists, or an er-
ror occurs adding a completion specification.
c\bco\bom\bmp\bpo\bop\bpt\bt [-\b-o\bo _\bo_\bp_\bt_\bi_\bo_\bn] [-\b-D\bDE\bEI\bI] [+\b+o\bo _\bo_\bp_\bt_\bi_\bo_\bn] [_\bn_\ba_\bm_\be]
- Modify completion options for each _\bn_\ba_\bm_\be according to the _\bo_\bp_\b-
+ Modify completion options for each _\bn_\ba_\bm_\be according to the _\bo_\bp_\b-
_\bt_\bi_\bo_\bns, or for the currently-executing completion if no _\bn_\ba_\bm_\bes are
- supplied. If no _\bo_\bp_\bt_\bi_\bo_\bns are supplied, display the completion
- options for each _\bn_\ba_\bm_\be or the current completion. The possible
- values of _\bo_\bp_\bt_\bi_\bo_\bn are those valid for the c\bco\bom\bmp\bpl\ble\bet\bte\be builtin de-
+ supplied. If no _\bo_\bp_\bt_\bi_\bo_\bns are supplied, display the completion
+ options for each _\bn_\ba_\bm_\be or the current completion. The possible
+ values of _\bo_\bp_\bt_\bi_\bo_\bn are those valid for the c\bco\bom\bmp\bpl\ble\bet\bte\be builtin de-
scribed above.
The -\b-D\bD option indicates that other supplied options should apply
- to the "default" command completion; the -\b-E\bE option indicates
+ to the "default" command completion; the -\b-E\bE option indicates
that other supplied options should apply to "empty" command com-
pletion; and the -\b-I\bI option indicates that other supplied options
- should apply to completion on the initial word on the line.
+ should apply to completion on the initial word on the line.
These are determined in the same way as the c\bco\bom\bmp\bpl\ble\bet\bte\be builtin.
If multiple options are supplied, the -\b-D\bD option takes precedence
over -\b-E\bE, and both take precedence over -\b-I\bI.
- The return value is true unless an invalid option is supplied,
+ The return value is true unless an invalid option is supplied,
an attempt is made to modify the options for a _\bn_\ba_\bm_\be for which no
completion specification exists, or an output error occurs.
c\bco\bon\bnt\bti\bin\bnu\bue\be [_\bn]
c\bco\bon\bnt\bti\bin\bnu\bue\be resumes the next iteration of the enclosing f\bfo\bor\br, w\bwh\bhi\bil\ble\be,
- u\bun\bnt\bti\bil\bl, or s\bse\bel\ble\bec\bct\bt loop. If _\bn is specified, b\bba\bas\bsh\bh resumes the _\bnth
- enclosing loop. _\bn must be >= 1. If _\bn is greater than the num-
- ber of enclosing loops, the shell resumes the last enclosing
- loop (the "top-level" loop). The return value is 0 unless _\bn is
+ u\bun\bnt\bti\bil\bl, or s\bse\bel\ble\bec\bct\bt loop. If _\bn is specified, b\bba\bas\bsh\bh resumes the _\bnth
+ enclosing loop. _\bn must be >= 1. If _\bn is greater than the num-
+ ber of enclosing loops, the shell resumes the last enclosing
+ loop (the "top-level" loop). The return value is 0 unless _\bn is
not greater than or equal to 1.
d\bde\bec\bcl\bla\bar\bre\be [-\b-a\baA\bAf\bfF\bFg\bgi\biI\bIl\bln\bnr\brt\btu\bux\bx] [-\b-p\bp] [_\bn_\ba_\bm_\be[=_\bv_\ba_\bl_\bu_\be] ...]
t\bty\byp\bpe\bes\bse\bet\bt [-\b-a\baA\bAf\bfF\bFg\bgi\biI\bIl\bln\bnr\brt\btu\bux\bx] [-\b-p\bp] [_\bn_\ba_\bm_\be[=_\bv_\ba_\bl_\bu_\be] ...]
- Declare variables and/or give them attributes. If no _\bn_\ba_\bm_\bes are
+ Declare variables and/or give them attributes. If no _\bn_\ba_\bm_\bes are
given then display the values of variables or functions. The -\b-p\bp
- option will display the attributes and values of each _\bn_\ba_\bm_\be.
- When -\b-p\bp is used with _\bn_\ba_\bm_\be arguments, additional options, other
+ option will display the attributes and values of each _\bn_\ba_\bm_\be.
+ When -\b-p\bp is used with _\bn_\ba_\bm_\be arguments, additional options, other
than -\b-f\bf and -\b-F\bF, are ignored.
When -\b-p\bp is supplied without _\bn_\ba_\bm_\be arguments, d\bde\bec\bcl\bla\bar\bre\be will display
the attributes and values of all variables having the attributes
- specified by the additional options. If no other options are
+ specified by the additional options. If no other options are
supplied with -\b-p\bp, d\bde\bec\bcl\bla\bar\bre\be will display the attributes and values
- of all shell variables. The -\b-f\bf option restricts the display to
+ of all shell variables. The -\b-f\bf option restricts the display to
shell functions.
The -\b-F\bF option inhibits the display of function definitions; only
- the function name and attributes are printed. If the e\bex\bxt\btd\bde\beb\bbu\bug\bg
- shell option is enabled using s\bsh\bho\bop\bpt\bt, the source file name and
- line number where each _\bn_\ba_\bm_\be is defined are displayed as well.
+ the function name and attributes are printed. If the e\bex\bxt\btd\bde\beb\bbu\bug\bg
+ shell option is enabled using s\bsh\bho\bop\bpt\bt, the source file name and
+ line number where each _\bn_\ba_\bm_\be is defined are displayed as well.
The -\b-F\bF option implies -\b-f\bf.
- The -\b-g\bg option forces variables to be created or modified at the
+ The -\b-g\bg option forces variables to be created or modified at the
global scope, even when d\bde\bec\bcl\bla\bar\bre\be is executed in a shell function.
It is ignored when d\bde\bec\bcl\bla\bar\bre\be is not executed in a shell function.
- The -\b-I\bI option causes local variables to inherit the attributes
- (except the _\bn_\ba_\bm_\be_\br_\be_\bf attribute) and value of any existing vari-
- able with the same _\bn_\ba_\bm_\be at a surrounding scope. If there is no
+ The -\b-I\bI option causes local variables to inherit the attributes
+ (except the _\bn_\ba_\bm_\be_\br_\be_\bf attribute) and value of any existing vari-
+ able with the same _\bn_\ba_\bm_\be at a surrounding scope. If there is no
existing variable, the local variable is initially unset.
- The following options can be used to restrict output to vari-
- ables with the specified attribute or to give variables attrib-
+ The following options can be used to restrict output to vari-
+ ables with the specified attribute or to give variables attrib-
utes:
- -\b-a\ba Each _\bn_\ba_\bm_\be is an indexed array variable (see A\bAr\brr\bra\bay\bys\bs
+ -\b-a\ba Each _\bn_\ba_\bm_\be is an indexed array variable (see A\bAr\brr\bra\bay\bys\bs
above).
- -\b-A\bA Each _\bn_\ba_\bm_\be is an associative array variable (see A\bAr\brr\bra\bay\bys\bs
+ -\b-A\bA Each _\bn_\ba_\bm_\be is an associative array variable (see A\bAr\brr\bra\bay\bys\bs
above).
-\b-f\bf Each _\bn_\ba_\bm_\be refers to a shell function.
-\b-i\bi The variable is treated as an integer; arithmetic evalua-
- tion (see A\bAR\bRI\bIT\bTH\bHM\bME\bET\bTI\bIC\bC E\bEV\bVA\bAL\bLU\bUA\bAT\bTI\bIO\bON\bN above) is performed when
+ tion (see A\bAR\bRI\bIT\bTH\bHM\bME\bET\bTI\bIC\bC E\bEV\bVA\bAL\bLU\bUA\bAT\bTI\bIO\bON\bN above) is performed when
the variable is assigned a value.
- -\b-l\bl When the variable is assigned a value, all upper-case
- characters are converted to lower-case. The upper-case
+ -\b-l\bl When the variable is assigned a value, all upper-case
+ characters are converted to lower-case. The upper-case
attribute is disabled.
- -\b-n\bn Give each _\bn_\ba_\bm_\be the _\bn_\ba_\bm_\be_\br_\be_\bf attribute, making it a name
- reference to another variable. That other variable is
- defined by the value of _\bn_\ba_\bm_\be. All references, assign-
- ments, and attribute modifications to _\bn_\ba_\bm_\be, except those
- using or changing the -\b-n\bn attribute itself, are performed
- on the variable referenced by _\bn_\ba_\bm_\be's value. The nameref
+ -\b-n\bn Give each _\bn_\ba_\bm_\be the _\bn_\ba_\bm_\be_\br_\be_\bf attribute, making it a name
+ reference to another variable. That other variable is
+ defined by the value of _\bn_\ba_\bm_\be. All references, assign-
+ ments, and attribute modifications to _\bn_\ba_\bm_\be, except those
+ using or changing the -\b-n\bn attribute itself, are performed
+ on the variable referenced by _\bn_\ba_\bm_\be's value. The nameref
attribute cannot be applied to array variables.
-\b-r\br Make _\bn_\ba_\bm_\bes readonly. These names cannot then be assigned
values by subsequent assignment statements or unset.
-\b-t\bt Give each _\bn_\ba_\bm_\be the _\bt_\br_\ba_\bc_\be attribute. Traced functions in-
- herit the D\bDE\bEB\bBU\bUG\bG and R\bRE\bET\bTU\bUR\bRN\bN traps from the calling shell.
+ herit the D\bDE\bEB\bBU\bUG\bG and R\bRE\bET\bTU\bUR\bRN\bN traps from the calling shell.
The trace attribute has no special meaning for variables.
- -\b-u\bu When the variable is assigned a value, all lower-case
- characters are converted to upper-case. The lower-case
+ -\b-u\bu When the variable is assigned a value, all lower-case
+ characters are converted to upper-case. The lower-case
attribute is disabled.
- -\b-x\bx Mark each _\bn_\ba_\bm_\be for export to subsequent commands via the
+ -\b-x\bx Mark each _\bn_\ba_\bm_\be for export to subsequent commands via the
environment.
- Using "+" instead of "-" turns off the specified attribute in-
+ Using "+" instead of "-" turns off the specified attribute in-
stead, with the exceptions that +\b+a\ba and +\b+A\bA may not be used to de-
- stroy array variables and +\b+r\br will not remove the readonly at-
+ stroy array variables and +\b+r\br will not remove the readonly at-
tribute.
- When used in a function, d\bde\bec\bcl\bla\bar\bre\be and t\bty\byp\bpe\bes\bse\bet\bt make each _\bn_\ba_\bm_\be lo-
- cal, as with the l\blo\boc\bca\bal\bl command, unless the -\b-g\bg option is sup-
- plied. If a variable name is followed by =_\bv_\ba_\bl_\bu_\be, the value of
- the variable is set to _\bv_\ba_\bl_\bu_\be. When using -\b-a\ba or -\b-A\bA and the com-
- pound assignment syntax to create array variables, additional
+ When used in a function, d\bde\bec\bcl\bla\bar\bre\be and t\bty\byp\bpe\bes\bse\bet\bt make each _\bn_\ba_\bm_\be lo-
+ cal, as with the l\blo\boc\bca\bal\bl command, unless the -\b-g\bg option is sup-
+ plied. If a variable name is followed by =_\bv_\ba_\bl_\bu_\be, the value of
+ the variable is set to _\bv_\ba_\bl_\bu_\be. When using -\b-a\ba or -\b-A\bA and the com-
+ pound assignment syntax to create array variables, additional
attributes do not take effect until subsequent assignments.
- The return value is 0 unless an invalid option is encountered,
- an attempt is made to define a function using "-f foo=bar", an
+ The return value is 0 unless an invalid option is encountered,
+ an attempt is made to define a function using "-f foo=bar", an
attempt is made to assign a value to a readonly variable, an at-
tempt is made to assign a value to an array variable without us-
- ing the compound assignment syntax (see A\bAr\brr\bra\bay\bys\bs above), one of
+ ing the compound assignment syntax (see A\bAr\brr\bra\bay\bys\bs above), one of
the _\bn_\ba_\bm_\be_\bs 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
+ 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 -\b-f\bf.
d\bdi\bir\brs\bs [\b[-\b-c\bcl\blp\bpv\bv]\b] [\b[+\b+_\bn]\b] [\b[-\b-_\bn]\b]
Without options, display the list of currently remembered direc-
- tories. The default display is on a single line with directory
- names separated by spaces. Directories are added to the list
- with the p\bpu\bus\bsh\bhd\bd command; the p\bpo\bop\bpd\bd command removes entries from
- the list. The current directory is always the first directory
+ tories. The default display is on a single line with directory
+ names separated by spaces. Directories are added to the list
+ with the p\bpu\bus\bsh\bhd\bd command; the p\bpo\bop\bpd\bd command removes entries from
+ the list. The current directory is always the first directory
in the stack.
Options, if supplied, have the following meanings:
- -\b-c\bc Clears the directory stack by deleting all of the en-
+ -\b-c\bc Clears the directory stack by deleting all of the en-
tries.
- -\b-l\bl Produces a listing using full pathnames; the default
+ -\b-l\bl Produces a listing using full pathnames; the default
listing format uses a tilde to denote the home directory.
-\b-p\bp Print the directory stack with one entry per line.
- -\b-v\bv Print the directory stack with one entry per line, pre-
+ -\b-v\bv Print the directory stack with one entry per line, pre-
fixing each entry with its index in the stack.
+\b+_\bn Displays the _\bnth entry counting from the left of the list
shown by d\bdi\bir\brs\bs when invoked without options, starting with
zero.
- -\b-_\bn Displays the _\bnth entry counting from the right of the
+ -\b-_\bn Displays the _\bnth entry counting from the right of the
list shown by d\bdi\bir\brs\bs when invoked without options, starting
with zero.
- The return value is 0 unless an invalid option is supplied or _\bn
+ The return value is 0 unless an invalid option is supplied or _\bn
indexes beyond the end of the directory stack.
d\bdi\bis\bso\bow\bwn\bn [-\b-a\bar\br] [-\b-h\bh] [_\bi_\bd ...]
- Without options, remove each _\bi_\bd from the table of active jobs.
- Each _\bi_\bd may be a job specification _\bj_\bo_\bb_\bs_\bp_\be_\bc or a process ID _\bp_\bi_\bd;
+ Without options, remove each _\bi_\bd from the table of active jobs.
+ Each _\bi_\bd may be a job specification _\bj_\bo_\bb_\bs_\bp_\be_\bc or a process ID _\bp_\bi_\bd;
if _\bi_\bd is a _\bp_\bi_\bd, d\bdi\bis\bso\bow\bwn\bn uses the job containing _\bp_\bi_\bd as _\bj_\bo_\bb_\bs_\bp_\be_\bc.
- If the -\b-h\bh option is supplied, d\bdi\bis\bso\bow\bwn\bn does not remove the jobs
- corresponding to each _\bi_\bd from the jobs table, but rather marks
- them so the shell does not send S\bSI\bIG\bGH\bHU\bUP\bP to the job if the shell
+ If the -\b-h\bh option is supplied, d\bdi\bis\bso\bow\bwn\bn does not remove the jobs
+ corresponding to each _\bi_\bd from the jobs table, but rather marks
+ them so the shell does not send S\bSI\bIG\bGH\bHU\bUP\bP to the job if the shell
receives a S\bSI\bIG\bGH\bHU\bUP\bP.
- If no _\bi_\bd is supplied, the -\b-a\ba option means to remove or mark all
+ If no _\bi_\bd is supplied, the -\b-a\ba option means to remove or mark all
jobs; the -\b-r\br option without an _\bi_\bd argument removes or marks run-
- ning jobs. If no _\bi_\bd is supplied, and neither the -\b-a\ba nor the -\b-r\br
+ ning jobs. If no _\bi_\bd is supplied, and neither the -\b-a\ba nor the -\b-r\br
option is supplied, d\bdi\bis\bso\bow\bwn\bn removes or marks the current job.
The return value is 0 unless an _\bi_\bd does not specify a valid job.
e\bec\bch\bho\bo [-\b-n\bne\beE\bE] [_\ba_\br_\bg ...]
- Output the _\ba_\br_\bgs, separated by spaces, followed by a newline.
- The return status is 0 unless a write error occurs. If -\b-n\bn is
+ Output the _\ba_\br_\bgs, separated by spaces, followed by a newline.
+ The return status is 0 unless a write error occurs. If -\b-n\bn is
specified, the trailing newline is not printed.
- If the -\b-e\be option is given, e\bec\bch\bho\bo interprets the following back-
+ If the -\b-e\be option is given, e\bec\bch\bho\bo interprets the following back-
slash-escaped characters. The -\b-E\bE option disables interpretation
- of these escape characters, even on systems where they are in-
- terpreted by default. The x\bxp\bpg\bg_\b_e\bec\bch\bho\bo shell option determines
+ of these escape characters, even on systems where they are in-
+ terpreted by default. The x\bxp\bpg\bg_\b_e\bec\bch\bho\bo shell option determines
whether or not e\bec\bch\bho\bo interprets any options and expands these es-
- cape characters. e\bec\bch\bho\bo does not interpret -\b--\b- to mean the end of
+ cape characters. e\bec\bch\bho\bo does not interpret -\b--\b- to mean the end of
options.
e\bec\bch\bho\bo interprets the following escape sequences:
\\b\t\bt horizontal tab
\\b\v\bv vertical tab
\\b\\\b\ backslash
- \\b\0\b0_\bn_\bn_\bn The eight-bit character whose value is the octal value
+ \\b\0\b0_\bn_\bn_\bn The eight-bit character whose value is the octal value
_\bn_\bn_\bn (zero to three octal digits).
- \\b\x\bx_\bH_\bH The eight-bit character whose value is the hexadecimal
+ \\b\x\bx_\bH_\bH The eight-bit character whose value is the hexadecimal
value _\bH_\bH (one or two hex digits).
- \\b\u\bu_\bH_\bH_\bH_\bH The Unicode (ISO/IEC 10646) character whose value is the
+ \\b\u\bu_\bH_\bH_\bH_\bH The Unicode (ISO/IEC 10646) character whose value is the
hexadecimal value _\bH_\bH_\bH_\bH (one to four hex digits).
\\b\U\bU_\bH_\bH_\bH_\bH_\bH_\bH_\bH_\bH
- The Unicode (ISO/IEC 10646) character whose value is the
+ The Unicode (ISO/IEC 10646) character whose value is the
hexadecimal value _\bH_\bH_\bH_\bH_\bH_\bH_\bH_\bH (one to eight hex digits).
- e\bec\bch\bho\bo writes any unrecognized backslash-escaped characters un-
+ e\bec\bch\bho\bo writes any unrecognized backslash-escaped characters un-
changed.
e\ben\bna\bab\bbl\ble\be [-\b-a\ba] [-\b-d\bdn\bnp\bps\bs] [-\b-f\bf _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be] [_\bn_\ba_\bm_\be ...]
- Enable and disable builtin shell commands. Disabling a builtin
- allows an executable file which has the same name as a shell
- builtin to be executed without specifying a full pathname, even
+ Enable and disable builtin shell commands. Disabling a builtin
+ allows an executable file which has the same name as a shell
+ builtin to be executed without specifying a full pathname, even
though the shell normally searches for builtins before files.
- If -\b-n\bn is supplied, each _\bn_\ba_\bm_\be is disabled; otherwise, _\bn_\ba_\bm_\bes are
- enabled. For example, to use the t\bte\bes\bst\bt binary found using P\bPA\bAT\bTH\bH
+ If -\b-n\bn is supplied, each _\bn_\ba_\bm_\be is disabled; otherwise, _\bn_\ba_\bm_\bes are
+ enabled. For example, to use the t\bte\bes\bst\bt binary found using P\bPA\bAT\bTH\bH
instead of the shell builtin version, run "enable -n test".
- If no _\bn_\ba_\bm_\be arguments are supplied, or if the -\b-p\bp option is sup-
+ If no _\bn_\ba_\bm_\be arguments are supplied, or if the -\b-p\bp option is sup-
plied, print a list of shell builtins. With no other option ar-
guments, the list consists of all enabled shell builtins. If -\b-n\bn
- is supplied, print only disabled builtins. If -\b-a\ba is supplied,
- the list printed includes all builtins, with an indication of
+ is supplied, print only disabled builtins. If -\b-a\ba is supplied,
+ the list printed includes all builtins, with an indication of
whether or not each is enabled. The -\b-s\bs option means to restrict
the output to the POSIX _\bs_\bp_\be_\bc_\bi_\ba_\bl builtins.
- The -\b-f\bf option means to load the new builtin command _\bn_\ba_\bm_\be from
+ The -\b-f\bf option means to load the new builtin command _\bn_\ba_\bm_\be from
shared object _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be, on systems that support dynamic loading.
If _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be does not contain a slash, B\bBa\bas\bsh\bh will use the value of
- the B\bBA\bAS\bSH\bH_\b_L\bLO\bOA\bAD\bDA\bAB\bBL\bLE\bES\bS_\b_P\bPA\bAT\bTH\bH variable as a colon-separated list of
- directories in which to search for _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be. The default for
- B\bBA\bAS\bSH\bH_\b_L\bLO\bOA\bAD\bDA\bAB\bBL\bLE\bES\bS_\b_P\bPA\bAT\bTH\bH is system-dependent, and may include "." to
- force a search of the current directory. The -\b-d\bd option will
- delete a builtin previously loaded with -\b-f\bf. If _\b-_\bs is used with
+ the B\bBA\bAS\bSH\bH_\b_L\bLO\bOA\bAD\bDA\bAB\bBL\bLE\bES\bS_\b_P\bPA\bAT\bTH\bH variable as a colon-separated list of
+ directories in which to search for _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be. The default for
+ B\bBA\bAS\bSH\bH_\b_L\bLO\bOA\bAD\bDA\bAB\bBL\bLE\bES\bS_\b_P\bPA\bAT\bTH\bH is system-dependent, and may include "." to
+ force a search of the current directory. The -\b-d\bd option will
+ delete a builtin previously loaded with -\b-f\bf. If _\b-_\bs is used with
_\b-_\bf, the new builtin becomes a POSIX special builtin.
- If no options are supplied and a _\bn_\ba_\bm_\be is not a shell builtin,
- e\ben\bna\bab\bbl\ble\be will attempt to load _\bn_\ba_\bm_\be from a shared object named
+ If no options are supplied and a _\bn_\ba_\bm_\be is not a shell builtin,
+ e\ben\bna\bab\bbl\ble\be will attempt to load _\bn_\ba_\bm_\be from a shared object named
_\bn_\ba_\bm_\be, as if the command were "enable -f _\bn_\ba_\bm_\be _\bn_\ba_\bm_\be".
- The return value is 0 unless a _\bn_\ba_\bm_\be is not a shell builtin or
+ The return value is 0 unless a _\bn_\ba_\bm_\be is not a shell builtin or
there is an error loading a new builtin from a shared object.
e\bev\bva\bal\bl [_\ba_\br_\bg ...]
- Concatenate the _\ba_\br_\bgs together into a single command, separating
+ Concatenate the _\ba_\br_\bgs together into a single command, separating
them with spaces. B\bBa\bas\bsh\bh then reads and execute this command, and
- returns its exit status as the return status of e\bev\bva\bal\bl. If there
+ returns its exit status as the return status of e\bev\bva\bal\bl. If there
are no _\ba_\br_\bg_\bs, or only null arguments, e\bev\bva\bal\bl returns 0.
e\bex\bxe\bec\bc [-\b-c\bcl\bl] [-\b-a\ba _\bn_\ba_\bm_\be] [_\bc_\bo_\bm_\bm_\ba_\bn_\bd [_\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs]]
- If _\bc_\bo_\bm_\bm_\ba_\bn_\bd is specified, it replaces the shell without creating
- a new process. _\bc_\bo_\bm_\bm_\ba_\bn_\bd cannot be a shell builtin or function.
+ If _\bc_\bo_\bm_\bm_\ba_\bn_\bd is specified, it replaces the shell without creating
+ a new process. _\bc_\bo_\bm_\bm_\ba_\bn_\bd cannot be a shell builtin or function.
The _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs become the arguments to _\bc_\bo_\bm_\bm_\ba_\bn_\bd. If the -\b-l\bl option
is supplied, the shell places a dash at the beginning of the ze-
- roth argument passed to _\bc_\bo_\bm_\bm_\ba_\bn_\bd. This is what _\bl_\bo_\bg_\bi_\bn(1) does.
- The -\b-c\bc option causes _\bc_\bo_\bm_\bm_\ba_\bn_\bd to be executed with an empty envi-
+ roth argument passed to _\bc_\bo_\bm_\bm_\ba_\bn_\bd. This is what _\bl_\bo_\bg_\bi_\bn(1) does.
+ The -\b-c\bc option causes _\bc_\bo_\bm_\bm_\ba_\bn_\bd to be executed with an empty envi-
ronment. If -\b-a\ba is supplied, the shell passes _\bn_\ba_\bm_\be as the zeroth
argument to the executed command.
If _\bc_\bo_\bm_\bm_\ba_\bn_\bd cannot be executed for some reason, a non-interactive
- shell exits, unless the e\bex\bxe\bec\bcf\bfa\bai\bil\bl shell option is enabled. In
- that case, it returns a non-zero status. An interactive shell
- returns a non-zero status if the file cannot be executed. A
+ shell exits, unless the e\bex\bxe\bec\bcf\bfa\bai\bil\bl shell option is enabled. In
+ that case, it returns a non-zero status. An interactive shell
+ returns a non-zero status if the file cannot be executed. A
subshell exits unconditionally if e\bex\bxe\bec\bc fails.
If _\bc_\bo_\bm_\bm_\ba_\bn_\bd is not specified, any redirections take effect in the
- current shell, and the return status is 0. If there is a redi-
+ current shell, and the return status is 0. If there is a redi-
rection error, the return status is 1.
e\bex\bxi\bit\bt [_\bn]
- Cause the shell to exit with a status of _\bn. If _\bn is omitted,
- the exit status is that of the last command executed. Any trap
+ Cause the shell to exit with a status of _\bn. If _\bn is omitted,
+ the exit status is that of the last command executed. Any trap
on E\bEX\bXI\bIT\bT is executed before the shell terminates.
e\bex\bxp\bpo\bor\brt\bt [-\b-f\bfn\bn] [_\bn_\ba_\bm_\be[=_\bv_\ba_\bl_\bu_\be]] ...
e\bex\bxp\bpo\bor\brt\bt -\b-p\bp [\b[-\b-f\bf]\b]
- The supplied _\bn_\ba_\bm_\be_\bs are marked for automatic export to the envi-
- ronment of subsequently executed commands. If the -\b-f\bf option is
+ The supplied _\bn_\ba_\bm_\be_\bs are marked for automatic export to the envi-
+ ronment of subsequently executed commands. If the -\b-f\bf option is
given, the _\bn_\ba_\bm_\be_\bs refer to functions.
- The -\b-n\bn option unexports, or removes the export attribute, from
- each _\bn_\ba_\bm_\be. If no _\bn_\ba_\bm_\be_\bs are given, or if only the -\b-p\bp option is
- supplied, e\bex\bxp\bpo\bor\brt\bt displays a list of names of all exported vari-
+ The -\b-n\bn option unexports, or removes the export attribute, from
+ each _\bn_\ba_\bm_\be. If no _\bn_\ba_\bm_\be_\bs are given, or if only the -\b-p\bp option is
+ supplied, e\bex\bxp\bpo\bor\brt\bt displays a list of names of all exported vari-
ables on the standard output. Using -\b-p\bp and -\b-f\bf together displays
- exported functions. The -\b-p\bp option displays output in a form
+ exported functions. The -\b-p\bp option displays output in a form
that may be reused as input.
- e\bex\bxp\bpo\bor\brt\bt allows the value of a variable to be set when it is ex-
+ e\bex\bxp\bpo\bor\brt\bt allows the value of a variable to be set when it is ex-
ported or unexported by following the variable name with =_\bv_\ba_\bl_\bu_\be.
This sets the value of the variable to _\bv_\ba_\bl_\bu_\be while modifying the
- export attribute. e\bex\bxp\bpo\bor\brt\bt returns an exit status of 0 unless an
- invalid option is encountered, one of the _\bn_\ba_\bm_\be_\bs is not a valid
+ export attribute. e\bex\bxp\bpo\bor\brt\bt returns an exit status of 0 unless an
+ invalid option is encountered, one of the _\bn_\ba_\bm_\be_\bs is not a valid
shell variable name, or -\b-f\bf is supplied with a _\bn_\ba_\bm_\be that is not a
function.
f\bfc\bc [-\b-e\be _\be_\bn_\ba_\bm_\be] [-\b-l\bln\bnr\br] [_\bf_\bi_\br_\bs_\bt] [_\bl_\ba_\bs_\bt]
f\bfc\bc -\b-s\bs [_\bp_\ba_\bt=_\br_\be_\bp] [_\bc_\bm_\bd]
- The first form selects a range of commands from _\bf_\bi_\br_\bs_\bt to _\bl_\ba_\bs_\bt
- from the history list and displays or edits and re-executes
- them. _\bF_\bi_\br_\bs_\bt and _\bl_\ba_\bs_\bt may be specified as a string (to locate
- the last command beginning with that string) or as a number (an
- index into the history list, where a negative number is used as
+ The first form selects a range of commands from _\bf_\bi_\br_\bs_\bt to _\bl_\ba_\bs_\bt
+ from the history list and displays or edits and re-executes
+ them. _\bF_\bi_\br_\bs_\bt and _\bl_\ba_\bs_\bt may be specified as a string (to locate
+ the last command beginning with that string) or as a number (an
+ index into the history list, where a negative number is used as
an offset from the current command number).
When listing, a _\bf_\bi_\br_\bs_\bt or _\bl_\ba_\bs_\bt of 0 is equivalent to -1 and -0 is
equivalent to the current command (usually the f\bfc\bc command); oth-
- erwise 0 is equivalent to -1 and -0 is invalid. If _\bl_\ba_\bs_\bt is not
+ erwise 0 is equivalent to -1 and -0 is invalid. If _\bl_\ba_\bs_\bt is not
specified, it is set to the current command for listing (so that
"fc -l -10" prints the last 10 commands) and to _\bf_\bi_\br_\bs_\bt otherwise.
If _\bf_\bi_\br_\bs_\bt is not specified, it is set to the previous command for
editing and -16 for listing.
- If the -\b-l\bl option is supplied, the commands are listed on the
- standard output. The -\b-n\bn option suppresses the command numbers
+ If the -\b-l\bl option is supplied, the commands are listed on the
+ standard output. The -\b-n\bn option suppresses the command numbers
when listing. The -\b-r\br option reverses the order of the commands.
- Otherwise, f\bfc\bc invokes the editor named by _\be_\bn_\ba_\bm_\be on a file con-
- taining those commands. If _\be_\bn_\ba_\bm_\be is not supplied, f\bfc\bc uses the
- value of the F\bFC\bCE\bED\bDI\bIT\bT variable, and the value of E\bED\bDI\bIT\bTO\bOR\bR if F\bFC\bCE\bED\bDI\bIT\bT
- is not set. If neither variable is set, f\bfc\bc uses _\bv_\bi_\b. When edit-
- ing is complete, f\bfc\bc reads the file containing the edited com-
+ Otherwise, f\bfc\bc invokes the editor named by _\be_\bn_\ba_\bm_\be on a file con-
+ taining those commands. If _\be_\bn_\ba_\bm_\be is not supplied, f\bfc\bc uses the
+ value of the F\bFC\bCE\bED\bDI\bIT\bT variable, and the value of E\bED\bDI\bIT\bTO\bOR\bR if F\bFC\bCE\bED\bDI\bIT\bT
+ is not set. If neither variable is set, f\bfc\bc uses _\bv_\bi_\b. When edit-
+ ing is complete, f\bfc\bc reads the file containing the edited com-
mands and echoes and executes them.
- In the second form, f\bfc\bc re-executes _\bc_\bo_\bm_\bm_\ba_\bn_\bd after replacing each
- instance of _\bp_\ba_\bt with _\br_\be_\bp. _\bC_\bo_\bm_\bm_\ba_\bn_\bd is interpreted the same as
+ In the second form, f\bfc\bc re-executes _\bc_\bo_\bm_\bm_\ba_\bn_\bd after replacing each
+ instance of _\bp_\ba_\bt with _\br_\be_\bp. _\bC_\bo_\bm_\bm_\ba_\bn_\bd is interpreted the same as
_\bf_\bi_\br_\bs_\bt above.
- A useful alias to use with f\bfc\bc is "r="fc -s"", so that typing "r
+ A useful alias to use with f\bfc\bc is "r="fc -s"", so that typing "r
cc" runs the last command beginning with "cc" and typing "r" re-
executes the last command.
- If the first form is used, the return value is zero unless an
- invalid option is encountered or _\bf_\bi_\br_\bs_\bt or _\bl_\ba_\bs_\bt specify history
- lines out of range. When editing and re-executing a file of
+ If the first form is used, the return value is zero unless an
+ invalid option is encountered or _\bf_\bi_\br_\bs_\bt or _\bl_\ba_\bs_\bt specify history
+ lines out of range. When editing and re-executing a file of
commands, the return value is the value of the last command exe-
cuted or failure if an error occurs with the temporary file. If
the second form is used, the return status is that of the re-ex-
- ecuted command, unless _\bc_\bm_\bd does not specify a valid history en-
+ ecuted command, unless _\bc_\bm_\bd does not specify a valid history en-
try, in which case f\bfc\bc returns a non-zero status.
f\bfg\bg [_\bj_\bo_\bb_\bs_\bp_\be_\bc]
- Resume _\bj_\bo_\bb_\bs_\bp_\be_\bc in the foreground, and make it the current job.
- If _\bj_\bo_\bb_\bs_\bp_\be_\bc is not present, f\bfg\bg uses the shell's notion of the
- _\bc_\bu_\br_\br_\be_\bn_\bt _\bj_\bo_\bb. The return value is that of the command placed
- into the foreground, or failure if run when job control is dis-
+ Resume _\bj_\bo_\bb_\bs_\bp_\be_\bc in the foreground, and make it the current job.
+ If _\bj_\bo_\bb_\bs_\bp_\be_\bc is not present, f\bfg\bg uses the shell's notion of the
+ _\bc_\bu_\br_\br_\be_\bn_\bt _\bj_\bo_\bb. The return value is that of the command placed
+ into the foreground, or failure if run when job control is dis-
abled or, when run with job control enabled, if _\bj_\bo_\bb_\bs_\bp_\be_\bc does not
- specify a valid job or _\bj_\bo_\bb_\bs_\bp_\be_\bc specifies a job that was started
+ specify a valid job or _\bj_\bo_\bb_\bs_\bp_\be_\bc specifies a job that was started
without job control.
g\bge\bet\bto\bop\bpt\bts\bs _\bo_\bp_\bt_\bs_\bt_\br_\bi_\bn_\bg _\bn_\ba_\bm_\be [_\ba_\br_\bg ...]
- g\bge\bet\bto\bop\bpt\bts\bs is used by shell scripts and functions to parse posi-
- tional parameters and obtain options and their arguments. _\bo_\bp_\bt_\b-
- _\bs_\bt_\br_\bi_\bn_\bg contains the option characters to be recognized; if a
+ g\bge\bet\bto\bop\bpt\bts\bs is used by shell scripts and functions to parse posi-
+ tional parameters and obtain options and their arguments. _\bo_\bp_\bt_\b-
+ _\bs_\bt_\br_\bi_\bn_\bg contains the option characters to be recognized; if a
character is followed by a colon, the option is expected to have
- an argument, which should be separated from it by white space.
+ an argument, which should be separated from it by white space.
The colon and question mark characters may not be used as option
characters.
- Each time it is invoked, g\bge\bet\bto\bop\bpt\bts\bs places the next option in the
+ Each time it is invoked, g\bge\bet\bto\bop\bpt\bts\bs places the next option in the
shell variable _\bn_\ba_\bm_\be, initializing _\bn_\ba_\bm_\be if it does not exist, and
the index of the next argument to be processed into the variable
- O\bOP\bPT\bTI\bIN\bND\bD. O\bOP\bPT\bTI\bIN\bND\bD is initialized to 1 each time the shell or a
- shell script is invoked. When an option requires an argument,
+ O\bOP\bPT\bTI\bIN\bND\bD. O\bOP\bPT\bTI\bIN\bND\bD is initialized to 1 each time the shell or a
+ shell script is invoked. When an option requires an argument,
g\bge\bet\bto\bop\bpt\bts\bs places that argument into the variable O\bOP\bPT\bTA\bAR\bRG\bG.
- The shell does not reset O\bOP\bPT\bTI\bIN\bND\bD automatically; it must be manu-
- ally reset between multiple calls to g\bge\bet\bto\bop\bpt\bts\bs within the same
+ The shell does not reset O\bOP\bPT\bTI\bIN\bND\bD automatically; it must be manu-
+ ally reset between multiple calls to g\bge\bet\bto\bop\bpt\bts\bs within the same
shell invocation to use a new set of parameters.
- When it reaches the end of options, g\bge\bet\bto\bop\bpt\bts\bs exits with a return
- value greater than zero. O\bOP\bPT\bTI\bIN\bND\bD is set to the index of the
+ When it reaches the end of options, g\bge\bet\bto\bop\bpt\bts\bs exits with a return
+ value greater than zero. O\bOP\bPT\bTI\bIN\bND\bD is set to the index of the
first non-option argument, and _\bn_\ba_\bm_\be is set to ?.
- g\bge\bet\bto\bop\bpt\bts\bs normally parses the positional parameters, but if more
- arguments are supplied as _\ba_\br_\bg values, g\bge\bet\bto\bop\bpt\bts\bs parses those in-
+ g\bge\bet\bto\bop\bpt\bts\bs normally parses the positional parameters, but if more
+ arguments are supplied as _\ba_\br_\bg values, g\bge\bet\bto\bop\bpt\bts\bs parses those in-
stead.
- g\bge\bet\bto\bop\bpt\bts\bs can report errors in two ways. If the first character
- of _\bo_\bp_\bt_\bs_\bt_\br_\bi_\bn_\bg is a colon, g\bge\bet\bto\bop\bpt\bts\bs uses _\bs_\bi_\bl_\be_\bn_\bt error reporting.
- In normal operation, g\bge\bet\bto\bop\bpt\bts\bs prints diagnostic messages when it
- encounters invalid options or missing option arguments. If the
- variable O\bOP\bPT\bTE\bER\bRR\bR is set to 0, g\bge\bet\bto\bop\bpt\bts\bs does not display any error
- messages, even if the first character of _\bo_\bp_\bt_\bs_\bt_\br_\bi_\bn_\bg is not a
+ g\bge\bet\bto\bop\bpt\bts\bs can report errors in two ways. If the first character
+ of _\bo_\bp_\bt_\bs_\bt_\br_\bi_\bn_\bg is a colon, g\bge\bet\bto\bop\bpt\bts\bs uses _\bs_\bi_\bl_\be_\bn_\bt error reporting.
+ In normal operation, g\bge\bet\bto\bop\bpt\bts\bs prints diagnostic messages when it
+ encounters invalid options or missing option arguments. If the
+ variable O\bOP\bPT\bTE\bER\bRR\bR is set to 0, g\bge\bet\bto\bop\bpt\bts\bs does not display any error
+ messages, even if the first character of _\bo_\bp_\bt_\bs_\bt_\br_\bi_\bn_\bg is not a
colon.
If g\bge\bet\bto\bop\bpt\bts\bs detects an invalid option, it places ? into _\bn_\ba_\bm_\be and,
- if not silent, prints an error message and unsets O\bOP\bPT\bTA\bAR\bRG\bG. If
- g\bge\bet\bto\bop\bpt\bts\bs is silent, it assigns the option character found to O\bOP\bP-\b-
+ if not silent, prints an error message and unsets O\bOP\bPT\bTA\bAR\bRG\bG. If
+ g\bge\bet\bto\bop\bpt\bts\bs is silent, it assigns the option character found to O\bOP\bP-\b-
T\bTA\bAR\bRG\bG and does not print a diagnostic message.
- If a required argument is not found, and g\bge\bet\bto\bop\bpt\bts\bs is not silent,
+ If a required argument is not found, and g\bge\bet\bto\bop\bpt\bts\bs is not silent,
it sets the value of _\bn_\ba_\bm_\be to a question mark (?\b?), unsets O\bOP\bPT\bTA\bAR\bRG\bG,
- and prints a diagnostic message. If g\bge\bet\bto\bop\bpt\bts\bs is silent, it sets
- the value of _\bn_\ba_\bm_\be to a colon (:\b:) and sets O\bOP\bPT\bTA\bAR\bRG\bG to the option
+ and prints a diagnostic message. If g\bge\bet\bto\bop\bpt\bts\bs is silent, it sets
+ the value of _\bn_\ba_\bm_\be to a colon (:\b:) and sets O\bOP\bPT\bTA\bAR\bRG\bG to the option
character found.
- g\bge\bet\bto\bop\bpt\bts\bs returns true if an option, specified or unspecified, is
+ g\bge\bet\bto\bop\bpt\bts\bs returns true if an option, specified or unspecified, is
found. It returns false if the end of options is encountered or
an error occurs.
h\bha\bas\bsh\bh [-\b-l\blr\br] [-\b-p\bp _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be] [-\b-d\bdt\bt] [_\bn_\ba_\bm_\be]
Each time h\bha\bas\bsh\bh is invoked, it remembers the full pathname of the
- command _\bn_\ba_\bm_\be as determined by searching the directories in
- $\b$P\bPA\bAT\bTH\bH. Any previously-remembered pathname associated with _\bn_\ba_\bm_\be
- is discarded. If the -\b-p\bp option is supplied, h\bha\bas\bsh\bh uses _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
+ command _\bn_\ba_\bm_\be as determined by searching the directories in
+ $\b$P\bPA\bAT\bTH\bH. Any previously-remembered pathname associated with _\bn_\ba_\bm_\be
+ is discarded. If the -\b-p\bp option is supplied, h\bha\bas\bsh\bh uses _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
as the full pathname of the command.
- The -\b-r\br option causes the shell to forget all remembered loca-
- tions. Assigning to the P\bPA\bAT\bTH\bH variable also clears all hashed
- filenames. The -\b-d\bd option causes the shell to forget the remem-
+ The -\b-r\br option causes the shell to forget all remembered loca-
+ tions. Assigning to the P\bPA\bAT\bTH\bH variable also clears all hashed
+ filenames. The -\b-d\bd option causes the shell to forget the remem-
bered location of each _\bn_\ba_\bm_\be.
If the -\b-t\bt option is supplied, h\bha\bas\bsh\bh prints the full pathname cor-
- responding to each _\bn_\ba_\bm_\be. If multiple _\bn_\ba_\bm_\be arguments are sup-
- plied with -\b-t\bt, h\bha\bas\bsh\bh prints the _\bn_\ba_\bm_\be before the corresponding
+ responding to each _\bn_\ba_\bm_\be. If multiple _\bn_\ba_\bm_\be arguments are sup-
+ plied with -\b-t\bt, h\bha\bas\bsh\bh prints the _\bn_\ba_\bm_\be before the corresponding
hashed full pathname. The -\b-l\bl option displays output in a format
that may be reused as input.
- If no arguments are given, or if only -\b-l\bl is supplied, h\bha\bas\bsh\bh
- prints information about remembered commands. The -\b-t\bt, -\b-d\bd, and
- -\b-p\bp options (the options that act on the _\bn_\ba_\bm_\be arguments) are mu-
+ If no arguments are given, or if only -\b-l\bl is supplied, h\bha\bas\bsh\bh
+ prints information about remembered commands. The -\b-t\bt, -\b-d\bd, and
+ -\b-p\bp options (the options that act on the _\bn_\ba_\bm_\be arguments) are mu-
tually exclusive. Only one will be active. If more than one is
- supplied, -\b-t\bt has higher priority than -\b-p\bp, and both have higher
+ supplied, -\b-t\bt has higher priority than -\b-p\bp, and both have higher
priority than -\b-d\bd.
- The return status is zero unless a _\bn_\ba_\bm_\be is not found or an in-
+ The return status is zero unless a _\bn_\ba_\bm_\be is not found or an in-
valid option is supplied.
h\bhe\bel\blp\bp [-\b-d\bdm\bms\bs] [_\bp_\ba_\bt_\bt_\be_\br_\bn]
- Display helpful information about builtin commands. If _\bp_\ba_\bt_\bt_\be_\br_\bn
- is specified, h\bhe\bel\blp\bp gives detailed help on all commands matching
- _\bp_\ba_\bt_\bt_\be_\br_\bn as described below; otherwise it displays a list of all
+ Display helpful information about builtin commands. If _\bp_\ba_\bt_\bt_\be_\br_\bn
+ is specified, h\bhe\bel\blp\bp gives detailed help on all commands matching
+ _\bp_\ba_\bt_\bt_\be_\br_\bn as described below; otherwise it displays a list of all
the builtins and shell compound commands.
Options, if supplied, have the follow meanings:
format
-\b-s\bs Display only a short usage synopsis for each _\bp_\ba_\bt_\bt_\be_\br_\bn
- If _\bp_\ba_\bt_\bt_\be_\br_\bn contains pattern matching characters (see P\bPa\bat\btt\bte\ber\brn\bn
- M\bMa\bat\btc\bch\bhi\bin\bng\bg above) it's treated as a shell pattern and h\bhe\bel\blp\bp prints
+ If _\bp_\ba_\bt_\bt_\be_\br_\bn contains pattern matching characters (see P\bPa\bat\btt\bte\ber\brn\bn
+ M\bMa\bat\btc\bch\bhi\bin\bng\bg above) it's treated as a shell pattern and h\bhe\bel\blp\bp prints
the description of each help topic matching _\bp_\ba_\bt_\bt_\be_\br_\bn.
- If not, and _\bp_\ba_\bt_\bt_\be_\br_\bn exactly matches the name of a help topic,
- h\bhe\bel\blp\bp prints the description associated with that topic. Other-
- wise, h\bhe\bel\blp\bp performs prefix matching and prints the descriptions
+ If not, and _\bp_\ba_\bt_\bt_\be_\br_\bn exactly matches the name of a help topic,
+ h\bhe\bel\blp\bp prints the description associated with that topic. Other-
+ wise, h\bhe\bel\blp\bp performs prefix matching and prints the descriptions
of all matching help topics.
The return status is 0 unless no command matches _\bp_\ba_\bt_\bt_\be_\br_\bn.
h\bhi\bis\bst\bto\bor\bry\by -\b-a\ban\bnr\brw\bw [_\bf_\bi_\bl_\be_\bn_\ba_\bm_\be]
h\bhi\bis\bst\bto\bor\bry\by -\b-p\bp _\ba_\br_\bg [_\ba_\br_\bg ...]
h\bhi\bis\bst\bto\bor\bry\by -\b-s\bs _\ba_\br_\bg [_\ba_\br_\bg ...]
- With no options, display the command history list with numbers.
- Entries prefixed with a *\b* have been modified. An argument of _\bn
- lists only the last _\bn entries. If the shell variable H\bHI\bIS\bST\bTT\bTI\bIM\bME\bE-\b-
- F\bFO\bOR\bRM\bMA\bAT\bT is set and not null, it is used as a format string for
- _\bs_\bt_\br_\bf_\bt_\bi_\bm_\be(3) to display the time stamp associated with each dis-
- played history entry. If h\bhi\bis\bst\bto\bor\bry\by uses H\bHI\bIS\bST\bTT\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT, it does
- not print an intervening space between the formatted time stamp
+ With no options, display the command history list with numbers.
+ Entries prefixed with a *\b* have been modified. An argument of _\bn
+ lists only the last _\bn entries. If the shell variable H\bHI\bIS\bST\bTT\bTI\bIM\bME\bE-\b-
+ F\bFO\bOR\bRM\bMA\bAT\bT is set and not null, it is used as a format string for
+ _\bs_\bt_\br_\bf_\bt_\bi_\bm_\be(3) to display the time stamp associated with each dis-
+ played history entry. If h\bhi\bis\bst\bto\bor\bry\by uses H\bHI\bIS\bST\bTT\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT, it does
+ not print an intervening space between the formatted time stamp
and the history entry.
If _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be is supplied, h\bhi\bis\bst\bto\bor\bry\by uses it as the name of the his-
- tory file; if not, it uses the value of H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE. If _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
- is not supplied and H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE is unset or null, the -\b-a\ba,\b, -\b-n\bn,\b, -\b-r\br,\b,
+ tory file; if not, it uses the value of H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE. If _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
+ is not supplied and H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE is unset or null, the -\b-a\ba,\b, -\b-n\bn,\b, -\b-r\br,\b,
and -\b-w\bw options have no effect.
Options, if supplied, have the following meanings:
can be used with the other options to replace the history
list.
-\b-d\bd _\bo_\bf_\bf_\bs_\be_\bt
- Delete the history entry at position _\bo_\bf_\bf_\bs_\be_\bt. If _\bo_\bf_\bf_\bs_\be_\bt
+ Delete the history entry at position _\bo_\bf_\bf_\bs_\be_\bt. If _\bo_\bf_\bf_\bs_\be_\bt
is negative, it is interpreted as relative to one greater
than the last history position, so negative indices count
- back from the end of the history, and an index of -1
+ back from the end of the history, and an index of -1
refers to the current h\bhi\bis\bst\bto\bor\bry\by -\b-d\bd command.
-\b-d\bd _\bs_\bt_\ba_\br_\bt-_\be_\bn_\bd
- Delete the range of history entries between positions
- _\bs_\bt_\ba_\br_\bt and _\be_\bn_\bd, inclusive. Positive and negative values
+ Delete the range of history entries between positions
+ _\bs_\bt_\ba_\br_\bt and _\be_\bn_\bd, inclusive. Positive and negative values
for _\bs_\bt_\ba_\br_\bt and _\be_\bn_\bd are interpreted as described above.
- -\b-a\ba Append the "new" history lines to the history file.
- These are history lines entered since the beginning of
+ -\b-a\ba Append the "new" history lines to the history file.
+ These are history lines entered since the beginning of
the current b\bba\bas\bsh\bh session, but not already appended to the
history file.
- -\b-n\bn Read the history lines not already read from the history
+ -\b-n\bn Read the history lines not already read from the history
file and add them to the current history list. These are
lines appended to the history file since the beginning of
the current b\bba\bas\bsh\bh session.
rent history list.
-\b-w\bw Write the current history list to the history file, over-
writing the history file.
- -\b-p\bp Perform history substitution on the following _\ba_\br_\bg_\bs and
- display the result on the standard output, without stor-
- ing the results in the history list. Each _\ba_\br_\bg must be
+ -\b-p\bp Perform history substitution on the following _\ba_\br_\bg_\bs and
+ display the result on the standard output, without stor-
+ ing the results in the history list. Each _\ba_\br_\bg must be
quoted to disable normal history expansion.
- -\b-s\bs Store the _\ba_\br_\bg_\bs in the history list as a single entry.
- The last command in the history list is removed before
+ -\b-s\bs Store the _\ba_\br_\bg_\bs in the history list as a single entry.
+ The last command in the history list is removed before
adding the _\ba_\br_\bg_\bs.
- If the H\bHI\bIS\bST\bTT\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT variable is set, h\bhi\bis\bst\bto\bor\bry\by writes the time
+ If the H\bHI\bIS\bST\bTT\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT variable is set, h\bhi\bis\bst\bto\bor\bry\by writes the time
stamp information associated with each history entry to the his-
- tory file, marked with the history comment character as de-
- scribed above. When the history file is read, lines beginning
- with the history comment character followed immediately by a
- digit are interpreted as timestamps for the following history
+ tory file, marked with the history comment character as de-
+ scribed above. When the history file is read, lines beginning
+ with the history comment character followed immediately by a
+ digit are interpreted as timestamps for the following history
entry.
- The return value is 0 unless an invalid option is encountered,
- an error occurs while reading or writing the history file, an
+ The return value is 0 unless an invalid option is encountered,
+ an error occurs while reading or writing the history file, an
invalid _\bo_\bf_\bf_\bs_\be_\bt or range is supplied as an argument to -\b-d\bd, or the
history expansion supplied as an argument to -\b-p\bp fails.
The first form lists the active jobs. The options have the fol-
lowing meanings:
-\b-l\bl List process IDs in addition to the normal information.
- -\b-n\bn Display information only about jobs that have changed
+ -\b-n\bn Display information only about jobs that have changed
status since the user was last notified of their status.
- -\b-p\bp List only the process ID of the job's process group
+ -\b-p\bp List only the process ID of the job's process group
leader.
-\b-r\br Display only running jobs.
-\b-s\bs Display only stopped jobs.
- If _\bj_\bo_\bb_\bs_\bp_\be_\bc is supplied, j\bjo\bob\bbs\bs restricts output to information
+ If _\bj_\bo_\bb_\bs_\bp_\be_\bc is supplied, j\bjo\bob\bbs\bs restricts output to information
about that job. The return status is 0 unless an invalid option
is encountered or an invalid _\bj_\bo_\bb_\bs_\bp_\be_\bc is supplied.
k\bki\bil\bll\bl [-\b-s\bs _\bs_\bi_\bg_\bs_\bp_\be_\bc | -\b-n\bn _\bs_\bi_\bg_\bn_\bu_\bm | -\b-_\bs_\bi_\bg_\bs_\bp_\be_\bc] _\bi_\bd [ ... ]
k\bki\bil\bll\bl -\b-l\bl|-\b-L\bL [_\bs_\bi_\bg_\bs_\bp_\be_\bc | _\be_\bx_\bi_\bt_\b__\bs_\bt_\ba_\bt_\bu_\bs]
- Send the signal specified by _\bs_\bi_\bg_\bs_\bp_\be_\bc or _\bs_\bi_\bg_\bn_\bu_\bm to the processes
+ Send the signal specified by _\bs_\bi_\bg_\bs_\bp_\be_\bc or _\bs_\bi_\bg_\bn_\bu_\bm to the processes
named by each _\bi_\bd. Each _\bi_\bd may be a job specification _\bj_\bo_\bb_\bs_\bp_\be_\bc or
- a process ID _\bp_\bi_\bd. _\bs_\bi_\bg_\bs_\bp_\be_\bc is either a case-insensitive signal
- name such as S\bSI\bIG\bGK\bKI\bIL\bLL\bL (with or without the S\bSI\bIG\bG prefix) or a sig-
- nal number; _\bs_\bi_\bg_\bn_\bu_\bm is a signal number. If _\bs_\bi_\bg_\bs_\bp_\be_\bc is not sup-
+ a process ID _\bp_\bi_\bd. _\bs_\bi_\bg_\bs_\bp_\be_\bc is either a case-insensitive signal
+ name such as S\bSI\bIG\bGK\bKI\bIL\bLL\bL (with or without the S\bSI\bIG\bG prefix) or a sig-
+ nal number; _\bs_\bi_\bg_\bn_\bu_\bm is a signal number. If _\bs_\bi_\bg_\bs_\bp_\be_\bc is not sup-
plied, then k\bki\bil\bll\bl sends S\bSI\bIG\bGT\bTE\bER\bRM\bM.
The -\b-l\bl option lists the signal names. If any arguments are sup-
plied when -\b-l\bl is given, k\bki\bil\bll\bl lists the names of the signals cor-
- responding to the arguments, and the return status is 0. The
- _\be_\bx_\bi_\bt_\b__\bs_\bt_\ba_\bt_\bu_\bs argument to -\b-l\bl is a number specifying either a sig-
- nal number or the exit status of a process terminated by a sig-
- nal; if it is supplied, k\bki\bil\bll\bl prints the name of the signal that
+ responding to the arguments, and the return status is 0. The
+ _\be_\bx_\bi_\bt_\b__\bs_\bt_\ba_\bt_\bu_\bs argument to -\b-l\bl is a number specifying either a sig-
+ nal number or the exit status of a process terminated by a sig-
+ nal; if it is supplied, k\bki\bil\bll\bl prints the name of the signal that
caused the process to terminate. k\bki\bil\bll\bl assumes that process exit
statuses are greater than 128; anything less than that is a sig-
nal number. The -\b-L\bL option is equivalent to -\b-l\bl.
- k\bki\bil\bll\bl returns true if at least one signal was successfully sent,
+ k\bki\bil\bll\bl returns true if at least one signal was successfully sent,
or false if an error occurs or an invalid option is encountered.
l\ble\bet\bt _\ba_\br_\bg [_\ba_\br_\bg ...]
- Each _\ba_\br_\bg is evaluated as an arithmetic expression (see A\bAR\bRI\bIT\bTH\bH-\b-
- M\bME\bET\bTI\bIC\bC E\bEV\bVA\bAL\bLU\bUA\bAT\bTI\bIO\bON\bN above). If the last _\ba_\br_\bg evaluates to 0, l\ble\bet\bt
+ Each _\ba_\br_\bg is evaluated as an arithmetic expression (see A\bAR\bRI\bIT\bTH\bH-\b-
+ M\bME\bET\bTI\bIC\bC E\bEV\bVA\bAL\bLU\bUA\bAT\bTI\bIO\bON\bN above). If the last _\ba_\br_\bg evaluates to 0, l\ble\bet\bt
returns 1; otherwise l\ble\bet\bt returns 0.
l\blo\boc\bca\bal\bl [_\bo_\bp_\bt_\bi_\bo_\bn] [_\bn_\ba_\bm_\be[=_\bv_\ba_\bl_\bu_\be] ... | - ]
For each argument, create a local variable named _\bn_\ba_\bm_\be and assign
- it _\bv_\ba_\bl_\bu_\be. The _\bo_\bp_\bt_\bi_\bo_\bn can be any of the options accepted by d\bde\be-\b-
- c\bcl\bla\bar\bre\be. When l\blo\boc\bca\bal\bl is used within a function, it causes the
- variable _\bn_\ba_\bm_\be to have a visible scope restricted to that func-
- tion and its children. It is an error to use l\blo\boc\bca\bal\bl when not
+ it _\bv_\ba_\bl_\bu_\be. The _\bo_\bp_\bt_\bi_\bo_\bn can be any of the options accepted by d\bde\be-\b-
+ c\bcl\bla\bar\bre\be. When l\blo\boc\bca\bal\bl is used within a function, it causes the
+ variable _\bn_\ba_\bm_\be to have a visible scope restricted to that func-
+ tion and its children. It is an error to use l\blo\boc\bca\bal\bl when not
within a function.
- If _\bn_\ba_\bm_\be is -, it makes the set of shell options local to the
- function in which l\blo\boc\bca\bal\bl is invoked: any shell options changed
- using the s\bse\bet\bt builtin inside the function after the call to l\blo\bo-\b-
- c\bca\bal\bl are restored to their original values when the function re-
- turns. The restore is performed as if a series of s\bse\bet\bt commands
- were executed to restore the values that were in place before
+ If _\bn_\ba_\bm_\be is -, it makes the set of shell options local to the
+ function in which l\blo\boc\bca\bal\bl is invoked: any shell options changed
+ using the s\bse\bet\bt builtin inside the function after the call to l\blo\bo-\b-
+ c\bca\bal\bl are restored to their original values when the function re-
+ turns. The restore is performed as if a series of s\bse\bet\bt commands
+ were executed to restore the values that were in place before
the function.
- With no operands, l\blo\boc\bca\bal\bl writes a list of local variables to the
+ With no operands, l\blo\boc\bca\bal\bl writes a list of local variables to the
standard output.
- The return status is 0 unless l\blo\boc\bca\bal\bl is used outside a function,
+ The return status is 0 unless l\blo\boc\bca\bal\bl is used outside a function,
an invalid _\bn_\ba_\bm_\be is supplied, or _\bn_\ba_\bm_\be is a readonly variable.
l\blo\bog\bgo\bou\but\bt [\b[_\bn]\b]
- Exit a login shell, returning a status of _\bn to the shell's par-
+ Exit a login shell, returning a status of _\bn to the shell's par-
ent.
m\bma\bap\bpf\bfi\bil\ble\be [-\b-d\bd _\bd_\be_\bl_\bi_\bm] [-\b-n\bn _\bc_\bo_\bu_\bn_\bt] [-\b-O\bO _\bo_\br_\bi_\bg_\bi_\bn] [-\b-s\bs _\bc_\bo_\bu_\bn_\bt] [-\b-t\bt] [-\b-u\bu _\bf_\bd] [-\b-C\bC
_\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk] [-\b-c\bc _\bq_\bu_\ba_\bn_\bt_\bu_\bm] [_\ba_\br_\br_\ba_\by]
r\bre\bea\bad\bda\bar\brr\bra\bay\by [-\b-d\bd _\bd_\be_\bl_\bi_\bm] [-\b-n\bn _\bc_\bo_\bu_\bn_\bt] [-\b-O\bO _\bo_\br_\bi_\bg_\bi_\bn] [-\b-s\bs _\bc_\bo_\bu_\bn_\bt] [-\b-t\bt] [-\b-u\bu _\bf_\bd] [-\b-C\bC
_\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk] [-\b-c\bc _\bq_\bu_\ba_\bn_\bt_\bu_\bm] [_\ba_\br_\br_\ba_\by]
- Read lines from the standard input, or from file descriptor _\bf_\bd
- if the -\b-u\bu option is supplied, into the indexed array variable
- _\ba_\br_\br_\ba_\by. The variable M\bMA\bAP\bPF\bFI\bIL\bLE\bE is the default _\ba_\br_\br_\ba_\by. Options, if
+ Read lines from the standard input, or from file descriptor _\bf_\bd
+ if the -\b-u\bu option is supplied, into the indexed array variable
+ _\ba_\br_\br_\ba_\by. The variable M\bMA\bAP\bPF\bFI\bIL\bLE\bE is the default _\ba_\br_\br_\ba_\by. Options, if
supplied, have the following meanings:
- -\b-d\bd Use the first character of _\bd_\be_\bl_\bi_\bm to terminate each input
+ -\b-d\bd Use the first character of _\bd_\be_\bl_\bi_\bm to terminate each input
line, rather than newline. If _\bd_\be_\bl_\bi_\bm is the empty string,
m\bma\bap\bpf\bfi\bil\ble\be will terminate a line when it reads a NUL charac-
ter.
-\b-n\bn Copy at most _\bc_\bo_\bu_\bn_\bt lines. If _\bc_\bo_\bu_\bn_\bt is 0, copy all lines.
- -\b-O\bO Begin assigning to _\ba_\br_\br_\ba_\by at index _\bo_\br_\bi_\bg_\bi_\bn. The default
+ -\b-O\bO Begin assigning to _\ba_\br_\br_\ba_\by at index _\bo_\br_\bi_\bg_\bi_\bn. The default
index is 0.
-\b-s\bs Discard the first _\bc_\bo_\bu_\bn_\bt lines read.
- -\b-t\bt Remove a trailing _\bd_\be_\bl_\bi_\bm (default newline) from each line
+ -\b-t\bt Remove a trailing _\bd_\be_\bl_\bi_\bm (default newline) from each line
read.
- -\b-u\bu Read lines from file descriptor _\bf_\bd instead of the stan-
+ -\b-u\bu Read lines from file descriptor _\bf_\bd instead of the stan-
dard input.
- -\b-C\bC Evaluate _\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk each time _\bq_\bu_\ba_\bn_\bt_\bu_\bm lines are read. The
+ -\b-C\bC Evaluate _\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk each time _\bq_\bu_\ba_\bn_\bt_\bu_\bm lines are read. The
-\b-c\bc option specifies _\bq_\bu_\ba_\bn_\bt_\bu_\bm.
- -\b-c\bc Specify the number of lines read between each call to
+ -\b-c\bc Specify the number of lines read between each call to
_\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk.
- If -\b-C\bC is specified without -\b-c\bc, the default quantum is 5000.
+ If -\b-C\bC is specified without -\b-c\bc, the default quantum is 5000.
When _\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk is evaluated, it is supplied the index of the next
array element to be assigned and the line to be assigned to that
- element as additional arguments. _\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk is evaluated after
+ element as additional arguments. _\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk is evaluated after
the line is read but before the array element is assigned.
- If not supplied with an explicit origin, m\bma\bap\bpf\bfi\bil\ble\be will clear _\ba_\br_\b-
+ If not supplied with an explicit origin, m\bma\bap\bpf\bfi\bil\ble\be will clear _\ba_\br_\b-
_\br_\ba_\by before assigning to it.
m\bma\bap\bpf\bfi\bil\ble\be returns zero unless an invalid option or option argument
- is supplied, _\ba_\br_\br_\ba_\by is invalid or unassignable, or if _\ba_\br_\br_\ba_\by is
+ is supplied, _\ba_\br_\br_\ba_\by is invalid or unassignable, or if _\ba_\br_\br_\ba_\by is
not an indexed array.
p\bpo\bop\bpd\bd [-n\bn] [+_\bn] [-_\bn]
- Remove entries from the directory stack. The elements are num-
- bered from 0 starting at the first directory listed by d\bdi\bir\brs\bs, so
- p\bpo\bop\bpd\bd is equivalent to "popd +0." With no arguments, p\bpo\bop\bpd\bd re-
- moves the top directory from the stack, and changes to the new
+ Remove entries from the directory stack. The elements are num-
+ bered from 0 starting at the first directory listed by d\bdi\bir\brs\bs, so
+ p\bpo\bop\bpd\bd is equivalent to "popd +0." With no arguments, p\bpo\bop\bpd\bd re-
+ moves the top directory from the stack, and changes to the new
top directory. Arguments, if supplied, have the following mean-
ings:
-\b-n\bn Suppress the normal change of directory when removing di-
rectories from the stack, only manipulate the stack.
- +\b+_\bn Remove the _\bnth entry counting from the left of the list
- shown by d\bdi\bir\brs\bs, starting with zero, from the stack. For
+ +\b+_\bn Remove the _\bnth entry counting from the left of the list
+ shown by d\bdi\bir\brs\bs, starting with zero, from the stack. For
example: "popd +0" removes the first directory, "popd +1"
the second.
- -\b-_\bn Remove the _\bnth entry counting from the right of the list
- shown by d\bdi\bir\brs\bs, starting with zero. For example: "popd
- -0" removes the last directory, "popd -1" the next to
+ -\b-_\bn Remove the _\bnth entry counting from the right of the list
+ shown by d\bdi\bir\brs\bs, starting with zero. For example: "popd
+ -0" removes the last directory, "popd -1" the next to
last.
- If the top element of the directory stack is modified, and the
- _\b-_\bn option was not supplied, p\bpo\bop\bpd\bd uses the c\bcd\bd builtin to change
+ If the top element of the directory stack is modified, and the
+ _\b-_\bn option was not supplied, p\bpo\bop\bpd\bd uses the c\bcd\bd builtin to change
to the directory at the top of the stack. If the c\bcd\bd fails, p\bpo\bop\bpd\bd
returns a non-zero value.
- Otherwise, p\bpo\bop\bpd\bd returns false if an invalid option is supplied,
- the directory stack is empty, or _\bn specifies a non-existent di-
+ Otherwise, p\bpo\bop\bpd\bd returns false if an invalid option is supplied,
+ the directory stack is empty, or _\bn specifies a non-existent di-
rectory stack entry.
- If the p\bpo\bop\bpd\bd command is successful, b\bba\bas\bsh\bh runs d\bdi\bir\brs\bs to show the
- final contents of the directory stack, and the return status is
+ If the p\bpo\bop\bpd\bd command is successful, b\bba\bas\bsh\bh runs d\bdi\bir\brs\bs to show the
+ final contents of the directory stack, and the return status is
0.
p\bpr\bri\bin\bnt\btf\bf [-\b-v\bv _\bv_\ba_\br] _\bf_\bo_\br_\bm_\ba_\bt [_\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs]
- Write the formatted _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs to the standard output under the
- control of the _\bf_\bo_\br_\bm_\ba_\bt. The -\b-v\bv option assigns the output to the
+ Write the formatted _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs to the standard output under the
+ control of the _\bf_\bo_\br_\bm_\ba_\bt. The -\b-v\bv option assigns the output to the
variable _\bv_\ba_\br rather than printing it to the standard output.
- The _\bf_\bo_\br_\bm_\ba_\bt is a character string which contains three types of
- objects: plain characters, which are simply copied to standard
- output, character escape sequences, which are converted and
- copied to the standard output, and format specifications, each
- of which causes printing of the next successive _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt. In
- addition to the standard _\bp_\br_\bi_\bn_\bt_\bf(3) format characters c\bcC\bCs\bsS\bS-\b-
+ The _\bf_\bo_\br_\bm_\ba_\bt is a character string which contains three types of
+ objects: plain characters, which are simply copied to standard
+ output, character escape sequences, which are converted and
+ copied to the standard output, and format specifications, each
+ of which causes printing of the next successive _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt. In
+ addition to the standard _\bp_\br_\bi_\bn_\bt_\bf(3) format characters c\bcC\bCs\bsS\bS-\b-
n\bnd\bdi\bio\bou\bux\bxX\bXe\beE\bEf\bfF\bFg\bgG\bGa\baA\bA, p\bpr\bri\bin\bnt\btf\bf interprets the following additional for-
mat specifiers:
%\b%b\bb causes p\bpr\bri\bin\bnt\btf\bf to expand backslash escape sequences in the
corresponding _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt in the same way as e\bec\bch\bho\bo -\b-e\be.
- %\b%q\bq causes p\bpr\bri\bin\bnt\btf\bf to output the corresponding _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt in a
- format that can be reused as shell input. %\b%q\bq and %\b%Q\bQ use
- the $\b$'\b''\b' quoting style if any characters in the argument
- string require it, and backslash quoting otherwise. If
- the format string uses the _\bp_\br_\bi_\bn_\bt_\bf alternate form, these
+ %\b%q\bq causes p\bpr\bri\bin\bnt\btf\bf to output the corresponding _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt in a
+ format that can be reused as shell input. %\b%q\bq and %\b%Q\bQ use
+ the $\b$'\b''\b' quoting style if any characters in the argument
+ string require it, and backslash quoting otherwise. If
+ the format string uses the _\bp_\br_\bi_\bn_\bt_\bf alternate form, these
two formats quote the argument string using single
quotes.
- %\b%Q\bQ like %\b%q\bq, but applies any supplied precision to the _\ba_\br_\bg_\bu_\b-
+ %\b%Q\bQ like %\b%q\bq, but applies any supplied precision to the _\ba_\br_\bg_\bu_\b-
_\bm_\be_\bn_\bt before quoting it.
%\b%(\b(_\bd_\ba_\bt_\be_\bf_\bm_\bt)\b)T\bT
- causes p\bpr\bri\bin\bnt\btf\bf to output the date-time string resulting
- from using _\bd_\ba_\bt_\be_\bf_\bm_\bt as a format string for _\bs_\bt_\br_\bf_\bt_\bi_\bm_\be(3).
+ causes p\bpr\bri\bin\bnt\btf\bf to output the date-time string resulting
+ from using _\bd_\ba_\bt_\be_\bf_\bm_\bt as a format string for _\bs_\bt_\br_\bf_\bt_\bi_\bm_\be(3).
The corresponding _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt is an integer representing the
number of seconds since the epoch. This format specifier
recognizes two special argument values: -1 represents the
- current time, and -2 represents the time the shell was
+ current time, and -2 represents the time the shell was
invoked. If no argument is specified, conversion behaves
- as if -1 had been supplied. This is an exception to the
+ as if -1 had been supplied. This is an exception to the
usual p\bpr\bri\bin\bnt\btf\bf behavior.
The %b, %q, and %T format specifiers all use the field width and
precision arguments from the format specification and write that
- many bytes from (or use that wide a field for) the expanded ar-
- gument, which usually contains more characters than the origi-
+ many bytes from (or use that wide a field for) the expanded ar-
+ gument, which usually contains more characters than the origi-
nal.
The %n format specifier accepts a corresponding argument that is
treated as a shell variable name.
- The %s and %c format specifiers accept an l (long) modifier,
+ The %s and %c format specifiers accept an l (long) modifier,
which forces them to convert the argument string to a wide-char-
acter string and apply any supplied field width and precision in
terms of characters, not bytes. The %S and %C format specifiers
are equivalent to %ls and %lc, respectively.
- Arguments to non-string format specifiers are treated as C con-
+ Arguments to non-string format specifiers are treated as C con-
stants, except that a leading plus or minus sign is allowed, and
- if the leading character is a single or double quote, the value
- is the numeric value of the following character, using the cur-
+ if the leading character is a single or double quote, the value
+ is the numeric value of the following character, using the cur-
rent locale.
- The _\bf_\bo_\br_\bm_\ba_\bt is reused as necessary to consume all of the _\ba_\br_\bg_\bu_\b-
+ The _\bf_\bo_\br_\bm_\ba_\bt is reused as necessary to consume all of the _\ba_\br_\bg_\bu_\b-
_\bm_\be_\bn_\bt_\bs. If the _\bf_\bo_\br_\bm_\ba_\bt requires more _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs than are supplied,
- the extra format specifications behave as if a zero value or
- null string, as appropriate, had been supplied. The return
- value is zero on success, non-zero if an invalid option is sup-
+ the extra format specifications behave as if a zero value or
+ null string, as appropriate, had been supplied. The return
+ value is zero on success, non-zero if an invalid option is sup-
plied or a write or assignment error occurs.
p\bpu\bus\bsh\bhd\bd [-\b-n\bn] [+_\bn] [-_\bn]
p\bpu\bus\bsh\bhd\bd [-\b-n\bn] [_\bd_\bi_\br]
Add a directory to the top of the directory stack, or rotate the
- stack, making the new top of the stack the current working di-
- rectory. With no arguments, p\bpu\bus\bsh\bhd\bd exchanges the top two ele-
- ments of the directory stack. Arguments, if supplied, have the
+ stack, making the new top of the stack the current working di-
+ rectory. With no arguments, p\bpu\bus\bsh\bhd\bd exchanges the top two ele-
+ ments of the directory stack. Arguments, if supplied, have the
following meanings:
- -\b-n\bn Suppress the normal change of directory when rotating or
- adding directories to the stack, only manipulate the
+ -\b-n\bn Suppress the normal change of directory when rotating or
+ adding directories to the stack, only manipulate the
stack.
+\b+_\bn Rotate the stack so that the _\bnth directory (counting from
- the left of the list shown by d\bdi\bir\brs\bs, starting with zero)
+ the left of the list shown by d\bdi\bir\brs\bs, starting with zero)
is at the top.
- -\b-_\bn Rotates the stack so that the _\bnth directory (counting
- from the right of the list shown by d\bdi\bir\brs\bs, starting with
+ -\b-_\bn Rotates the stack so that the _\bnth directory (counting
+ from the right of the list shown by d\bdi\bir\brs\bs, starting with
zero) is at the top.
_\bd_\bi_\br Adds _\bd_\bi_\br to the directory stack at the top.
After the stack has been modified, if the -\b-n\bn option was not sup-
- plied, p\bpu\bus\bsh\bhd\bd uses the c\bcd\bd builtin to change to the directory at
+ plied, p\bpu\bus\bsh\bhd\bd uses the c\bcd\bd builtin to change to the directory at
the top of the stack. If the c\bcd\bd fails, p\bpu\bus\bsh\bhd\bd returns a non-zero
value.
- Otherwise, if no arguments are supplied, p\bpu\bus\bsh\bhd\bd returns zero un-
- less the directory stack is empty. When rotating the directory
+ Otherwise, if no arguments are supplied, p\bpu\bus\bsh\bhd\bd returns zero un-
+ less the directory stack is empty. When rotating the directory
stack, p\bpu\bus\bsh\bhd\bd returns zero unless the directory stack is empty or
_\bn specifies a non-existent directory stack element.
- If the p\bpu\bus\bsh\bhd\bd command is successful, b\bba\bas\bsh\bh runs d\bdi\bir\brs\bs to show the
+ If the p\bpu\bus\bsh\bhd\bd command is successful, b\bba\bas\bsh\bh runs d\bdi\bir\brs\bs to show the
final contents of the directory stack.
p\bpw\bwd\bd [-\b-L\bLP\bP]
- Print the absolute pathname of the current working directory.
+ Print the absolute pathname of the current working directory.
The pathname printed contains no symbolic links if the -\b-P\bP option
is supplied or the -\b-o\bo p\bph\bhy\bys\bsi\bic\bca\bal\bl option to the s\bse\bet\bt builtin command
- is enabled. If the -\b-L\bL option is used, the pathname printed may
- contain symbolic links. The return status is 0 unless an error
+ is enabled. If the -\b-L\bL option is used, the pathname printed may
+ contain symbolic links. The return status is 0 unless an error
occurs while reading the name of the current directory or an in-
valid option is supplied.
r\bre\bea\bad\bd [-\b-E\bEe\ber\brs\bs] [-\b-a\ba _\ba_\bn_\ba_\bm_\be] [-\b-d\bd _\bd_\be_\bl_\bi_\bm] [-\b-i\bi _\bt_\be_\bx_\bt] [-\b-n\bn _\bn_\bc_\bh_\ba_\br_\bs] [-\b-N\bN _\bn_\bc_\bh_\ba_\br_\bs]
[-\b-p\bp _\bp_\br_\bo_\bm_\bp_\bt] [-\b-t\bt _\bt_\bi_\bm_\be_\bo_\bu_\bt] [-\b-u\bu _\bf_\bd] [_\bn_\ba_\bm_\be ...]
Read one line from the standard input, or from the file descrip-
- tor _\bf_\bd supplied as an argument to the -\b-u\bu option, split it into
- words as described above under W\bWo\bor\brd\bd S\bSp\bpl\bli\bit\btt\bti\bin\bng\bg, and assign the
- first word to the first _\bn_\ba_\bm_\be, the second word to the second
- _\bn_\ba_\bm_\be, and so on. If there are more words than names, the re-
- maining words and their intervening delimiters are assigned to
- the last _\bn_\ba_\bm_\be. If there are fewer words read from the input
- stream than names, the remaining names are assigned empty val-
- ues. The characters in the value of the I\bIF\bFS\bS variable are used
+ tor _\bf_\bd supplied as an argument to the -\b-u\bu option, split it into
+ words as described above under W\bWo\bor\brd\bd S\bSp\bpl\bli\bit\btt\bti\bin\bng\bg, and assign the
+ first word to the first _\bn_\ba_\bm_\be, the second word to the second
+ _\bn_\ba_\bm_\be, and so on. If there are more words than names, the re-
+ maining words and their intervening delimiters are assigned to
+ the last _\bn_\ba_\bm_\be. If there are fewer words read from the input
+ stream than names, the remaining names are assigned empty val-
+ ues. The characters in the value of the I\bIF\bFS\bS variable are used
to split the line into words using the same rules the shell uses
for expansion (described above under W\bWo\bor\brd\bd S\bSp\bpl\bli\bit\btt\bti\bin\bng\bg). The back-
- slash character (\\b\) removes any special meaning for the next
+ slash character (\\b\) removes any special meaning for the next
character read and is used for line continuation.
Options, if supplied, have the following meanings:
-\b-a\ba _\ba_\bn_\ba_\bm_\be
The words are assigned to sequential indices of the array
variable _\ba_\bn_\ba_\bm_\be, starting at 0. _\ba_\bn_\ba_\bm_\be is unset before any
- new values are assigned. Other _\bn_\ba_\bm_\be arguments are ig-
+ new values are assigned. Other _\bn_\ba_\bm_\be arguments are ig-
nored.
-\b-d\bd _\bd_\be_\bl_\bi_\bm
- The first character of _\bd_\be_\bl_\bi_\bm terminates the input line,
- rather than newline. If _\bd_\be_\bl_\bi_\bm is the empty string, r\bre\bea\bad\bd
+ The first character of _\bd_\be_\bl_\bi_\bm terminates the input line,
+ rather than newline. If _\bd_\be_\bl_\bi_\bm is the empty string, r\bre\bea\bad\bd
will terminate a line when it reads a NUL character.
- -\b-e\be If the standard input is coming from a terminal, r\bre\bea\bad\bd
- uses r\bre\bea\bad\bdl\bli\bin\bne\be (see R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE above) to obtain the line.
- R\bRe\bea\bad\bdl\bli\bin\bne\be uses the current (or default, if line editing
- was not previously active) editing settings, but uses
+ -\b-e\be If the standard input is coming from a terminal, r\bre\bea\bad\bd
+ uses r\bre\bea\bad\bdl\bli\bin\bne\be (see R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE above) to obtain the line.
+ R\bRe\bea\bad\bdl\bli\bin\bne\be uses the current (or default, if line editing
+ was not previously active) editing settings, but uses
r\bre\bea\bad\bdl\bli\bin\bne\be's default filename completion.
- -\b-E\bE If the standard input is coming from a terminal, r\bre\bea\bad\bd
- uses r\bre\bea\bad\bdl\bli\bin\bne\be (see R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE above) to obtain the line.
- R\bRe\bea\bad\bdl\bli\bin\bne\be uses the current (or default, if line editing
- was not previously active) editing settings, but uses
+ -\b-E\bE If the standard input is coming from a terminal, r\bre\bea\bad\bd
+ uses r\bre\bea\bad\bdl\bli\bin\bne\be (see R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE above) to obtain the line.
+ R\bRe\bea\bad\bdl\bli\bin\bne\be uses the current (or default, if line editing
+ was not previously active) editing settings, but uses
bash's default completion, including programmable comple-
tion.
-\b-i\bi _\bt_\be_\bx_\bt
- If r\bre\bea\bad\bdl\bli\bin\bne\be is being used to read the line, r\bre\bea\bad\bd places
+ If r\bre\bea\bad\bdl\bli\bin\bne\be is being used to read the line, r\bre\bea\bad\bd places
_\bt_\be_\bx_\bt into the editing buffer before editing begins.
-\b-n\bn _\bn_\bc_\bh_\ba_\br_\bs
- r\bre\bea\bad\bd returns after reading _\bn_\bc_\bh_\ba_\br_\bs characters rather than
- waiting for a complete line of input, unless it encoun-
- ters EOF or r\bre\bea\bad\bd times out, but honors a delimiter if it
+ r\bre\bea\bad\bd returns after reading _\bn_\bc_\bh_\ba_\br_\bs characters rather than
+ waiting for a complete line of input, unless it encoun-
+ ters EOF or r\bre\bea\bad\bd times out, but honors a delimiter if it
reads fewer than _\bn_\bc_\bh_\ba_\br_\bs characters before the delimiter.
-\b-N\bN _\bn_\bc_\bh_\ba_\br_\bs
- r\bre\bea\bad\bd returns after reading exactly _\bn_\bc_\bh_\ba_\br_\bs characters
- rather than waiting for a complete line of input, unless
+ r\bre\bea\bad\bd returns after reading exactly _\bn_\bc_\bh_\ba_\br_\bs characters
+ rather than waiting for a complete line of input, unless
it encounters EOF or r\bre\bea\bad\bd times out. Any delimiter char-
- acters in the input are not treated specially and do not
+ acters in the input are not treated specially and do not
cause r\bre\bea\bad\bd to return until it has read _\bn_\bc_\bh_\ba_\br_\bs characters.
The result is not split on the characters in I\bIF\bFS\bS; the in-
tent is that the variable is assigned exactly the charac-
- ters read (with the exception of backslash; see the -\b-r\br
+ ters read (with the exception of backslash; see the -\b-r\br
option below).
-\b-p\bp _\bp_\br_\bo_\bm_\bp_\bt
Display _\bp_\br_\bo_\bm_\bp_\bt on standard error, without a trailing new-
- line, before attempting to read any input, but only if
+ line, before attempting to read any input, but only if
input is coming from a terminal.
-\b-r\br Backslash does not act as an escape character. The back-
- slash is considered to be part of the line. In particu-
- lar, a backslash-newline pair may not then be used as a
+ slash is considered to be part of the line. In particu-
+ lar, a backslash-newline pair may not then be used as a
line continuation.
-\b-s\bs Silent mode. If input is coming from a terminal, charac-
ters are not echoed.
-\b-t\bt _\bt_\bi_\bm_\be_\bo_\bu_\bt
- Cause r\bre\bea\bad\bd to time out and return failure if it does not
- read a complete line of input (or a specified number of
- characters) within _\bt_\bi_\bm_\be_\bo_\bu_\bt seconds. _\bt_\bi_\bm_\be_\bo_\bu_\bt may be a
- decimal number with a fractional portion following the
- decimal point. This option is only effective if r\bre\bea\bad\bd is
- reading input from a terminal, pipe, or other special
- file; it has no effect when reading from regular files.
- If r\bre\bea\bad\bd times out, it saves any partial input read into
- the specified variable _\bn_\ba_\bm_\be, and the exit status is
- greater than 128. If _\bt_\bi_\bm_\be_\bo_\bu_\bt is 0, r\bre\bea\bad\bd returns immedi-
- ately, without trying to read any data. In this case,
- the exit status is 0 if input is available on the speci-
- fied file descriptor, or the read will return EOF, non-
+ Cause r\bre\bea\bad\bd to time out and return failure if it does not
+ read a complete line of input (or a specified number of
+ characters) within _\bt_\bi_\bm_\be_\bo_\bu_\bt seconds. _\bt_\bi_\bm_\be_\bo_\bu_\bt may be a
+ decimal number with a fractional portion following the
+ decimal point. This option is only effective if r\bre\bea\bad\bd is
+ reading input from a terminal, pipe, or other special
+ file; it has no effect when reading from regular files.
+ If r\bre\bea\bad\bd times out, it saves any partial input read into
+ the specified variable _\bn_\ba_\bm_\be, and the exit status is
+ greater than 128. If _\bt_\bi_\bm_\be_\bo_\bu_\bt is 0, r\bre\bea\bad\bd returns immedi-
+ ately, without trying to read any data. In this case,
+ the exit status is 0 if input is available on the speci-
+ fied file descriptor, or the read will return EOF, non-
zero otherwise.
- -\b-u\bu _\bf_\bd Read input from file descriptor _\bf_\bd instead of the stan-
+ -\b-u\bu _\bf_\bd Read input from file descriptor _\bf_\bd instead of the stan-
dard input.
- Other than the case where _\bd_\be_\bl_\bi_\bm is the empty string, r\bre\bea\bad\bd ig-
+ Other than the case where _\bd_\be_\bl_\bi_\bm is the empty string, r\bre\bea\bad\bd ig-
nores any NUL characters in the input.
- If no _\bn_\ba_\bm_\be_\bs are supplied, r\bre\bea\bad\bd assigns the line read, without
- the ending delimiter but otherwise unmodified, to the variable
+ If no _\bn_\ba_\bm_\be_\bs are supplied, r\bre\bea\bad\bd assigns the line read, without
+ the ending delimiter but otherwise unmodified, to the variable
R\bRE\bEP\bPL\bLY\bY.
The exit status is zero, unless end-of-file is encountered, r\bre\bea\bad\bd
- times out (in which case the status is greater than 128), a
+ times out (in which case the status is greater than 128), a
variable assignment error (such as assigning to a readonly vari-
- able) occurs, or an invalid file descriptor is supplied as the
+ able) occurs, or an invalid file descriptor is supplied as the
argument to -\b-u\bu.
r\bre\bea\bad\bdo\bon\bnl\bly\by [-\b-a\baA\bAf\bf] [-\b-p\bp] [_\bn_\ba_\bm_\be[=_\bw_\bo_\br_\bd] ...]
- The given _\bn_\ba_\bm_\be_\bs are marked readonly; the values of these _\bn_\ba_\bm_\be_\bs
+ The given _\bn_\ba_\bm_\be_\bs are marked readonly; the values of these _\bn_\ba_\bm_\be_\bs
may not be changed by subsequent assignment or unset. If the -\b-f\bf
- option is supplied, each _\bn_\ba_\bm_\be refers to a shell function. The
- -\b-a\ba option restricts the variables to indexed arrays; the -\b-A\bA op-
+ option is supplied, each _\bn_\ba_\bm_\be refers to a shell function. The
+ -\b-a\ba option restricts the variables to indexed arrays; the -\b-A\bA op-
tion restricts the variables to associative arrays. If both op-
- tions are supplied, -\b-A\bA takes precedence. If no _\bn_\ba_\bm_\be arguments
- are supplied, or if the -\b-p\bp option is supplied, print a list of
- all readonly names. The other options may be used to restrict
+ tions are supplied, -\b-A\bA takes precedence. If no _\bn_\ba_\bm_\be arguments
+ are supplied, or if the -\b-p\bp option is supplied, print a list of
+ all readonly names. The other options may be used to restrict
the output to a subset of the set of readonly names. The -\b-p\bp op-
tion displays output in a format that may be reused as input.
- r\bre\bea\bad\bdo\bon\bnl\bly\by allows the value of a variable to be set at the same
+ r\bre\bea\bad\bdo\bon\bnl\bly\by allows the value of a variable to be set at the same
time the readonly attribute is changed by following the variable
- name with =_\bv_\ba_\bl_\bu_\be. This sets the value of the variable is to
+ name with =_\bv_\ba_\bl_\bu_\be. This sets the value of the variable is to
_\bv_\ba_\bl_\bu_\be while modifying the readonly attribute.
- The return status is 0 unless an invalid option is encountered,
- one of the _\bn_\ba_\bm_\be_\bs is not a valid shell variable name, or -\b-f\bf is
+ The return status is 0 unless an invalid option is encountered,
+ one of the _\bn_\ba_\bm_\be_\bs is not a valid shell variable name, or -\b-f\bf is
supplied with a _\bn_\ba_\bm_\be that is not a function.
r\bre\bet\btu\bur\brn\bn [_\bn]
- Stop executing a shell function or sourced file and return the
+ Stop executing a shell function or sourced file and return the
value specified by _\bn to its caller. If _\bn is omitted, the return
- status is that of the last command executed. If r\bre\bet\btu\bur\brn\bn is exe-
- cuted by a trap handler, the last command used to determine the
+ status is that of the last command executed. If r\bre\bet\btu\bur\brn\bn is exe-
+ cuted by a trap handler, the last command used to determine the
status is the last command executed before the trap handler. If
r\bre\bet\btu\bur\brn\bn is executed during a D\bDE\bEB\bBU\bUG\bG trap, the last command used to
- determine the status is the last command executed by the trap
+ determine the status is the last command executed by the trap
handler before r\bre\bet\btu\bur\brn\bn was invoked.
When r\bre\bet\btu\bur\brn\bn is used to terminate execution of a script being ex-
- ecuted by the .\b. (s\bso\bou\bur\brc\bce\be) command, it causes the shell to stop
- executing that script and return either _\bn or the exit status of
- the last command executed within the script as the exit status
- of the script. If _\bn is supplied, the return value is its least
+ ecuted by the .\b. (s\bso\bou\bur\brc\bce\be) command, it causes the shell to stop
+ executing that script and return either _\bn or the exit status of
+ the last command executed within the script as the exit status
+ of the script. If _\bn is supplied, the return value is its least
significant 8 bits.
- Any command associated with the R\bRE\bET\bTU\bUR\bRN\bN trap is executed before
+ Any command associated with the R\bRE\bET\bTU\bUR\bRN\bN trap is executed before
execution resumes after the function or script.
- The return status is non-zero if r\bre\bet\btu\bur\brn\bn is supplied a non-nu-
+ The return status is non-zero if r\bre\bet\btu\bur\brn\bn is supplied a non-nu-
meric argument, or is used outside a function and not during ex-
ecution of a script by .\b. or s\bso\bou\bur\brc\bce\be.
s\bse\bet\bt [-\b-a\bab\bbe\bef\bfh\bhk\bkm\bmn\bnp\bpt\btu\buv\bvx\bxB\bBC\bCE\bEH\bHP\bPT\bT] [-\b-o\bo _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be] [-\b--\b-] [-\b-] [_\ba_\br_\bg ...]
s\bse\bet\bt [+\b+a\bab\bbe\bef\bfh\bhk\bkm\bmn\bnp\bpt\btu\buv\bvx\bxB\bBC\bCE\bEH\bHP\bPT\bT] [+\b+o\bo _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be] [-\b--\b-] [-\b-] [_\ba_\br_\bg ...]
s\bse\bet\bt -\b-o\bo
- s\bse\bet\bt +\b+o\bo Without options, display the name and value of each shell vari-
- able in a format that can be reused as input for setting or re-
+ s\bse\bet\bt +\b+o\bo Without options, display the name and value of each shell vari-
+ able in a format that can be reused as input for setting or re-
setting the currently-set variables. Read-only variables cannot
- be reset. In posix mode, only shell variables are listed. The
- output is sorted according to the current locale. When options
- are specified, they set or unset shell attributes. Any argu-
- ments remaining after option processing are treated as values
+ be reset. In posix mode, only shell variables are listed. The
+ output is sorted according to the current locale. When options
+ are specified, they set or unset shell attributes. Any argu-
+ ments remaining after option processing are treated as values
for the positional parameters and are assigned, in order, to $\b$1\b1,
- $\b$2\b2, ..., $\b$_\bn. Options, if specified, have the following mean-
+ $\b$2\b2, ..., $\b$_\bn. Options, if specified, have the following mean-
ings:
-\b-a\ba Each variable or function that is created or modified is
- given the export attribute and marked for export to the
+ given the export attribute and marked for export to the
environment of subsequent commands.
- -\b-b\bb Report the status of terminated background jobs immedi-
+ -\b-b\bb Report the status of terminated background jobs immedi-
ately, rather than before the next primary prompt or af-
- ter a foreground command terminates. This is effective
+ ter a foreground command terminates. This is effective
only when job control is enabled.
- -\b-e\be Exit immediately if a _\bp_\bi_\bp_\be_\bl_\bi_\bn_\be (which may consist of a
- single _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd), a _\bl_\bi_\bs_\bt, or a _\bc_\bo_\bm_\bp_\bo_\bu_\bn_\bd _\bc_\bo_\bm_\bm_\ba_\bn_\bd
+ -\b-e\be Exit immediately if a _\bp_\bi_\bp_\be_\bl_\bi_\bn_\be (which may consist of a
+ single _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd), a _\bl_\bi_\bs_\bt, or a _\bc_\bo_\bm_\bp_\bo_\bu_\bn_\bd _\bc_\bo_\bm_\bm_\ba_\bn_\bd
(see S\bSH\bHE\bEL\bLL\bL G\bGR\bRA\bAM\bMM\bMA\bAR\bR above), exits with a non-zero status.
- The shell does not exit if the command that fails is
- part of the command list immediately following a w\bwh\bhi\bil\ble\be
- or u\bun\bnt\bti\bil\bl reserved word, part of the test following the
- i\bif\bf or e\bel\bli\bif\bf reserved words, part of any command executed
- in a &\b&&\b& or |\b||\b| list except the command following the fi-
- nal &\b&&\b& or |\b||\b|, any command in a pipeline but the last
- (subject to the state of the p\bpi\bip\bpe\bef\bfa\bai\bil\bl shell option), or
- if the command's return value is being inverted with !\b!.
- If a compound command other than a subshell returns a
- non-zero status because a command failed while -\b-e\be was
- being ignored, the shell does not exit. A trap on E\bER\bRR\bR,
+ The shell does not exit if the command that fails is
+ part of the command list immediately following a w\bwh\bhi\bil\ble\be
+ or u\bun\bnt\bti\bil\bl reserved word, part of the test following the
+ i\bif\bf or e\bel\bli\bif\bf reserved words, part of any command executed
+ in a &\b&&\b& or |\b||\b| list except the command following the fi-
+ nal &\b&&\b& or |\b||\b|, any command in a pipeline but the last
+ (subject to the state of the p\bpi\bip\bpe\bef\bfa\bai\bil\bl shell option), or
+ if the command's return value is being inverted with !\b!.
+ If a compound command other than a subshell returns a
+ non-zero status because a command failed while -\b-e\be was
+ being ignored, the shell does not exit. A trap on E\bER\bRR\bR,
if set, is executed before the shell exits. This option
applies to the shell environment and each subshell envi-
- ronment separately (see C\bCO\bOM\bMM\bMA\bAN\bND\bD E\bEX\bXE\bEC\bCU\bUT\bTI\bIO\bON\bN E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT
+ ronment separately (see C\bCO\bOM\bMM\bMA\bAN\bND\bD E\bEX\bXE\bEC\bCU\bUT\bTI\bIO\bON\bN E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT
above), and may cause subshells to exit before executing
all the commands in the subshell.
- If a compound command or shell function executes in a
- context where -\b-e\be is being ignored, none of the commands
- executed within the compound command or function body
- will be affected by the -\b-e\be setting, even if -\b-e\be is set
- and a command returns a failure status. If a compound
- command or shell function sets -\b-e\be while executing in a
- context where -\b-e\be is ignored, that setting will not have
- any effect until the compound command or the command
+ If a compound command or shell function executes in a
+ context where -\b-e\be is being ignored, none of the commands
+ executed within the compound command or function body
+ will be affected by the -\b-e\be setting, even if -\b-e\be is set
+ and a command returns a failure status. If a compound
+ command or shell function sets -\b-e\be while executing in a
+ context where -\b-e\be is ignored, that setting will not have
+ any effect until the compound command or the command
containing the function call completes.
-\b-f\bf Disable pathname expansion.
- -\b-h\bh Remember the location of commands as they are looked up
+ -\b-h\bh Remember the location of commands as they are looked up
for execution. This is enabled by default.
- -\b-k\bk All arguments in the form of assignment statements are
- placed in the environment for a command, not just those
+ -\b-k\bk All arguments in the form of assignment statements are
+ placed in the environment for a command, not just those
that precede the command name.
- -\b-m\bm Monitor mode. Job control is enabled. This option is
- on by default for interactive shells on systems that
- support it (see J\bJO\bOB\bB C\bCO\bON\bNT\bTR\bRO\bOL\bL above). All processes run
+ -\b-m\bm Monitor mode. Job control is enabled. This option is
+ on by default for interactive shells on systems that
+ support it (see J\bJO\bOB\bB C\bCO\bON\bNT\bTR\bRO\bOL\bL above). All processes run
in a separate process group. When a background job com-
pletes, the shell prints a line containing its exit sta-
tus.
-\b-n\bn Read commands but do not execute them. This may be used
- to check a shell script for syntax errors. This is ig-
+ to check a shell script for syntax errors. This is ig-
nored by interactive shells.
-\b-o\bo _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be
The _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be can be one of the following:
Same as -\b-a\ba.
b\bbr\bra\bac\bce\bee\bex\bxp\bpa\ban\bnd\bd
Same as -\b-B\bB.
- e\bem\bma\bac\bcs\bs Use an emacs-style command line editing inter-
+ e\bem\bma\bac\bcs\bs Use an emacs-style command line editing inter-
face. This is enabled by default when the shell
is interactive, unless the shell is started with
- the -\b--\b-n\bno\boe\bed\bdi\bit\bti\bin\bng\bg option. This also affects the
+ the -\b--\b-n\bno\boe\bed\bdi\bit\bti\bin\bng\bg option. This also affects the
editing interface used for r\bre\bea\bad\bd -\b-e\be.
e\ber\brr\bre\bex\bxi\bit\bt Same as -\b-e\be.
e\ber\brr\brt\btr\bra\bac\bce\be
H\bHI\bIS\bST\bTO\bOR\bRY\bY. This option is on by default in inter-
active shells.
i\big\bgn\bno\bor\bre\bee\beo\bof\bf
- The effect is as if the shell command
+ The effect is as if the shell command
"IGNOREEOF=10" had been executed (see S\bSh\bhe\bel\bll\bl
V\bVa\bar\bri\bia\bab\bbl\ble\bes\bs above).
k\bke\bey\byw\bwo\bor\brd\bd Same as -\b-k\bk.
p\bph\bhy\bys\bsi\bic\bca\bal\bl
Same as -\b-P\bP.
p\bpi\bip\bpe\bef\bfa\bai\bil\bl
- If set, the return value of a pipeline is the
- value of the last (rightmost) command to exit
- with a non-zero status, or zero if all commands
- in the pipeline exit successfully. This option
+ If set, the return value of a pipeline is the
+ value of the last (rightmost) command to exit
+ with a non-zero status, or zero if all commands
+ in the pipeline exit successfully. This option
is disabled by default.
- p\bpo\bos\bsi\bix\bx Enable posix mode; change the behavior of b\bba\bas\bsh\bh
- where the default operation differs from the
- POSIX standard to match the standard. See S\bSE\bEE\bE
- A\bAL\bLS\bSO\bO below for a reference to a document that
+ p\bpo\bos\bsi\bix\bx Enable posix mode; change the behavior of b\bba\bas\bsh\bh
+ where the default operation differs from the
+ POSIX standard to match the standard. See S\bSE\bEE\bE
+ A\bAL\bLS\bSO\bO below for a reference to a document that
details how posix mode affects bash's behavior.
p\bpr\bri\biv\bvi\bil\ble\beg\bge\bed\bd
Same as -\b-p\bp.
v\bve\ber\brb\bbo\bos\bse\be Same as -\b-v\bv.
- v\bvi\bi Use a vi-style command line editing interface.
+ v\bvi\bi Use a vi-style command line editing interface.
This also affects the editing interface used for
r\bre\bea\bad\bd -\b-e\be.
x\bxt\btr\bra\bac\bce\be Same as -\b-x\bx.
- If -\b-o\bo is supplied with no _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be, s\bse\bet\bt prints the
- current shell option settings. If +\b+o\bo is supplied with
- no _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be, s\bse\bet\bt prints a series of s\bse\bet\bt commands to
- recreate the current option settings on the standard
+ If -\b-o\bo is supplied with no _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be, s\bse\bet\bt prints the
+ current shell option settings. If +\b+o\bo is supplied with
+ no _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be, s\bse\bet\bt prints a series of s\bse\bet\bt commands to
+ recreate the current option settings on the standard
output.
- -\b-p\bp Turn on _\bp_\br_\bi_\bv_\bi_\bl_\be_\bg_\be_\bd mode. In this mode, the shell does
- not read the $\b$E\bEN\bNV\bV and $\b$B\bBA\bAS\bSH\bH_\b_E\bEN\bNV\bV files, shell functions
- are not inherited from the environment, and the S\bSH\bHE\bEL\bL-\b-
- L\bLO\bOP\bPT\bTS\bS, B\bBA\bAS\bSH\bHO\bOP\bPT\bTS\bS, C\bCD\bDP\bPA\bAT\bTH\bH, and G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE variables, if
- they appear in the environment, are ignored. If the
- shell is started with the effective user (group) id not
- equal to the real user (group) id, and the -\b-p\bp option is
- not supplied, these actions are taken and the effective
+ -\b-p\bp Turn on _\bp_\br_\bi_\bv_\bi_\bl_\be_\bg_\be_\bd mode. In this mode, the shell does
+ not read the $\b$E\bEN\bNV\bV and $\b$B\bBA\bAS\bSH\bH_\b_E\bEN\bNV\bV files, shell functions
+ are not inherited from the environment, and the S\bSH\bHE\bEL\bL-\b-
+ L\bLO\bOP\bPT\bTS\bS, B\bBA\bAS\bSH\bHO\bOP\bPT\bTS\bS, C\bCD\bDP\bPA\bAT\bTH\bH, and G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE variables, if
+ they appear in the environment, are ignored. If the
+ shell is started with the effective user (group) id not
+ equal to the real user (group) id, and the -\b-p\bp option is
+ not supplied, these actions are taken and the effective
user id is set to the real user id. If the -\b-p\bp option is
supplied at startup, the effective user id is not reset.
- Turning this option off causes the effective user and
+ Turning this option off causes the effective user and
group ids to be set to the real user and group ids.
-\b-r\br Enable restricted shell mode. This option cannot be un-
set once it has been set.
-\b-t\bt Exit after reading and executing one command.
-\b-u\bu Treat unset variables and parameters other than the spe-
- cial parameters "@" and "*", or array variables sub-
- scripted with "@" or "*", as an error when performing
- parameter expansion. If expansion is attempted on an
- unset variable or parameter, the shell prints an error
- message, and, if not interactive, exits with a non-zero
+ cial parameters "@" and "*", or array variables sub-
+ scripted with "@" or "*", as an error when performing
+ parameter expansion. If expansion is attempted on an
+ unset variable or parameter, the shell prints an error
+ message, and, if not interactive, exits with a non-zero
status.
-\b-v\bv Print shell input lines as they are read.
- -\b-x\bx After expanding each _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd, f\bfo\bor\br command, c\bca\bas\bse\be
+ -\b-x\bx After expanding each _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd, f\bfo\bor\br command, c\bca\bas\bse\be
command, s\bse\bel\ble\bec\bct\bt command, or arithmetic f\bfo\bor\br command, dis-
- play the expanded value of P\bPS\bS4\b4, followed by the command
- and its expanded arguments or associated word list, to
+ play the expanded value of P\bPS\bS4\b4, followed by the command
+ and its expanded arguments or associated word list, to
the standard error.
- -\b-B\bB The shell performs brace expansion (see B\bBr\bra\bac\bce\be E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn
+ -\b-B\bB The shell performs brace expansion (see B\bBr\bra\bac\bce\be E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn
above). This is on by default.
- -\b-C\bC If set, b\bba\bas\bsh\bh does not overwrite an existing file with
- the >\b>, >\b>&\b&, and <\b<>\b> redirection operators. Using the
- redirection operator >\b>|\b| instead of >\b> will override this
+ -\b-C\bC If set, b\bba\bas\bsh\bh does not overwrite an existing file with
+ the >\b>, >\b>&\b&, and <\b<>\b> redirection operators. Using the
+ redirection operator >\b>|\b| instead of >\b> will override this
and force the creation of an output file.
-\b-E\bE If set, any trap on E\bER\bRR\bR is inherited by shell functions,
- command substitutions, and commands executed in a sub-
- shell environment. The E\bER\bRR\bR trap is normally not inher-
+ command substitutions, and commands executed in a sub-
+ shell environment. The E\bER\bRR\bR trap is normally not inher-
ited in such cases.
-\b-H\bH Enable !\b! style history substitution. This option is on
by default when the shell is interactive.
- -\b-P\bP If set, the shell does not resolve symbolic links when
- executing commands such as c\bcd\bd that change the current
+ -\b-P\bP If set, the shell does not resolve symbolic links when
+ executing commands such as c\bcd\bd that change the current
working directory. It uses the physical directory
structure instead. By default, b\bba\bas\bsh\bh follows the logical
- chain of directories when performing commands which
+ chain of directories when performing commands which
change the current directory.
- -\b-T\bT If set, any traps on D\bDE\bEB\bBU\bUG\bG and R\bRE\bET\bTU\bUR\bRN\bN are inherited by
+ -\b-T\bT If set, any traps on D\bDE\bEB\bBU\bUG\bG and R\bRE\bET\bTU\bUR\bRN\bN are inherited by
shell functions, command substitutions, and commands ex-
- ecuted in a subshell environment. The D\bDE\bEB\bBU\bUG\bG and R\bRE\bET\bTU\bUR\bRN\bN
+ ecuted in a subshell environment. The D\bDE\bEB\bBU\bUG\bG and R\bRE\bET\bTU\bUR\bRN\bN
traps are normally not inherited in such cases.
-\b--\b- If no arguments follow this option, unset the positional
parameters. Otherwise, set the positional parameters to
the _\ba_\br_\bgs, even if some of them begin with a -\b-.
-\b- Signal the end of options, and assign all remaining _\ba_\br_\bgs
to the positional parameters. The -\b-x\bx and -\b-v\bv options are
- turned off. If there are no _\ba_\br_\bgs, the positional para-
+ turned off. If there are no _\ba_\br_\bgs, the positional para-
meters remain unchanged.
- The options are off by default unless otherwise noted. Using +
- rather than - causes these options to be turned off. The op-
+ The options are off by default unless otherwise noted. Using +
+ rather than - causes these options to be turned off. The op-
tions can also be specified as arguments to an invocation of the
- shell. The current set of options may be found in $\b$-\b-. The re-
- turn status is always zero unless an invalid option is encoun-
+ shell. The current set of options may be found in $\b$-\b-. The re-
+ turn status is always zero unless an invalid option is encoun-
tered.
s\bsh\bhi\bif\bft\bt [_\bn]
Rename positional parameters from _\bn+1 ... to $\b$1\b1 .\b..\b..\b..\b. Parameters
- represented by the numbers $\b$#\b# down to $\b$#\b#-_\bn+1 are unset. _\bn must
- be a non-negative number less than or equal to $\b$#\b#. If _\bn is 0,
- no parameters are changed. If _\bn is not given, it is assumed to
- be 1. If _\bn is greater than $\b$#\b#, the positional parameters are
- not changed. The return status is greater than zero if _\bn is
+ represented by the numbers $\b$#\b# down to $\b$#\b#-_\bn+1 are unset. _\bn must
+ be a non-negative number less than or equal to $\b$#\b#. If _\bn is 0,
+ no parameters are changed. If _\bn is not given, it is assumed to
+ be 1. If _\bn is greater than $\b$#\b#, the positional parameters are
+ not changed. The return status is greater than zero if _\bn is
greater than $\b$#\b# or less than zero; otherwise 0.
s\bsh\bho\bop\bpt\bt [-\b-p\bpq\bqs\bsu\bu] [-\b-o\bo] [_\bo_\bp_\bt_\bn_\ba_\bm_\be ...]
- Toggle the values of settings controlling optional shell behav-
- ior. The settings can be either those listed below, or, if the
+ Toggle the values of settings controlling optional shell behav-
+ ior. The settings can be either those listed below, or, if the
-\b-o\bo option is used, those available with the -\b-o\bo option to the s\bse\bet\bt
builtin command.
- With no options, or with the -\b-p\bp option, display a list of all
- settable options, with an indication of whether or not each is
- set; if any _\bo_\bp_\bt_\bn_\ba_\bm_\be_\bs are supplied, the output is restricted to
+ With no options, or with the -\b-p\bp option, display a list of all
+ settable options, with an indication of whether or not each is
+ set; if any _\bo_\bp_\bt_\bn_\ba_\bm_\be_\bs are supplied, the output is restricted to
those options. The -\b-p\bp option displays output in a form that may
be reused as input.
Other options have the following meanings:
-\b-s\bs Enable (set) each _\bo_\bp_\bt_\bn_\ba_\bm_\be.
-\b-u\bu Disable (unset) each _\bo_\bp_\bt_\bn_\ba_\bm_\be.
- -\b-q\bq Suppresses normal output (quiet mode); the return status
+ -\b-q\bq Suppresses normal output (quiet mode); the return status
indicates whether the _\bo_\bp_\bt_\bn_\ba_\bm_\be is set or unset. If multi-
- ple _\bo_\bp_\bt_\bn_\ba_\bm_\be arguments are supplied with -\b-q\bq, the return
+ ple _\bo_\bp_\bt_\bn_\ba_\bm_\be arguments are supplied with -\b-q\bq, the return
status is zero if all _\bo_\bp_\bt_\bn_\ba_\bm_\be_\bs are enabled; non-zero oth-
erwise.
- -\b-o\bo Restricts the values of _\bo_\bp_\bt_\bn_\ba_\bm_\be to be those defined for
+ -\b-o\bo Restricts the values of _\bo_\bp_\bt_\bn_\ba_\bm_\be to be those defined for
the -\b-o\bo option to the s\bse\bet\bt builtin.
- If either -\b-s\bs or -\b-u\bu is used with no _\bo_\bp_\bt_\bn_\ba_\bm_\be arguments, s\bsh\bho\bop\bpt\bt
- shows only those options which are set or unset, respectively.
- Unless otherwise noted, the s\bsh\bho\bop\bpt\bt options are disabled (unset)
+ If either -\b-s\bs or -\b-u\bu is used with no _\bo_\bp_\bt_\bn_\ba_\bm_\be arguments, s\bsh\bho\bop\bpt\bt
+ shows only those options which are set or unset, respectively.
+ Unless otherwise noted, the s\bsh\bho\bop\bpt\bt options are disabled (unset)
by default.
- The return status when listing options is zero if all _\bo_\bp_\bt_\bn_\ba_\bm_\be_\bs
- are enabled, non-zero otherwise. When setting or unsetting op-
- tions, the return status is zero unless an _\bo_\bp_\bt_\bn_\ba_\bm_\be is not a
+ The return status when listing options is zero if all _\bo_\bp_\bt_\bn_\ba_\bm_\be_\bs
+ are enabled, non-zero otherwise. When setting or unsetting op-
+ tions, the return status is zero unless an _\bo_\bp_\bt_\bn_\ba_\bm_\be is not a
valid shell option.
The list of s\bsh\bho\bop\bpt\bt options is:
a\bar\brr\bra\bay\by_\b_e\bex\bxp\bpa\ban\bnd\bd_\b_o\bon\bnc\bce\be
- If set, the shell suppresses multiple evaluation of as-
+ If set, the shell suppresses multiple evaluation of as-
sociative and indexed array subscripts during arithmetic
expression evaluation, while executing builtins that can
- perform variable assignments, and while executing
+ perform variable assignments, and while executing
builtins that perform array dereferencing.
a\bas\bss\bso\boc\bc_\b_e\bex\bxp\bpa\ban\bnd\bd_\b_o\bon\bnc\bce\be
Deprecated; a synonym for a\bar\brr\bra\bay\by_\b_e\bex\bxp\bpa\ban\bnd\bd_\b_o\bon\bnc\bce\be.
- a\bau\but\bto\boc\bcd\bd If set, a command name that is the name of a directory
- is executed as if it were the argument to the c\bcd\bd com-
+ a\bau\but\bto\boc\bcd\bd If set, a command name that is the name of a directory
+ is executed as if it were the argument to the c\bcd\bd com-
mand. This option is only used by interactive shells.
b\bba\bas\bsh\bh_\b_s\bso\bou\bur\brc\bce\be_\b_f\bfu\bul\bll\blp\bpa\bat\bth\bh
- If set, filenames added to the B\bBA\bAS\bSH\bH_\b_S\bSO\bOU\bUR\bRC\bCE\bE array vari-
- able are converted to full pathnames (see S\bSh\bhe\bel\bll\bl V\bVa\bar\bri\bi-\b-
+ If set, filenames added to the B\bBA\bAS\bSH\bH_\b_S\bSO\bOU\bUR\bRC\bCE\bE array vari-
+ able are converted to full pathnames (see S\bSh\bhe\bel\bll\bl V\bVa\bar\bri\bi-\b-
a\bab\bbl\ble\bes\bs above).
c\bcd\bda\bab\bbl\ble\be_\b_v\bva\bar\brs\bs
- If set, an argument to the c\bcd\bd builtin command that is
- not a directory is assumed to be the name of a variable
+ If set, an argument to the c\bcd\bd builtin command that is
+ not a directory is assumed to be the name of a variable
whose value is the directory to change to.
- c\bcd\bds\bsp\bpe\bel\bll\bl If set, the c\bcd\bd command attempts to correct minor errors
- in the spelling of a directory component. Minor errors
- include transposed characters, a missing character, and
+ c\bcd\bds\bsp\bpe\bel\bll\bl If set, the c\bcd\bd command attempts to correct minor errors
+ in the spelling of a directory component. Minor errors
+ include transposed characters, a missing character, and
one extra character. If c\bcd\bd corrects the directory name,
- it prints the corrected filename, and the command pro-
+ it prints the corrected filename, and the command pro-
ceeds. This option is only used by interactive shells.
c\bch\bhe\bec\bck\bkh\bha\bas\bsh\bh
If set, b\bba\bas\bsh\bh checks that a command found in the hash ta-
- ble exists before trying to execute it. If a hashed
- command no longer exists, b\bba\bas\bsh\bh performs a normal path
+ ble exists before trying to execute it. If a hashed
+ command no longer exists, b\bba\bas\bsh\bh performs a normal path
search.
c\bch\bhe\bec\bck\bkj\bjo\bob\bbs\bs
If set, b\bba\bas\bsh\bh lists the status of any stopped and running
- jobs before exiting an interactive shell. If any jobs
+ jobs before exiting an interactive shell. If any jobs
are running, b\bba\bas\bsh\bh defers the exit until a second exit is
- attempted without an intervening command (see J\bJO\bOB\bB C\bCO\bON\bN-\b-
- T\bTR\bRO\bOL\bL above). The shell always postpones exiting if any
+ attempted without an intervening command (see J\bJO\bOB\bB C\bCO\bON\bN-\b-
+ T\bTR\bRO\bOL\bL above). The shell always postpones exiting if any
jobs are stopped.
c\bch\bhe\bec\bck\bkw\bwi\bin\bns\bsi\biz\bze\be
- If set, b\bba\bas\bsh\bh checks the window size after each external
- (non-builtin) command and, if necessary, updates the
- values of L\bLI\bIN\bNE\bES\bS and C\bCO\bOL\bLU\bUM\bMN\bNS\bS, using the file descriptor
- associated with the standard error if it is a terminal.
+ If set, b\bba\bas\bsh\bh checks the window size after each external
+ (non-builtin) command and, if necessary, updates the
+ values of L\bLI\bIN\bNE\bES\bS and C\bCO\bOL\bLU\bUM\bMN\bNS\bS, using the file descriptor
+ associated with the standard error if it is a terminal.
This option is enabled by default.
- c\bcm\bmd\bdh\bhi\bis\bst\bt If set, b\bba\bas\bsh\bh attempts to save all lines of a multiple-
- line command in the same history entry. This allows
- easy re-editing of multi-line commands. This option is
- enabled by default, but only has an effect if command
+ c\bcm\bmd\bdh\bhi\bis\bst\bt If set, b\bba\bas\bsh\bh attempts to save all lines of a multiple-
+ line command in the same history entry. This allows
+ easy re-editing of multi-line commands. This option is
+ enabled by default, but only has an effect if command
history is enabled, as described above under H\bHI\bIS\bST\bTO\bOR\bRY\bY.
c\bco\bom\bmp\bpa\bat\bt3\b31\b1
c\bco\bom\bmp\bpa\bat\bt3\b32\b2
c\bco\bom\bmp\bpa\bat\bt4\b42\b2
c\bco\bom\bmp\bpa\bat\bt4\b43\b3
c\bco\bom\bmp\bpa\bat\bt4\b44\b4
- These control aspects of the shell's compatibility mode
+ These control aspects of the shell's compatibility mode
(see S\bSH\bHE\bEL\bLL\bL C\bCO\bOM\bMP\bPA\bAT\bTI\bIB\bBI\bIL\bLI\bIT\bTY\bY M\bMO\bOD\bDE\bE below).
c\bco\bom\bmp\bpl\ble\bet\bte\be_\b_f\bfu\bul\bll\blq\bqu\buo\bot\bte\be
- If set, b\bba\bas\bsh\bh quotes all shell metacharacters in file-
- names and directory names when performing completion.
+ If set, b\bba\bas\bsh\bh quotes all shell metacharacters in file-
+ names and directory names when performing completion.
If not set, b\bba\bas\bsh\bh removes metacharacters such as the dol-
- lar sign from the set of characters that will be quoted
- in completed filenames when these metacharacters appear
- in shell variable references in words to be completed.
- This means that dollar signs in variable names that ex-
- pand to directories will not be quoted; however, any
- dollar signs appearing in filenames will not be quoted,
- either. This is active only when bash is using back-
- slashes to quote completed filenames. This variable is
- set by default, which is the default bash behavior in
+ lar sign from the set of characters that will be quoted
+ in completed filenames when these metacharacters appear
+ in shell variable references in words to be completed.
+ This means that dollar signs in variable names that ex-
+ pand to directories will not be quoted; however, any
+ dollar signs appearing in filenames will not be quoted,
+ either. This is active only when bash is using back-
+ slashes to quote completed filenames. This variable is
+ set by default, which is the default bash behavior in
versions through 4.2.
d\bdi\bir\bre\bex\bxp\bpa\ban\bnd\bd
- If set, b\bba\bas\bsh\bh replaces directory names with the results
- of word expansion when performing filename completion.
+ If set, b\bba\bas\bsh\bh replaces directory names with the results
+ of word expansion when performing filename completion.
This changes the contents of the r\bre\bea\bad\bdl\bli\bin\bne\be editing
- buffer. If not set, b\bba\bas\bsh\bh attempts to preserve what the
+ buffer. If not set, b\bba\bas\bsh\bh attempts to preserve what the
user typed.
d\bdi\bir\brs\bsp\bpe\bel\bll\bl
- If set, b\bba\bas\bsh\bh attempts spelling correction on directory
- names during word completion if the directory name ini-
+ If set, b\bba\bas\bsh\bh attempts spelling correction on directory
+ names during word completion if the directory name ini-
tially supplied does not exist.
- d\bdo\bot\btg\bgl\blo\bob\bb If set, b\bba\bas\bsh\bh includes filenames beginning with a "." in
- the results of pathname expansion. The filenames _\b. and
+ d\bdo\bot\btg\bgl\blo\bob\bb If set, b\bba\bas\bsh\bh includes filenames beginning with a "." in
+ the results of pathname expansion. The filenames _\b. and
_\b._\b. must always be matched explicitly, even if d\bdo\bot\btg\bgl\blo\bob\bb is
set.
e\bex\bxe\bec\bcf\bfa\bai\bil\bl
If set, a non-interactive shell will not exit if it can-
- not execute the file specified as an argument to the
- e\bex\bxe\bec\bc builtin. An interactive shell does not exit if
+ not execute the file specified as an argument to the
+ e\bex\bxe\bec\bc builtin. An interactive shell does not exit if
e\bex\bxe\bec\bc fails.
e\bex\bxp\bpa\ban\bnd\bd_\b_a\bal\bli\bia\bas\bse\bes\bs
- If set, aliases are expanded as described above under
+ If set, aliases are expanded as described above under
A\bAL\bLI\bIA\bAS\bSE\bES\bS. This option is enabled by default for interac-
tive shells.
e\bex\bxt\btd\bde\beb\bbu\bug\bg
- If set at shell invocation, or in a shell startup file,
+ If set at shell invocation, or in a shell startup file,
arrange to execute the debugger profile before the shell
- starts, identical to the -\b--\b-d\bde\beb\bbu\bug\bgg\bge\ber\br option. If set af-
- ter invocation, behavior intended for use by debuggers
+ starts, identical to the -\b--\b-d\bde\beb\bbu\bug\bgg\bge\ber\br option. If set af-
+ ter invocation, behavior intended for use by debuggers
is enabled:
1\b1.\b. The -\b-F\bF option to the d\bde\bec\bcl\bla\bar\bre\be builtin displays the
source file name and line number corresponding to
each function name supplied as an argument.
- 2\b2.\b. If the command run by the D\bDE\bEB\bBU\bUG\bG trap returns a
- non-zero value, the next command is skipped and
+ 2\b2.\b. If the command run by the D\bDE\bEB\bBU\bUG\bG trap returns a
+ non-zero value, the next command is skipped and
not executed.
- 3\b3.\b. If the command run by the D\bDE\bEB\bBU\bUG\bG trap returns a
- value of 2, and the shell is executing in a sub-
- routine (a shell function or a shell script exe-
- cuted by the .\b. or s\bso\bou\bur\brc\bce\be builtins), the shell
+ 3\b3.\b. If the command run by the D\bDE\bEB\bBU\bUG\bG trap returns a
+ value of 2, and the shell is executing in a sub-
+ routine (a shell function or a shell script exe-
+ cuted by the .\b. or s\bso\bou\bur\brc\bce\be builtins), the shell
simulates a call to r\bre\bet\btu\bur\brn\bn.
- 4\b4.\b. B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGC\bC and B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGV\bV are updated as described
+ 4\b4.\b. B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGC\bC and B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGV\bV are updated as described
in their descriptions above).
- 5\b5.\b. Function tracing is enabled: command substitu-
+ 5\b5.\b. Function tracing is enabled: command substitu-
tion, shell functions, and subshells invoked with
(\b( _\bc_\bo_\bm_\bm_\ba_\bn_\bd )\b) inherit the D\bDE\bEB\bBU\bUG\bG and R\bRE\bET\bTU\bUR\bRN\bN traps.
- 6\b6.\b. Error tracing is enabled: command substitution,
- shell functions, and subshells invoked with (\b(
+ 6\b6.\b. Error tracing is enabled: command substitution,
+ shell functions, and subshells invoked with (\b(
_\bc_\bo_\bm_\bm_\ba_\bn_\bd )\b) inherit the E\bER\bRR\bR trap.
- e\bex\bxt\btg\bgl\blo\bob\bb If set, enable the extended pattern matching features
+ e\bex\bxt\btg\bgl\blo\bob\bb If set, enable the extended pattern matching features
described above under P\bPa\bat\bth\bhn\bna\bam\bme\be E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn.
e\bex\bxt\btq\bqu\buo\bot\bte\be
- If set, $\b$'_\bs_\bt_\br_\bi_\bn_\bg' and $\b$"_\bs_\bt_\br_\bi_\bn_\bg" quoting is performed
- within $\b${\b{_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br}\b} expansions enclosed in double
+ If set, $\b$'_\bs_\bt_\br_\bi_\bn_\bg' and $\b$"_\bs_\bt_\br_\bi_\bn_\bg" quoting is performed
+ within $\b${\b{_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br}\b} expansions enclosed in double
quotes. This option is enabled by default.
f\bfa\bai\bil\blg\bgl\blo\bob\bb
- If set, patterns which fail to match filenames during
+ If set, patterns which fail to match filenames during
pathname expansion result in an expansion error.
f\bfo\bor\brc\bce\be_\b_f\bfi\big\bgn\bno\bor\bre\be
- If set, the suffixes specified by the F\bFI\bIG\bGN\bNO\bOR\bRE\bE shell
- variable cause words to be ignored when performing word
+ If set, the suffixes specified by the F\bFI\bIG\bGN\bNO\bOR\bRE\bE shell
+ variable cause words to be ignored when performing word
completion even if the ignored words are the only possi-
- ble completions. See S\bSh\bhe\bel\bll\bl V\bVa\bar\bri\bia\bab\bbl\ble\bes\bs above for a de-
- scription of F\bFI\bIG\bGN\bNO\bOR\bRE\bE. This option is enabled by de-
+ ble completions. See S\bSh\bhe\bel\bll\bl V\bVa\bar\bri\bia\bab\bbl\ble\bes\bs above for a de-
+ scription of F\bFI\bIG\bGN\bNO\bOR\bRE\bE. This option is enabled by de-
fault.
g\bgl\blo\bob\bba\bas\bsc\bci\bii\bir\bra\ban\bng\bge\bes\bs
- If set, range expressions used in pattern matching
- bracket expressions (see P\bPa\bat\btt\bte\ber\brn\bn M\bMa\bat\btc\bch\bhi\bin\bng\bg above) behave
- as if in the traditional C locale when performing com-
- parisons. That is, pattern matching does not take the
- current locale's collating sequence into account, so b\bb
- will not collate between A\bA and B\bB, and upper-case and
+ If set, range expressions used in pattern matching
+ bracket expressions (see P\bPa\bat\btt\bte\ber\brn\bn M\bMa\bat\btc\bch\bhi\bin\bng\bg above) behave
+ as if in the traditional C locale when performing com-
+ parisons. That is, pattern matching does not take the
+ current locale's collating sequence into account, so b\bb
+ will not collate between A\bA and B\bB, and upper-case and
lower-case ASCII characters will collate together.
g\bgl\blo\bob\bbs\bsk\bki\bip\bpd\bdo\bot\bts\bs
- If set, pathname expansion will never match the file-
- names _\b. and _\b._\b., even if the pattern begins with a ".".
+ If set, pathname expansion will never match the file-
+ names _\b. and _\b._\b., even if the pattern begins with a ".".
This option is enabled by default.
g\bgl\blo\bob\bbs\bst\bta\bar\br
If set, the pattern *\b**\b* used in a pathname expansion con-
- text will match all files and zero or more directories
- and subdirectories. If the pattern is followed by a /\b/,
+ text will match all files and zero or more directories
+ and subdirectories. If the pattern is followed by a /\b/,
only directories and subdirectories match.
g\bgn\bnu\bu_\b_e\ber\brr\brf\bfm\bmt\bt
If set, shell error messages are written in the standard
GNU error message format.
h\bhi\bis\bst\bta\bap\bpp\bpe\ben\bnd\bd
- If set, the history list is appended to the file named
+ If set, the history list is appended to the file named
by the value of the H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE variable when the shell ex-
its, rather than overwriting the file.
h\bhi\bis\bst\btr\bre\bee\bed\bdi\bit\bt
- If set, and r\bre\bea\bad\bdl\bli\bin\bne\be is being used, the user is given
- the opportunity to re-edit a failed history substitu-
+ If set, and r\bre\bea\bad\bdl\bli\bin\bne\be is being used, the user is given
+ the opportunity to re-edit a failed history substitu-
tion.
h\bhi\bis\bst\btv\bve\ber\bri\bif\bfy\by
- If set, and r\bre\bea\bad\bdl\bli\bin\bne\be is being used, the results of his-
- tory substitution are not immediately passed to the
- shell parser. Instead, the resulting line is loaded
+ If set, and r\bre\bea\bad\bdl\bli\bin\bne\be is being used, the results of his-
+ tory substitution are not immediately passed to the
+ shell parser. Instead, the resulting line is loaded
into the r\bre\bea\bad\bdl\bli\bin\bne\be editing buffer, allowing further modi-
fication.
h\bho\bos\bst\btc\bco\bom\bmp\bpl\ble\bet\bte\be
If set, and r\bre\bea\bad\bdl\bli\bin\bne\be is being used, b\bba\bas\bsh\bh will attempt to
- perform hostname completion when a word containing a @\b@
- is being completed (see C\bCo\bom\bmp\bpl\ble\bet\bti\bin\bng\bg under R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE
+ perform hostname completion when a word containing a @\b@
+ is being completed (see C\bCo\bom\bmp\bpl\ble\bet\bti\bin\bng\bg under R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE
above). This is enabled by default.
h\bhu\bup\bpo\bon\bne\bex\bxi\bit\bt
If set, b\bba\bas\bsh\bh will send S\bSI\bIG\bGH\bHU\bUP\bP to all jobs when an inter-
active login shell exits.
i\bin\bnh\bhe\ber\bri\bit\bt_\b_e\ber\brr\bre\bex\bxi\bit\bt
- If set, command substitution inherits the value of the
- e\ber\brr\bre\bex\bxi\bit\bt option, instead of unsetting it in the subshell
- environment. This option is enabled when posix mode is
+ If set, command substitution inherits the value of the
+ e\ber\brr\bre\bex\bxi\bit\bt option, instead of unsetting it in the subshell
+ environment. This option is enabled when posix mode is
enabled.
i\bin\bnt\bte\ber\bra\bac\bct\bti\biv\bve\be_\b_c\bco\bom\bmm\bme\ben\bnt\bts\bs
- In an interactive shell, a word beginning with #\b# causes
- that word and all remaining characters on that line to
- be ignored, as in a non-interactive shell (see C\bCO\bOM\bMM\bME\bEN\bNT\bTS\bS
+ In an interactive shell, a word beginning with #\b# causes
+ that word and all remaining characters on that line to
+ be ignored, as in a non-interactive shell (see C\bCO\bOM\bMM\bME\bEN\bNT\bTS\bS
above). This option is enabled by default.
l\bla\bas\bst\btp\bpi\bip\bpe\be
- If set, and job control is not active, the shell runs
+ If set, and job control is not active, the shell runs
the last command of a pipeline not executed in the back-
ground in the current shell environment.
- l\bli\bit\bth\bhi\bis\bst\bt If set, and the c\bcm\bmd\bdh\bhi\bis\bst\bt option is enabled, multi-line
+ l\bli\bit\bth\bhi\bis\bst\bt If set, and the c\bcm\bmd\bdh\bhi\bis\bst\bt option is enabled, multi-line
commands are saved to the history with embedded newlines
rather than using semicolon separators where possible.
l\blo\boc\bca\bal\blv\bva\bar\br_\b_i\bin\bnh\bhe\ber\bri\bit\bt
scope before any new value is assigned. The nameref at-
tribute is not inherited.
l\blo\boc\bca\bal\blv\bva\bar\br_\b_u\bun\bns\bse\bet\bt
- If set, calling u\bun\bns\bse\bet\bt on local variables in previous
- function scopes marks them so subsequent lookups find
+ If set, calling u\bun\bns\bse\bet\bt on local variables in previous
+ function scopes marks them so subsequent lookups find
them unset until that function returns. This is identi-
- cal to the behavior of unsetting local variables at the
+ cal to the behavior of unsetting local variables at the
current function scope.
l\blo\bog\bgi\bin\bn_\b_s\bsh\bhe\bel\bll\bl
- The shell sets this option if it is started as a login
- shell (see I\bIN\bNV\bVO\bOC\bCA\bAT\bTI\bIO\bON\bN above). The value may not be
+ The shell sets this option if it is started as a login
+ shell (see I\bIN\bNV\bVO\bOC\bCA\bAT\bTI\bIO\bON\bN above). The value may not be
changed.
m\bma\bai\bil\blw\bwa\bar\brn\bn
- If set, and a file that b\bba\bas\bsh\bh is checking for mail has
- been accessed since the last time it was checked, b\bba\bas\bsh\bh
- displays the message "The mail in _\bm_\ba_\bi_\bl_\bf_\bi_\bl_\be has been
+ If set, and a file that b\bba\bas\bsh\bh is checking for mail has
+ been accessed since the last time it was checked, b\bba\bas\bsh\bh
+ displays the message "The mail in _\bm_\ba_\bi_\bl_\bf_\bi_\bl_\be has been
read".
n\bno\bo_\b_e\bem\bmp\bpt\bty\by_\b_c\bcm\bmd\bd_\b_c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn
If set, and r\bre\bea\bad\bdl\bli\bin\bne\be is being used, b\bba\bas\bsh\bh does not search
- P\bPA\bAT\bTH\bH for possible completions when completion is at-
+ P\bPA\bAT\bTH\bH for possible completions when completion is at-
tempted on an empty line.
n\bno\boc\bca\bas\bse\beg\bgl\blo\bob\bb
- If set, b\bba\bas\bsh\bh matches filenames in a case-insensitive
+ If set, b\bba\bas\bsh\bh matches filenames in a case-insensitive
fashion when performing pathname expansion (see P\bPa\bat\bth\bhn\bna\bam\bme\be
E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn above).
n\bno\boc\bca\bas\bse\bem\bma\bat\btc\bch\bh
- If set, b\bba\bas\bsh\bh matches patterns in a case-insensitive
+ If set, b\bba\bas\bsh\bh matches patterns in a case-insensitive
fashion when performing matching while executing c\bca\bas\bse\be or
[\b[[\b[ conditional commands, when performing pattern substi-
- tution word expansions, or when filtering possible com-
+ tution word expansions, or when filtering possible com-
pletions as part of programmable completion.
n\bno\boe\bex\bxp\bpa\ban\bnd\bd_\b_t\btr\bra\ban\bns\bsl\bla\bat\bti\bio\bon\bn
- If set, b\bba\bas\bsh\bh encloses the translated results of $\b$"\b"..."\b"
- quoting in single quotes instead of double quotes. If
+ If set, b\bba\bas\bsh\bh encloses the translated results of $\b$"\b"..."\b"
+ quoting in single quotes instead of double quotes. If
the string is not translated, this has no effect.
n\bnu\bul\bll\blg\bgl\blo\bob\bb
If set, pathname expansion patterns which match no files
removed, rather than expanding to themselves.
p\bpa\bat\bts\bsu\bub\bb_\b_r\bre\bep\bpl\bla\bac\bce\bem\bme\ben\bnt\bt
If set, b\bba\bas\bsh\bh expands occurrences of &\b& in the replacement
- string of pattern substitution to the text matched by
- the pattern, as described under P\bPa\bar\bra\bam\bme\bet\bte\ber\br E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn
+ string of pattern substitution to the text matched by
+ the pattern, as described under P\bPa\bar\bra\bam\bme\bet\bte\ber\br E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn
above. This option is enabled by default.
p\bpr\bro\bog\bgc\bco\bom\bmp\bp
- If set, enable the programmable completion facilities
+ If set, enable the programmable completion facilities
(see P\bPr\bro\bog\bgr\bra\bam\bmm\bma\bab\bbl\ble\be C\bCo\bom\bmp\bpl\ble\bet\bti\bio\bon\bn above). This option is en-
abled by default.
p\bpr\bro\bog\bgc\bco\bom\bmp\bp_\b_a\bal\bli\bia\bas\bs
- If set, and programmable completion is enabled, b\bba\bas\bsh\bh
- treats a command name that doesn't have any completions
+ If set, and programmable completion is enabled, b\bba\bas\bsh\bh
+ treats a command name that doesn't have any completions
as a possible alias and attempts alias expansion. If it
- has an alias, b\bba\bas\bsh\bh attempts programmable completion us-
+ has an alias, b\bba\bas\bsh\bh attempts programmable completion us-
ing the command word resulting from the expanded alias.
p\bpr\bro\bom\bmp\bpt\btv\bva\bar\brs\bs
If set, prompt strings undergo parameter expansion, com-
- mand substitution, arithmetic expansion, and quote re-
- moval after being expanded as described in P\bPR\bRO\bOM\bMP\bPT\bTI\bIN\bNG\bG
+ mand substitution, arithmetic expansion, and quote re-
+ moval after being expanded as described in P\bPR\bRO\bOM\bMP\bPT\bTI\bIN\bNG\bG
above. This option is enabled by default.
r\bre\bes\bst\btr\bri\bic\bct\bte\bed\bd_\b_s\bsh\bhe\bel\bll\bl
- The shell sets this option if it is started in re-
- stricted mode (see R\bRE\bES\bST\bTR\bRI\bIC\bCT\bTE\bED\bD S\bSH\bHE\bEL\bLL\bL below). The value
- may not be changed. This is not reset when the startup
- files are executed, allowing the startup files to dis-
+ The shell sets this option if it is started in re-
+ stricted mode (see R\bRE\bES\bST\bTR\bRI\bIC\bCT\bTE\bED\bD S\bSH\bHE\bEL\bLL\bL below). The value
+ may not be changed. This is not reset when the startup
+ files are executed, allowing the startup files to dis-
cover whether or not a shell is restricted.
s\bsh\bhi\bif\bft\bt_\b_v\bve\ber\brb\bbo\bos\bse\be
- If set, the s\bsh\bhi\bif\bft\bt builtin prints an error message when
+ If set, the s\bsh\bhi\bif\bft\bt builtin prints an error message when
the shift count exceeds the number of positional parame-
ters.
s\bso\bou\bur\brc\bce\bep\bpa\bat\bth\bh
If set, the .\b. (s\bso\bou\bur\brc\bce\be) builtin uses the value of P\bPA\bAT\bTH\bH to
- find the directory containing the file supplied as an
- argument when the -\b-p\bp option is not supplied. This op-
+ find the directory containing the file supplied as an
+ argument when the -\b-p\bp option is not supplied. This op-
tion is enabled by default.
v\bva\bar\brr\bre\bed\bdi\bir\br_\b_c\bcl\blo\bos\bse\be
- If set, the shell automatically closes file descriptors
- assigned using the _\b{_\bv_\ba_\br_\bn_\ba_\bm_\be_\b} redirection syntax (see
+ If set, the shell automatically closes file descriptors
+ assigned using the _\b{_\bv_\ba_\br_\bn_\ba_\bm_\be_\b} redirection syntax (see
R\bRE\bED\bDI\bIR\bRE\bEC\bCT\bTI\bIO\bON\bN above) instead of leaving them open when the
command completes.
x\bxp\bpg\bg_\b_e\bec\bch\bho\bo
- If set, the e\bec\bch\bho\bo builtin expands backslash-escape se-
- quences by default. If the p\bpo\bos\bsi\bix\bx shell option is also
+ If set, the e\bec\bch\bho\bo builtin expands backslash-escape se-
+ quences by default. If the p\bpo\bos\bsi\bix\bx shell option is also
enabled, e\bec\bch\bho\bo does not interpret any options.
s\bsu\bus\bsp\bpe\ben\bnd\bd [-\b-f\bf]
- Suspend the execution of this shell until it receives a S\bSI\bIG\bGC\bCO\bON\bNT\bT
- signal. A login shell, or a shell without job control enabled,
- cannot be suspended; the -\b-f\bf option will 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 -\b-f\bf is not sup-
+ Suspend the execution of this shell until it receives a S\bSI\bIG\bGC\bCO\bON\bNT\bT
+ signal. A login shell, or a shell without job control enabled,
+ cannot be suspended; the -\b-f\bf option will 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 -\b-f\bf is not sup-
plied.
t\bte\bes\bst\bt _\be_\bx_\bp_\br
[\b[ _\be_\bx_\bp_\br ]\b]
Return a status of 0 (true) or 1 (false) depending on the evalu-
- ation of the conditional expression _\be_\bx_\bp_\br. Each operator and
- operand must be a separate argument. Expressions are composed
- of the primaries described above under C\bCO\bON\bND\bDI\bIT\bTI\bIO\bON\bNA\bAL\bL E\bEX\bXP\bPR\bRE\bES\bSS\bSI\bIO\bON\bNS\bS.
- t\bte\bes\bst\bt does not accept any options, nor does it accept and ignore
+ ation of the conditional expression _\be_\bx_\bp_\br. Each operator and
+ operand must be a separate argument. Expressions are composed
+ of the primaries described above under C\bCO\bON\bND\bDI\bIT\bTI\bIO\bON\bNA\bAL\bL E\bEX\bXP\bPR\bRE\bES\bSS\bSI\bIO\bON\bNS\bS.
+ t\bte\bes\bst\bt does not accept any options, nor does it accept and ignore
an argument of -\b--\b- as signifying the end of options.
- Expressions may be combined using the following operators,
- listed in decreasing order of precedence. The evaluation de-
+ Expressions may be combined using the following operators,
+ listed in decreasing order of precedence. The evaluation de-
pends on the number of arguments; see below. t\bte\bes\bst\bt uses operator
precedence when there are five or more arguments.
!\b! _\be_\bx_\bp_\br True if _\be_\bx_\bp_\br is false.
(\b( _\be_\bx_\bp_\br )\b)
- Returns the value of _\be_\bx_\bp_\br. This may be used to override
+ Returns the value of _\be_\bx_\bp_\br. This may be used to override
normal operator precedence.
_\be_\bx_\bp_\br_\b1 -a\ba _\be_\bx_\bp_\br_\b2
True if both _\be_\bx_\bp_\br_\b1 and _\be_\bx_\bp_\br_\b2 are true.
null.
2 arguments
If the first argument is !\b!, the expression is true if and
- only if the second argument is null. If the first argu-
- ment is one of the unary conditional operators listed
- above under C\bCO\bON\bND\bDI\bIT\bTI\bIO\bON\bNA\bAL\bL E\bEX\bXP\bPR\bRE\bES\bSS\bSI\bIO\bON\bNS\bS, the expression is
+ only if the second argument is null. If the first argu-
+ ment is one of the unary conditional operators listed
+ above under C\bCO\bON\bND\bDI\bIT\bTI\bIO\bON\bNA\bAL\bL E\bEX\bXP\bPR\bRE\bES\bSS\bSI\bIO\bON\bNS\bS, the expression is
true if the unary test is true. If the first argument is
not a valid unary conditional operator, the expression is
false.
3 arguments
The following conditions are applied in the order listed.
- If the second argument is one of the binary conditional
+ If the second argument is one of the binary conditional
operators listed above under C\bCO\bON\bND\bDI\bIT\bTI\bIO\bON\bNA\bAL\bL E\bEX\bXP\bPR\bRE\bES\bSS\bSI\bIO\bON\bNS\bS, the
result of the expression is the result of the binary test
- using the first and third arguments as operands. The -\b-a\ba
- and -\b-o\bo operators are considered binary operators when
- there are three arguments. If the first argument is !\b!,
- the value is the negation of the two-argument test using
+ using the first and third arguments as operands. The -\b-a\ba
+ and -\b-o\bo operators are considered binary operators when
+ there are three arguments. If the first argument is !\b!,
+ the value is the negation of the two-argument test using
the second and third arguments. If the first argument is
exactly (\b( and the third argument is exactly )\b), the result
- is the one-argument test of the second argument. Other-
+ is the one-argument test of the second argument. Other-
wise, the expression is false.
4 arguments
The following conditions are applied in the order listed.
If the first argument is !\b!, the result is the negation of
- the three-argument expression composed of the remaining
- arguments. If the first argument is exactly (\b( and the
+ the three-argument expression composed of the remaining
+ arguments. If the first argument is exactly (\b( and the
fourth argument is exactly )\b), the result is the two-argu-
- ment test of the second and third arguments. Otherwise,
- the expression is parsed and evaluated according to
+ ment test of the second and third arguments. 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
+ The expression is parsed and evaluated according to
precedence using the rules listed above.
When the shell is in posix mode, or if the expression is part of
the [\b[[\b[ command, the <\b< and >\b> operators sort using the current lo-
- cale. If the shell is not in posix mode, the t\bte\bes\bst\bt and [\b[ com-
+ cale. If the shell is not in posix mode, the t\bte\bes\bst\bt and [\b[ com-
mands sort lexicographically using ASCII ordering.
- The historical operator-precedence parsing with 4 or more argu-
- ments can lead to ambiguities when it encounters strings that
- look like primaries. The POSIX standard has deprecated the -\b-a\ba
- and -\b-o\bo primaries and enclosing expressions within parentheses.
- Scripts should no longer use them. It's much more reliable to
- restrict test invocations to a single primary, and to replace
+ The historical operator-precedence parsing with 4 or more argu-
+ ments can lead to ambiguities when it encounters strings that
+ look like primaries. The POSIX standard has deprecated the -\b-a\ba
+ and -\b-o\bo primaries and enclosing expressions within parentheses.
+ Scripts should no longer use them. It's much more reliable to
+ restrict test invocations to a single primary, and to replace
uses of -\b-a\ba and -\b-o\bo with the shell's &\b&&\b& and |\b||\b| list operators.
- t\bti\bim\bme\bes\bs Print the accumulated user and system times for the shell and
+ t\bti\bim\bme\bes\bs Print the accumulated user and system times for the shell and
for processes run from the shell. The return status is 0.
t\btr\bra\bap\bp [-\b-l\blp\bpP\bP] [[_\ba_\bc_\bt_\bi_\bo_\bn] _\bs_\bi_\bg_\bs_\bp_\be_\bc ...]
The _\ba_\bc_\bt_\bi_\bo_\bn is a command that is read and executed when the shell
- receives any of the signals _\bs_\bi_\bg_\bs_\bp_\be_\bc. If _\ba_\bc_\bt_\bi_\bo_\bn is absent (and
+ receives any of the signals _\bs_\bi_\bg_\bs_\bp_\be_\bc. If _\ba_\bc_\bt_\bi_\bo_\bn is absent (and
there is a single _\bs_\bi_\bg_\bs_\bp_\be_\bc) or -\b-, each specified _\bs_\bi_\bg_\bs_\bp_\be_\bc is reset
- to the value it had when the shell was started. If _\ba_\bc_\bt_\bi_\bo_\bn is
- the null string the signal specified by each _\bs_\bi_\bg_\bs_\bp_\be_\bc is ignored
+ to the value it had when the shell was started. If _\ba_\bc_\bt_\bi_\bo_\bn is
+ the null string the signal specified by each _\bs_\bi_\bg_\bs_\bp_\be_\bc is ignored
by the shell and by the commands it invokes.
- If no arguments are supplied, t\btr\bra\bap\bp displays the actions associ-
+ If no arguments are supplied, t\btr\bra\bap\bp displays the actions associ-
ated with each trapped signal as a set of t\btr\bra\bap\bp commands that can
- be reused as shell input to restore the current signal disposi-
- tions. If -\b-p\bp is given, and _\ba_\bc_\bt_\bi_\bo_\bn is not present, then t\btr\bra\bap\bp
- displays the actions associated with each _\bs_\bi_\bg_\bs_\bp_\be_\bc or, if none
+ be reused as shell input to restore the current signal disposi-
+ tions. If -\b-p\bp is given, and _\ba_\bc_\bt_\bi_\bo_\bn is not present, then t\btr\bra\bap\bp
+ displays the actions associated with each _\bs_\bi_\bg_\bs_\bp_\be_\bc or, if none
are supplied, for all trapped signals, as a set of t\btr\bra\bap\bp commands
- that can be reused as shell input to restore the current signal
- dispositions. The -\b-P\bP option behaves similarly, but displays
- only the actions associated with each _\bs_\bi_\bg_\bs_\bp_\be_\bc argument. -\b-P\bP re-
- quires at least one _\bs_\bi_\bg_\bs_\bp_\be_\bc argument. The -\b-P\bP or -\b-p\bp options may
- be used in a subshell environment (e.g., command substitution)
- and, as long as they are used before t\btr\bra\bap\bp is used to change a
+ that can be reused as shell input to restore the current signal
+ dispositions. The -\b-P\bP option behaves similarly, but displays
+ only the actions associated with each _\bs_\bi_\bg_\bs_\bp_\be_\bc argument. -\b-P\bP re-
+ quires at least one _\bs_\bi_\bg_\bs_\bp_\be_\bc argument. The -\b-P\bP or -\b-p\bp options may
+ be used in a subshell environment (e.g., command substitution)
+ and, as long as they are used before t\btr\bra\bap\bp is used to change a
signal's handling, will display the state of its parent's traps.
- The -\b-l\bl option prints a list of signal names and their corre-
- sponding numbers. Each _\bs_\bi_\bg_\bs_\bp_\be_\bc is either a signal name defined
+ The -\b-l\bl option prints a list of signal names and their corre-
+ sponding numbers. Each _\bs_\bi_\bg_\bs_\bp_\be_\bc is either a signal name defined
in <_\bs_\bi_\bg_\bn_\ba_\bl_\b._\bh>, or a signal number. Signal names are case insen-
- sitive and the S\bSI\bIG\bG prefix is optional. If -\b-l\bl is supplied with
+ sitive and the S\bSI\bIG\bG prefix is optional. If -\b-l\bl is supplied with
no _\bs_\bi_\bg_\bs_\bp_\be_\bc arguments, it prints a list of valid signal names.
- If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is E\bEX\bXI\bIT\bT (0), _\ba_\bc_\bt_\bi_\bo_\bn is executed on exit from the
- shell. If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is D\bDE\bEB\bBU\bUG\bG, _\ba_\bc_\bt_\bi_\bo_\bn is executed before every
- _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd, _\bf_\bo_\br command, _\bc_\ba_\bs_\be command, _\bs_\be_\bl_\be_\bc_\bt command, ((
- arithmetic command, [[ conditional command, arithmetic _\bf_\bo_\br com-
- mand, and before the first command executes in a shell function
- (see S\bSH\bHE\bEL\bLL\bL G\bGR\bRA\bAM\bMM\bMA\bAR\bR above). Refer to the description of the
- e\bex\bxt\btd\bde\beb\bbu\bug\bg shell option (see s\bsh\bho\bop\bpt\bt above) for details of its ef-
- fect on the D\bDE\bEB\bBU\bUG\bG trap. If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is R\bRE\bET\bTU\bUR\bRN\bN, _\ba_\bc_\bt_\bi_\bo_\bn is exe-
+ If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is E\bEX\bXI\bIT\bT (0), _\ba_\bc_\bt_\bi_\bo_\bn is executed on exit from the
+ shell. If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is D\bDE\bEB\bBU\bUG\bG, _\ba_\bc_\bt_\bi_\bo_\bn is executed before every
+ _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd, _\bf_\bo_\br command, _\bc_\ba_\bs_\be command, _\bs_\be_\bl_\be_\bc_\bt command, ((
+ arithmetic command, [[ conditional command, arithmetic _\bf_\bo_\br com-
+ mand, and before the first command executes in a shell function
+ (see S\bSH\bHE\bEL\bLL\bL G\bGR\bRA\bAM\bMM\bMA\bAR\bR above). Refer to the description of the
+ e\bex\bxt\btd\bde\beb\bbu\bug\bg shell option (see s\bsh\bho\bop\bpt\bt above) for details of its ef-
+ fect on the D\bDE\bEB\bBU\bUG\bG trap. If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is R\bRE\bET\bTU\bUR\bRN\bN, _\ba_\bc_\bt_\bi_\bo_\bn is exe-
cuted each time a shell function or a script executed with the .\b.
or s\bso\bou\bur\brc\bce\be builtins finishes executing.
- If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is E\bER\bRR\bR, _\ba_\bc_\bt_\bi_\bo_\bn is executed whenever a pipeline
- (which may consist of a single simple command), a list, or a
- compound command returns a non-zero exit status, subject to the
- following conditions. The E\bER\bRR\bR trap is not executed if the
+ If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is E\bER\bRR\bR, _\ba_\bc_\bt_\bi_\bo_\bn is executed whenever a pipeline
+ (which may consist of a single simple command), a list, or a
+ compound command returns a non-zero exit status, subject to the
+ following conditions. The E\bER\bRR\bR trap is not executed if the
failed command is part of the command list immediately following
a w\bwh\bhi\bil\ble\be or u\bun\bnt\bti\bil\bl reserved word, part of the test in an _\bi_\bf state-
- ment, part of a command executed in a &\b&&\b& or |\b||\b| list except the
- command following the final &\b&&\b& or |\b||\b|, any command in a pipeline
- but the last (subject to the state of the p\bpi\bip\bpe\bef\bfa\bai\bil\bl shell op-
- tion), or if the command's return value is being inverted using
+ ment, part of a command executed in a &\b&&\b& or |\b||\b| list except the
+ command following the final &\b&&\b& or |\b||\b|, any command in a pipeline
+ but the last (subject to the state of the p\bpi\bip\bpe\bef\bfa\bai\bil\bl shell op-
+ tion), or if the command's return value is being inverted using
!\b!. These are the same conditions obeyed by the e\ber\brr\bre\bex\bxi\bit\bt (-\b-e\be) op-
tion.
When the shell is not interactive, signals ignored upon entry to
the shell cannot be trapped or reset. Interactive shells permit
trapping signals ignored on entry. Trapped signals that are not
- being ignored are reset to their original values in a subshell
- or subshell environment when one is created. The return status
+ being ignored are reset to their original values in a subshell
+ or subshell environment when one is created. The return status
is false if any _\bs_\bi_\bg_\bs_\bp_\be_\bc is invalid; otherwise t\btr\bra\bap\bp returns true.
t\btr\bru\bue\be Does nothing, returns a 0 status.
Indicate how each _\bn_\ba_\bm_\be would be interpreted if used as a command
name.
- If the -\b-t\bt option is used, t\bty\byp\bpe\be prints a string which is one of
- _\ba_\bl_\bi_\ba_\bs, _\bk_\be_\by_\bw_\bo_\br_\bd, _\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn, _\bb_\bu_\bi_\bl_\bt_\bi_\bn, or _\bf_\bi_\bl_\be if _\bn_\ba_\bm_\be is an alias,
- shell reserved word, function, builtin, or executable file, re-
- spectively. If the _\bn_\ba_\bm_\be is not found, t\bty\byp\bpe\be prints nothing and
+ If the -\b-t\bt option is used, t\bty\byp\bpe\be prints a string which is one of
+ _\ba_\bl_\bi_\ba_\bs, _\bk_\be_\by_\bw_\bo_\br_\bd, _\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn, _\bb_\bu_\bi_\bl_\bt_\bi_\bn, or _\bf_\bi_\bl_\be if _\bn_\ba_\bm_\be is an alias,
+ shell reserved word, function, builtin, or executable file, re-
+ spectively. If the _\bn_\ba_\bm_\be is not found, t\bty\byp\bpe\be prints nothing and
returns a non-zero exit status.
- If the -\b-p\bp option is used, t\bty\byp\bpe\be either returns the pathname of
- the executable file that would be found by searching $\b$P\bPA\bAT\bTH\bH for
+ If the -\b-p\bp option is used, t\bty\byp\bpe\be either returns the pathname of
+ the executable file that would be found by searching $\b$P\bPA\bAT\bTH\bH for
_\bn_\ba_\bm_\be or nothing if "type -t name" would not return _\bf_\bi_\bl_\be. The -\b-P\bP
- option forces a P\bPA\bAT\bTH\bH search for each _\bn_\ba_\bm_\be, even if "type -t
+ option forces a P\bPA\bAT\bTH\bH search for each _\bn_\ba_\bm_\be, even if "type -t
name" would not return _\bf_\bi_\bl_\be. If _\bn_\ba_\bm_\be is present in the table of
- hashed commands, -\b-p\bp and -\b-P\bP print the hashed value, which is not
+ hashed commands, -\b-p\bp and -\b-P\bP print the hashed value, which is not
necessarily the file that appears first in P\bPA\bAT\bTH\bH.
- If the -\b-a\ba option is used, t\bty\byp\bpe\be prints all of the places that
- contain a command named _\bn_\ba_\bm_\be. This includes aliases, reserved
- words, functions, and builtins, but the path search options (-\b-p\bp
- and -\b-P\bP) can be supplied to restrict the output to executable
- files. t\bty\byp\bpe\be does not consult the table of hashed commands when
+ If the -\b-a\ba option is used, t\bty\byp\bpe\be prints all of the places that
+ contain a command named _\bn_\ba_\bm_\be. This includes aliases, reserved
+ words, functions, and builtins, but the path search options (-\b-p\bp
+ and -\b-P\bP) can be supplied to restrict the output to executable
+ files. t\bty\byp\bpe\be does not consult the table of hashed commands when
using -\b-a\ba with -\b-p\bp, and only performs a P\bPA\bAT\bTH\bH search for _\bn_\ba_\bm_\be.
The -\b-f\bf option suppresses shell function lookup, as with the c\bco\bom\bm-\b-
- m\bma\ban\bnd\bd builtin. t\bty\byp\bpe\be returns true if all of the arguments are
+ m\bma\ban\bnd\bd builtin. t\bty\byp\bpe\be returns true if all of the arguments are
found, false if any are not found.
u\bul\bli\bim\bmi\bit\bt [-\b-H\bHS\bS] -\b-a\ba
u\bul\bli\bim\bmi\bit\bt [-\b-H\bHS\bS] [-\b-b\bbc\bcd\bde\bef\bfi\bik\bkl\blm\bmn\bnp\bpq\bqr\brs\bst\btu\buv\bvx\bxP\bPR\bRT\bT [_\bl_\bi_\bm_\bi_\bt]]
- Provides control over the resources available to the shell and
+ Provides control over the resources available to the shell and
to processes it starts, on systems that allow such control.
- The -\b-H\bH and -\b-S\bS options specify whether the hard or soft limit is
+ The -\b-H\bH and -\b-S\bS options specify whether the hard or soft limit is
set for the given resource. A hard limit cannot be increased by
a non-root user once it is set; a soft limit may be increased up
- to the value of the hard limit. If neither -\b-H\bH nor -\b-S\bS is speci-
+ to the value of the hard limit. If neither -\b-H\bH nor -\b-S\bS is speci-
fied, u\bul\bli\bim\bmi\bit\bt sets both the soft and hard limits.
The value of _\bl_\bi_\bm_\bi_\bt can be a number in the unit specified for the
- resource or one of the special values h\bha\bar\brd\bd, s\bso\bof\bft\bt, or u\bun\bnl\bli\bim\bmi\bit\bte\bed\bd,
- which stand for the current hard limit, the current soft limit,
- and no limit, respectively. If _\bl_\bi_\bm_\bi_\bt is omitted, u\bul\bli\bim\bmi\bit\bt prints
- the current value of the soft limit of the resource, unless the
- -\b-H\bH option is given. When more than one resource is specified,
- the limit name and unit, if appropriate, are printed before the
+ resource or one of the special values h\bha\bar\brd\bd, s\bso\bof\bft\bt, or u\bun\bnl\bli\bim\bmi\bit\bte\bed\bd,
+ which stand for the current hard limit, the current soft limit,
+ and no limit, respectively. If _\bl_\bi_\bm_\bi_\bt is omitted, u\bul\bli\bim\bmi\bit\bt prints
+ the current value of the soft limit of the resource, unless the
+ -\b-H\bH option is given. When more than one resource is specified,
+ the limit name and unit, if appropriate, are printed before the
value. Other options are interpreted as follows:
-\b-a\ba Report all current limits; no limits are set.
-\b-b\bb The maximum socket buffer size.
-\b-c\bc The maximum size of core files created.
-\b-d\bd The maximum size of a process's data segment.
-\b-e\be The maximum scheduling priority ("nice").
- -\b-f\bf The maximum size of files written by the shell and its
+ -\b-f\bf The maximum size of files written by the shell and its
children.
-\b-i\bi The maximum number of pending signals.
-\b-k\bk The maximum number of kqueues that may be allocated.
-\b-l\bl The maximum size that may be locked into memory.
- -\b-m\bm The maximum resident set size (many systems do not honor
+ -\b-m\bm The maximum resident set size (many systems do not honor
this limit).
-\b-n\bn The maximum number of open file descriptors (most systems
do not allow this value to be set).
-\b-r\br The maximum real-time scheduling priority.
-\b-s\bs The maximum stack size.
-\b-t\bt The maximum amount of cpu time in seconds.
- -\b-u\bu The maximum number of processes available to a single
+ -\b-u\bu The maximum number of processes available to a single
user.
- -\b-v\bv The maximum amount of virtual memory available to the
+ -\b-v\bv The maximum amount of virtual memory available to the
shell and, on some systems, to its children.
-\b-x\bx The maximum number of file locks.
-\b-P\bP The maximum number of pseudoterminals.
- -\b-R\bR The maximum time a real-time process can run before
+ -\b-R\bR The maximum time a real-time process can run before
blocking, in microseconds.
-\b-T\bT The maximum number of threads.
- If _\bl_\bi_\bm_\bi_\bt is supplied, and the -\b-a\ba option is not used, _\bl_\bi_\bm_\bi_\bt is
- the new value of the specified resource. If no option is sup-
+ If _\bl_\bi_\bm_\bi_\bt is supplied, and the -\b-a\ba option is not used, _\bl_\bi_\bm_\bi_\bt is
+ the new value of the specified resource. If no option is sup-
plied, then -\b-f\bf is assumed.
- Values are in 1024-byte increments, except for -\b-t\bt, which is in
- seconds; -\b-R\bR, which is in microseconds; -\b-p\bp, which is in units of
- 512-byte blocks; -\b-P\bP, -\b-T\bT, -\b-b\bb, -\b-k\bk, -\b-n\bn, and -\b-u\bu, which are unscaled
- values; and, when in posix mode, -\b-c\bc and -\b-f\bf, which are in
- 512-byte increments. The return status is 0 unless an invalid
+ Values are in 1024-byte increments, except for -\b-t\bt, which is in
+ seconds; -\b-R\bR, which is in microseconds; -\b-p\bp, which is in units of
+ 512-byte blocks; -\b-P\bP, -\b-T\bT, -\b-b\bb, -\b-k\bk, -\b-n\bn, and -\b-u\bu, which are unscaled
+ values; and, when in posix mode, -\b-c\bc and -\b-f\bf, which are in
+ 512-byte increments. The return status is 0 unless an invalid
option or argument is supplied, or an error occurs while setting
a new limit.
u\bum\bma\bas\bsk\bk [-\b-p\bp] [-\b-S\bS] [_\bm_\bo_\bd_\be]
- Set the user file-creation mask to _\bm_\bo_\bd_\be. If _\bm_\bo_\bd_\be begins with a
+ Set the user file-creation mask to _\bm_\bo_\bd_\be. If _\bm_\bo_\bd_\be begins with a
digit, it is interpreted as an octal number; otherwise it is in-
- terpreted as a symbolic mode mask similar to that accepted by
+ terpreted as a symbolic mode mask similar to that accepted by
_\bc_\bh_\bm_\bo_\bd(1). If _\bm_\bo_\bd_\be is omitted, u\bum\bma\bas\bsk\bk prints the current value of
the mask. The -\b-S\bS option without a _\bm_\bo_\bd_\be argument prints the mask
in a symbolic format; the default output is an octal number. If
the -\b-p\bp option is supplied, and _\bm_\bo_\bd_\be is omitted, the output is in
- a form that may be reused as input. The return status is zero
- if the mode was successfully changed or if no _\bm_\bo_\bd_\be argument was
+ a form that may be reused as input. The return status is zero
+ if the mode was successfully changed or if no _\bm_\bo_\bd_\be argument was
supplied, and non-zero otherwise.
u\bun\bna\bal\bli\bia\bas\bs [-a\ba] [_\bn_\ba_\bm_\be ...]
- Remove each _\bn_\ba_\bm_\be from the list of defined aliases. If -\b-a\ba is
- supplied, remove all alias definitions. The return value is
+ Remove each _\bn_\ba_\bm_\be from the list of defined aliases. If -\b-a\ba is
+ supplied, remove all alias definitions. The return value is
true unless a supplied _\bn_\ba_\bm_\be is not a defined alias.
u\bun\bns\bse\bet\bt [-f\bfv\bv] [-n\bn] [_\bn_\ba_\bm_\be ...]
- For each _\bn_\ba_\bm_\be, remove the corresponding variable or function.
+ For each _\bn_\ba_\bm_\be, remove the corresponding variable or function.
If the -\b-v\bv option is given, each _\bn_\ba_\bm_\be refers to a shell variable,
- and that variable is removed. If -\b-f\bf is specified, each _\bn_\ba_\bm_\be
- refers to a shell function, and the function definition is re-
- moved. If the -\b-n\bn option is supplied, and _\bn_\ba_\bm_\be is a variable
- with the _\bn_\ba_\bm_\be_\br_\be_\bf attribute, _\bn_\ba_\bm_\be will be unset rather than the
- variable it references. -\b-n\bn has no effect if the -\b-f\bf option is
- supplied. Read-only variables and functions may not be unset.
- When variables or functions are removed, they are also removed
- from the environment passed to subsequent commands. If no op-
- tions are supplied, each _\bn_\ba_\bm_\be refers to a variable; if there is
- no variable by that name, a function with that name, if any, is
- unset. Some shell variables may not be unset. If any of
+ and that variable is removed. If -\b-f\bf is specified, each _\bn_\ba_\bm_\be
+ refers to a shell function, and the function definition is re-
+ moved. If the -\b-n\bn option is supplied, and _\bn_\ba_\bm_\be is a variable
+ with the _\bn_\ba_\bm_\be_\br_\be_\bf attribute, _\bn_\ba_\bm_\be will be unset rather than the
+ variable it references. -\b-n\bn has no effect if the -\b-f\bf option is
+ supplied. Read-only variables and functions may not be unset.
+ When variables or functions are removed, they are also removed
+ from the environment passed to subsequent commands. If no op-
+ tions are supplied, each _\bn_\ba_\bm_\be refers to a variable; if there is
+ no variable by that name, a function with that name, if any, is
+ unset. Some shell variables may not be unset. If any of
B\bBA\bAS\bSH\bH_\b_A\bAL\bLI\bIA\bAS\bSE\bES\bS, B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGV\bV0\b0, B\bBA\bAS\bSH\bH_\b_C\bCM\bMD\bDS\bS, B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMM\bMA\bAN\bND\bD, B\bBA\bAS\bSH\bH_\b_S\bSU\bUB\bB-\b-
- S\bSH\bHE\bEL\bLL\bL, B\bBA\bAS\bSH\bHP\bPI\bID\bD, C\bCO\bOM\bMP\bP_\b_W\bWO\bOR\bRD\bDB\bBR\bRE\bEA\bAK\bKS\bS, D\bDI\bIR\bRS\bST\bTA\bAC\bCK\bK, E\bEP\bPO\bOC\bCH\bHR\bRE\bEA\bAL\bLT\bTI\bIM\bME\bE,
- E\bEP\bPO\bOC\bCH\bHS\bSE\bEC\bCO\bON\bND\bDS\bS, F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE, G\bGR\bRO\bOU\bUP\bPS\bS, H\bHI\bIS\bST\bTC\bCM\bMD\bD, L\bLI\bIN\bNE\bEN\bNO\bO, R\bRA\bAN\bND\bDO\bOM\bM, S\bSE\bEC\bC-\b-
- O\bON\bND\bDS\bS, or S\bSR\bRA\bAN\bND\bDO\bOM\bM are unset, they lose their special properties,
- even if they are subsequently reset. The exit status is true
+ S\bSH\bHE\bEL\bLL\bL, B\bBA\bAS\bSH\bHP\bPI\bID\bD, C\bCO\bOM\bMP\bP_\b_W\bWO\bOR\bRD\bDB\bBR\bRE\bEA\bAK\bKS\bS, D\bDI\bIR\bRS\bST\bTA\bAC\bCK\bK, E\bEP\bPO\bOC\bCH\bHR\bRE\bEA\bAL\bLT\bTI\bIM\bME\bE,
+ E\bEP\bPO\bOC\bCH\bHS\bSE\bEC\bCO\bON\bND\bDS\bS, F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE, G\bGR\bRO\bOU\bUP\bPS\bS, H\bHI\bIS\bST\bTC\bCM\bMD\bD, L\bLI\bIN\bNE\bEN\bNO\bO, R\bRA\bAN\bND\bDO\bOM\bM, S\bSE\bEC\bC-\b-
+ O\bON\bND\bDS\bS, or S\bSR\bRA\bAN\bND\bDO\bOM\bM are unset, they lose their special properties,
+ even if they are subsequently reset. The exit status is true
unless a _\bn_\ba_\bm_\be is readonly or may not be unset.
w\bwa\bai\bit\bt [-\b-f\bfn\bn] [-\b-p\bp _\bv_\ba_\br_\bn_\ba_\bm_\be] [_\bi_\bd ...]
Wait for each specified child process _\bi_\bd and return the termina-
- tion status of the last _\bi_\bd. Each _\bi_\bd may be a process ID _\bp_\bi_\bd or
- a job specification _\bj_\bo_\bb_\bs_\bp_\be_\bc; if a jobspec is supplied, w\bwa\bai\bit\bt
+ tion status of the last _\bi_\bd. Each _\bi_\bd may be a process ID _\bp_\bi_\bd or
+ a job specification _\bj_\bo_\bb_\bs_\bp_\be_\bc; if a jobspec is supplied, w\bwa\bai\bit\bt
waits for all processes in the job.
- If no options or _\bi_\bds are supplied, w\bwa\bai\bit\bt waits for all running
- background jobs and the last-executed process substitution, if
+ If no options or _\bi_\bds are supplied, w\bwa\bai\bit\bt waits for all running
+ background jobs and the last-executed process substitution, if
its process id is the same as $\b$!\b!, and the return status is zero.
- If the -\b-n\bn option is supplied, w\bwa\bai\bit\bt waits for any one of the
+ If the -\b-n\bn option is supplied, w\bwa\bai\bit\bt waits for any one of the
given _\bi_\bds or, if no _\bi_\bds are supplied, any job or process substi-
tution, to complete and returns its exit status. If none of the
- supplied _\bi_\bds is a child of the shell, or if no _\bi_\bds are supplied
- and the shell has no unwaited-for children, the exit status is
+ supplied _\bi_\bds is a child of the shell, or if no _\bi_\bds are supplied
+ and the shell has no unwaited-for children, the exit status is
127.
- If the -\b-p\bp option is supplied, w\bwa\bai\bit\bt assigns the process or job
- identifier of the job for which the exit status is returned to
- the variable _\bv_\ba_\br_\bn_\ba_\bm_\be named by the option argument. The vari-
- able, which cannot be readonly, will be unset initially, before
- any assignment. This is useful only when used with the -\b-n\bn op-
+ If the -\b-p\bp option is supplied, w\bwa\bai\bit\bt assigns the process or job
+ identifier of the job for which the exit status is returned to
+ the variable _\bv_\ba_\br_\bn_\ba_\bm_\be named by the option argument. The vari-
+ able, which cannot be readonly, will be unset initially, before
+ any assignment. This is useful only when used with the -\b-n\bn op-
tion.
- Supplying the -\b-f\bf option, when job control is enabled, forces
- w\bwa\bai\bit\bt to wait for each _\bi_\bd to terminate before returning its sta-
+ Supplying the -\b-f\bf option, when job control is enabled, forces
+ w\bwa\bai\bit\bt to wait for each _\bi_\bd to terminate before returning its sta-
tus, instead of returning when it changes status.
- If none of the _\bi_\bds specify one of the shell's active child
- processes, the return status is 127. If w\bwa\bai\bit\bt is interrupted by
- a signal, any _\bv_\ba_\br_\bn_\ba_\bm_\be will remain unset, and the return status
- will be greater than 128, as described under S\bSI\bIG\bGN\bNA\bAL\bLS\bS above.
+ If none of the _\bi_\bds specify one of the shell's active child
+ processes, the return status is 127. If w\bwa\bai\bit\bt is interrupted by
+ a signal, any _\bv_\ba_\br_\bn_\ba_\bm_\be will remain unset, and the return status
+ will be greater than 128, as described under S\bSI\bIG\bGN\bNA\bAL\bLS\bS above.
Otherwise, the return status is the exit status of the last _\bi_\bd.
S\bSH\bHE\bEL\bLL\bL C\bCO\bOM\bMP\bPA\bAT\bTI\bIB\bBI\bIL\bLI\bIT\bTY\bY M\bMO\bOD\bDE\bE
- Bash-4.0 introduced the concept of a _\bs_\bh_\be_\bl_\bl _\bc_\bo_\bm_\bp_\ba_\bt_\bi_\bb_\bi_\bl_\bi_\bt_\by _\bl_\be_\bv_\be_\bl, speci-
+ Bash-4.0 introduced the concept of a _\bs_\bh_\be_\bl_\bl _\bc_\bo_\bm_\bp_\ba_\bt_\bi_\bb_\bi_\bl_\bi_\bt_\by _\bl_\be_\bv_\be_\bl, speci-
fied as a set of options to the shopt builtin (c\bco\bom\bmp\bpa\bat\bt3\b31\b1, c\bco\bom\bmp\bpa\bat\bt3\b32\b2, c\bco\bom\bm-\b-
- p\bpa\bat\bt4\b40\b0, c\bco\bom\bmp\bpa\bat\bt4\b41\b1, and so on). There is only one current compatibility
+ p\bpa\bat\bt4\b40\b0, c\bco\bom\bmp\bpa\bat\bt4\b41\b1, and so on). There is only one current compatibility
level -- each option is mutually exclusive. The compatibility level is
- intended to allow users to select behavior from previous versions that
- is incompatible with newer versions while they migrate scripts to use
- current features and behavior. It's intended to be a temporary solu-
+ intended to allow users to select behavior from previous versions that
+ is incompatible with newer versions while they migrate scripts to use
+ current features and behavior. It's intended to be a temporary solu-
tion.
- This section does not mention behavior that is standard for a particu-
- lar version (e.g., setting c\bco\bom\bmp\bpa\bat\bt3\b32\b2 means that quoting the right hand
- side of the regexp matching operator quotes special regexp characters
- in the word, which is default behavior in bash-3.2 and subsequent ver-
+ This section does not mention behavior that is standard for a particu-
+ lar version (e.g., setting c\bco\bom\bmp\bpa\bat\bt3\b32\b2 means that quoting the right hand
+ side of the regexp matching operator quotes special regexp characters
+ in the word, which is default behavior in bash-3.2 and subsequent ver-
sions).
- If a user enables, say, c\bco\bom\bmp\bpa\bat\bt3\b32\b2, it may affect the behavior of other
- compatibility levels up to and including the current compatibility
- level. The idea is that each compatibility level controls behavior
- that changed in that version of b\bba\bas\bsh\bh, but that behavior may have been
- present in earlier versions. For instance, the change to use locale-
- based comparisons with the [\b[[\b[ command came in bash-4.1, and earlier
+ If a user enables, say, c\bco\bom\bmp\bpa\bat\bt3\b32\b2, it may affect the behavior of other
+ compatibility levels up to and including the current compatibility
+ level. The idea is that each compatibility level controls behavior
+ that changed in that version of b\bba\bas\bsh\bh, but that behavior may have been
+ present in earlier versions. For instance, the change to use locale-
+ based comparisons with the [\b[[\b[ command came in bash-4.1, and earlier
versions used ASCII-based comparisons, so enabling c\bco\bom\bmp\bpa\bat\bt3\b32\b2 will enable
- ASCII-based comparisons as well. That granularity may not be suffi-
- cient for all uses, and as a result users should employ compatibility
- levels carefully. Read the documentation for a particular feature to
+ ASCII-based comparisons as well. That granularity may not be suffi-
+ cient for all uses, and as a result users should employ compatibility
+ levels carefully. Read the documentation for a particular feature to
find out the current behavior.
- Bash-4.3 introduced a new shell variable: B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMP\bPA\bAT\bT. The value as-
+ Bash-4.3 introduced a new shell variable: B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMP\bPA\bAT\bT. The value as-
signed to this variable (a decimal version number like 4.2, or an inte-
- ger corresponding to the c\bco\bom\bmp\bpa\bat\bt_\bN_\bN option, like 42) determines the com-
+ ger corresponding to the c\bco\bom\bmp\bpa\bat\bt_\bN_\bN option, like 42) determines the com-
patibility level.
Starting with bash-4.4, b\bba\bas\bsh\bh began deprecating older compatibility lev-
els. Eventually, the options will be removed in favor of B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMP\bPA\bAT\bT.
- Bash-5.0 was the final version for which there was an individual shopt
- option for the previous version. B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMP\bPA\bAT\bT is the only mechanism to
+ Bash-5.0 was the final version for which there was an individual shopt
+ option for the previous version. B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMP\bPA\bAT\bT is the only mechanism to
control the compatibility level in versions newer than bash-5.0.
- The following table describes the behavior changes controlled by each
+ The following table describes the behavior changes controlled by each
compatibility level setting. The c\bco\bom\bmp\bpa\bat\bt_\bN_\bN tag is used as shorthand for
setting the compatibility level to _\bN_\bN using one of the following mecha-
- nisms. For versions prior to bash-5.0, the compatibility level may be
- set using the corresponding c\bco\bom\bmp\bpa\bat\bt_\bN_\bN shopt option. For bash-4.3 and
- later versions, the B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMP\bPA\bAT\bT variable is preferred, and it is re-
+ nisms. For versions prior to bash-5.0, the compatibility level may be
+ set using the corresponding c\bco\bom\bmp\bpa\bat\bt_\bN_\bN shopt option. For bash-4.3 and
+ later versions, the B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMP\bPA\bAT\bT variable is preferred, and it is re-
quired for bash-5.1 and later versions.
c\bco\bom\bmp\bpa\bat\bt3\b31\b1
ator (=~) has no special effect.
c\bco\bom\bmp\bpa\bat\bt3\b32\b2
- +\bo The <\b< and >\b> operators to the [\b[[\b[ command do not consider
+ +\bo The <\b< and >\b> operators to the [\b[[\b[ command do not consider
the current locale when comparing strings; they use ASCII
ordering.
c\bco\bom\bmp\bpa\bat\bt4\b40\b0
- +\bo The <\b< and >\b> operators to the [\b[[\b[ command do not consider
+ +\bo The <\b< and >\b> operators to the [\b[[\b[ command do not consider
the current locale when comparing strings; they use ASCII
ordering. B\bBa\bas\bsh\bh versions prior to bash-4.1 use ASCII col-
- lation and _\bs_\bt_\br_\bc_\bm_\bp(3); bash-4.1 and later use the current
+ lation and _\bs_\bt_\br_\bc_\bm_\bp(3); bash-4.1 and later use the current
locale's collation sequence and _\bs_\bt_\br_\bc_\bo_\bl_\bl(3).
c\bco\bom\bmp\bpa\bat\bt4\b41\b1
- +\bo In posix mode, t\bti\bim\bme\be may be followed by options and still
+ +\bo In posix mode, t\bti\bim\bme\be may be followed by options and still
be recognized as a reserved word (this is POSIX interpre-
tation 267).
+\bo In _\bp_\bo_\bs_\bi_\bx mode, the parser requires that an even number of
- single quotes occur in the _\bw_\bo_\br_\bd portion of a double-
- quoted parameter expansion and treats them specially, so
- that characters within the single quotes are considered
+ single quotes occur in the _\bw_\bo_\br_\bd portion of a double-
+ quoted parameter expansion and treats them specially, so
+ that characters within the single quotes are considered
quoted (this is POSIX interpretation 221).
c\bco\bom\bmp\bpa\bat\bt4\b42\b2
+\bo The replacement string in double-quoted pattern substitu-
- tion does not undergo quote removal, as it does in ver-
+ tion does not undergo quote removal, as it does in ver-
sions after bash-4.2.
- +\bo In posix mode, single quotes are considered special when
- expanding the _\bw_\bo_\br_\bd portion of a double-quoted parameter
- expansion and can be used to quote a closing brace or
- other special character (this is part of POSIX interpre-
- tation 221); in later versions, single quotes are not
+ +\bo In posix mode, single quotes are considered special when
+ expanding the _\bw_\bo_\br_\bd portion of a double-quoted parameter
+ expansion and can be used to quote a closing brace or
+ other special character (this is part of POSIX interpre-
+ tation 221); in later versions, single quotes are not
special within double-quoted word expansions.
c\bco\bom\bmp\bpa\bat\bt4\b43\b3
- +\bo 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
+ +\bo Word expansion errors are considered non-fatal errors
+ that cause the current command to fail, even in posix
+ mode (the default behavior is to make them fatal errors
that cause the shell to exit).
- +\bo When executing a shell function, the loop state
+ +\bo When executing a shell function, the loop state
(while/until/etc.) is not reset, so b\bbr\bre\bea\bak\bk or c\bco\bon\bnt\bti\bin\bnu\bue\be in
that function will break or continue loops in the calling
context. Bash-4.4 and later reset the loop state to pre-
vent this.
c\bco\bom\bmp\bpa\bat\bt4\b44\b4
- +\bo The shell sets up the values used by B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGV\bV and
- B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGC\bC so they can expand to the shell's positional
- parameters even if extended debugging mode is not en-
+ +\bo The shell sets up the values used by B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGV\bV and
+ B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGC\bC so they can expand to the shell's positional
+ parameters even if extended debugging mode is not en-
abled.
- +\bo A subshell inherits loops from its parent context, so
- b\bbr\bre\bea\bak\bk or c\bco\bon\bnt\bti\bin\bnu\bue\be will cause the subshell to exit.
- Bash-5.0 and later reset the loop state to prevent the
+ +\bo A subshell inherits loops from its parent context, so
+ b\bbr\bre\bea\bak\bk or c\bco\bon\bnt\bti\bin\bnu\bue\be will cause the subshell to exit.
+ Bash-5.0 and later reset the loop state to prevent the
exit
- +\bo Variable assignments preceding builtins like e\bex\bxp\bpo\bor\brt\bt and
+ +\bo Variable assignments preceding builtins like e\bex\bxp\bpo\bor\brt\bt and
r\bre\bea\bad\bdo\bon\bnl\bly\by that set attributes continue to affect variables
with the same name in the calling environment even if the
shell is not in posix mode.
c\bco\bom\bmp\bpa\bat\bt5\b50\b0
- +\bo Bash-5.1 changed the way $\b$R\bRA\bAN\bND\bDO\bOM\bM is generated to intro-
- duce slightly more randomness. If the shell compatibil-
+ +\bo Bash-5.1 changed the way $\b$R\bRA\bAN\bND\bDO\bOM\bM is generated to intro-
+ duce slightly more randomness. If the shell compatibil-
ity level is set to 50 or lower, it reverts to the method
- from bash-5.0 and previous versions, so seeding the ran-
- dom number generator by assigning a value to R\bRA\bAN\bND\bDO\bOM\bM will
+ from bash-5.0 and previous versions, so seeding the ran-
+ dom number generator by assigning a value to R\bRA\bAN\bND\bDO\bOM\bM will
produce the same sequence as in bash-5.0.
- +\bo If the command hash table is empty, bash versions prior
- to bash-5.1 printed an informational message to that ef-
- fect, even when producing output that can be reused as
- input. Bash-5.1 suppresses that message when the -\b-l\bl op-
+ +\bo If the command hash table is empty, bash versions prior
+ to bash-5.1 printed an informational message to that ef-
+ fect, even when producing output that can be reused as
+ input. Bash-5.1 suppresses that message when the -\b-l\bl op-
tion is supplied.
c\bco\bom\bmp\bpa\bat\bt5\b51\b1
- +\bo The u\bun\bns\bse\bet\bt builtin treats attempts to unset array sub-
- scripts @\b@ and *\b* differently depending on whether the ar-
- ray is indexed or associative, and differently than in
+ +\bo The u\bun\bns\bse\bet\bt builtin treats attempts to unset array sub-
+ scripts @\b@ and *\b* differently depending on whether the ar-
+ ray is indexed or associative, and differently than in
previous versions.
+\bo Arithmetic commands ( (\b((\b(...)\b))\b) ) and the expressions in an
arithmetic for statement can be expanded more than once.
- +\bo Expressions used as arguments to arithmetic operators in
- the [\b[[\b[ conditional command can be expanded more than
+ +\bo Expressions used as arguments to arithmetic operators in
+ the [\b[[\b[ conditional command can be expanded more than
once.
- +\bo The expressions in substring parameter brace expansion
+ +\bo The expressions in substring parameter brace expansion
can be expanded more than once.
+\bo The expressions in the $\b$(\b((\b(...)\b))\b) word expansion can be ex-
panded more than once.
- +\bo Arithmetic expressions used as indexed array subscripts
+ +\bo Arithmetic expressions used as indexed array subscripts
can be expanded more than once.
- +\bo t\bte\bes\bst\bt -\b-v\bv, when given an argument of A\bA[\b[@\b@]\b], where A\bA is an
+ +\bo t\bte\bes\bst\bt -\b-v\bv, when given an argument of A\bA[\b[@\b@]\b], where A\bA is an
existing associative array, will return true if the array
- has any set elements. Bash-5.2 will look for and report
+ has any set elements. Bash-5.2 will look for and report
on a key named @\b@.
+\bo The ${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br[\b[:\b:]\b]=\b=_\bv_\ba_\bl_\bu_\be} word expansion will return
- _\bv_\ba_\bl_\bu_\be, before any variable-specific transformations have
+ _\bv_\ba_\bl_\bu_\be, 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.
- +\bo Parsing command substitutions will behave as if extended
+ +\bo Parsing command substitutions will behave as if extended
globbing (see the description of the s\bsh\bho\bop\bpt\bt builtin above)
- is enabled, so that parsing a command substitution con-
+ is enabled, so that parsing a command substitution con-
taining an extglob pattern (say, as part of a shell func-
- tion) will not fail. This assumes the intent is to en-
- able extglob before the command is executed and word ex-
- pansions are performed. It will fail at word expansion
- time if extglob hasn't been enabled by the time the com-
+ tion) will not fail. This assumes the intent is to en-
+ able extglob before the command is executed and word ex-
+ pansions are performed. It will fail at word expansion
+ time if extglob hasn't been enabled by the time the com-
mand is executed.
c\bco\bom\bmp\bpa\bat\bt5\b52\b2
- +\bo The t\bte\bes\bst\bt builtin uses its historical algorithm to parse
- parenthesized subexpressions when given five or more ar-
+ +\bo The t\bte\bes\bst\bt builtin uses its historical algorithm to parse
+ parenthesized subexpressions when given five or more ar-
guments.
- +\bo If the -\b-p\bp or -\b-P\bP option is supplied to the b\bbi\bin\bnd\bd builtin,
+ +\bo If the -\b-p\bp or -\b-P\bP option is supplied to the b\bbi\bin\bnd\bd builtin,
b\bbi\bin\bnd\bd treats any arguments remaining after option process-
- ing as bindable command names, and displays any key se-
- quences bound to those commands, instead of treating the
+ ing as bindable command names, and displays any key se-
+ quences bound to those commands, instead of treating the
arguments as key sequences to bind.
R\bRE\bES\bST\bTR\bRI\bIC\bCT\bTE\bED\bD S\bSH\bHE\bEL\bLL\bL
If b\bba\bas\bsh\bh is started with the name r\brb\bba\bas\bsh\bh, or the -\b-r\br option is supplied at
- invocation, the shell becomes _\br_\be_\bs_\bt_\br_\bi_\bc_\bt_\be_\bd. A restricted shell is used
- to set up an environment more controlled than the standard shell. It
- behaves identically to b\bba\bas\bsh\bh with the exception that the following are
+ invocation, the shell becomes _\br_\be_\bs_\bt_\br_\bi_\bc_\bt_\be_\bd. A restricted shell is used
+ to set up an environment more controlled than the standard shell. It
+ behaves identically to b\bba\bas\bsh\bh with the exception that the following are
disallowed or not performed:
+\bo Changing directories with c\bcd\bd.
- +\bo Setting or unsetting the values of S\bSH\bHE\bEL\bLL\bL, P\bPA\bAT\bTH\bH, H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE, E\bEN\bNV\bV,
+ +\bo Setting or unsetting the values of S\bSH\bHE\bEL\bLL\bL, P\bPA\bAT\bTH\bH, H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE, E\bEN\bNV\bV,
or B\bBA\bAS\bSH\bH_\b_E\bEN\bNV\bV.
+\bo Specifying command names containing /\b/.
- +\bo Specifying a filename containing a /\b/ as an argument to the .\b.
+ +\bo Specifying a filename containing a /\b/ as an argument to the .\b.
builtin command.
- +\bo Using the -\b-p\bp option to the .\b. builtin command to specify a
+ +\bo Using the -\b-p\bp option to the .\b. builtin command to specify a
search path.
- +\bo Specifying a filename containing a slash as an argument to the
+ +\bo Specifying a filename containing a slash as an argument to the
h\bhi\bis\bst\bto\bor\bry\by builtin command.
- +\bo Specifying a filename containing a slash as an argument to the
+ +\bo Specifying a filename containing a slash as an argument to the
-\b-p\bp option to the h\bha\bas\bsh\bh builtin command.
- +\bo Importing function definitions from the shell environment at
+ +\bo Importing function definitions from the shell environment at
startup.
- +\bo Parsing the values of B\bBA\bAS\bSH\bHO\bOP\bPT\bTS\bS and S\bSH\bHE\bEL\bLL\bLO\bOP\bPT\bTS\bS from the shell en-
+ +\bo Parsing the values of B\bBA\bAS\bSH\bHO\bOP\bPT\bTS\bS and S\bSH\bHE\bEL\bLL\bLO\bOP\bPT\bTS\bS from the shell en-
vironment at startup.
- +\bo Redirecting output using the >, >|, <>, >&, &>, and >> redirec-
+ +\bo Redirecting output using the >, >|, <>, >&, &>, and >> redirec-
tion operators.
+\bo Using the e\bex\bxe\bec\bc builtin command to replace the shell with another
command.
- +\bo Adding or deleting builtin commands with the -\b-f\bf and -\b-d\bd options
+ +\bo Adding or deleting builtin commands with the -\b-f\bf and -\b-d\bd options
to the e\ben\bna\bab\bbl\ble\be builtin command.
- +\bo Using the e\ben\bna\bab\bbl\ble\be builtin command to enable disabled shell
+ +\bo Using the e\ben\bna\bab\bbl\ble\be builtin command to enable disabled shell
builtins.
+\bo Specifying the -\b-p\bp option to the c\bco\bom\bmm\bma\ban\bnd\bd builtin command.
- +\bo Turning off restricted mode with s\bse\bet\bt +\b+r\br or s\bsh\bho\bop\bpt\bt -\b-u\bu r\bre\be-\b-
+ +\bo Turning off restricted mode with s\bse\bet\bt +\b+r\br or s\bsh\bho\bop\bpt\bt -\b-u\bu r\bre\be-\b-
s\bst\btr\bri\bic\bct\bte\bed\bd_\b_s\bsh\bhe\bel\bll\bl.
These restrictions are enforced after any startup files are read.
When a command that is found to be a shell script is executed (see C\bCO\bOM\bM-\b-
- M\bMA\bAN\bND\bD E\bEX\bXE\bEC\bCU\bUT\bTI\bIO\bON\bN above), r\brb\bba\bas\bsh\bh turns off any restrictions in the shell
+ M\bMA\bAN\bND\bD E\bEX\bXE\bEC\bCU\bUT\bTI\bIO\bON\bN above), r\brb\bba\bas\bsh\bh turns off any restrictions in the shell
spawned to execute the script.
S\bSE\bEE\bE A\bAL\bLS\bSO\bO
_\b~_\b/_\b._\bb_\ba_\bs_\bh_\br_\bc
The individual per-interactive-shell startup file
_\b~_\b/_\b._\bb_\ba_\bs_\bh_\b__\bl_\bo_\bg_\bo_\bu_\bt
- The individual login shell cleanup file, executed when a login
+ The individual login shell cleanup file, executed when a login
shell exits
_\b~_\b/_\b._\bb_\ba_\bs_\bh_\b__\bh_\bi_\bs_\bt_\bo_\br_\by
- The default value of H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE, the file in which bash saves the
+ The default value of H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE, the file in which bash saves the
command history
_\b~_\b/_\b._\bi_\bn_\bp_\bu_\bt_\br_\bc
Individual _\br_\be_\ba_\bd_\bl_\bi_\bn_\be initialization file
B\bBU\bUG\bG R\bRE\bEP\bPO\bOR\bRT\bTS\bS
If you find a bug in b\bba\bas\bsh\bh, you should report it. But first, you should
- make sure that it really is a bug, and that it appears in the latest
- version of b\bba\bas\bsh\bh. The latest version is always available from
+ make sure that it really is a bug, and that it appears in the latest
+ version of b\bba\bas\bsh\bh. The latest version is always available from
_\bf_\bt_\bp_\b:_\b/_\b/_\bf_\bt_\bp_\b._\bg_\bn_\bu_\b._\bo_\br_\bg_\b/_\bp_\bu_\bb_\b/_\bg_\bn_\bu_\b/_\bb_\ba_\bs_\bh_\b/ and _\bh_\bt_\bt_\bp_\b:_\b/_\b/_\bg_\bi_\bt_\b._\bs_\ba_\bv_\ba_\bn_\b-
_\bn_\ba_\bh_\b._\bg_\bn_\bu_\b._\bo_\br_\bg_\b/_\bc_\bg_\bi_\bt_\b/_\bb_\ba_\bs_\bh_\b._\bg_\bi_\bt_\b/_\bs_\bn_\ba_\bp_\bs_\bh_\bo_\bt_\b/_\bb_\ba_\bs_\bh_\b-_\bm_\ba_\bs_\bt_\be_\br_\b._\bt_\ba_\br_\b._\bg_\bz.
- Once you have determined that a bug actually exists, use the _\bb_\ba_\bs_\bh_\bb_\bu_\bg
- command to submit a bug report. If you have a fix, you are encouraged
+ Once you have determined that a bug actually exists, use the _\bb_\ba_\bs_\bh_\bb_\bu_\bg
+ command to submit a bug report. If you have a fix, you are encouraged
to mail that as well! You may send suggestions and "philosophical" bug
- reports to _\bb_\bu_\bg_\b-_\bb_\ba_\bs_\bh_\b@_\bg_\bn_\bu_\b._\bo_\br_\bg or post them to the Usenet newsgroup
+ reports to _\bb_\bu_\bg_\b-_\bb_\ba_\bs_\bh_\b@_\bg_\bn_\bu_\b._\bo_\br_\bg or post them to the Usenet newsgroup
g\bgn\bnu\bu.\b.b\bba\bas\bsh\bh.\b.b\bbu\bug\bg.
ALL bug reports should include:
A description of the bug behavior
A short script or "recipe" which exercises the bug
- _\bb_\ba_\bs_\bh_\bb_\bu_\bg inserts the first three items automatically into the template
+ _\bb_\ba_\bs_\bh_\bb_\bu_\bg inserts the first three items automatically into the template
it provides for filing a bug report.
Comments and bug reports concerning this manual page should be directed
Shell builtin commands and functions are not stoppable/restartable.
- Compound commands and command lists of the form "a ; b ; c" are not
- handled gracefully when combined with process suspension. When a
- process is stopped, the shell immediately executes the next command in
- the list or breaks out of any existing loops. It suffices to enclose
- the command in parentheses to force it into a subshell, which may be
- stopped as a unit, or to start the command in the background and imme-
+ Compound commands and command lists of the form "a ; b ; c" are not
+ handled gracefully when combined with process suspension. When a
+ process is stopped, the shell immediately executes the next command in
+ the list or breaks out of any existing loops. It suffices to enclose
+ the command in parentheses to force it into a subshell, which may be
+ stopped as a unit, or to start the command in the background and imme-
diately bring it into the foreground.
Array variables may not (yet) be exported.
-GNU Bash 5.3 2025 August 25 _\bB_\bA_\bS_\bH(1)
+GNU Bash 5.3 2025 September 6 _\bB_\bA_\bS_\bH(1)
-<HTML><HEAD>
-<TITLE>BASH(1) Manual Page</TITLE>
-</HEAD>
-<BODY><TABLE WIDTH=100%>
-<TR>
-<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2025 August 25<TH ALIGN=RIGHT width=33%>BASH(1)
-</TR>
-</TABLE>
-<BR><A HREF="#index">Index</A>
-<HR>
+<!-- Creator : groff version 1.23.0 -->
+<!-- CreationDate: Sat Sep 6 15:33:53 2025 -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<meta name="Content-Style" content="text/css">
+<style type="text/css">
+ p { margin-top: 0; margin-bottom: 0; vertical-align: top }
+ pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
+ table { margin-top: 0; margin-bottom: 0; vertical-align: top }
+ h1 { text-align: center }
+</style>
+<title>BASH</title>
+
+</head>
+<body>
+
+<h1 align="center">BASH</h1>
+
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#COPYRIGHT">COPYRIGHT</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#OPTIONS">OPTIONS</a><br>
+<a href="#ARGUMENTS">ARGUMENTS</a><br>
+<a href="#INVOCATION">INVOCATION</a><br>
+<a href="#DEFINITIONS">DEFINITIONS</a><br>
+<a href="#RESERVED WORDS">RESERVED WORDS</a><br>
+<a href="#SHELL GRAMMAR">SHELL GRAMMAR</a><br>
+<a href="#Simple Commands">Simple Commands</a><br>
+<a href="#Pipelines">Pipelines</a><br>
+<a href="#Lists">Lists</a><br>
+<a href="#Compound Commands">Compound Commands</a><br>
+<a href="#Coprocesses">Coprocesses</a><br>
+<a href="#Shell Function Definitions">Shell Function Definitions</a><br>
+<a href="#COMMENTS">COMMENTS</a><br>
+<a href="#QUOTING">QUOTING</a><br>
+<a href="#Translating Strings">Translating Strings</a><br>
+<a href="#PARAMETERS">PARAMETERS</a><br>
+<a href="#Positional Parameters">Positional Parameters</a><br>
+<a href="#Special Parameters">Special Parameters</a><br>
+<a href="#Shell Variables">Shell Variables</a><br>
+<a href="#Arrays">Arrays</a><br>
+<a href="#EXPANSION">EXPANSION</a><br>
+<a href="#Brace Expansion">Brace Expansion</a><br>
+<a href="#Tilde Expansion">Tilde Expansion</a><br>
+<a href="#Parameter Expansion">Parameter Expansion</a><br>
+<a href="#Command Substitution">Command Substitution</a><br>
+<a href="#Arithmetic Expansion">Arithmetic Expansion</a><br>
+<a href="#Process Substitution">Process Substitution</a><br>
+<a href="#Word Splitting">Word Splitting</a><br>
+<a href="#Pathname Expansion">Pathname Expansion</a><br>
+<a href="#Quote Removal">Quote Removal</a><br>
+<a href="#REDIRECTION">REDIRECTION</a><br>
+<a href="#Redirecting Input">Redirecting Input</a><br>
+<a href="#Redirecting Output">Redirecting Output</a><br>
+<a href="#Appending Redirected Output">Appending Redirected Output</a><br>
+<a href="#Redirecting Standard Output and Standard Error">Redirecting Standard Output and Standard Error</a><br>
+<a href="#Appending Standard Output and Standard Error">Appending Standard Output and Standard Error</a><br>
+<a href="#Here Documents">Here Documents</a><br>
+<a href="#Here Strings">Here Strings</a><br>
+<a href="#Duplicating File Descriptors">Duplicating File Descriptors</a><br>
+<a href="#Moving File Descriptors">Moving File Descriptors</a><br>
+<a href="#Opening File Descriptors for Reading and Writing">Opening File Descriptors for Reading and Writing</a><br>
+<a href="#ALIASES">ALIASES</a><br>
+<a href="#FUNCTIONS">FUNCTIONS</a><br>
+<a href="#ARITHMETIC EVALUATION">ARITHMETIC EVALUATION</a><br>
+<a href="#CONDITIONAL EXPRESSIONS">CONDITIONAL EXPRESSIONS</a><br>
+<a href="#SIMPLE COMMAND EXPANSION">SIMPLE COMMAND EXPANSION</a><br>
+<a href="#COMMAND EXECUTION">COMMAND EXECUTION</a><br>
+<a href="#COMMAND EXECUTION ENVIRONMENT">COMMAND EXECUTION ENVIRONMENT</a><br>
+<a href="#ENVIRONMENT">ENVIRONMENT</a><br>
+<a href="#EXIT STATUS">EXIT STATUS</a><br>
+<a href="#SIGNALS">SIGNALS</a><br>
+<a href="#JOB CONTROL">JOB CONTROL</a><br>
+<a href="#PROMPTING">PROMPTING</a><br>
+<a href="#READLINE">READLINE</a><br>
+<a href="#Readline Notation">Readline Notation</a><br>
+<a href="#Readline Initialization">Readline Initialization</a><br>
+<a href="#Readline Key Bindings">Readline Key Bindings</a><br>
+<a href="#Readline Variables">Readline Variables</a><br>
+<a href="#Readline Conditional Constructs">Readline Conditional Constructs</a><br>
+<a href="#Searching">Searching</a><br>
+<a href="#Readline Command Names">Readline Command Names</a><br>
+<a href="#Commands for Moving">Commands for Moving</a><br>
+<a href="#Commands for Manipulating the History">Commands for Manipulating the History</a><br>
+<a href="#Commands for Changing Text">Commands for Changing Text</a><br>
+<a href="#Killing and Yanking">Killing and Yanking</a><br>
+<a href="#Numeric Arguments">Numeric Arguments</a><br>
+<a href="#Completing">Completing</a><br>
+<a href="#Keyboard Macros">Keyboard Macros</a><br>
+<a href="#Miscellaneous">Miscellaneous</a><br>
+<a href="#Programmable Completion">Programmable Completion</a><br>
+<a href="#HISTORY">HISTORY</a><br>
+<a href="#HISTORY EXPANSION">HISTORY EXPANSION</a><br>
+<a href="#Event Designators">Event Designators</a><br>
+<a href="#Word Designators">Word Designators</a><br>
+<a href="#Modifiers">Modifiers</a><br>
+<a href="#SHELL BUILTIN COMMANDS">SHELL BUILTIN COMMANDS</a><br>
+<a href="#SHELL COMPATIBILITY MODE">SHELL COMPATIBILITY MODE</a><br>
+<a href="#RESTRICTED SHELL">RESTRICTED SHELL</a><br>
+<a href="#SEE ALSO">SEE ALSO</a><br>
+<a href="#FILES">FILES</a><br>
+<a href="#AUTHORS">AUTHORS</a><br>
+<a href="#BUG REPORTS">BUG REPORTS</a><br>
+<a href="#BUGS">BUGS</a><br>
+
+<hr>
+
+
+<h2>NAME
+<a name="NAME"></a>
+</h2>
+
+
+<p style="margin-left:9%; margin-top: 1em">bash − GNU
+Bourne-Again SHell</p>
+
+<h2>SYNOPSIS
+<a name="SYNOPSIS"></a>
+</h2>
+
+
+<p style="margin-left:9%; margin-top: 1em"><b>bash</b>
+[options] [command_string | file]</p>
+
+<h2>COPYRIGHT
+<a name="COPYRIGHT"></a>
+</h2>
+
+
+<p style="margin-left:9%; margin-top: 1em">Bash is
+Copyright (C) 1989-2025 by the Free Software Foundation,
+Inc.</p>
+
+<h2>DESCRIPTION
+<a name="DESCRIPTION"></a>
+</h2>
+
+
+<p style="margin-left:9%; margin-top: 1em"><b>Bash</b> is a
+command language interpreter that executes commands read
+from the standard input, from a string, or from a file. It
+is a reimplementation and extension of the Bourne shell, the
+historical Unix command language interpreter. <b>Bash</b>
+also incorporates useful features from the <i>Korn</i> and
+<i>C</i> shells (<b>ksh</b> and <b>csh</b>).</p>
+
+
+<p style="margin-left:9%; margin-top: 1em"><small>POSIX</small>
+is the name for a family of computing standards based on
+Unix. <b>Bash</b> is intended to be a conformant
+implementation of the Shell and Utilities portion of the
+IEEE <small>POSIX</small> specification (IEEE Standard
+1003.1). <b>Bash</b> <small>POSIX</small> mode (hereafter
+referred to as <i>posix mode</i>) changes the shell’s
+behavior where its default operation differs from the
+standard to strictly conform to the standard. See
+<b><small>SEE ALSO</small></b> below for a reference to a
+document that details how posix mode affects
+<b>bash</b>’s behavior. <b>Bash</b> can be configured
+to be <small>POSIX</small> -conformant by default.</p>
+
+<h2>OPTIONS
+<a name="OPTIONS"></a>
+</h2>
+
+
+<p style="margin-left:9%; margin-top: 1em">All of the
+single-character shell options documented in the description
+of the <b>set</b> builtin command, including
+<b>−o</b>, can be used as options when the shell is
+invoked. In addition, <b>bash</b> interprets the following
+options when it is invoked:</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="3%">
+
+<p><b>−c</b></p></td>
+<td width="10%"></td>
+<td width="78%">
+<p>If the <b>−c</b> option is present, then commands
+are read from the first non-option argument
+<i>command_string</i>. If there are arguments after the
+<i>command_string</i>, the first argument is assigned to
+<b>$0</b> and any remaining arguments are assigned to the
+positional parameters. The assignment to <b>$0</b> sets the
+name of the shell, which is used in warning and error
+messages.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="3%">
+<p><b>−i</b></p></td>
+<td width="10%"></td>
+<td width="78%">
+<p>If the <b>−i</b> option is present, the shell is
+<i>interactive</i>.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="3%">
+<p><b>−l</b></p></td>
+<td width="10%"></td>
+<td width="78%">
+<p>Make <b>bash</b> act as if it had been invoked as a
+login shell (see <b><small>INVOCATION</small></b>
+below).</p> </td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="3%">
+<p><b>−r</b></p></td>
+<td width="10%"></td>
+<td width="78%">
+<p>If the <b>−r</b> option is present, the shell
+becomes <i>restricted</i> (see <b><small>RESTRICTED
+SHELL</small></b> below).</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="3%">
+<p><b>−s</b></p></td>
+<td width="10%"></td>
+<td width="78%">
+<p>If the <b>−s</b> option is present, or if no
+arguments remain after option processing, the shell reads
+commands from the standard input. This option allows the
+positional parameters to be set when invoking an interactive
+shell or when reading input through a pipe.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="3%">
+<p><b>−D</b></p></td>
+<td width="10%"></td>
+<td width="78%">
+<p>Print a list of all double-quoted strings preceded by
+<b>$</b> on the standard output. These are the strings that
+are subject to language translation when the current locale
+is not <b>C</b> or <b>POSIX</b>. This implies the
+<b>−n</b> option; no commands will be executed.</p></td></tr>
+</table>
+<p style="margin-left:9%;"><b>[−+]O
+[</b><i>shopt_option</i><b>]</b></p>
-<A NAME="lbAB"> </A>
-<H3>NAME</H3>
+<p style="margin-left:22%;"><i>shopt_option</i> is one of
+the shell options accepted by the <b>shopt</b> builtin (see
+<b><small>SHELL BUILTIN COMMANDS</small></b> below). If
+<i>shopt_option</i> is present, <b>−O</b> sets the
+value of that option; <b>+O</b> unsets it. If
+<i>shopt_option</i> is not supplied, <b>bash</b> prints the
+names and values of the shell options accepted by
+<b>shopt</b> on the standard output. If the invocation
+option is <b>+O</b>, the output is displayed in a format
+that may be reused as input.</p>
-bash - GNU Bourne-Again SHell
-<A NAME="lbAC"> </A>
-<H3>SYNOPSIS</H3>
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="3%">
-<B>bash</B>
-[options]
-[command_string | file]
-<A NAME="lbAD"> </A>
-<H3>COPYRIGHT</H3>
+<p><b>−−</b></p></td>
+<td width="10%"></td>
+<td width="78%">
-Bash is Copyright © 1989-2025 by the Free Software Foundation, Inc.
-<A NAME="lbAE"> </A>
-<H3>DESCRIPTION</H3>
+<p>A <b>−−</b> signals the end of options and
+disables further option processing. Any arguments after the
+<b>−−</b> are treated as a shell script filename
+(see below) and arguments passed to that script. An argument
+of <b>−</b> is equivalent to
+<b>−−</b>.</p> </td></tr>
+</table>
-<B>Bash</B>
+<p style="margin-left:9%; margin-top: 1em"><b>Bash</b> also
+interprets a number of multi-character options. These
+options must appear on the command line before the
+single-character options to be recognized. <b><br>
+−−debugger</b></p>
-is a command language interpreter that
-executes commands read from the standard input, from a string,
-or from a file.
-It is a reimplementation and extension of the Bourne shell,
-the historical Unix command language interpreter.
-<B>Bash</B>
+<p style="margin-left:18%;">Arrange for the debugger
+profile to be executed before the shell starts. Turns on
+extended debugging mode (see the description of the
+<b>extdebug</b> option to the <b>shopt</b> builtin
+below).</p>
-also incorporates useful features from the <I>Korn</I> and <I>C</I>
-shells (<B>ksh</B> and <B>csh</B>).
-<P>
-<FONT SIZE=-1>POSIX</FONT>
-is the name for a family of computing standards based on Unix.
-<B>Bash</B>
+<p style="margin-left:9%;"><b>−−dump−po−strings</b></p>
-is intended to be a conformant implementation of the
-Shell and Utilities portion of the IEEE
-<FONT SIZE=-1>POSIX</FONT>
-specification (IEEE Standard 1003.1).
-<B>Bash</B>
+<p style="margin-left:18%;">Equivalent to <b>−D</b>,
+but the output is in the GNU <i>gettext</i> “po”
+(portable object) file format.</p>
-<FONT SIZE=-1>POSIX</FONT>
-mode (hereafter referred to as <I>posix mode</I>)
-changes the shell's behavior where its default operation differs
-from the standard to strictly conform to the standard.
-See
-<FONT SIZE=-1><B>SEE ALSO</B>
-</FONT>
-below for a reference to a document that details how posix mode affects
-<B>bash</B>'s behavior.
-<B>Bash</B>
+<p style="margin-left:9%;"><b>−−dump−strings</b></p>
-can be configured to be
-<FONT SIZE=-1>POSIX</FONT>
--conformant by default.
-<A NAME="lbAF"> </A>
-<H3>OPTIONS</H3>
+<p style="margin-left:18%;">Equivalent to
+<b>−D</b>.</p>
-All of the single-character shell options documented in the
-description of the <B>set</B> builtin command, including <B>-o</B>,
-can be used as options when the shell is invoked.
-In addition, <B>bash</B>
-interprets the following options when it is invoked:
-<P>
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="8%">
-<DL COMPACT>
-<DT><B>-c</B>
-<DD>
-If the
-<B>-c</B>
+<p><b>−−help</b></p></td>
+<td width="1%"></td>
+<td width="82%">
-option is present, then commands are read from the first non-option argument
-<I>command_string</I>.
-If there are arguments after the
-<I>command_string</I>,
+<p>Display a usage message on standard output and exit
+successfully.</p> </td></tr>
+</table>
-the first argument is assigned to
-<B>$0</B>
-and any remaining arguments are assigned to the positional parameters.
-The assignment to
-<B>$0</B>
+<p style="margin-left:9%;"><b>−−init−file</b>
+<i>file</i> <b><br>
+−−rcfile</b> <i>file</i></p>
-sets the name of the shell, which is used in warning and error messages.
-<DT><B>-i</B>
+<p style="margin-left:18%;">Execute commands from
+<i>file</i> instead of the standard personal initialization
+file <A HREF="file:~/.bashrc"><i>~/.bashrc</i></A> if the shell is interactive (see
+<b><small>INVOCATION</small></b> below).</p>
-<DD>
-If the
-<B>-i</B>
+<p style="margin-left:9%;"><b>−−login</b></p>
-option is present, the shell is
-<I>interactive</I>.
+<p style="margin-left:18%;">Equivalent to
+<b>−l</b>.</p>
-<DT><B>-l</B>
-<DD>
-Make
-<B>bash</B>
+<p style="margin-left:9%;"><b>−−noediting</b></p>
-act as if it had been invoked as a login shell (see
-<FONT SIZE=-1><B>INVOCATION</B>
+<p style="margin-left:18%;">Do not use the GNU
+<b>readline</b> library to read command lines when the shell
+is interactive.</p>
-</FONT>
-below).
-<DT><B>-r</B>
-
-<DD>
-If the
-<B>-r</B>
-option is present, the shell becomes
-<I>restricted</I>
-
-(see
-<FONT SIZE=-1><B>RESTRICTED SHELL</B>
-
-</FONT>
-below).
-<DT><B>-s</B>
-
-<DD>
-If the
-<B>-s</B>
-
-option is present, or if no arguments remain after option
-processing, the shell reads commands from the standard input.
-This option allows the positional parameters to be set
-when invoking an interactive shell or when reading input
-through a pipe.
-<DT><B>-D</B>
-
-<DD>
-Print a list of all double-quoted strings preceded by <B>$</B>
-on the standard output.
-These are the strings that
-are subject to language translation when the current locale
-is not <B>C</B> or <B>POSIX</B>.
-This implies the <B>-n</B> option; no commands will be executed.
-<DT><B>[-+]O [</B><I>shopt_option</I>]
+<p style="margin-left:9%;"><b>−−noprofile</b></p>
-<DD>
-<I>shopt_option</I> is one of the shell options accepted by the
-<B>shopt</B> builtin (see
-<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
+<p style="margin-left:18%;">Do not read either the
+system-wide startup file <A HREF="file:/etc/profile"><i>/etc/profile</i></A> or any of the
+personal initialization files <A HREF="file:~/.bash_profile"><i>~/.bash_profile</i></A>,
+<A HREF="file:~/.bash_login"><i>~/.bash_login</i></A>, or <A HREF="file:~/.profile"><i>~/.profile</i></A>. By default,
+<b>bash</b> reads these files when it is invoked as a login
+shell (see <b><small>INVOCATION</small></b> below).</p>
-</FONT>
-below).
-If <I>shopt_option</I> is present, <B>-O</B> sets the value of that option;
-<B>+O</B> unsets it.
-If <I>shopt_option</I> is not supplied, <B>bash</B> prints
-the names and values of the shell
-options accepted by <B>shopt</B> on the standard output.
-If the invocation option is <B>+O</B>, the output is displayed in a format
-that may be reused as input.
-<DT><B>--</B>
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="8%">
-<DD>
-A
-<B>--</B>
-signals the end of options and disables further option processing.
-Any arguments after the
-<B>--</B>
+<p><b>−−norc</b></p></td>
+<td width="1%"></td>
+<td width="82%">
-are treated as a shell script filename (see below)
-and arguments passed to that script.
-An argument of
-<B>-</B>
-is equivalent to <B>--</B>.
-</DL>
-<P>
+<p>Do not read and execute the personal initialization file
+<A HREF="file:~/.bashrc"><i>~/.bashrc</i></A> if the shell is interactive. This option is
+on by default if the shell is invoked as <b>sh</b>.</p></td></tr>
+</table>
-<B>Bash</B>
+<p style="margin-left:9%;"><b>−−posix</b></p>
-also interprets a number of multi-character options.
-These options must appear on the command line before the
-single-character options to be recognized.
-<P>
+<p style="margin-left:18%;">Enable posix mode; change the
+behavior of <b>bash</b> where the default operation differs
+from the <small>POSIX</small> standard to match the
+standard.</p>
-<DL COMPACT>
-<DT><B>--debugger</B>
-<DD>
-Arrange for the debugger profile to be executed before the shell
-starts.
-Turns on extended debugging mode (see the description of the
-<B>extdebug</B>
+<p style="margin-left:9%;"><b>−−restricted</b></p>
-option to the
-<B>shopt</B>
+<p style="margin-left:18%;">The shell becomes restricted
+(see <b><small>RESTRICTED SHELL</small></b> below).</p>
-builtin below).
-<DT><B>--dump-po-strings</B>
-<DD>
-Equivalent to <B>-D</B>, but the output is in the GNU <I>gettext</I>
+<p style="margin-left:9%;"><b>−−verbose</b></p>
-(portable object) file format.
-<DT><B>--dump-strings</B>
+<p style="margin-left:18%;">Equivalent to
+<b>−v</b>.</p>
-<DD>
-Equivalent to <B>-D</B>.
-<DT><B>--help</B>
-<DD>
-Display a usage message on standard output and exit successfully.
-<DT>
-<DD>
-<B>--init-file</B> <I>file</I>
-<DT><B>--rcfile</B> <I>file</I><DD>
+<p style="margin-left:9%;"><b>−−version</b></p>
-Execute commands from
-<I>file</I>
+<p style="margin-left:18%;">Show version information for
+this instance of <b>bash</b> on the standard output and exit
+successfully.</p>
-instead of the standard personal initialization file
+<h2>ARGUMENTS
+<a name="ARGUMENTS"></a>
+</h2>
-<A HREF="file:~/.bashrc"><I>~/.bashrc</I></A>
-if the shell is interactive (see
-<FONT SIZE=-1><B>INVOCATION</B>
+<p style="margin-left:9%; margin-top: 1em">If arguments
+remain after option processing, and neither the
+<b>−c</b> nor the <b>−s</b> option has been
+supplied, the first argument is treated as the name of a
+file containing shell commands (a <i>shell script</i>). When
+<b>bash</b> is invoked in this fashion, <b>$0</b> is set to
+the name of the file, and the positional parameters are set
+to the remaining arguments. <b>Bash</b> reads and executes
+commands from this file, then exits. <b>Bash</b>’s
+exit status is the exit status of the last command executed
+in the script. If no commands are executed, the exit status
+is 0. <b>Bash</b> first attempts to open the file in the
+current directory, and, if no file is found, searches the
+directories in <b><small>PATH</small></b> for the
+script.</p>
-</FONT>
-below).
-<DT><B>--login</B>
+<h2>INVOCATION
+<a name="INVOCATION"></a>
+</h2>
-<DD>
-Equivalent to <B>-l</B>.
-<DT><B>--noediting</B>
-<DD>
-Do not use the GNU
-<B>readline</B>
+<p style="margin-left:9%; margin-top: 1em">A <i>login
+shell</i> is one whose first character of argument zero is a
+<b>−</b>, or one started with the
+<b>−−login</b> option.</p>
-library to read command lines when the shell is interactive.
-<DT><B>--noprofile</B>
+<p style="margin-left:9%; margin-top: 1em">An
+<i>interactive shell</i> is one started without non-option
+arguments (unless <b>−s</b> is specified) and without
+the <b>−c</b> option, and whose standard input and
+standard error are both connected to terminals (as
+determined by <i>isatty</i>(3)), or one started with the
+<b>−i</b> option. <b>Bash</b> sets
+<b><small>PS1</small></b> and <b>$−</b> includes
+<b>i</b> if the shell is interactive, so a shell script or a
+startup file can test this state.</p>
-<DD>
-Do not read either the system-wide startup file
+<p style="margin-left:9%; margin-top: 1em">The following
+paragraphs describe how <b>bash</b> executes its startup
+files. If any of the files exist but cannot be read,
+<b>bash</b> reports an error. Tildes are expanded in
+filenames as described below under <b>Tilde Expansion</b> in
+the <b><small>EXPANSION</small></b> section.</p>
+
+<p style="margin-left:9%; margin-top: 1em">When <b>bash</b>
+is invoked as an interactive login shell, or as a
+non-interactive shell with the <b>−−login</b>
+option, it first reads and executes commands from the file
+<A HREF="file:/etc/profile"><i>/etc/profile</i></A>, if that file exists. After reading that
+file, it looks for <A HREF="file:~/.bash_profile"><i>~/.bash_profile</i></A>,
+<A HREF="file:~/.bash_login"><i>~/.bash_login</i></A>, and <A HREF="file:~/.profile"><i>~/.profile</i></A>, in that order,
+and reads and executes commands from the first one that
+exists and is readable. The <b>−−noprofile</b>
+option may be used when the shell is started to inhibit this
+behavior.</p>
+
+<p style="margin-left:9%; margin-top: 1em">When an
+interactive login shell exits, or a non-interactive login
+shell executes the <b>exit</b> builtin command, <b>bash</b>
+reads and executes commands from the file
+<A HREF="file:~/.bash_logout"><i>~/.bash_logout</i></A>, if it exists.</p>
+
+<p style="margin-left:9%; margin-top: 1em">When an
+interactive shell that is not a login shell is started,
+<b>bash</b> reads and executes commands from
+<A HREF="file:~/.bashrc"><i>~/.bashrc</i></A>, if that file exists. The
+<b>−−norc</b> option inhibits this behavior. The
+<b>−−rcfile</b> <i>file</i> option causes
+<b>bash</b> to use <i>file</i> instead of
+<A HREF="file:~/.bashrc"><i>~/.bashrc</i></A>.</p>
+
+<p style="margin-left:9%; margin-top: 1em">When <b>bash</b>
+is started non-interactively, to run a shell script, for
+example, it looks for the variable
+<b><small>BASH_ENV</small></b> in the environment, expands
+its value if it appears there, and uses the expanded value
+as the name of a file to read and execute. <b>Bash</b>
+behaves as if the following command were executed:</p>
+
+<p style="margin-left:18%; margin-top: 1em">if [ −n
+"$BASH_ENV" ]; then . "$BASH_ENV";
+fi</p>
+
+<p style="margin-left:9%; margin-top: 1em">but does not use
+the value of the <b><small>PATH</small></b> variable to
+search for the filename.</p>
+
+<p style="margin-left:9%; margin-top: 1em">If <b>bash</b>
+is invoked with the name <b>sh</b>, it tries to mimic the
+startup behavior of historical versions of <b>sh</b> as
+closely as possible, while conforming to the
+<small>POSIX</small> standard as well. When invoked as an
+interactive login shell, or a non-interactive shell with the
+<b>−−login</b> option, it first attempts to read
+and execute commands from <A HREF="file:/etc/profile"><i>/etc/profile</i></A> and
+<A HREF="file:~/.profile"><i>~/.profile</i></A>, in that order. The
+<b>−−noprofile</b> option inhibits this
+behavior. When invoked as an interactive shell with the name
+<b>sh</b>, <b>bash</b> looks for the variable
+<b><small>ENV</small></b><small>,</small> expands its value
+if it is defined, and uses the expanded value as the name of
+a file to read and execute. Since a shell invoked as
+<b>sh</b> does not attempt to read and execute commands from
+any other startup files, the <b>−−rcfile</b>
+option has no effect. A non-interactive shell invoked with
+the name <b>sh</b> does not attempt to read any other
+startup files.</p>
+
+<p style="margin-left:9%; margin-top: 1em">When invoked as
+<b>sh</b>, <b>bash</b> enters posix mode after reading the
+startup files.</p>
+
+<p style="margin-left:9%; margin-top: 1em">When <b>bash</b>
+is started in posix mode, as with the
+<b>−−posix</b> command line option, it follows
+the <small>POSIX</small> standard for startup files. In this
+mode, interactive shells expand the
+<b><small>ENV</small></b> variable and read and execute
+commands from the file whose name is the expanded value. No
+other startup files are read.</p>
+
+<p style="margin-left:9%; margin-top: 1em"><b>Bash</b>
+attempts to determine when it is being run with its standard
+input connected to a network connection, as when executed by
+the historical and rarely-seen remote shell daemon, usually
+<i>rshd</i>, or the secure shell daemon <i>sshd</i>. If
+<b>bash</b> determines it is being run non-interactively in
+this fashion, it reads and executes commands from
+<A HREF="file:~/.bashrc"><i>~/.bashrc</i></A>, if that file exists and is readable.
+<b>Bash</b> does not read this file if invoked as <b>sh</b>.
+The <b>−−norc</b> option inhibits this behavior,
+and the <b>−−rcfile</b> option makes <b>bash</b>
+use a different file instead of <A HREF="file:~/.bashrc"><i>~/.bashrc</i></A>, but
+neither <i>rshd</i> nor <i>sshd</i> generally invoke the
+shell with those options or allow them to be specified.</p>
+
+<p style="margin-left:9%; margin-top: 1em">If the shell is
+started with the effective user (group) id not equal to the
+real user (group) id, and the <b>−p</b> option is not
+supplied, no startup files are read, shell functions are not
+inherited from the environment, the
+<b><small>SHELLOPTS</small></b><small>, <b>BASHOPTS</b>,
+<b>CDPATH</b>,</small> and <b><small>GLOBIGNORE</small></b>
+variables, if they appear in the environment, are ignored,
+and the effective user id is set to the real user id. If the
+<b>−p</b> option is supplied at invocation, the
+startup behavior is the same, but the effective user id is
+not reset.</p>
-<A HREF="file:/etc/profile"><I>/etc/profile</I></A>
+<h2>DEFINITIONS
+<a name="DEFINITIONS"></a>
+</h2>
-or any of the personal initialization files
-<A HREF="file:~/.bash_profile"><I>~/.bash_profile</I></A>,
+<p style="margin-left:9%; margin-top: 1em">The following
+definitions are used throughout the rest of this
+document.</p>
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="6%">
-<A HREF="file:~/.bash_login"><I>~/.bash_login</I></A>,
-or
+<p><b>blank</b></p></td>
+<td width="3%"></td>
+<td width="19%">
-<A HREF="file:~/.profile"><I>~/.profile</I></A>.
-By default,
-<B>bash</B>
+<p>A space or tab.</p></td>
+<td width="63%">
+</td></tr>
+</table>
-reads these files when it is invoked as a login shell (see
-<FONT SIZE=-1><B>INVOCATION</B>
+<p style="margin-left:9%;"><b>whitespace</b></p>
-</FONT>
-below).
-<DT><B>--norc</B>
+<p style="margin-left:18%;">A character belonging to the
+<b>space</b> character class in the current locale, or for
+which <i>isspace</i>(3) returns true.</p>
-<DD>
-Do not read and execute the personal initialization file
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="5%">
-<A HREF="file:~/.bashrc"><I>~/.bashrc</I></A>
-if the shell is interactive.
-This option is on by default if the shell is invoked as
-<B>sh</B>.
+<p><b>word</b></p></td>
+<td width="4%"></td>
+<td width="82%">
-<DT><B>--posix</B>
-<DD>
-Enable posix mode;
-change the behavior of <B>bash</B>
-where the default operation differs from the
-<FONT SIZE=-1>POSIX</FONT>
-standard to match the standard.
-<DT><B>--restricted</B>
+<p>A sequence of characters considered as a single unit by
+the shell. Also known as a <b>token</b>.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="5%">
-<DD>
-The shell becomes restricted (see
-<FONT SIZE=-1><B>RESTRICTED SHELL</B>
-</FONT>
-below).
-<DT><B>--verbose</B>
+<p><b>name</b></p></td>
+<td width="4%"></td>
+<td width="82%">
-<DD>
-Equivalent to <B>-v</B>.
-<DT><B>--version</B>
-<DD>
-Show version information for this instance of
-<B>bash</B>
+<p>A <i>word</i> consisting only of alphanumeric characters
+and underscores, and beginning with an alphabetic character
+or an underscore. Also referred to as an
+<b>identifier</b>.</p> </td></tr>
+</table>
-on the standard output and exit successfully.
-</DL>
-<A NAME="lbAG"> </A>
-<H3>ARGUMENTS</H3>
+<p style="margin-left:9%;"><b>metacharacter</b></p>
-If arguments remain after option processing, and neither the
-<B>-c</B>
+<p style="margin-left:18%;">A character that, when
+unquoted, separates words. One of the following: <b><br>
+| & ; ( ) < > space tab newline</b></p>
-nor the
-<B>-s</B>
+<p style="margin-left:9%;"><b>control operator</b></p>
-option has been supplied, the first argument is treated as
-the name of a file containing shell commands (a <I>shell script</I>).
-When
-<B>bash</B>
+<p style="margin-left:18%;">A <i>token</i> that performs a
+control function. It is one of the following symbols:
+<b><br>
+|| & && ; ;; ;& ;;& ( ) | |&
+<newline></b></p>
-is invoked in this fashion,
-<B>$0</B>
+<h2>RESERVED WORDS
+<a name="RESERVED WORDS"></a>
+</h2>
-is set to the name of the file, and the positional parameters
-are set to the remaining arguments.
-<B>Bash</B>
-reads and executes commands from this file, then exits.
-<B>Bash</B>'s exit status is the exit status of the last command
-executed in the script.
-If no commands are executed, the exit status is 0.
-<B>Bash</B>
+<p style="margin-left:9%; margin-top: 1em"><b><i>Reserved
+words</i></b> are words that have a special meaning to the
+shell. The following words are recognized as reserved when
+unquoted and either</p>
-first attempts to open the file in the current directory,
-and, if no file is found, searches the directories in
-<FONT SIZE=-1><B>PATH</B>
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-</FONT>
-for the script.
-<A NAME="lbAH"> </A>
-<H3>INVOCATION</H3>
-A <I>login shell</I> is one whose first character of argument zero is a
-<B>-</B>,
+<p>•</p></td>
+<td width="8%"></td>
+<td width="82%">
-or one started with the
-<B>--login</B>
-option.
-<P>
+<p>the first word of a command (see <b><small>SHELL
+GRAMMAR</small></b> below);</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-An <I>interactive shell</I> is one started without non-option arguments
-(unless <B>-s</B> is specified)
-and without the
-<B>-c</B>
-option,
-and whose standard input and standard error are
-both connected to terminals (as determined by
-<I>isatty</I>(3)),
+<p>•</p></td>
+<td width="8%"></td>
+<td width="82%">
-or one started with the
-<B>-i</B>
-option.
-<B>Bash</B>
+<p>the first word following a reserved word other than
+<b>case</b>, <b>for</b>, <b>select</b>, or <b>in</b>;</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-sets
-<FONT SIZE=-1><B>PS1</B>
-</FONT>
-and
-<B>$-</B>
+<p>•</p></td>
+<td width="8%"></td>
+<td width="82%">
-includes
-<B>i</B>
-if the shell is interactive,
-so a shell script or a startup file can test this state.
-<P>
+<p>the third word of a <b>case</b> command (only <b>in</b>
+is valid);</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-The following paragraphs describe how
-<B>bash</B>
-executes its startup files.
-If any of the files exist but cannot be read,
-<B>bash</B>
+<p>•</p></td>
+<td width="8%"></td>
+<td width="82%">
-reports an error.
-Tildes are expanded in filenames as described below under
-<B>Tilde Expansion</B>
-in the
-<FONT SIZE=-1><B>EXPANSION</B>
+<p>the third word of a <b>for</b> or <b>select</b> command
+(only <b>in</b> and <b>do</b> are valid);</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-</FONT>
-section.
-<P>
-When
-<B>bash</B>
+<p>•</p></td>
+<td width="8%"></td>
+<td width="82%">
-is invoked as an interactive login shell, or as a non-interactive shell
-with the <B>--login</B> option, it first reads and
-executes commands from the file
-<A HREF="file:/etc/profile"><I>/etc/profile</I></A>,
+<p>following a control operator.</p></td></tr>
+</table>
-if that file exists.
-After reading that file, it looks for
+<p style="margin-left:9%; margin-top: 1em">The shell will
+also recognize reserved words where the syntax of a command
+specifically requires the reserved word as the only correct
+token.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The following
+are reserved words:</p>
+
+<p style="margin-left:9%; margin-top: 1em"><b>! case coproc
+do done elif else esac fi for function if in select then
+until while { } time [[ ]]</b></p>
+
+<h2>SHELL GRAMMAR
+<a name="SHELL GRAMMAR"></a>
+</h2>
+
+
+<p style="margin-left:9%; margin-top: 1em">This section
+describes the syntax of the various forms of shell
+commands.</p>
+
+<h3>Simple Commands
+<a name="Simple Commands"></a>
+</h3>
+
+
+<p style="margin-left:9%; margin-top: 1em">A <i>simple
+command</i> is a sequence of optional variable assignments
+followed by <b>blank</b>-separated words and redirections,
+and terminated by a <i>control operator</i>. The first word
+specifies the command to be executed, and is passed as
+argument zero. The remaining words are passed as arguments
+to the invoked command.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The return value
+of a <i>simple command</i> is its exit status, or
+128+<i>n</i> if the command is terminated by signal
+<i>n</i>.</p>
+
+<h3>Pipelines
+<a name="Pipelines"></a>
+</h3>
-<A HREF="file:~/.bash_profile"><I>~/.bash_profile</I></A>,
+<p style="margin-left:9%; margin-top: 1em">A
+<i>pipeline</i> is a sequence of one or more commands
+separated by one of the control operators <b>|</b> or
+<b>|&</b>. The format for a pipeline is:</p>
+
+<p style="margin-left:18%; margin-top: 1em">[<b>time</b>
+[<b>−p</b>]] [ ! ] <i>command1</i> [
+[<b>|</b>⎪<b>|&</b>] <i>command2</i> ... ]</p>
+
+<p style="margin-left:9%; margin-top: 1em">The standard
+output of <i>command1</i> is connected via a pipe to the
+standard input of <i>command2</i>. This connection is
+performed before any redirections specified by the
+<i>command1</i>(see <b><small>REDIRECTION</small></b>
+below). If <b>|&</b> is the pipeline operator,
+<i>command1</i>’s standard error, in addition to its
+standard output, is connected to <i>command2</i>’s
+standard input through the pipe; it is shorthand for
+<b>2>&1 |</b>. This implicit redirection of the
+standard error to the standard output is performed after any
+redirections specified by <i>command1</i>.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The return
+status of a pipeline is the exit status of the last command,
+unless the <b>pipefail</b> option is enabled. If
+<b>pipefail</b> is enabled, the pipeline’s return
+status is the value of the last (rightmost) command to exit
+with a non-zero status, or zero if all commands exit
+successfully. If the reserved word <b>!</b> precedes a
+pipeline, the exit status of that pipeline is the logical
+negation of the exit status as described above. If a
+pipeline is executed synchronously, the shell waits for all
+commands in the pipeline to terminate before returning a
+value.</p>
+
+<p style="margin-left:9%; margin-top: 1em">If the
+<b>time</b> reserved word precedes a pipeline, the shell
+reports the elapsed as well as user and system time consumed
+by its execution when the pipeline terminates. The
+<b>−p</b> option changes the output format to that
+specified by <small>POSIX</small> . When the shell is in
+posix mode, it does not recognize <b>time</b> as a reserved
+word if the next token begins with a “−”.
+The value of the <b><small>TIMEFORMAT</small></b> variable
+is a format string that specifies how the timing information
+should be displayed; see the description of
+<b><small>TIMEFORMAT</small></b> below under <b>Shell
+Variables</b>.</p>
+
+<p style="margin-left:9%; margin-top: 1em">When the shell
+is in posix mode, <b>time</b> may appear by itself as the
+only word in a simple command. In this case, the shell
+displays the total user and system time consumed by the
+shell and its children. The <b><small>TIMEFORMAT</small></b>
+variable specifies the format of the time information.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Each command in
+a multi-command pipeline, where pipes are created, is
+executed in a <i>subshell</i>, which is a separate process.
+See <b><small>COMMAND EXECUTION ENVIRONMENT</small></b> for
+a description of subshells and a subshell environment. If
+the <b>lastpipe</b> option is enabled using the <b>shopt</b>
+builtin (see the description of <b>shopt</b> below), and job
+control is not active, the last element of a pipeline may be
+run by the shell process.</p>
+
+<h3>Lists
+<a name="Lists"></a>
+</h3>
+
+
+<p style="margin-left:9%; margin-top: 1em">A <i>list</i> is
+a sequence of one or more AND or OR lists separated by one
+of the operators <b>;</b>, <b>&</b>, or
+<b><newline></b>, and optionally terminated by one of
+those three characters.</p>
+
+<p style="margin-left:9%; margin-top: 1em">AND and OR lists
+are sequences of one or more pipelines separated by the
+<b>&&</b> and <b>||</b> control operators,
+respectively. AND and OR lists are executed with left
+associativity.</p>
+
+<p style="margin-left:9%; margin-top: 1em">An AND list has
+the form</p>
+
+
+<p style="margin-left:18%; margin-top: 1em"><i>command1</i>
+<b>&&</b> <i>command2</i></p>
+
+<p style="margin-left:9%; margin-top: 1em"><i>command2</i>
+is executed if, and only if, <i>command1</i> returns an exit
+status of zero (success).</p>
+
+<p style="margin-left:9%; margin-top: 1em">An OR list has
+the form</p>
+
+
+<p style="margin-left:18%; margin-top: 1em"><i>command1</i>
+<b>||</b> <i>command2</i></p>
+
+<p style="margin-left:9%; margin-top: 1em"><i>command2</i>
+is executed if, and only if, <i>command1</i> returns a
+non-zero exit status. The return status of AND and OR lists
+is the exit status of the last command executed in the
+list.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Of these list
+operators, <b>&&</b> and <b>||</b> have equal
+precedence, followed by <b>;</b> and <b>&</b>, which
+have equal precedence.</p>
+
+<p style="margin-left:9%; margin-top: 1em">A sequence of
+one or more newlines may appear in a <i>list</i> instead of
+a semicolon to delimit commands.</p>
+
+<p style="margin-left:9%; margin-top: 1em">If a command is
+terminated by the control operator <b>&</b>, the shell
+executes the command in the <i>background</i> in a subshell.
+The shell does not wait for the command to finish, and the
+return status is 0. These are referred to as
+<i>asynchronous</i> commands. Commands separated or
+terminated by <b>;</b> (or an equivalent
+<b><newline></b>) are executed sequentially; the shell
+waits for each command to terminate in turn.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The return
+status of a list is the exit status of the last command
+executed.</p>
+
+<h3>Compound Commands
+<a name="Compound Commands"></a>
+</h3>
+
+
+<p style="margin-left:9%; margin-top: 1em">A <i>compound
+command</i> is one of the following. In most cases a
+<i>list</i> in a command’s description may be
+separated from the rest of the command by one or more
+newlines, and may be followed by a newline in place of a
+semicolon.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="8%">
+
+
+<p style="margin-top: 1em">(<i>list</i>)</p></td>
+<td width="1%"></td>
+<td width="82%">
+
+
+<p style="margin-top: 1em"><i>list</i> is executed in a
+subshell (see <b><small>COMMAND EXECUTION
+ENVIRONMENT</small></b> below for a description of a
+subshell environment). Variable assignments and builtin
+commands that affect the shell’s environment do not
+remain in effect after the command completes. The return
+status is the exit status of <i>list</i>.</p></td></tr>
+</table>
+
+<p style="margin-left:9%;">{ <i>list</i>; }</p>
+
+<p style="margin-left:18%;"><i>list</i> is executed in the
+current shell environment. <i>list</i> must be terminated
+with a newline or semicolon. This is known as a <i>group
+command</i>. The return status is the exit status of
+<i>list</i>.</p>
+
+<p style="margin-left:18%; margin-top: 1em">Note that
+unlike the metacharacters <b>(</b> and <b>)</b>, <b>{</b>
+and <b>}</b> are <i>reserved words</i> and must occur where
+a reserved word is permitted to be recognized. Since they do
+not cause a word break, they must be separated from
+<i>list</i> by whitespace or another shell
+metacharacter.</p>
+
+<p style="margin-left:9%;">((<i>expression</i>))</p>
+
+<p style="margin-left:18%;">The arithmetic
+<i>expression</i> is evaluated according to the rules
+described below under <b><small>ARITHMETIC
+EVALUATION</small></b><small>.</small> If the value of the
+expression is non-zero, the return status is 0; otherwise
+the return status is 1. The <i>expression</i> undergoes the
+same expansions as if it were within double quotes, but
+unescaped double quote characters in <i>expression</i> are
+not treated specially and are removed. Since this can
+potentially result in empty strings, this command treats
+those as expressions that evaluate to 0.</p>
+
+<p style="margin-left:9%;"><b>[[</b> <i>expression</i>
+<b>]]</b></p>
+
+<p style="margin-left:18%;">Evaluate the conditional
+expression <i>expression</i> and return a status of zero
+(true) or non-zero (false). Expressions are composed of the
+primaries described below under <b><small>CONDITIONAL
+EXPRESSIONS</small></b><small>.</small> The words between
+the <b>[[</b> and <b>]]</b> do not undergo word splitting
+and pathname expansion. The shell performs tilde expansion,
+parameter and variable expansion, arithmetic expansion,
+command substitution, process substitution, and quote
+removal on those words. Conditional operators such as
+<b>−f</b> must be unquoted to be recognized as
+primaries.</p>
+
+<p style="margin-left:18%; margin-top: 1em">When used with
+<b>[[</b>, the <b><</b> and <b>></b> operators sort
+lexicographically using the current locale.</p>
+
+<p style="margin-left:18%; margin-top: 1em">When the
+<b>==</b> and <b>!=</b> operators are used, the string to
+the right of the operator is considered a pattern and
+matched according to the rules described below under
+<b>Pattern Matching</b>, as if the <b>extglob</b> shell
+option were enabled. The <b>=</b> operator is equivalent to
+<b>==</b>. If the <b>nocasematch</b> shell option is
+enabled, the match is performed without regard to the case
+of alphabetic characters. The return value is 0 if the
+string matches (<b>==</b>) or does not match (<b>!=</b>) the
+pattern, and 1 otherwise. If any part of the pattern is
+quoted, the quoted portion is matched as a string: every
+character in the quoted portion matches itself, instead of
+having any special pattern matching meaning.</p>
+
+<p style="margin-left:18%; margin-top: 1em">An additional
+binary operator, <b>=~</b>, is available, with the same
+precedence as <b>==</b> and <b>!=</b>. When it is used, the
+string to the right of the operator is considered a
+<small>POSIX</small> extended regular expression and matched
+accordingly (using the <small>POSIX</small> <i>regcomp</i>
+and <i>regexec</i> interfaces usually described in
+<i>regex</i>(3)). The return value is 0 if the string
+matches the pattern, and 1 otherwise. If the regular
+expression is syntactically incorrect, the conditional
+expression’s return value is 2. If the
+<b>nocasematch</b> shell option is enabled, the match is
+performed without regard to the case of alphabetic
+characters.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If any part of
+the pattern is quoted, the quoted portion is matched
+literally, as above. If the pattern is stored in a shell
+variable, quoting the variable expansion forces the entire
+pattern to be matched literally. Treat bracket expressions
+in regular expressions carefully, since normal quoting and
+pattern characters lose their meanings between brackets.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The match
+succeeds if the pattern matches any part of the string.
+Anchor the pattern using the <b>^</b> and <b>$</b> regular
+expression operators to force it to match the entire
+string.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The array
+variable <b><small>BASH_REMATCH</small></b> records which
+parts of the string matched the pattern. The element of
+<b><small>BASH_REMATCH</small></b> 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 <b><small>BASH_REMATCH</small></b> indices.
+The element of <b><small>BASH_REMATCH</small></b> with index
+<i>n</i> is the portion of the string matching the
+<i>n</i>th parenthesized subexpression. <b>Bash</b> sets
+<b><small>BASH_REMATCH</small></b> in the global scope;
+declaring it as a local variable will lead to unexpected
+results.</p>
+
+<p style="margin-left:18%; margin-top: 1em">Expressions may
+be combined using the following operators, listed in
+decreasing order of precedence: <b><br>
+(</b> <i>expression</i> <b>)</b></p>
+
+<p style="margin-left:27%;">Returns the value of
+<i>expression</i>. This may be used to override the normal
+precedence of operators.</p>
+
+<p style="margin-left:18%;"><b>!</b> <i>expression</i></p>
+
+<p style="margin-left:27%;">True if <i>expression</i> is
+false.</p>
+
+<p style="margin-left:18%;"><i>expression1</i>
+<b>&&</b> <i>expression2</i></p>
+
+<p style="margin-left:27%;">True if both <i>expression1</i>
+and <i>expression2</i> are true.</p>
+
+<p style="margin-left:18%;"><i>expression1</i> <b>||</b>
+<i>expression2</i></p>
+
+<p style="margin-left:27%;">True if either
+<i>expression1</i> or <i>expression2</i> is true.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The
+<b>&&</b> and <b>||</b> operators do not evaluate
+<i>expression2</i> if the value of <i>expression1</i> is
+sufficient to determine the return value of the entire
+conditional expression.</p>
+
+<p style="margin-left:9%;"><b>for</b> <i>name</i> [ [
+<b>in</b> <i>word ...</i> ] ; ] <b>do</b> <i>list</i> ;
+<b>done</b></p>
+
+<p style="margin-left:18%;">First, expand the list of words
+following <b>in</b>, generating a list of items. Then, the
+variable <i>name</i> is set to each element of this list in
+turn, and <i>list</i> is executed each time. If the
+<b>in</b> <i>word</i> is omitted, the <b>for</b> command
+executes <i>list</i> once for each positional parameter that
+is set (see <b><small>PARAMETERS</small></b> below). The
+return status is the exit status of the last command that
+executes. If the expansion of the items following <b>in</b>
+results in an empty list, no commands are executed, and the
+return status is 0.</p>
+
+<p style="margin-left:9%;"><b>for</b> (( <i>expr1</i> ;
+<i>expr2</i> ; <i>expr3</i> )) [;] <b>do</b> <i>list</i> ;
+<b>done</b></p>
+
+<p style="margin-left:18%;">First, evaluate the arithmetic
+expression <i>expr1</i> according to the rules described
+below under <b><small>ARITHMETIC
+EVALUATION</small></b><small>.</small> Then, repeatedly
+evaluate the arithmetic expression <i>expr2</i> until it
+evaluates to zero. Each time <i>expr2</i> evaluates to a
+non-zero value, execute <i>list</i> and evaluate the
+arithmetic expression <i>expr3</i>. If any expression is
+omitted, it behaves as if it evaluates to 1. The return
+value is the exit status of the last command in <i>list</i>
+that is executed, or non-zero if any of the expressions is
+invalid.</p>
+
+<p style="margin-left:18%; margin-top: 1em">Use the
+<b>break</b> and <b>continue</b> builtins (see
+<b><small>SHELL BUILTIN COMMANDS</small></b> below) to
+control loop execution.</p>
+
+<p style="margin-left:9%;"><b>select</b> <i>name</i> [ [
+<b>in</b> <i>word ...</i> ] ; ] <b>do</b> <i>list</i> ;
+<b>done</b></p>
+
+<p style="margin-left:18%;">First, expand the list of words
+following <b>in</b>, generating a list of items, and print
+the set of expanded words the standard error, each preceded
+by a number. If the <b>in</b> <i>word</i> is omitted, print
+the positional parameters (see
+<b><small>PARAMETERS</small></b> below). <b>select</b> then
+displays the <b><small>PS3</small></b> prompt and reads a
+line from the standard input. If the line consists of a
+number corresponding to one of the displayed words, then
+<b>select</b> sets the value of <i>name</i> to that word. If
+the line is empty, <b>select</b> displays the words and
+prompt again. If EOF is read, <b>select</b> completes and
+returns 1. Any other value sets <i>name</i> to null. The
+line read is saved in the variable
+<b><small>REPLY</small></b><small>.</small> The <i>list</i>
+is executed after each selection until a <b>break</b>
+command is executed. The exit status of <b>select</b> is the
+exit status of the last command executed in <i>list</i>, or
+zero if no commands were executed.</p>
+
+<p style="margin-left:9%;"><b>case</b> <i>word</i>
+<b>in</b> [ [(] <i>pattern</i> [ <b>|</b> <i>pattern</i> ]
+... ) <i>list</i> ;; ] ... <b>esac</b></p>
+
+<p style="margin-left:18%;">A <b>case</b> command first
+expands <i>word</i>, and tries to match it against each
+<i>pattern</i> in turn, proceeding from first to last, using
+the matching rules described under <b>Pattern Matching</b>
+below. The <i>word</i> is expanded using tilde expansion,
+parameter and variable expansion, arithmetic expansion,
+command substitution, process substitution and quote
+removal. Each <i>pattern</i> examined is expanded using
+tilde expansion, parameter and variable expansion,
+arithmetic expansion, command substitution, process
+substitution, and quote removal. If the <b>nocasematch</b>
+shell option is enabled, the match is performed without
+regard to the case of alphabetic characters.</p>
+
+<p style="margin-left:18%; margin-top: 1em">A <i>pattern
+list</i> is a set of one or more patterns separated by
+<b>|</b>, and terminated by the <b>)</b> operator. A case
+<i>clause</i> is a pattern list and an associated
+<i>list</i>, terminated by <b>;;</b>, <b>;&</b>, or
+<b>;;&</b>. The terminator is optional for the last
+clause preceding <b>esac</b>. There may be an arbitrary
+number of case clauses. The first pattern that matches
+determines the <i>list</i> that is executed.</p>
+
+<p style="margin-left:18%; margin-top: 1em">When a match is
+found, <b>case</b> executes the corresponding <i>list</i>.
+If the <b>;;</b> operator terminates the case clause, the
+<b>case</b> command completes after the first match. Using
+the <b>;&</b> terminator continues execution with the
+<i>list</i> associated with the next clause, if any. Using
+the <b>;;&</b> terminator causes the shell to test the
+pattern list in the next clause, if any, and execute any
+associated <i>list</i> if the match succeeds, continuing the
+case statement execution as if the pattern list had not
+matched.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The exit status
+is zero if no pattern matches. Otherwise, it is the exit
+status of the last command executed in the last <i>list</i>
+executed.</p>
+
+<p style="margin-left:9%;"><b>if</b> <i>list</i>;
+<b>then</b> <i>list</i>; [ <b>elif</b> <i>list</i>;
+<b>then</b> <i>list</i>; ] ... [ <b>else</b> <i>list</i>; ]
+<b>fi</b></p>
+
+<p style="margin-left:18%;">The <b>if</b> <i>list</i> is
+executed. If its exit status is zero, the <b>then</b>
+<i>list</i> is executed. Otherwise, each <b>elif</b>
+<i>list</i> is executed in turn, and if its exit status is
+zero, the corresponding <b>then</b> <i>list</i> is executed
+and the command completes. Otherwise, the <b>else</b>
+<i>list</i> is executed, if present. The exit status is the
+exit status of the last command executed, or zero if no
+condition tested true.</p>
+
+<p style="margin-left:9%;"><b>while</b> <i>list-1</i>;
+<b>do</b> <i>list-2</i>; <b>done <br>
+until</b> <i>list-1</i>; <b>do</b> <i>list-2</i>;
+<b>done</b></p>
+
+<p style="margin-left:18%;">The <b>while</b> command
+continuously executes the list <i>list-2</i> as long as the
+last command in the list <i>list-1</i> returns an exit
+status of zero. The <b>until</b> command is identical to the
+<b>while</b> command, except that the test is negated:
+<i>list-2</i> is executed as long as the last command in
+<i>list-1</i> returns a non-zero exit status. The exit
+status of the <b>while</b> and <b>until</b> commands is the
+exit status of the last command executed in <i>list-2</i>,
+or zero if none was executed.</p>
+
+<h3>Coprocesses
+<a name="Coprocesses"></a>
+</h3>
+
+
+<p style="margin-left:9%; margin-top: 1em">A
+<i>coprocess</i> is a shell command preceded by the
+<b>coproc</b> reserved word. A coprocess is executed
+asynchronously in a subshell, as if the command had been
+terminated with the <b>&</b> control operator, with a
+two-way pipe established between the executing shell and the
+coprocess.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The syntax for a
+coprocess is:</p>
+
+<p style="margin-left:18%; margin-top: 1em"><b>coproc</b>
+[<i>NAME</i>] <i>command</i> [<i>redirections</i>]</p>
+
+<p style="margin-left:9%; margin-top: 1em">This creates a
+coprocess named <i>NAME</i>. <i>command</i> may be either a
+simple command or a compound command (see above).
+<i>NAME</i> is a shell variable name. If <i>NAME</i> is not
+supplied, the default name is <b>COPROC</b>.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The recommended
+form to use for a coprocess is</p>
+
+<p style="margin-left:18%; margin-top: 1em"><b>coproc</b>
+<i>NAME</i> { <i>command</i> [<i>redirections</i>]; }</p>
+
+<p style="margin-left:9%; margin-top: 1em">This form is
+preferred because simple commands result in the coprocess
+always being named <b>COPROC</b>, and it is simpler to use
+and more complete than the other compound commands.</p>
+
+<p style="margin-left:9%; margin-top: 1em">If
+<i>command</i> is a compound command, <i>NAME</i> is
+optional. The word following <b>coproc</b> determines
+whether that word is interpreted as a variable name: it is
+interpreted as <i>NAME</i> if it is not a reserved word that
+introduces a compound command. If <i>command</i> is a simple
+command, <i>NAME</i> is not allowed; this is to avoid
+confusion between <i>NAME</i> and the first word of the
+simple command.</p>
+
+<p style="margin-left:9%; margin-top: 1em">When the
+coprocess is executed, the shell creates an array variable
+(see <b>Arrays</b> below) named <i>NAME</i> in the context
+of the executing shell. The standard output of
+<i>command</i> is connected via a pipe to a file descriptor
+in the executing shell, and that file descriptor is assigned
+to <i>NAME</i>[0]. The standard input of <i>command</i> is
+connected via a pipe to a file descriptor in the executing
+shell, and that file descriptor is assigned to
+<i>NAME</i>[1]. This pipe is established before any
+redirections specified by the command (see
+<b><small>REDIRECTION</small></b> below). 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.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The process ID
+of the shell spawned to execute the coprocess is available
+as the value of the variable <i>NAME</i>_PID. The
+<b>wait</b> builtin may be used to wait for the coprocess to
+terminate.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Since the
+coprocess is created as an asynchronous command, the
+<b>coproc</b> command always returns success. The return
+status of a coprocess is the exit status of
+<i>command</i>.</p>
+
+<h3>Shell Function Definitions
+<a name="Shell Function Definitions"></a>
+</h3>
+
+
+<p style="margin-left:9%; margin-top: 1em">A shell function
+is an object that is called like a simple command and
+executes a compound command with a new set of positional
+parameters. Shell functions are declared as follows: <i><br>
+fname</i> () <i>compound−command</i>
+[<i>redirection</i>] <b><br>
+function</b> <i>fname</i> [()] <i>compound−command</i>
+[<i>redirection</i>]</p>
+
+<p style="margin-left:18%;">This defines a function named
+<i>fname</i>. The reserved word <b>function</b> is optional.
+If the <b>function</b> reserved word is supplied, the
+parentheses are optional. The <i>body</i> of the function is
+the compound command <i>compound−command</i> (see
+<b>Compound Commands</b> above). That command is usually a
+<i>list</i> of commands between { and }, but may be any
+command listed under <b>Compound Commands</b> above. If the
+<b>function</b> reserved word is used, but the parentheses
+are not supplied, the braces are recommended.
+<i>compound−command</i> is executed whenever
+<i>fname</i> is specified as the name of a simple command.
+When in posix mode, <i>fname</i> must be a valid shell
+<i>name</i> and may not be the name of one of the
+<small>POSIX</small> <i>special builtins</i>. In default
+mode, a function name can be any unquoted shell word that
+does not contain <b>$</b>.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Any redirections
+(see <b><small>REDIRECTION</small></b> below) specified when
+a function is defined are performed when the function is
+executed.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The exit status
+of a function definition is zero unless a syntax error
+occurs or a readonly function with the same name already
+exists. When executed, the exit status of a function is the
+exit status of the last command executed in the body. (See
+<b><small>FUNCTIONS</small></b> below.)</p>
+
+<h2>COMMENTS
+<a name="COMMENTS"></a>
+</h2>
+
+
+<p style="margin-left:9%; margin-top: 1em">In a
+non-interactive shell, or an interactive shell in which the
+<b>interactive_comments</b> option to the <b>shopt</b>
+builtin is enabled (see <b><small>SHELL BUILTIN
+COMMANDS</small></b> below), a word beginning with <b>#</b>
+introduces a comment. A word begins at the beginning of a
+line, after unquoted whitespace, or after an operator. The
+comment causes that word and all remaining characters on
+that line to be ignored. An interactive shell without the
+<b>interactive_comments</b> option enabled does not allow
+comments. The <b>interactive_comments</b> option is enabled
+by default in interactive shells.</p>
+
+<h2>QUOTING
+<a name="QUOTING"></a>
+</h2>
+
+
+<p style="margin-left:9%; margin-top: 1em"><i>Quoting</i>
+is used to remove the special meaning of certain characters
+or words to the shell. Quoting can be used to disable
+special treatment for special characters, to prevent
+reserved words from being recognized as such, and to prevent
+parameter expansion.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Each of the
+<i>metacharacters</i> listed above under
+<b><small>DEFINITIONS</small></b> has special meaning to the
+shell and must be quoted if it is to represent itself.</p>
+
+<p style="margin-left:9%; margin-top: 1em">When the command
+history expansion facilities are being used (see
+<b><small>HISTORY EXPANSION</small></b> below), the
+<i>history expansion</i> character, usually <b>!</b>, must
+be quoted to prevent history expansion.</p>
+
+<p style="margin-left:9%; margin-top: 1em">There are four
+quoting mechanisms: the <i>escape character</i>, single
+quotes, double quotes, and dollar-single quotes.</p>
+
+<p style="margin-left:9%; margin-top: 1em">A non-quoted
+backslash (<b>\</b>) is the <i>escape character</i>. It
+preserves the literal value of the next character that
+follows, removing any special meaning it has, with the
+exception of <newline>. If a <b>\</b><newline>
+pair appears, and the backslash is not itself quoted, the
+<b>\</b><newline> is treated as a line continuation
+(that is, it is removed from the input stream and
+effectively ignored).</p>
+
+<p style="margin-left:9%; margin-top: 1em">Enclosing
+characters in single quotes preserves the literal value of
+each character within the quotes. A single quote may not
+occur between single quotes, even when preceded by a
+backslash.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Enclosing
+characters in double quotes preserves the literal value of
+all characters within the quotes, with the exception of
+<b>$</b>, <b>`</b>, <b>\</b>, and, when history expansion is
+enabled, <b>!</b>. When the shell is in posix mode, the
+<b>!</b> has no special meaning within double quotes, even
+when history expansion is enabled. The characters <b>$</b>
+and <b>`</b> retain their special meaning within double
+quotes. The backslash retains its special meaning only when
+followed by one of the following characters: <b>$</b>,
+<b>`</b>, <b>"</b>, <b>\</b>, or
+<b><newline></b>. Backslashes preceding characters
+without a special meaning are left unmodified.</p>
+
+<p style="margin-left:9%; margin-top: 1em">A double quote
+may be quoted within double quotes by preceding it with a
+backslash. If enabled, history expansion will be performed
+unless an <b>!</b> appearing in double quotes is escaped
+using a backslash. The backslash preceding the <b>!</b> is
+not removed.</p>
-<A HREF="file:~/.bash_login"><I>~/.bash_login</I></A>,
+<p style="margin-left:9%; margin-top: 1em">The special
+parameters <b>*</b> and <b>@</b> have special meaning when
+in double quotes (see <b><small>PARAMETERS</small></b>
+below).</p>
-and
+<p style="margin-left:9%; margin-top: 1em">Character
+sequences of the form <b>$</b>'<i>string</i>' are treated as
+a special variant of single quotes. The sequence expands to
+<i>string</i>, with backslash-escaped characters in
+<i>string</i> replaced as specified by the ANSI C standard.
+Backslash escape sequences, if present, are decoded as
+follows:</p>
-<A HREF="file:~/.profile"><I>~/.profile</I></A>,
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="8%">
-in that order, and reads
-and executes commands from the first one that exists and is readable.
-The
-<B>--noprofile</B>
-option may be used when the shell is started to inhibit this behavior.
-<P>
+<p><b>\a</b></p></td>
+<td width="1%"></td>
+<td width="73%">
-When an interactive login shell exits,
-or a non-interactive login shell executes the <B>exit</B> builtin command,
-<B>bash</B>
-reads and executes commands from the file
+<p>alert (bell)</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="8%">
-<A HREF="file:~/.bash_logout"><I>~/.bash_logout</I></A>,
-if it exists.
-<P>
+<p><b>\b</b></p></td>
+<td width="1%"></td>
+<td width="73%">
-When an interactive shell that is not a login shell is started,
-<B>bash</B>
-reads and executes commands from
+<p>backspace</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="8%">
-<A HREF="file:~/.bashrc"><I>~/.bashrc</I></A>,
-if that file exists.
-The
-<B>--norc</B>
+<p><b>\e</b></p></td>
+<td width="1%"></td>
+<td width="73%">
+</td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="8%">
-option inhibits this behavior.
-The <B>--rcfile</B> <I>file</I> option causes
-<B>bash</B>
-to use <I>file</I> instead of
+<p><b>\E</b></p></td>
+<td width="1%"></td>
+<td width="73%">
-<A HREF="file:~/.bashrc"><I>~/.bashrc</I></A>.
-<P>
+<p>an escape character</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="8%">
-When
-<B>bash</B>
-is started non-interactively, to run a shell script, for example, it
-looks for the variable
-<FONT SIZE=-1><B>BASH_ENV</B>
+<p><b>\f</b></p></td>
+<td width="1%"></td>
+<td width="73%">
-</FONT>
-in the environment, expands its value if it appears there, and uses the
-expanded value as the name of a file to read and execute.
-<B>Bash</B>
-behaves as if the following command were executed:
-<P>
+<p>form feed</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="8%">
-<DL COMPACT><DT><DD>
-if [ -n "
-$BASH_ENV"
- ]; then . "
-$BASH_ENV"
-; fi
+<p><b>\n</b></p></td>
+<td width="1%"></td>
+<td width="73%">
-</DL>
-<P>
+<p>new line</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="8%">
-but does not use the value of the
-<FONT SIZE=-1><B>PATH</B>
-</FONT>
-variable to search for the filename.
-<P>
+<p><b>\r</b></p></td>
+<td width="1%"></td>
+<td width="73%">
-If
-<B>bash</B>
-is invoked with the name
-<B>sh</B>,
+<p>carriage return</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="8%">
-it tries to mimic the startup behavior of historical versions of
-<B>sh</B>
-as closely as possible,
-while conforming to the
-<FONT SIZE=-1>POSIX</FONT>
-standard as well.
-When invoked as an interactive login shell, or a non-interactive
-shell with the <B>--login</B> option, it first attempts to read
-and execute commands from
+<p><b>\t</b></p></td>
+<td width="1%"></td>
+<td width="73%">
-<A HREF="file:/etc/profile"><I>/etc/profile</I></A>
-and
+<p>horizontal tab</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="8%">
-<A HREF="file:~/.profile"><I>~/.profile</I></A>,
-in that order.
-The
-<B>--noprofile</B>
+<p><b>\v</b></p></td>
+<td width="1%"></td>
+<td width="73%">
-option inhibits this behavior.
-When invoked as an interactive shell with the name
-<B>sh</B>,
-<B>bash</B>
+<p>vertical tab</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="8%">
-looks for the variable
-<FONT SIZE=-1><B>ENV</B>,
-</FONT>
-expands its value if it is defined, and uses the
-expanded value as the name of a file to read and execute.
-Since a shell invoked as
-<B>sh</B>
+<p><b>\\</b></p></td>
+<td width="1%"></td>
+<td width="73%">
-does not attempt to read and execute commands from any other startup
-files, the
-<B>--rcfile</B>
-option has no effect.
-A non-interactive shell invoked with the name
-<B>sh</B>
+<p>backslash</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="8%">
-does not attempt to read any other startup files.
-<P>
-When invoked as
-<B>sh</B>,
+<p><b>\'</b></p></td>
+<td width="1%"></td>
+<td width="73%">
-<B>bash</B>
-enters posix mode after reading the startup files.
-<P>
+<p>single quote</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="8%">
-When
-<B>bash</B>
-is started in posix mode, as with the
-<B>--posix</B>
+<p><b>\"</b></p></td>
+<td width="1%"></td>
+<td width="73%">
-command line option, it follows the
-<FONT SIZE=-1>POSIX</FONT>
-standard for startup files.
-In this mode, interactive shells expand the
-<FONT SIZE=-1><B>ENV</B>
-</FONT>
-variable and read and execute commands from the file
-whose name is the expanded value.
-No other startup files are read.
-<P>
+<p>double quote</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="8%">
-<B>Bash</B>
-attempts to determine when it is being run with its standard input
-connected to a network connection, as when executed by
-the historical and rarely-seen remote shell daemon, usually <I>rshd</I>,
-or the secure shell daemon <I>sshd</I>.
-If
-<B>bash</B>
+<p><b>\?</b></p></td>
+<td width="1%"></td>
+<td width="73%">
-determines it is being run non-interactively in this fashion,
-it reads and executes commands from
-<A HREF="file:~/.bashrc"><I>~/.bashrc</I></A>,
+<p>question mark</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="8%">
-if that file exists and is readable.
-<B>Bash</B>
-does not read this file if invoked as <B>sh</B>.
-The
-<B>--norc</B>
+<p><b>\</b><i>nnn</i></p></td>
+<td width="1%"></td>
+<td width="73%">
-option inhibits this behavior, and the
-<B>--rcfile</B>
-option makes <B>bash</B> use a different file instead of
+<p>The eight-bit character whose value is the octal value
+<i>nnn</i> (one to three octal digits).</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="8%">
-<A HREF="file:~/.bashrc"><I>~/.bashrc</I></A>,
-but neither
-<I>rshd</I> nor <I>sshd</I> generally invoke the shell with those options
-or allow them to be specified.
-<P>
+<p><b>\x</b><i>HH</i></p></td>
+<td width="1%"></td>
+<td width="73%">
-If the shell is started with the effective user (group) id not equal to the
-real user (group) id, and the <B>-p</B> option is not supplied, no startup
-files are read, shell functions are not inherited from the environment, the
-<FONT SIZE=-1><B>SHELLOPTS</B>,
-</FONT>
-<FONT SIZE=-1><B>BASHOPTS</B>,
+<p>The eight-bit character whose value is the hexadecimal
+value <i>HH</i> (one or two hex digits).</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="8%">
-</FONT>
-<FONT SIZE=-1><B>CDPATH</B>,
-</FONT>
-and
-<FONT SIZE=-1><B>GLOBIGNORE</B>
+<p><b>\u</b><i>HHHH</i></p></td>
+<td width="1%"></td>
+<td width="73%">
-</FONT>
-variables, if they appear in the environment, are ignored,
-and the effective user id is set to the real user id.
-If the <B>-p</B> option is supplied at invocation, the startup behavior is
-the same, but the effective user id is not reset.
-<A NAME="lbAI"> </A>
-<H3>DEFINITIONS</H3>
-The following definitions are used throughout the rest of this
-document.
+<p>The Unicode (ISO/IEC 10646) character whose value is the
+hexadecimal value <i>HHHH</i> (one to four hex digits).</p></td></tr>
+</table>
-<DL COMPACT>
-<DT><B>blank</B>
+<p style="margin-left:18%;"><b>\U</b><i>HHHHHHHH</i></p>
-<DD>
-A space or tab.
-<DT><B>whitespace</B>
+<p style="margin-left:27%;">The Unicode (ISO/IEC 10646)
+character whose value is the hexadecimal value
+<i>HHHHHHHH</i> (one to eight hex digits).</p>
-<DD>
-A character belonging to the <B>space</B> character class in the
-current locale, or for which <I>isspace</I>(3) returns true.
-<DT><B>word</B>
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="4%">
-<DD>
-A sequence of characters considered as a single unit by the shell.
-Also known as a
-<B>token</B>.
-<DT><B>name</B>
+<p><b>\c</b><i>x</i></p></td>
+<td width="5%"></td>
+<td width="28%">
+
+
+<p>A control-<i>x</i> character.</p></td>
+<td width="45%">
+</td></tr>
+</table>
+
+<p style="margin-left:9%; margin-top: 1em">The expanded
+result is single-quoted, as if the dollar sign had not been
+present.</p>
+
+<h3>Translating Strings
+<a name="Translating Strings"></a>
+</h3>
+
+
+<p style="margin-left:9%; margin-top: 1em">A double-quoted
+string preceded by a dollar sign
+(<b>$</b>"<i>string</i>") causes the string to be
+translated according to the current locale. The
+<i>gettext</i> infrastructure performs the lookup and
+translation, using the <b>LC_MESSAGES</b>,
+<b>TEXTDOMAINDIR</b>, and <b>TEXTDOMAIN</b> shell variables.
+If the current locale is <b>C</b> or <b>POSIX</b>, if there
+are no translations available, or if the string is not
+translated, the dollar sign is ignored, and the string is
+treated as double-quoted as described above. This is a form
+of double quoting, so the string remains double-quoted by
+default, whether or not it is translated and replaced. If
+the <b>noexpand_translation</b> option is enabled using the
+<b>shopt</b> builtin, translated strings are single-quoted
+instead of double-quoted. See the description of
+<b>shopt</b> below under <b><small>SHELL BUILTIN
+COMMANDS</small></b><small>.</small></p>
+
+<h2>PARAMETERS
+<a name="PARAMETERS"></a>
+</h2>
+
+
+<p style="margin-left:9%; margin-top: 1em">A
+<i>parameter</i> is an entity that stores values. It can be
+a <i>name</i>, a number, or one of the special characters
+listed below under <b>Special Parameters</b>. A
+<i>variable</i> is a parameter denoted by a <i>name</i>. A
+variable has a <i>value</i> and zero or more
+<i>attributes</i>. Attributes are assigned using the
+<b>declare</b> builtin command (see <b>declare</b> below in
+<b><small>SHELL BUILTIN
+COMMANDS</small></b><small>).</small> The <b>export</b> and
+<b>readonly</b> builtins assign specific attributes.</p>
+
+<p style="margin-left:9%; margin-top: 1em">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 the <b>unset</b> builtin command (see <b><small>SHELL
+BUILTIN COMMANDS</small></b> below).</p>
+
+<p style="margin-left:9%; margin-top: 1em">A
+<i>variable</i> is assigned to using a statement of the
+form</p>
+
+
+<p style="margin-left:18%; margin-top: 1em"><i>name</i>=[<i>value</i>]</p>
+
+<p style="margin-left:9%; margin-top: 1em">If <i>value</i>
+is not given, the variable is assigned the null string. All
+<i>values</i> undergo tilde expansion, parameter and
+variable expansion, command substitution, arithmetic
+expansion, and quote removal (see
+<b><small>EXPANSION</small></b> below). If the variable has
+its <b>integer</b> attribute set, then <i>value</i> is
+evaluated as an arithmetic expression even if the
+<b>$((</b>...<b>))</b> expansion is not used (see
+<b>Arithmetic Expansion</b> below). Word splitting and
+pathname expansion are not performed. Assignment statements
+may also appear as arguments to the <b>alias</b>,
+<b>declare</b>, <b>typeset</b>, <b>export</b>,
+<b>readonly</b>, and <b>local</b> builtin commands
+(<i>declaration</i> commands). When in posix mode, these
+builtins may appear in a command after one or more instances
+of the <b>command</b> builtin and retain these assignment
+statement properties.</p>
+
+<p style="margin-left:9%; margin-top: 1em">In the context
+where an assignment statement is assigning a value to a
+shell variable or array index, the “+=” operator
+appends to or adds to the variable’s previous value.
+This includes arguments to <i>declaration</i> commands such
+as <b>declare</b> that accept assignment statements. When
+“+=” is applied to a variable for which the
+<b>integer</b> attribute has been set, the variable’s
+current value and <i>value</i> are each evaluated as
+arithmetic expressions, and the sum of the results is
+assigned as the variable’s value. The current value is
+usually an integer constant, but may be an expression. When
+“+=” is applied to an array variable using
+compound assignment (see <b>Arrays</b> below), the
+variable’s value is not unset (as it is when using
+“=”), and new values are appended to the array
+beginning at one greater than the array’s maximum
+index (for indexed arrays) or added as additional
+key−value pairs in an associative array. When applied
+to a string-valued variable, <i>value</i> is expanded and
+appended to the variable’s value.</p>
+
+<p style="margin-left:9%; margin-top: 1em">A variable can
+be assigned the <i>nameref</i> attribute using the
+<b>−n</b> option to the <b>declare</b> or <b>local</b>
+builtin commands (see the descriptions of <b>declare</b> and
+<b>local</b> below) to create a <i>nameref</i>, 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 <i>nameref</i>
+attribute itself), the operation is actually performed on
+the variable specified by the nameref variable’s
+value. A nameref is commonly used within 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</p>
+
+<p style="margin-left:18%; margin-top: 1em">declare
+−n ref=$1</p>
+
+<p style="margin-left:9%; margin-top: 1em">inside the
+function creates a local nameref variable <b>ref</b> whose
+value is the variable name passed as the first argument.
+References and assignments to <b>ref</b>, and changes to its
+attributes, are treated as references, assignments, and
+attribute modifications to the variable whose name was
+passed as <b>$1</b>. If the control variable in a <b>for</b>
+loop has the nameref attribute, the list of words can be a
+list of shell variables, and a name reference is established
+for each word in the list, in turn, when the loop is
+executed. Array variables cannot be given the <b>nameref</b>
+attribute. However, nameref variables can reference array
+variables and subscripted array variables. Namerefs can be
+unset using the <b>−n</b> option to the <b>unset</b>
+builtin. Otherwise, if <b>unset</b> is executed with the
+name of a nameref variable as an argument, the variable
+referenced by the nameref variable is unset.</p>
+
+<p style="margin-left:9%; margin-top: 1em">When the shell
+starts, it reads its environment and creates a shell
+variable from each environment variable that has a valid
+name, as described below (see
+<b><small>ENVIRONMENT</small></b><small>).</small></p>
+
+<h3>Positional Parameters
+<a name="Positional Parameters"></a>
+</h3>
+
+
+<p style="margin-left:9%; margin-top: 1em">A <i>positional
+parameter</i> 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 <b>set</b> builtin
+command. Positional parameters may not be assigned to with
+assignment statements. The positional parameters are
+temporarily replaced when a shell function is executed (see
+<b><small>FUNCTIONS</small></b> below).</p>
+
+<p style="margin-left:9%; margin-top: 1em">When a
+positional parameter consisting of more than a single digit
+is expanded, it must be enclosed in braces (see
+<b><small>EXPANSION</small></b> below). Without braces, a
+digit following $ can only refer to one of the first nine
+positional parameters (<b>$1−$9</b>) or the special
+parameter <b>$0</b> (see the next section).</p>
+
+<h3>Special Parameters
+<a name="Special Parameters"></a>
+</h3>
+
+
+<p style="margin-left:9%; margin-top: 1em">The shell treats
+several parameters specially. These parameters may only be
+referenced; assignment to them is not allowed. Special
+parameters are denoted by one of the following
+characters.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
+
+
+<p style="margin-top: 1em"><b>*</b></p></td>
+<td width="8%"></td>
+<td width="82%">
+
+
+<p style="margin-top: 1em">(<b>$*</b>) Expands to the
+positional parameters, starting from one. When the expansion
+is not within double quotes, each positional parameter
+expands to a separate word. In contexts where word
+expansions are performed, those words are subject to further
+word splitting and pathname expansion. When the expansion
+occurs within double quotes, it expands to a single word
+with the value of each parameter separated by the first
+character of the <b><small>IFS</small></b> variable. That
+is, <b>"$*"</b> is equivalent to
+<b>"$1</b><i>c</i><b>$2</b><i>c</i><b>..."</b>,
+where <i>c</i> is the first character of the value of the
+<b><small>IFS</small></b> variable. If
+<b><small>IFS</small></b> is unset, the parameters are
+separated by spaces. If <b><small>IFS</small></b> is null,
+the parameters are joined without intervening
+separators.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
+
+
+<p><b>@</b></p></td>
+<td width="8%"></td>
+<td width="82%">
+
+
+<p>(<b>$@</b>) Expands to the positional parameters,
+starting from one. In contexts where word splitting is
+performed, this expands each positional parameter to a
+separate word; if not within double quotes, these words are
+subject to word splitting. In contexts where word splitting
+is not performed, such as the value portion of an assignment
+statement, this expands to a single word with each
+positional parameter separated by a space. When the
+expansion occurs within double quotes, and word splitting is
+performed, each parameter expands to a separate word. That
+is, <b>"$@"</b> is equivalent to
+<b>"$1" "$2" ...</b> If the
+double-quoted expansion occurs within a word, the expansion
+of the first parameter is joined with the expansion of the
+beginning part of the original word, and the expansion of
+the last parameter is joined with the expansion of the last
+part of the original word. When there are no positional
+parameters, <b>"$@"</b> and <b>$@</b> expand to
+nothing (i.e., they are removed).</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
+
+
+<p><b>#</b></p></td>
+<td width="8%"></td>
+<td width="82%">
+
+
+<p>(<b>$#</b>) Expands to the number of positional
+parameters in decimal.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
+
+
+<p><b>?</b></p></td>
+<td width="8%"></td>
+<td width="82%">
+
+
+<p>(<b>$?</b>) Expands to the exit status of the most
+recently executed command.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
+
+
+<p><b>−</b></p></td>
+<td width="8%"></td>
+<td width="82%">
+
+
+<p>(<b>$−</b>) Expands to the current option flags as
+specified upon invocation, by the <b>set</b> builtin
+command, or those set by the shell itself (such as the
+<b>−i</b> option).</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
+
+
+<p><b>$</b></p></td>
+<td width="8%"></td>
+<td width="82%">
+
+
+<p>(<b>$$</b>) Expands to the process ID of the shell. In a
+subshell, it expands to the process ID of the parent shell,
+not the subshell.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
+
+
+<p><b>!</b></p></td>
+<td width="8%"></td>
+<td width="82%">
+
+
+<p>(<b>$!</b>)Expands to the process ID of the job most
+recently placed into the background, whether executed as an
+asynchronous command or using the <b>bg</b> builtin (see
+<b><small>JOB CONTROL</small></b> below).</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-<DD>
-A
-<I>word</I>
-consisting only of alphanumeric characters and underscores, and
-beginning with an alphabetic character or an underscore. Also
-referred to as an
-<B>identifier</B>.
+<p><b>0</b></p></td>
+<td width="8%"></td>
+<td width="82%">
-<DT><B>metacharacter</B>
-<DD>
-A character that, when unquoted, separates words.
-One of the following:
-<BR>
+<p>(<b>$0</b>) Expands to the name of the shell or shell
+script. This is set at shell initialization. If <b>bash</b>
+is invoked with a file of commands, <b>$0</b> is set to the
+name of that file. If <b>bash</b> is started with the
+<b>−c</b> option, then <b>$0</b> is set to the first
+argument after the string to be executed, if one is present.
+Otherwise, it is set to the filename used to invoke
+<b>bash</b>, as given by argument zero.</p></td></tr>
+</table>
+
+<h3>Shell Variables
+<a name="Shell Variables"></a>
+</h3>
+
+
+<p style="margin-left:9%; margin-top: 1em">The shell sets
+following variables:</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="5%">
+
+
+<p style="margin-top: 1em"><b>_</b></p></td>
+<td width="4%"></td>
+<td width="82%">
+
+
+<p style="margin-top: 1em">(<b>$_</b>, an underscore) This
+has a number of meanings depending on context. At shell
+startup, <b>_</b> is set to the pathname used to invoke the
+shell or shell script being executed as passed in the
+environment or argument list. Subsequently, it expands to
+the last argument to the previous simple command executed in
+the foreground, after expansion. It is also set to the full
+pathname used to invoke each command executed and placed in
+the environment exported to that command. When checking
+mail, <b>$_</b> expands to the name of the mail file
+currently being checked.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="5%">
+
+
+<p><b>BASH</b></p></td>
+<td width="4%"></td>
+<td width="82%">
+
+
+<p>Expands to the full filename used to invoke this
+instance of <b>bash</b>.</p></td></tr>
+</table>
+
+<p style="margin-left:9%;"><b>BASHOPTS</b></p>
+
+<p style="margin-left:18%;">A colon-separated list of
+enabled shell options. Each word in the list is a valid
+argument for the <b>−s</b> option to the <b>shopt</b>
+builtin command (see <b><small>SHELL BUILTIN
+COMMANDS</small></b> below). The options appearing in
+<b><small>BASHOPTS</small></b> are those reported as
+<i>on</i> by <b>shopt</b>. If this variable is in the
+environment when <b>bash</b> starts up, the shell enables
+each option in the list before reading any startup files. If
+this variable is exported, child shells will enable each
+option in the list. This variable is read-only.</p>
+
+<p style="margin-left:9%;"><b>BASHPID</b></p>
+
+<p style="margin-left:18%;">Expands to the process ID of
+the current <b>bash</b> process. This differs from <b>$$</b>
+under certain circumstances, such as subshells that do not
+require <b>bash</b> to be re-initialized. Assignments to
+<b><small>BASHPID</small></b> have no effect. If
+<b><small>BASHPID</small></b> is unset, it loses its special
+properties, even if it is subsequently reset.</p>
+
+<p style="margin-left:9%;"><b>BASH_ALIASES</b></p>
+
+<p style="margin-left:18%;">An associative array variable
+whose members correspond to the internal list of aliases as
+maintained by the <b>alias</b> builtin. Elements added to
+this array appear in the alias list; however, unsetting
+array elements currently does not remove aliases from the
+alias list. If <b><small>BASH_ALIASES</small></b> is unset,
+it loses its special properties, even if it is subsequently
+reset.</p>
+
+<p style="margin-left:9%;"><b>BASH_ARGC</b></p>
+
+<p style="margin-left:18%;">An array variable whose values
+are the number of parameters in each frame of the current
+<b>bash</b> execution call stack. The number of parameters
+to the current subroutine (shell function or script executed
+with <b>.</b> or <b>source</b>) is at the top of the stack.
+When a subroutine is executed, the number of parameters
+passed is pushed onto
+<b><small>BASH_ARGC</small></b><small>.</small> The shell
+sets <b><small>BASH_ARGC</small></b> only when in extended
+debugging mode (see the description of the <b>extdebug</b>
+option to the <b>shopt</b> builtin below). Setting
+<b>extdebug</b> after the shell has started to execute a
+script, or referencing this variable when <b>extdebug</b> is
+not set, may result in inconsistent values. Assignments to
+<b><small>BASH_ARGC</small></b> have no effect, and it may
+not be unset.</p>
+
+<p style="margin-left:9%;"><b>BASH_ARGV</b></p>
+
+<p style="margin-left:18%;">An array variable containing
+all of the parameters in the current <b>bash</b> execution
+call stack. The final parameter of the last subroutine call
+is at the top of the stack; the first parameter of the
+initial call is at the bottom. When a subroutine is
+executed, the shell pushes the supplied parameters onto
+<b><small>BASH_ARGV</small></b><small>.</small> The shell
+sets <b><small>BASH_ARGV</small></b> only when in extended
+debugging mode (see the description of the <b>extdebug</b>
+option to the <b>shopt</b> builtin below). Setting
+<b>extdebug</b> after the shell has started to execute a
+script, or referencing this variable when <b>extdebug</b> is
+not set, may result in inconsistent values. Assignments to
+<b><small>BASH_ARGV</small></b> have no effect, and it may
+not be unset.</p>
+
+<p style="margin-left:9%;"><b>BASH_ARGV0</b></p>
+
+<p style="margin-left:18%;">When referenced, this variable
+expands to the name of the shell or shell script (identical
+to <b>$0</b>; see the description of special parameter 0
+above). Assigning a value to
+<b><small>BASH_ARGV0</small></b> sets <b>$0</b> to the same
+value. If <b><small>BASH_ARGV0</small></b> is unset, it
+loses its special properties, even if it is subsequently
+reset.</p>
+
+<p style="margin-left:9%;"><b>BASH_CMDS</b></p>
+
+<p style="margin-left:18%;">An associative array variable
+whose members correspond to the internal hash table of
+commands as maintained by the <b>hash</b> builtin. Adding
+elements to this array makes them appear in the hash table;
+however, unsetting array elements currently does not remove
+command names from the hash table. If
+<b><small>BASH_CMDS</small></b> is unset, it loses its
+special properties, even if it is subsequently reset.</p>
+
+<p style="margin-left:9%;"><b>BASH_COMMAND</b></p>
+
+<p style="margin-left:18%;">Expands to the command
+currently being executed or about to be executed, unless the
+shell is executing a command as the result of a trap, in
+which case it is the command executing at the time of the
+trap. If <b><small>BASH_COMMAND</small></b> is unset, it
+loses its special properties, even if it is subsequently
+reset.</p>
+
+
+<p style="margin-left:9%;"><b>BASH_EXECUTION_STRING</b></p>
+
+<p style="margin-left:18%;">The command argument to the
+<b>−c</b> invocation option.</p>
+
+<p style="margin-left:9%;"><b>BASH_LINENO</b></p>
+
+<p style="margin-left:18%;">An array variable whose members
+are the line numbers in source files where each
+corresponding member of <b><small>FUNCNAME</small></b> was
+invoked. <b>${BASH_LINENO[</b><i>$i</i><b>]}</b> is the line
+number in the source file
+(<b>${BASH_SOURCE[</b><i>$i+1</i><b>]}</b>) where
+<b>${FUNCNAME[</b><i>$i</i><b>]}</b> was called (or
+<b>${BASH_LINENO[</b><i>$i−1</i><b>]}</b> if
+referenced within another shell function). Use
+<b><small>LINENO</small></b> to obtain the current line
+number. Assignments to <b><small>BASH_LINENO</small></b>
+have no effect, and it may not be unset.</p>
+
+<p style="margin-left:9%;"><b>BASH_LOADABLES_PATH</b></p>
+
+<p style="margin-left:18%;">A colon-separated list of
+directories in which the <b>enable</b> command looks for
+dynamically loadable builtins.</p>
+
+<p style="margin-left:9%;"><b>BASH_MONOSECONDS</b></p>
+
+<p style="margin-left:18%;">Each time this variable is
+referenced, it expands to the value returned by the
+system’s monotonic clock, if one is available. If
+there is no monotonic clock, this is equivalent to
+<b>EPOCHSECONDS</b>. If
+<b><small>BASH_MONOSECONDS</small></b> is unset, it loses
+its special properties, even if it is subsequently
+reset.</p>
+
+<p style="margin-left:9%;"><b>BASH_REMATCH</b></p>
+
+<p style="margin-left:18%;">An array variable whose members
+are assigned by the <b>=~</b> binary operator to the
+<b>[[</b> conditional command. The element with index 0 is
+the portion of the string matching the entire regular
+expression. The element with index <i>n</i> is the portion
+of the string matching the <i>n</i>th parenthesized
+subexpression.</p>
+
+<p style="margin-left:9%;"><b>BASH_SOURCE</b></p>
+
+<p style="margin-left:18%;">An array variable whose members
+are the source filenames where the corresponding shell
+function names in the <b><small>FUNCNAME</small></b> array
+variable are defined. The shell function
+<b>${FUNCNAME[</b><i>$i</i><b>]}</b> is defined in the file
+<b>${BASH_SOURCE[</b><i>$i</i><b>]}</b> and called from
+<b>${BASH_SOURCE[</b><i>$i+1</i><b>]}</b>. Assignments to
+<b><small>BASH_SOURCE</small></b> have no effect, and it may
+not be unset.</p>
-<DL COMPACT><DT><DD>
-<P>
+<p style="margin-left:9%;"><b>BASH_SUBSHELL</b></p>
-<B>| & ; ( ) < > space tab newline</B>
+<p style="margin-left:18%;">Incremented by one within each
+subshell or subshell environment when the shell begins
+executing in that environment. The initial value is 0. If
+<b><small>BASH_SUBSHELL</small></b> is unset, it loses its
+special properties, even if it is subsequently reset.</p>
-</DL>
+<p style="margin-left:9%;"><b>BASH_TRAPSIG</b></p>
-<DT><B>control operator</B>
+<p style="margin-left:18%;">Set to the signal number
+corresponding to the trap action being executed during its
+execution. See the description of <b>trap</b> under
+<b><small>SHELL BUILTIN COMMANDS</small></b> below for
+information about signal numbers and trap execution.</p>
-<DD>
-A <I>token</I> that performs a control function.
-It is one of the following symbols:
-<DL COMPACT><DT><DD>
-<P>
+<p style="margin-left:9%;"><b>BASH_VERSINFO</b></p>
-<B>|| & && ; ;; ;& ;;& ( ) | |& <newline></B>
+<p style="margin-left:18%;">A readonly array variable whose
+members hold version information for this instance of
+<b>bash</b>. The values assigned to the array members are as
+follows:</p>
-</DL>
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="20%">
-</DL>
-<A NAME="lbAJ"> </A>
-<H3>RESERVED WORDS</H3>
+<p><b>BASH_VERSINFO[</b>0<b>]</b></p></td>
+<td width="11%"></td>
+<td width="50%">
-<I>Reserved words</I> are words that have a special meaning to the shell.
-The following words are recognized as reserved when unquoted and either
-the first word of a command (see
-<FONT SIZE=-1><B>SHELL GRAMMAR</B>
-</FONT>
-below), the third word of a
-<B>case</B>
+<p>The major version number (the <i>release</i>).</p></td>
+<td width="1%">
+</td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="20%">
-or
-<B>select</B>
-command
-(only <B>in</B> is valid), or the third word of a
-<B>for</B>
+<p><b>BASH_VERSINFO[</b>1<b>]</b></p></td>
+<td width="11%"></td>
+<td width="50%">
-command (only <B>in</B> and <B>do</B> are valid):
-<DL COMPACT><DT><DD>
-<P>
+<p>The minor version number (the <i>version</i>).</p></td>
+<td width="1%">
+</td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="20%">
-<B>
-</B>
-! case coproc do done elif else esac fi for function if in select then until while { } time [[ ]]
-</DL>
+<p><b>BASH_VERSINFO[</b>2<b>]</b></p></td>
+<td width="11%"></td>
+<td width="50%">
-<A NAME="lbAK"> </A>
-<H3>SHELL GRAMMAR</H3>
+<p>The patch level.</p></td>
+<td width="1%">
+</td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="20%">
-This section describes the syntax of the various forms of shell commands.
-<A NAME="lbAL"> </A>
-<H4>Simple Commands</H4>
-A <I>simple command</I> is a sequence of optional variable assignments
-followed by <B>blank</B>-separated words and redirections, and
-terminated by a <I>control operator</I>.
-The first word
-specifies the command to be executed, and is passed as argument zero.
-The remaining words are passed as arguments to the invoked command.
-<P>
+<p><b>BASH_VERSINFO[</b>3<b>]</b></p></td>
+<td width="11%"></td>
+<td width="50%">
-The return value of a <I>simple command</I> is its exit status, or
-128+<I>n</I> if the command is terminated by signal
-<I>n</I>.
-<A NAME="lbAM"> </A>
-<H4>Pipelines</H4>
+<p>The build version.</p></td>
+<td width="1%">
+</td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="20%">
-A <I>pipeline</I> is a sequence of one or more commands separated by
-one of the control operators
-<B>|</B>
-or <B>|&</B>.
-The format for a pipeline is:
-<DL COMPACT><DT><DD>
-<P>
+<p><b>BASH_VERSINFO[</b>4<b>]</b></p></td>
+<td width="11%"></td>
+<td width="50%">
-[<B>time</B> [<B>-p</B>]] [ ! ] <I>command1</I> [ [<B>|</B>|<B>|&</B>] <I>command2</I> ... ]
-</DL>
-<P>
+<p>The release status (e.g., <i>beta</i>).</p></td>
+<td width="1%">
+</td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="20%">
-The standard output of
-<I>command1</I>
-is connected via a pipe to the standard input of
-<I>command2</I>.
+<p><b>BASH_VERSINFO[</b>5<b>]</b></p></td>
+<td width="11%"></td>
+<td width="50%">
-This connection is performed before any redirections specified by the
-<I>command1</I>(see
-<FONT SIZE=-1><B>REDIRECTION</B>
+<p>The value of
+<b><small>MACHTYPE</small></b><small>.</small></p> </td>
+<td width="1%">
+</td></tr>
+</table>
-</FONT>
-below).
-If <B>|&</B> is the pipeline operator,
-<I>command1</I>'s standard error, in addition to its
-standard output, is connected to
-<I>command2</I>'s standard input through the pipe;
-it is shorthand for <B>2>&1 |</B>.
-This implicit redirection of the standard error to the standard output is
-performed after any redirections specified by <I>command1</I>.
-<P>
+<p style="margin-left:9%;"><b>BASH_VERSION</b></p>
-The return status of a pipeline is the exit status of the last
-command, unless the <B>pipefail</B> option is enabled.
-If <B>pipefail</B> is enabled, the pipeline's return status is the
-value of the last (rightmost) command to exit with a non-zero status,
-or zero if all commands exit successfully.
-If the reserved word
-<B>!</B>
+<p style="margin-left:18%;">Expands to a string describing
+the version of this instance of <b>bash</b> (e.g.,
+5.2.37(3)-release).</p>
-precedes a pipeline, the exit status of that pipeline is the logical
-negation of the exit status as described above.
-If a pipeline is executed synchronously,
-the shell waits for all commands in the pipeline to
-terminate before returning a value.
-<P>
+<p style="margin-left:9%;"><b>COMP_CWORD</b></p>
-If the
-<B>time</B>
+<p style="margin-left:18%;">An index into
+<b>${COMP_WORDS}</b> of the word containing the current
+cursor position. This variable is available only in shell
+functions invoked by the programmable completion facilities
+(see <b>Programmable Completion</b> below).</p>
-reserved word precedes a pipeline, the shell reports the
-elapsed as well as user and system time consumed by its execution
-when the pipeline terminates.
-The <B>-p</B> option changes the output format to that specified by
-<FONT SIZE=-1>POSIX</FONT>
-.
-When the shell is in posix mode, it does not recognize
-<B>time</B> as a reserved word if the next token begins with a
-
-The value of the
-<FONT SIZE=-1><B>TIMEFORMAT</B>
-
-</FONT>
-variable is a format string that specifies how the timing
-information should be displayed; see the description of
-<FONT SIZE=-1><B>TIMEFORMAT</B>
-
-</FONT>
-below under
-<B>Shell Variables</B>.
-
-<P>
+<p style="margin-left:9%;"><b>COMP_KEY</b></p>
-When the shell is in posix mode, <B>time</B>
-may appear by itself as the only word in a simple command.
-In this case, the shell displays the
-total user and system time consumed by the shell and its children.
-The
-<FONT SIZE=-1><B>TIMEFORMAT</B>
-
-</FONT>
-variable specifies the format of the time information.
-<P>
-
-Each command in a multi-command pipeline,
-where pipes are created,
-is executed in a <I>subshell</I>, which is a
-separate process.
-See
-<FONT SIZE=-1><B>COMMAND EXECUTION ENVIRONMENT</B>
+<p style="margin-left:18%;">The key (or final key of a key
+sequence) used to invoke the current completion function.
+This variable is available only in shell functions and
+external commands invoked by the programmable completion
+facilities (see <b>Programmable Completion</b> below).</p>
-</FONT>
-for a description of subshells and a subshell environment.
-If the <B>lastpipe</B> option is enabled using the <B>shopt</B> builtin
-(see the description of <B>shopt</B> below),
-and job control is not active,
-the last element of a pipeline may be run by the shell process.
-<A NAME="lbAN"> </A>
-<H4>Lists</H4>
+<p style="margin-left:9%;"><b>COMP_LINE</b></p>
-A <I>list</I> is a sequence of one or more pipelines separated by one
-of the operators
-<B>;</B>,
-
-<B>&</B>,
-
-<B>&&</B>,
-
-or
-<B>||</B>,
-
-and optionally terminated by one of
-<B>;</B>,
-
-<B>&</B>,
-
-or
-<B><newline></B>.
-
-<P>
-
-Of these list operators,
-<B>&&</B>
-
-and
-<B>||</B>
-
-have equal precedence, followed by
-<B>;</B>
-
-and
-<B>&</B>,
-
-which have equal precedence.
-<P>
-
-A sequence of one or more newlines may appear in a <I>list</I> instead
-of a semicolon to delimit commands.
-<P>
-
-If a command is terminated by the control operator
-<B>&</B>,
-
-the shell executes the command in the <I>background</I>
-in a subshell.
-The shell does not wait for the command to
-finish, and the return status is 0.
-These are referred to as <I>asynchronous</I> commands.
-Commands separated by a
-<B>;</B>
-
-are executed sequentially; the shell waits for each
-command to terminate in turn.
-The return status is the exit status of the last command executed.
-<P>
-
-AND and OR lists are sequences of one or more pipelines separated by the
-<B>&&</B> and <B>||</B> control operators, respectively.
-AND and OR lists are executed with left associativity.
-An AND list has the form
-<DL COMPACT><DT><DD>
-<P>
-
-<I>command1</I> <B>&&</B> <I>command2</I>
-</DL>
-
-<P>
-
-<I>command2</I>
-
-is executed if, and only if,
-<I>command1</I>
-
-returns an exit status of zero (success).
-<P>
-
-An OR list has the form
-<DL COMPACT><DT><DD>
-<P>
-
-<I>command1</I> <B>||</B> <I>command2</I>
-</DL>
-
-<P>
-
-<I>command2</I>
-
-is executed if, and only if,
-<I>command1</I>
-
-returns a non-zero exit status.
-The return status of
-AND and OR lists is the exit status of the last command
-executed in the list.
-<A NAME="lbAO"> </A>
-<H4>Compound Commands</H4>
-
-A <I>compound command</I> is one of the following.
-In most cases a <I>list</I> in a command's description may be separated from
-the rest of the command by one or more newlines, and may be followed by a
-newline in place of a semicolon.
-<DL COMPACT>
-<DT>(<I>list</I>)<DD>
-<I>list</I> is executed in a subshell (see
-<FONT SIZE=-1><B>COMMAND EXECUTION ENVIRONMENT</B>
-
-</FONT>
-below for a description of a subshell environment).
-Variable assignments and builtin
-commands that affect the shell's environment do not remain in effect
-after the command completes.
-The return status is the exit status of <I>list</I>.
-<DT>{ <I>list</I>; }<DD>
-<I>list</I> is executed in the current shell environment.
-<I>list</I> must be terminated with a newline or semicolon.
-This is known as a <I>group command</I>.
-The return status is the exit status of <I>list</I>.
-<DT><DD>
-Note that unlike the metacharacters <B>(</B> and <B>)</B>, <B>{</B> and
-<B>}</B> are <I>reserved words</I> and must occur where a reserved
-word is permitted to be recognized.
-Since they do not cause a word break, they must be separated from
-<I>list</I> by whitespace or another shell metacharacter.
-<DT>((<I>expression</I>))<DD>
-The arithmetic <I>expression</I> is evaluated according to the rules
-described below under
-<FONT SIZE=-1><B>ARITHMETIC EVALUATION</B>.
-
-</FONT>
-If the value of the expression is non-zero, the return status is 0;
-otherwise the return status is 1.
-The <I>expression</I>
-undergoes the same expansions
-as if it were within double quotes,
-but unescaped double quote characters
-in <I>expression</I> are not treated
-specially and are removed.
-Since this can potentially result in empty strings, this command treats
-those as expressions that evaluate to 0.
-<DT><B>[[</B> <I>expression</I> <B>]]</B><DD>
-
-Evaluate the conditional expression <I>expression</I>
-and return a status of zero (true) or non-zero (false).
-Expressions are composed of the primaries described below under
-<FONT SIZE=-1><B>CONDITIONAL EXPRESSIONS</B>.
-
-</FONT>
-The words between the <B>[[</B> and <B>]]</B> do not undergo word splitting
-and pathname expansion.
-The shell performs tilde expansion, parameter and
-variable expansion, arithmetic expansion, command substitution, process
-substitution, and quote removal on those words.
-Conditional operators such as <B>-f</B> must be unquoted to be recognized
-as primaries.
-<DT><DD>
-When used with <B>[[</B>, the <B><</B> and <B>></B> operators sort
-lexicographically using the current locale.
-<DT><DD>
-When the <B>==</B> and <B>!=</B> operators are used, the string to the
-right of the operator is considered a pattern and matched according
-to the rules described below under <B>Pattern Matching</B>,
-as if the <B>extglob</B> shell option were enabled.
-The <B>=</B> operator is equivalent to <B>==</B>.
-If the
-<B>nocasematch</B>
-
-shell option is enabled, the match is performed without regard to the case
-of alphabetic characters.
-The return value is 0 if the string matches (<B>==</B>) or does not match
-(<B>!=</B>) the pattern, and 1 otherwise.
-If any part of the pattern is quoted, the quoted portion is matched
-as a string: every character in the quoted portion matches itself,
-instead of having any special pattern matching meaning.
-<DT><DD>
-An additional binary operator, <B>=~</B>, is available, with the same
-precedence as <B>==</B> and <B>!=</B>.
-When it is used, the string to the right of the operator is considered
-a
-<FONT SIZE=-1>POSIX</FONT>
-extended regular expression and matched accordingly
-(using the
-<FONT SIZE=-1>POSIX</FONT>
-<I>regcomp</I> and <I>regexec</I> interfaces
-usually described in
-<I>regex</I>(3)).
-
-The return value is 0 if the string matches
-the pattern, and 1 otherwise.
-If the regular expression is syntactically incorrect, the conditional
-expression's return value is 2.
-If the
-<B>nocasematch</B>
-
-shell option is enabled, the match is performed without regard to the case
-of alphabetic characters.
-<DT><DD>
-If any part of the pattern is quoted, the quoted portion is matched literally,
-as above.
-If the pattern is stored in a shell variable, quoting the variable
-expansion forces the entire pattern to be matched literally.
-Treat bracket expressions in regular expressions carefully,
-since normal quoting and pattern characters lose their meanings
-between brackets.
-<DT><DD>
-The match succeeds if the pattern matches any part of the string.
-Anchor the pattern using the <B>^</B> and <B>$</B> regular expression
-operators to force it to match the entire string.
-<DT><DD>
-The array variable
-<FONT SIZE=-1><B>BASH_REMATCH</B>
-
-</FONT>
-records which parts of the string matched the pattern.
-The element of
-<FONT SIZE=-1><B>BASH_REMATCH</B>
-
-</FONT>
-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
-<FONT SIZE=-1><B>BASH_REMATCH</B>
-
-</FONT>
-indices.
-The element of
-<FONT SIZE=-1><B>BASH_REMATCH</B>
-
-</FONT>
-with index <I>n</I> is the portion of the
-string matching the <I>n</I>th parenthesized subexpression.
-<B>Bash</B> sets
-<FONT SIZE=-1><B>BASH_REMATCH</B>
-
-</FONT>
-in the global scope; declaring it as a local variable will lead to
-unexpected results.
-<DT><DD>
-Expressions may be combined using the following operators, listed
-in decreasing order of precedence:
-<DT><DD>
-<DL COMPACT><DT><DD>
-
-<DL COMPACT>
-<DT><B>( </B><I>expression</I> )
-
-<DD>
-Returns the value of <I>expression</I>.
-This may be used to override the normal precedence of operators.
-<DT><B>! </B><I>expression</I>
-
-<DD>
-True if
-<I>expression</I>
-
-is false.
-<DT><I>expression1</I> <B>&&</B> <I>expression2</I><DD>
-True if both
-<I>expression1</I>
-
-and
-<I>expression2</I>
-
-are true.
-<DT><I>expression1</I> <B>||</B> <I>expression2</I><DD>
-True if either
-<I>expression1</I>
-
-or
-<I>expression2</I>
-
-is true.
-
-</DL>
-<P>
-
-The <B>&&</B> and <B>||</B>
-operators do not evaluate <I>expression2</I> if the value of
-<I>expression1</I> is sufficient to determine the return value of
-the entire conditional expression.
-</DL>
-
-<DT><B>for</B> <I>name</I> [ [ <B>in</B> <I>word ...</I> ] ; ] <B>do</B> <I>list</I> ; <B>done</B><DD>
-First, expand The list of words following <B>in</B>, generating a list
-of items.
-Then, the variable <I>name</I> is set to each element of this list
-in turn, and <I>list</I> is executed each time.
-If the <B>in</B> <I>word</I> is omitted, the <B>for</B> command executes
-<I>list</I> once for each positional parameter that is set (see
-<FONT SIZE=-1><B>PARAMETERS</B>
-
-</FONT>
-below).
-The return status is the exit status of the last command that executes.
-If the expansion of the items following <B>in</B> results in an empty
-list, no commands are executed, and the return status is 0.
-<DT><B>for</B> (( <I>expr1</I> ; <I>expr2</I> ; <I>expr3</I> )) [;] <B>do</B> <I>list</I> ; <B>done</B><DD>
-First, evaluate the arithmetic expression <I>expr1</I> according
-to the rules described below under
-<FONT SIZE=-1><B>ARITHMETIC EVALUATION</B>.
-
-</FONT>
-Then, repeatedly evaluate the arithmetic expression <I>expr2</I>
-until it evaluates to zero.
-Each time <I>expr2</I> evaluates to a non-zero value,
-execute <I>list</I>
-and evaluate the arithmetic expression <I>expr3</I>.
-If any expression is omitted, it behaves as if it evaluates to 1.
-The return value is the exit status of the last command in <I>list</I>
-that is executed, or non-zero if any of the expressions is invalid.
-<DT><DD>
-Use the <B>break</B> and continue builtins
-(see
-<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
-
-</FONT>
-below)
-to control loop execution.
-<DT><B>select</B> <I>name</I> [ <B>in</B> <I>word</I> ] ; <B>do</B> <I>list</I> ; <B>done</B><DD>
-First, expand the list of words following <B>in</B>,
-generating a list of items, and print the set of expanded words
-the standard error, each preceded by a number.
-If the <B>in</B>
-<I>word</I> is omitted, print the positional parameters (see
-<FONT SIZE=-1><B>PARAMETERS</B>
-
-</FONT>
-below).
-<B>select</B>
-
-then displays the
-<FONT SIZE=-1><B>PS3</B>
-
-</FONT>
-prompt and reads a line from the standard input.
-If the line consists of a number corresponding to one of
-the displayed words, then <B>select</B> sets the value of
-<I>name</I>
-
-to that word.
-If the line is empty, <B>select</B> displays the words and prompt again.
-If EOF is read, <B>select</B> completes and returns 1.
-Any other value sets
-<I>name</I>
-
-to null.
-The line read is saved in the variable
-<FONT SIZE=-1><B>REPLY</B>.
-
-</FONT>
-The
-<I>list</I>
-
-is executed after each selection until a
-<B>break</B>
-
-command is executed.
-The exit status of
-<B>select</B>
-
-is the exit status of the last command executed in
-<I>list</I>,
-
-or zero if no commands were executed.
-<DT><B>case</B> <I>word</I> <B>in</B> [ [(] <I>pattern</I> [ <B>|</B> <I>pattern</I> ]
-.. ) <I>list</I> ;; ] ... <B>esac</B><DD>
-A <B>case</B> command first expands <I>word</I>, and tries to match
-it against each <I>pattern</I> in turn,
-proceeding from first to last,
-using the matching rules
-described under
-<B>Pattern Matching</B>
-
-below.
-A pattern list is a set of one or more patterns separated by ,
-and the ) operator terminates the pattern list.
-The <I>word</I> is expanded using tilde
-expansion, parameter and variable expansion, arithmetic expansion,
-command substitution, process substitution and quote removal.
-Each <I>pattern</I> examined is expanded using tilde
-expansion, parameter and variable expansion, arithmetic expansion,
-command substitution, process substitution, and quote removal.
-If the
-<B>nocasematch</B>
-
-shell option is enabled, the match is performed without regard to the case
-of alphabetic characters.
-A <I>clause</I> is a pattern list and an associated <I>list</I>.
-<DT><DD>
-When a match is found, <B>case</B> executes the corresponding <I>list</I>.
-If the <B>;;</B> operator terminates the case clause, the <B>case</B>
-command completes after the first match.
-Using <B>;&</B> in place of <B>;;</B> causes execution to continue with
-the <I>list</I> associated with the next pattern list.
-Using <B>;;&</B> in place of <B>;;</B> causes the shell to test the next
-pattern list in the statement, if any, and execute any associated <I>list</I>
-if the match succeeds,
-continuing the case statement execution as if the pattern list had not matched.
-The exit status is zero if no pattern matches.
-<DT><DD>
-Otherwise, it is the exit status of the
-last command executed in the last <I>list</I> executed.
-<DT><B>if</B> <I>list</I>; <B>then</B> <I>list</I>; [ <B>elif</B> <I>list</I>; <B>then</B> <I>list</I>; ] ... [ <B>else</B> <I>list</I>; ] <B>fi</B><DD>
-The
-<B>if</B>
-
-<I>list</I>
-
-is executed.
-If its exit status is zero, the
-<B>then</B> <I>list</I> is executed.
-Otherwise, each <B>elif</B> <I>list</I> is executed in turn,
-and if its exit status is zero, the corresponding <B>then</B> <I>list</I>
-is executed and the command completes.
-Otherwise, the <B>else</B> <I>list</I> is executed, if present.
-The exit status is the exit status of the
-last command executed, or zero if no condition tested true.
-<DT><B>while</B> <I>list-1</I>; <B>do</B> <I>list-2</I>; <B>done</B><DD>
-
-<DT><B>until</B> <I>list-1</I>; <B>do</B> <I>list-2</I>; <B>done</B><DD>
-
-The <B>while</B> command continuously executes the list
-<I>list-2</I> as long as the last command in the list <I>list-1</I> returns
-an exit status of zero.
-The <B>until</B> command is identical
-to the <B>while</B> command, except that the test is negated:
-<I>list-2</I>
-
-is executed as long as the last command in
-<I>list-1</I>
-
-returns a non-zero exit status.
-The exit status of the <B>while</B> and <B>until</B> commands
-is the exit status
-of the last command executed in <I>list-2</I>, or zero if
-none was executed.
-</DL>
-<A NAME="lbAP"> </A>
-<H4>Coprocesses</H4>
-
-A <I>coprocess</I> is a shell command preceded by the <B>coproc</B> reserved
-word.
-A coprocess is executed asynchronously in a subshell, as if the command
-had been terminated with the <B>&</B> control operator, with a two-way pipe
-established between the executing shell and the coprocess.
-<P>
-
-The syntax for a coprocess is:
-<DL COMPACT><DT><DD>
-<P>
-
-<B>coproc</B> [<I>NAME</I>] <I>command</I> [<I>redirections</I>]
-</DL>
-
-<P>
-
-This creates a coprocess named <I>NAME</I>.
-<I>command</I> may be either a simple command or a compound
-command (see above).
-<I>NAME</I> is a shell variable name.
-If <I>NAME</I> is not supplied, the default name is <B>COPROC</B>.
-<P>
-
-The recommended form to use for a coprocess is
-<DL COMPACT><DT><DD>
-<P>
-
-<B>coproc</B> <I>NAME</I> { <I>command</I> [<I>redirections</I>]; }
-</DL>
-
-<P>
-
-This form is preferred because simple commands result in the coprocess
-always being named <B>COPROC</B>, and it is simpler to use and more complete
-than the other compound commands.
-<P>
-
-If <I>command</I> is a compound command, <I>NAME</I> is optional. The
-word following <B>coproc</B> determines whether that word is interpreted
-as a variable name: it is interpreted as <I>NAME</I> if it is not a
-reserved word that introduces a compound command.
-If <I>command</I> is a simple command, <I>NAME</I> is not allowed; this
-is to avoid confusion between <I>NAME</I> and the first word of the simple
-command.
-<P>
-
-When the coprocess is executed, the shell creates an array variable (see
-<B>Arrays</B>
-
-below) named <I>NAME</I> in the context of the executing shell.
-The standard output of
-<I>command</I>
-
-is connected via a pipe to a file descriptor in the executing shell,
-and that file descriptor is assigned to <I>NAME</I>[0].
-The standard input of
-<I>command</I>
-
-is connected via a pipe to a file descriptor in the executing shell,
-and that file descriptor is assigned to <I>NAME</I>[1].
-This pipe is established before any redirections specified by the
-command (see
-<FONT SIZE=-1><B>REDIRECTION</B>
-
-</FONT>
-below).
-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.
-<P>
-
-The process ID of the shell spawned to execute the coprocess is
-available as the value of the variable <I>NAME</I>_PID.
-The <B>wait</B>
-builtin may be used to wait for the coprocess to terminate.
-<P>
-
-Since the coprocess is created as an asynchronous command,
-the <B>coproc</B> command always returns success.
-The return status of a coprocess is the exit status of <I>command</I>.
-<A NAME="lbAQ"> </A>
-<H4>Shell Function Definitions</H4>
-
-A shell function is an object that is called like a simple command and
-executes a compound command with a new set of positional parameters.
-Shell functions are declared as follows:
-<DL COMPACT>
-<DT><I>fname</I> () <I>compound-command</I> [<I>redirection</I>]<DD>
-
-<DT><B>function</B> <I>fname</I> [()] <I>compound-command</I> [<I>redirection</I>]<DD>
-
-This defines a function named <I>fname</I>.
-The reserved word <B>function</B> is optional.
-If the <B>function</B> reserved word is supplied, the parentheses are optional.
-The <I>body</I> of the function is the compound command
-<I>compound-command</I>
-
-(see <B>Compound Commands</B> above).
-That command is usually a <I>list</I> of commands between { and }, but
-may be any command listed under <B>Compound Commands</B> above.
-If the <B>function</B> reserved word is used, but the
-parentheses are not supplied, the braces are recommended.
-<I>compound-command</I> is executed whenever <I>fname</I> is specified as the
-name of a simple command.
-When in posix mode, <I>fname</I> must be a valid shell <I>name</I>
-and may not be the name of one of the
-<FONT SIZE=-1>POSIX</FONT>
-<I>special builtins</I>.
-In default mode, a function name can be any unquoted shell word that does
-not contain <B>$</B>.
-</DL>
-<P>
-
-Any redirections (see
-<FONT SIZE=-1><B>REDIRECTION</B>
-
-</FONT>
-below) specified when a function is defined are performed
-when the function is executed.
-<P>
-
-The exit status of a function definition is zero unless a syntax error
-occurs or a readonly function with the same name already exists.
-When executed, the exit status of a function is the exit status of the
-last command executed in the body. (See
-<FONT SIZE=-1><B>FUNCTIONS</B>
-
-</FONT>
-below.)
-<A NAME="lbAR"> </A>
-<H3>COMMENTS</H3>
-
-In a non-interactive shell, or an interactive shell in which the
-<B>interactive_comments</B>
-
-option to the
-<B>shopt</B>
-
-builtin is enabled (see
-<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
-
-</FONT>
-below), a word beginning with
-<B>#</B>
-
-introduces a comment.
-A word begins at the beginning of a line, after unquoted whitespace, or
-after an operator.
-The comment causes that word and all remaining characters on that line to
-be ignored.
-An interactive shell without the
-<B>interactive_comments</B>
-
-option enabled does not allow comments.
-The
-<B>interactive_comments</B>
-
-option is enabled by default in interactive shells.
-<A NAME="lbAS"> </A>
-<H3>QUOTING</H3>
-
-<I>Quoting</I> is used to remove the special meaning of certain
-characters or words to the shell.
-Quoting can be used to
-disable special treatment for special characters, to prevent
-reserved words from being recognized as such, and to prevent
-parameter expansion.
-<P>
+<p style="margin-left:18%;">The current command line. This
+variable is available only in shell functions and external
+commands invoked by the programmable completion facilities
+(see <b>Programmable Completion</b> below).</p>
-Each of the <I>metacharacters</I> listed above under
-<FONT SIZE=-1><B>DEFINITIONS</B>
+<p style="margin-left:9%;"><b>COMP_POINT</b></p>
-</FONT>
-has special meaning to the shell and must be quoted if it is to
-represent itself.
-<P>
+<p style="margin-left:18%;">The index of the current cursor
+position relative to the beginning of the current command.
+If the current cursor position is at the end of the current
+command, the value of this variable is equal to
+<b>${#COMP_LINE}</b>. This variable is available only in
+shell functions and external commands invoked by the
+programmable completion facilities (see <b>Programmable
+Completion</b> below).</p>
-When the command history expansion facilities are being used
-(see
-<FONT SIZE=-1><B>HISTORY EXPANSION</B>
+<p style="margin-left:9%;"><b>COMP_TYPE</b></p>
-</FONT>
-below), the
-<I>history expansion</I> character, usually <B>!</B>, must be quoted
-to prevent history expansion.
-<P>
+<p style="margin-left:18%;">Set to an integer value
+corresponding to the type of attempted completion that
+caused a completion function to be called: <i>TAB</i>, for
+normal completion, <i>?</i>, for listing completions after
+successive tabs, <i>!</i>, for listing alternatives on
+partial word completion, <i>@</i>, to list completions if
+the word is not unmodified, or <i>%</i>, for menu
+completion. This variable is available only in shell
+functions and external commands invoked by the programmable
+completion facilities (see <b>Programmable Completion</b>
+below).</p>
+
+<p style="margin-left:9%;"><b>COMP_WORDBREAKS</b></p>
+
+<p style="margin-left:18%;">The set of characters that the
+<b>readline</b> library treats as word separators when
+performing word completion. If
+<b><small>COMP_WORDBREAKS</small></b> is unset, it loses its
+special properties, even if it is subsequently reset.</p>
+
+<p style="margin-left:9%;"><b>COMP_WORDS</b></p>
+
+<p style="margin-left:18%;">An array variable (see
+<b>Arrays</b> below) consisting of the individual words in
+the current command line. The line is split into words as
+<b>readline</b> would split it, using
+<b><small>COMP_WORDBREAKS</small></b> as described above.
+This variable is available only in shell functions invoked
+by the programmable completion facilities (see
+<b>Programmable Completion</b> below).</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="8%">
+
+
+<p><b>COPROC</b></p></td>
+<td width="1%"></td>
+<td width="82%">
+
+
+<p>An array variable (see <b>Arrays</b> below) created to
+hold the file descriptors for output from and input to an
+unnamed coprocess (see <b>Coprocesses</b> above).</p></td></tr>
+</table>
+
+<p style="margin-left:9%;"><b>DIRSTACK</b></p>
+
+<p style="margin-left:18%;">An array variable (see
+<b>Arrays</b> below) containing the current contents of the
+directory stack. Directories appear in the stack in the
+order they are displayed by the <b>dirs</b> builtin.
+Assigning to members of this array variable may be used to
+modify directories already in the stack, but the
+<b>pushd</b> and <b>popd</b> builtins must be used to add
+and remove directories. Assigning to this variable does not
+change the current directory. If
+<b><small>DIRSTACK</small></b> is unset, it loses its
+special properties, even if it is subsequently reset.</p>
+
+<p style="margin-left:9%;"><b>EPOCHREALTIME</b></p>
+
+<p style="margin-left:18%;">Each time this parameter is
+referenced, it expands to the number of seconds since the
+Unix Epoch (see <i>time</i>(3)) as a floating-point value
+with micro-second granularity. Assignments to
+<b><small>EPOCHREALTIME</small></b> are ignored. If
+<b><small>EPOCHREALTIME</small></b> is unset, it loses its
+special properties, even if it is subsequently reset.</p>
+
+<p style="margin-left:9%;"><b>EPOCHSECONDS</b></p>
+
+<p style="margin-left:18%;">Each time this parameter is
+referenced, it expands to the number of seconds since the
+Unix Epoch (see <i>time</i>(3)). Assignments to
+<b><small>EPOCHSECONDS</small></b> are ignored. If
+<b><small>EPOCHSECONDS</small></b> is unset, it loses its
+special properties, even if it is subsequently reset.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="5%">
+
+
+<p><b>EUID</b></p></td>
+<td width="4%"></td>
+<td width="82%">
+
+
+<p>Expands to the effective user ID of the current user,
+initialized at shell startup. This variable is readonly.</p></td></tr>
+</table>
+
+<p style="margin-left:9%;"><b>FUNCNAME</b></p>
+
+<p style="margin-left:18%;">An array variable containing
+the names of all shell functions currently in the execution
+call stack. The element with index 0 is the name of any
+currently-executing shell function. The bottom-most element
+(the one with the highest index) is “main”. This
+variable exists only when a shell function is executing.
+Assignments to <b><small>FUNCNAME</small></b> have no
+effect. If <b><small>FUNCNAME</small></b> is unset, it loses
+its special properties, even if it is subsequently
+reset.</p>
+
+<p style="margin-left:18%; margin-top: 1em">This variable
+can be used with <b><small>BASH_LINENO</small></b> and
+<b><small>BASH_SOURCE</small></b><small>.</small> Each
+element of <b><small>FUNCNAME</small></b> has corresponding
+elements in <b><small>BASH_LINENO</small></b> and
+<b><small>BASH_SOURCE</small></b> to describe the call
+stack. For instance, <b>${FUNCNAME[</b><i>$i</i><b>]}</b>
+was called from the file
+<b>${BASH_SOURCE[</b><i>$i+1</i><b>]}</b> at line number
+<b>${BASH_LINENO[</b><i>$i</i><b>]}</b>. The <b>caller</b>
+builtin displays the current call stack using this
+information.</p>
-There are four quoting mechanisms: the
-<I>escape character</I>,
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="8%">
-single quotes, double quotes,
-and dollar-single quotes.
-<P>
-A non-quoted backslash (<B>\</B>) is the
-<I>escape character</I>.
+<p><b>GROUPS</b></p></td>
+<td width="1%"></td>
+<td width="82%">
-It preserves the literal value of the next character that follows,
-removing any special meaning it has,
-with the exception of <newline>.
-If a <B>\</B><newline> pair appears, and the backslash is not itself quoted,
-the <B>\</B><newline> is treated as a line continuation (that is, it is
-removed from the input stream and effectively ignored).
-<P>
-Enclosing characters in single quotes preserves the literal value
-of each character within the quotes.
-A single quote may not occur
-between single quotes, even when preceded by a backslash.
-<P>
+<p>An array variable containing the list of groups of which
+the current user is a member. Assignments to
+<b><small>GROUPS</small></b> have no effect. If
+<b><small>GROUPS</small></b> is unset, it loses its special
+properties, even if it is subsequently reset.</p></td></tr>
+</table>
-Enclosing characters in double quotes preserves the literal value
-of all characters within the quotes, with the exception of
-<B>$</B>,
+<p style="margin-left:9%;"><b>HISTCMD</b></p>
-<B>`</B>,
+<p style="margin-left:18%;">The history number, or index in
+the history list, of the current command. Assignments to
+<b><small>HISTCMD</small></b> have no effect. If
+<b><small>HISTCMD</small></b> is unset, it loses its special
+properties, even if it is subsequently reset.</p>
-<B>\</B>,
+<p style="margin-left:9%;"><b>HOSTNAME</b></p>
-and, when history expansion is enabled,
-<B>!</B>.
+<p style="margin-left:18%;">Automatically set to the name
+of the current host.</p>
-When the shell is in posix mode,
-the <B>!</B> has no special meaning
-within double quotes, even when history expansion is enabled.
-The characters
-<B>$</B>
+<p style="margin-left:9%;"><b>HOSTTYPE</b></p>
-and
-<B>`</B>
+<p style="margin-left:18%;">Automatically set to a string
+that uniquely describes the type of machine on which
+<b>bash</b> is executing. The default is
+system-dependent.</p>
-retain their special meaning within double quotes.
-The backslash retains its special meaning only when followed by one of
-the following characters:
-<B>$</B>,
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="8%">
-<B>`</B>,
-<B>"
-</B>,
-<B>\</B>,
+<p><b>LINENO</b></p></td>
+<td width="1%"></td>
+<td width="82%">
-or
-<B><newline></B>.
-Backslashes preceding characters without a
-special meaning are left unmodified.
-<P>
+<p>Each time this parameter is referenced, the shell
+substitutes a decimal number representing the current
+sequential line number (starting with 1) within a script or
+function. When not in a script or function, the value
+substituted is not guaranteed to be meaningful. If
+<b><small>LINENO</small></b> is unset, it loses its special
+properties, even if it is subsequently reset.</p></td></tr>
+</table>
-A double quote may be quoted within double quotes by preceding it with
-a backslash.
-If enabled, history expansion will be performed unless an
-<B>!</B>
-
-appearing in double quotes is escaped using a backslash.
-The backslash preceding the
-<B>!</B>
-
-is not removed.
-<P>
+<p style="margin-left:9%;"><b>MACHTYPE</b></p>
-The special parameters
-<B>*</B>
+<p style="margin-left:18%;">Automatically set to a string
+that fully describes the system type on which <b>bash</b> is
+executing, in the standard GNU <i>cpu-company-system</i>
+format. The default is system-dependent.</p>
-and
-<B>@</B>
+<p style="margin-left:9%;"><b>MAPFILE</b></p>
-have special meaning when in double quotes
-(see
-<FONT SIZE=-1><B>PARAMETERS</B>
+<p style="margin-left:18%;">An array variable (see
+<b>Arrays</b> below) created to hold the text read by the
+<b>mapfile</b> builtin when no variable name is
+supplied.</p>
-</FONT>
-below).
-<P>
-
-Character sequences of the form <B>$</B>'<I>string</I>' are treated
-as a special variant of single quotes.
-The sequence expands to <I>string</I>, with backslash-escaped characters
-in <I>string</I> replaced as specified by the ANSI C standard.
-Backslash escape sequences, if present, are decoded as follows:
-<DL COMPACT><DT><DD>
-
-<DL COMPACT>
-<DT><B>\a</B>
-
-<DD>
-alert (bell)
-<DT><B>\b</B>
-
-<DD>
-backspace
-<DT><B>\e</B>
-
-<DD>
-<DT><B>\E</B>
-
-<DD>
-an escape character
-<DT><B>\f</B>
-
-<DD>
-form feed
-<DT><B>\n</B>
-
-<DD>
-new line
-<DT><B>\r</B>
-
-<DD>
-carriage return
-<DT><B>\t</B>
-
-<DD>
-horizontal tab
-<DT><B>\v</B>
-
-<DD>
-vertical tab
-<DT><B>\\</B>
-
-<DD>
-backslash
-<DT><B>\'</B>
-
-<DD>
-single quote
-<DT><B>\</B>
-
-<DD>
-double quote
-<DT><B>\?</B>
-
-<DD>
-question mark
-<DT><B>\</B><I>nnn</I>
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="8%">
-<DD>
-The eight-bit character whose value is the octal value <I>nnn</I>
-(one to three octal digits).
-<DT><B>\x</B><I>HH</I>
-
-<DD>
-The eight-bit character whose value is the hexadecimal value <I>HH</I>
-(one or two hex digits).
-<DT><B>\u</B><I>HHHH</I>
-
-<DD>
-The Unicode (ISO/IEC 10646) character whose value is the hexadecimal value
-<I>HHHH</I> (one to four hex digits).
-<DT><B>\U</B><I>HHHHHHHH</I>
-<DD>
-The Unicode (ISO/IEC 10646) character whose value is the hexadecimal value
-<I>HHHHHHHH</I> (one to eight hex digits).
-<DT><B>\c</B><I>x</I>
+<p><b>OLDPWD</b></p></td>
+<td width="1%"></td>
+<td width="82%">
-<DD>
-A control-<I>x</I> character.
-</DL></DL>
+<p>The previous working directory as set by the <b>cd</b>
+command.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="8%">
-<P>
-The expanded result is single-quoted, as if the dollar sign had
-not been present.
-<A NAME="lbAT"> </A>
-<H4>Translating Strings</H4>
-
-A double-quoted string preceded by a dollar sign (<B>$</B>"
-<I>string</I>"
-)
-causes the string to be translated according to the current locale.
-The <I>gettext</I> infrastructure performs the lookup and
-translation, using the <B>LC_MESSAGES</B>, <B>TEXTDOMAINDIR</B>,
-and <B>TEXTDOMAIN</B> shell variables.
-If the current locale is <B>C</B> or <B>POSIX</B>,
-if there are no translations available,
-or if the string is not translated, the dollar sign is ignored,
-and the string is treated as double-quoted as described above.
-This is a form of double quoting, so the string remains double-quoted
-by default, whether or not it is translated and replaced.
-If the <B>noexpand_translation</B> option is enabled
-using the <B>shopt</B> builtin,
-translated strings are single-quoted instead of double-quoted.
-See the description of
-<B>shopt</B>
+<p><b>OPTARG</b></p></td>
+<td width="1%"></td>
+<td width="82%">
-below under
-<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>.
-</FONT>
-<A NAME="lbAU"> </A>
-<H3>PARAMETERS</H3>
+<p>The value of the last option argument processed by the
+<b>getopts</b> builtin command (see <b><small>SHELL BUILTIN
+COMMANDS</small></b> below).</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="8%">
-A
-<I>parameter</I>
-
-is an entity that stores values.
-It can be a
-<I>name</I>,
-
-a number, or one of the special characters listed below under
-<B>Special Parameters</B>.
-A
-<I>variable</I>
+<p><b>OPTIND</b></p></td>
+<td width="1%"></td>
+<td width="82%">
-is a parameter denoted by a
-<I>name</I>.
-A variable has a <I>value</I> and zero or more <I>attributes</I>.
-Attributes are assigned using the
-<B>declare</B>
+<p>The index of the next argument to be processed by the
+<b>getopts</b> builtin command (see <b><small>SHELL BUILTIN
+COMMANDS</small></b> below).</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="8%">
-builtin command (see
-<B>declare</B>
-
-below in
-<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>).
-</FONT>
-The <B>export</B> and <B>readonly</B> builtins assign specific attributes.
-<P>
+<p><b>OSTYPE</b></p></td>
+<td width="1%"></td>
+<td width="82%">
-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 the
-<B>unset</B>
-
-builtin command (see
-<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
-</FONT>
-below).
-<P>
+<p>Automatically set to a string that describes the
+operating system on which <b>bash</b> is executing. The
+default is system-dependent.</p></td></tr>
+</table>
-A
-<I>variable</I>
+<p style="margin-left:9%;"><b>PIPESTATUS</b></p>
-is assigned to using a statement of the form
-<DL COMPACT><DT><DD>
-<P>
+<p style="margin-left:18%;">An array variable (see
+<b>Arrays</b> below) containing a list of exit status values
+from the commands in the most-recently-executed foreground
+pipeline, which may consist of only a simple command (see
+<b><small>SHELL GRAMMAR</small></b> above). <b>Bash</b> sets
+<b><small>PIPESTATUS</small></b> after executing
+multi-element pipelines, timed and negated pipelines, simple
+commands, subshells created with the ( operator, the
+<b>[[</b> and <b>((</b> compound commands, and after error
+conditions that result in the shell aborting command
+execution.</p>
-<I>name</I>=[<I>value</I>]
-</DL>
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="8%">
-<P>
-If
-<I>value</I>
+<p><b>PPID</b></p></td>
+<td width="1%"></td>
+<td width="82%">
-is not given, the variable is assigned the null string.
-All
-<I>values</I>
-undergo tilde expansion, parameter and variable expansion,
-command substitution, arithmetic expansion, and quote
-removal (see
-<FONT SIZE=-1><B>EXPANSION</B>
+<p>The process ID of the shell’s parent. This
+variable is readonly.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="8%">
-</FONT>
-below).
-If the variable has its
-<B>integer</B>
-
-attribute set, then
-<I>value</I>
-
-is evaluated as an arithmetic expression even if the
-<B>$((</B>...<B>))</B>
-
-expansion is not used (see
-<B>Arithmetic Expansion</B>
-
-below).
-Word splitting and pathname expansion are not performed.
-Assignment statements may also appear as arguments to the
-<B>alias</B>,
-
-<B>declare</B>,
-
-<B>typeset</B>,
-
-<B>export</B>,
-
-<B>readonly</B>,
-
-and
-<B>local</B>
-
-builtin commands (<I>declaration</I> commands).
-When in posix mode, these builtins may appear in a command after
-one or more instances of the <B>command</B> builtin and retain these
-assignment statement properties.
-<P>
-
-In the context where an assignment statement is assigning a value
-to a shell variable or array index, the
-
-operator appends to or adds to
-the variable's previous value.
-This includes arguments to <I>declaration</I> commands such as
-<B>declare</B>
-
-that accept assignment statements.
-When
-
-is applied to a variable for which the
-<B>integer</B>
-
-attribute has been set,
-the variable's current value and <I>value</I> are each evaluated as
-arithmetic expressions,
-and the sum of the results is assigned as the variable's value.
-The current value is usually an integer constant, but may be an expression.
-When
-
-is applied to an array variable using compound assignment
-(see
-<B>Arrays</B>
-
-below),
-the variable's value is not unset
-(as it is when using
-
-and new values are appended to the array
-beginning at one greater than the array's maximum index (for indexed arrays)
-or added as additional key-value pairs in an associative array.
-When applied to a string-valued variable, <I>value</I> is expanded and
-appended to the variable's value.
-<P>
-
-A variable can be assigned the <I>nameref</I> attribute using the
-<B>-n</B> option to the <B>declare</B> or <B>local</B> builtin commands
-(see the descriptions of <B>declare</B> and <B>local</B> below)
-to create a <I>nameref</I>, 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 <I>nameref</I>
-attribute itself), the
-operation is actually performed on the variable specified by the nameref
-variable's value.
-A nameref is commonly used within 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
-<P>
-
-<DL COMPACT><DT><DD>
-
-declare -n ref=$1
-
-</DL>
-
-<P>
-
-inside the function creates a local nameref variable <B>ref</B> whose value
-is the variable name passed as the first argument.
-References and assignments to <B>ref</B>, and changes to its attributes,
-are treated as references, assignments, and attribute modifications
-to the variable whose name was passed as <B>$1</B>.
-If the control variable in a <B>for</B> loop has the nameref attribute,
-the list of words can be a list of shell variables, and a name reference
-is established for each word in the list, in turn, when the loop is
-executed.
-Array variables cannot be given the <B>nameref</B> attribute.
-However, nameref variables can reference array variables and subscripted
-array variables.
-Namerefs can be unset using the <B>-n</B> option to the <B>unset</B> builtin.
-Otherwise, if <B>unset</B> is executed with the name of a nameref variable
-as an argument, the variable referenced by the nameref variable is unset.
-<P>
-
-When the shell starts, it reads its environment and creates a shell
-variable from each environment variable that has a valid name,
-as described below
-(see
-<FONT SIZE=-1><B>ENVIRONMENT</B>).
-
-</FONT>
-<A NAME="lbAV"> </A>
-<H4>Positional Parameters</H4>
-
-A
-<I>positional parameter</I>
-
-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
-<B>set</B>
-
-builtin command.
-Positional parameters may not be assigned to
-with assignment statements.
-The positional parameters are
-temporarily replaced when a shell function is executed (see
-<FONT SIZE=-1><B>FUNCTIONS</B>
-
-</FONT>
-below).
-<P>
-
-When a positional parameter consisting of more than a single
-digit is expanded, it must be enclosed in braces (see
-<FONT SIZE=-1><B>EXPANSION</B>
-
-</FONT>
-below).
-Without braces, a digit following $ can only refer to
-one of the first nine positional parameters (<B>$1-$9</B>) or the
-special parameter <B>$0</B> (see the next section).
-<A NAME="lbAW"> </A>
-<H4>Special Parameters</H4>
-
-The shell treats several parameters specially.
-These parameters may only be referenced; assignment to them is
-not allowed.
-Special parameters are denoted by one of the following characters.
-<DL COMPACT>
-<DT>
-<DD>
-<B>*</B>
-
-(<B>$*</B>) Expands to the positional parameters, starting from one.
-When the expansion is not within double quotes, each positional parameter
-expands to a separate word.
-In contexts where word expansions are performed, those words
-are subject to further word splitting and pathname expansion.
-When the expansion occurs within double quotes, it expands to a
-single word with the value of each parameter separated by the first
-character of the
-<FONT SIZE=-1><B>IFS</B>
-
-</FONT>
-variable.
-That is,
-<B>$*</B>
-
-is equivalent to
-<B>$1</B><I>c</I>$2<I>c</I>...,
-
-where
-<I>c</I>
-
-is the first character of the value of the
-<FONT SIZE=-1><B>IFS</B>
-
-</FONT>
-variable.
-If
-<FONT SIZE=-1><B>IFS</B>
-
-</FONT>
-is unset, the parameters are separated by spaces.
-If
-<FONT SIZE=-1><B>IFS</B>
-
-</FONT>
-is null, the parameters are joined without intervening separators.
-<DT><B>@</B>
-
-<DD>
-(<B>$@</B>) Expands to the positional parameters, starting from one.
-In contexts where word splitting is performed, this expands each
-positional parameter to a separate word; if not within double
-quotes, these words are subject to word splitting.
-In contexts where word splitting is not performed,
-such as the value portion of an assignment statement,
-this expands to a single word
-with each positional parameter separated by a space.
-When the expansion occurs within double quotes,
-and word splitting is performed,
-each parameter expands to a separate word.
-That is,
-<B>$@</B>
-
-is equivalent to
-<B>$1 $2 ...</B>
-
-If the double-quoted expansion occurs within a word, the expansion of
-the first parameter is joined with the expansion of the
-beginning part of the original word,
-and the expansion of the last parameter is joined with the
-expansion of the last part of the original word.
-When there are no positional parameters,
-<B>$@</B>
-
-and
-<B>$@</B>
-
-expand to nothing (i.e., they are removed).
-<DT><B>#</B>
-
-<DD>
-(<B>$#</B>) Expands to the number of positional parameters in decimal.
-<DT><B>?</B>
-
-<DD>
-(<B>$?</B>) Expands to the exit status of the most recently executed command.
-<DT><B>-</B>
-
-<DD>
-(<B>$-</B>) Expands to the current option flags as specified upon invocation,
-by the
-<B>set</B>
-
-builtin command, or those set by the shell itself
-(such as the
-<B>-i</B>
-
-option).
-<DT><B>$</B>
-
-<DD>
-(<B>$$</B>) Expands to the process ID of the shell.
-In a subshell, it expands to the process ID of the parent shell,
-not the subshell.
-<DT><B>!</B>
-
-<DD>
-(<B>$!</B>)Expands to the process ID of the job most recently placed into the
-background, whether executed as an asynchronous command or using
-the <B>bg</B> builtin (see
-<FONT SIZE=-1><B>JOB CONTROL</B>
-
-</FONT>
-below).
-<DT><B>0</B>
-
-<DD>
-(<B>$0</B>) Expands to the name of the shell or shell script.
-This is set at shell initialization.
-If <B>bash</B> is invoked with a file of commands,
-<B>$0</B>
-
-is set to the name of that file.
-If <B>bash</B> is started with the
-<B>-c</B>
-
-option, then
-<B>$0</B>
-
-is set to the first argument after the string to be
-executed, if one is present.
-Otherwise, it is set to the filename used to invoke
-<B>bash</B>,
-
-as given by argument zero.
-
-</DL>
-<A NAME="lbAX"> </A>
-<H4>Shell Variables</H4>
-
-The shell sets following variables:
-<P>
-
-
-<DL COMPACT>
-<DT><B>_</B>
-
-<DD>
-(<B>$_</B>, an underscore)
-This has a number of meanings depending on context.
-At shell startup, <B>_</B> is set to the pathname used to invoke the
-shell or shell script being executed as passed in the environment
-or argument list.
-Subsequently, it expands to the last argument to the previous simple
-command executed in the foreground, after expansion.
-It is also set to the full pathname used to invoke each command executed
-and placed in the environment exported to that command.
-When checking mail, <B>$_</B> expands to the name of the mail file
-currently being checked.
-<DT><B>BASH</B>
-
-<DD>
-Expands to the full filename used to invoke this instance of
-<B>bash</B>.
-
-<DT><B>BASHOPTS</B>
-
-<DD>
-A colon-separated list of enabled shell options. Each word in
-the list is a valid argument for the
-<B>-s</B>
-
-option to the
-<B>shopt</B>
-
-builtin command (see
-<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
-
-</FONT>
-below).
-The options appearing in
-<FONT SIZE=-1><B>BASHOPTS</B>
-
-</FONT>
-are those reported as
-<I>on</I>
-
-by <B>shopt</B>.
-If this variable is in the environment when
-<B>bash</B>
-
-starts up, the shell enables each option in the list before
-reading any startup files.
-If this variable is exported, child shells will enable each option
-in the list.
-This variable is read-only.
-<DT><B>BASHPID</B>
-
-<DD>
-Expands to the process ID of the current <B>bash</B> process.
-This differs from <B>$$</B> under certain circumstances, such as subshells
-that do not require <B>bash</B> to be re-initialized.
-Assignments to
-<FONT SIZE=-1><B>BASHPID</B>
-
-</FONT>
-have no effect.
-If
-<FONT SIZE=-1><B>BASHPID</B>
-
-</FONT>
-is unset, it loses its special properties, even if it is
-subsequently reset.
-<DT><B>BASH_ALIASES</B>
-
-<DD>
-An associative array variable whose members correspond to the internal
-list of aliases as maintained by the <B>alias</B> builtin.
-Elements added to this array appear in the alias list; however,
-unsetting array elements currently does not remove aliases
-from the alias list.
-If
-<FONT SIZE=-1><B>BASH_ALIASES</B>
-
-</FONT>
-is unset, it loses its special properties, even if it is
-subsequently reset.
-<DT><B>BASH_ARGC</B>
-
-<DD>
-An array variable whose values are the number of parameters in each
-frame of the current <B>bash</B> execution call stack.
-The number of parameters to the current subroutine (shell function or
-script executed with <B>.</B> or <B>source</B>) is at the top of the stack.
-When a subroutine is executed, the number of parameters passed is pushed onto
-<FONT SIZE=-1><B>BASH_ARGC</B>.
-
-</FONT>
-The shell sets
-<FONT SIZE=-1><B>BASH_ARGC</B>
-
-</FONT>
-only when in extended debugging mode (see the description of the
-<B>extdebug</B>
-
-option to the
-<B>shopt</B>
-
-builtin below).
-Setting <B>extdebug</B> after the shell has started to execute a script,
-or referencing this variable when <B>extdebug</B> is not set,
-may result in inconsistent values.
-Assignments to
-<FONT SIZE=-1><B>BASH_ARGC</B>
-
-</FONT>
-have no effect, and it may not be unset.
-<DT><B>BASH_ARGV</B>
-
-<DD>
-An array variable containing all of the parameters in the current <B>bash</B>
-execution call stack.
-The final parameter of the last subroutine call is at the top of the stack;
-the first parameter of the initial call is at the bottom.
-When a subroutine is executed, the shell pushes the supplied parameters onto
-<FONT SIZE=-1><B>BASH_ARGV</B>.
-
-</FONT>
-The shell sets
-<FONT SIZE=-1><B>BASH_ARGV</B>
-
-</FONT>
-only when in extended debugging mode
-(see the description of the
-<B>extdebug</B>
-
-option to the
-<B>shopt</B>
-
-builtin below).
-Setting <B>extdebug</B> after the shell has started to execute a script,
-or referencing this variable when <B>extdebug</B> is not set,
-may result in inconsistent values.
-Assignments to
-<FONT SIZE=-1><B>BASH_ARGV</B>
-
-</FONT>
-have no effect, and it may not be unset.
-<DT><B>BASH_ARGV0</B>
-
-<DD>
-When referenced, this variable expands to the name of the shell or shell
-script (identical to
-<B>$0</B>;
-
-see the description of special parameter 0 above).
-Assigning a value to
-<FONT SIZE=-1><B>BASH_ARGV0</B>
-
-</FONT>
-sets <B>$0</B> to the same value.
-If
-<FONT SIZE=-1><B>BASH_ARGV0</B>
-
-</FONT>
-is unset, it loses its special properties, even if it is
-subsequently reset.
-<DT><B>BASH_CMDS</B>
-
-<DD>
-An associative array variable whose members correspond to the internal
-hash table of commands as maintained by the <B>hash</B> builtin.
-Adding elements to this array makes them appear in the hash table; however,
-unsetting array elements currently does not remove command names
-from the hash table.
-If
-<FONT SIZE=-1><B>BASH_CMDS</B>
-
-</FONT>
-is unset, it loses its special properties, even if it is
-subsequently reset.
-<DT><B>BASH_COMMAND</B>
-
-<DD>
-Expands to the command currently being executed or about to be executed,
-unless the shell is executing a command as the result of a trap,
-in which case it is the command executing at the time of the trap.
-If
-<FONT SIZE=-1><B>BASH_COMMAND</B>
-
-</FONT>
-is unset, it loses its special properties, even if it is
-subsequently reset.
-<DT><B>BASH_EXECUTION_STRING</B>
-
-<DD>
-The command argument to the <B>-c</B> invocation option.
-<DT><B>BASH_LINENO</B>
-
-<DD>
-An array variable whose members are the line numbers in source files
-where each corresponding member of
-<FONT SIZE=-1><B>FUNCNAME</B>
-
-</FONT>
-was invoked.
-<B>${BASH_LINENO[</B><I>$i</I><B>]}</B>
-is the line number in the source file
-(<B>${BASH_SOURCE[</B><I>$i+1</I><B>]}</B>)
-where
-<B>${FUNCNAME[</B><I>$i</I><B>]}</B>
-was called
-(or <B>${BASH_LINENO[</B><I>$i-1</I><B>]}</B> if referenced within another
-shell function).
-Use
-<FONT SIZE=-1><B>LINENO</B>
-
-</FONT>
-to obtain the current line number.
-Assignments to
-<FONT SIZE=-1><B>BASH_LINENO</B>
-
-</FONT>
-have no effect, and it may not be unset.
-<DT><B>BASH_LOADABLES_PATH</B>
-
-<DD>
-A colon-separated list of directories in which the
-<B>enable</B>
-
-command
-looks for
-dynamically loadable builtins.
-<DT><B>BASH_MONOSECONDS</B>
-
-<DD>
-Each time this variable is referenced, it expands to the value returned
-by the system's monotonic clock, if one is available.
-If there is no monotonic clock, this is equivalent to <B>EPOCHSECONDS</B>.
-If
-<FONT SIZE=-1><B>BASH_MONOSECONDS</B>
-
-</FONT>
-is unset, it loses its special properties, even if it is
-subsequently reset.
-<DT><B>BASH_REMATCH</B>
-
-<DD>
-An array variable whose members are assigned by the <B>=~</B> binary
-operator to the <B>[[</B> conditional command.
-The element with index 0 is the portion of the string
-matching the entire regular expression.
-The element with index <I>n</I> is the portion of the
-string matching the <I>n</I>th parenthesized subexpression.
-<DT><B>BASH_SOURCE</B>
-
-<DD>
-An array variable whose members are the source filenames
-where the corresponding shell function names in the
-<FONT SIZE=-1><B>FUNCNAME</B>
-
-</FONT>
-array variable are defined.
-The shell function
-<B>${FUNCNAME[</B><I>$i</I><B>]}</B> is defined in the file
-<B>${BASH_SOURCE[</B><I>$i</I><B>]}</B> and called from
-<B>${BASH_SOURCE[</B><I>$i+1</I><B>]}</B>.
-Assignments to
-<FONT SIZE=-1><B>BASH_SOURCE</B>
-
-</FONT>
-have no effect, and it may not be unset.
-<DT><B>BASH_SUBSHELL</B>
-
-<DD>
-Incremented by one within each subshell or subshell environment when
-the shell begins executing in that environment.
-The initial value is 0.
-If
-<FONT SIZE=-1><B>BASH_SUBSHELL</B>
-
-</FONT>
-is unset, it loses its special properties, even if it is
-subsequently reset.
-<DT><B>BASH_TRAPSIG</B>
-
-<DD>
-Set to the signal number corresponding to the trap action being executed
-during its execution.
-See the description of <B>trap</B> under
-<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
-
-</FONT>
-below for information about signal numbers and trap execution.
-<DT><B>BASH_VERSINFO</B>
-
-<DD>
-A readonly array variable whose members hold version information for
-this instance of
-<B>bash</B>.
-
-The values assigned to the array members are as follows:
-</DL>
-<P>
-
-<DL COMPACT><DT><DD>
-<DL COMPACT>
-<DT><B>BASH_VERSINFO[</B>0]
-
-<DD>
-The major version number (the <I>release</I>).
-<DT><B>BASH_VERSINFO[</B>1]
-
-<DD>
-The minor version number (the <I>version</I>).
-<DT><B>BASH_VERSINFO[</B>2]
-
-<DD>
-The patch level.
-<DT><B>BASH_VERSINFO[</B>3]
-
-<DD>
-The build version.
-<DT><B>BASH_VERSINFO[</B>4]
-
-<DD>
-The release status (e.g., <I>beta</I>).
-<DT><B>BASH_VERSINFO[</B>5]
-
-<DD>
-The value of
-<FONT SIZE=-1><B>MACHTYPE</B>.
-
-</FONT>
-</DL></DL>
-
-<DL COMPACT>
-<DT><B>BASH_VERSION</B>
-
-<DD>
-Expands to a string describing the version of this instance of
-<B>bash</B>
-
-(e.g., 5.2.37(3)-release).
-<DT><B>COMP_CWORD</B>
-
-<DD>
-An index into <B>${COMP_WORDS}</B> of the word containing the current
-cursor position.
-This variable is available only in shell functions invoked by the
-programmable completion facilities (see <B>Programmable Completion</B>
-below).
-<DT><B>COMP_KEY</B>
-
-<DD>
-The key (or final key of a key sequence) used to invoke the current
-completion function.
-This variable is available only in shell functions and external
-commands invoked by the
-programmable completion facilities (see <B>Programmable Completion</B>
-below).
-<DT><B>COMP_LINE</B>
-
-<DD>
-The current command line.
-This variable is available only in shell functions and external
-commands invoked by the
-programmable completion facilities (see <B>Programmable Completion</B>
-below).
-<DT><B>COMP_POINT</B>
-
-<DD>
-The index of the current cursor position relative to the beginning of
-the current command.
-If the current cursor position is at the end of the current command,
-the value of this variable is equal to <B>${#COMP_LINE}</B>.
-This variable is available only in shell functions and external
-commands invoked by the
-programmable completion facilities (see <B>Programmable Completion</B>
-below).
-<DT><B>COMP_TYPE</B>
-
-<DD>
-Set to an integer value corresponding to the type of attempted completion
-that caused a completion function to be called:
-<I>TAB</I>, for normal completion,
-<I>?</I>, for listing completions after successive tabs,
-<I>!</I>, for listing alternatives on partial word completion,
-<I>@</I>, to list completions if the word is not unmodified,
-or
-<I>%</I>, for menu completion.
-This variable is available only in shell functions and external
-commands invoked by the
-programmable completion facilities (see <B>Programmable Completion</B>
-below).
-<DT><B>COMP_WORDBREAKS</B>
-
-<DD>
-The set of characters that the <B>readline</B> library treats as word
-separators when performing word completion.
-If
-<FONT SIZE=-1><B>COMP_WORDBREAKS</B>
-
-</FONT>
-is unset, it loses its special properties, even if it is
-subsequently reset.
-<DT><B>COMP_WORDS</B>
-
-<DD>
-An array variable (see <B>Arrays</B> below) consisting of the individual
-words in the current command line.
-The line is split into words as <B>readline</B> would split it, using
-<FONT SIZE=-1><B>COMP_WORDBREAKS</B>
-
-</FONT>
-as described above.
-This variable is available only in shell functions invoked by the
-programmable completion facilities (see <B>Programmable Completion</B>
-below).
-<DT><B>COPROC</B>
-
-<DD>
-An array variable (see <B>Arrays</B> below) created to hold the file descriptors
-for output from and input to an unnamed coprocess (see <B>Coprocesses</B>
-above).
-<DT><B>DIRSTACK</B>
-
-<DD>
-An array variable (see
-<B>Arrays</B>
-
-below) containing the current contents of the directory stack.
-Directories appear in the stack in the order they are displayed by the
-<B>dirs</B>
-
-builtin.
-Assigning to members of this array variable may be used to modify
-directories already in the stack, but the
-<B>pushd</B>
-
-and
-<B>popd</B>
-
-builtins must be used to add and remove directories.
-Assigning to this variable does not change the current directory.
-If
-<FONT SIZE=-1><B>DIRSTACK</B>
-
-</FONT>
-is unset, it loses its special properties, even if it is
-subsequently reset.
-<DT><B>EPOCHREALTIME</B>
-
-<DD>
-Each time this parameter is referenced, it expands to the number of seconds
-since the Unix Epoch (see
-<I>time</I>(3))
-
-as a floating-point value with micro-second granularity.
-Assignments to
-<FONT SIZE=-1><B>EPOCHREALTIME</B>
-
-</FONT>
-are ignored.
-If
-<FONT SIZE=-1><B>EPOCHREALTIME</B>
-
-</FONT>
-is unset, it loses its special properties, even if it is
-subsequently reset.
-<DT><B>EPOCHSECONDS</B>
-
-<DD>
-Each time this parameter is referenced, it expands to the number of seconds
-since the Unix Epoch (see
-<I>time</I>(3)).
-
-Assignments to
-<FONT SIZE=-1><B>EPOCHSECONDS</B>
-
-</FONT>
-are ignored.
-If
-<FONT SIZE=-1><B>EPOCHSECONDS</B>
-
-</FONT>
-is unset, it loses its special properties, even if it is
-subsequently reset.
-<DT><B>EUID</B>
-
-<DD>
-Expands to the effective user ID of the current user, initialized at
-shell startup. This variable is readonly.
-<DT><B>FUNCNAME</B>
-
-<DD>
-
-An array variable containing the names of all shell functions
-currently in the execution call stack.
-The element with index 0 is the name of any currently-executing
-shell function.
-The bottom-most element (the one with the highest index) is
-
-This variable exists only when a shell function is executing.
-Assignments to
-<FONT SIZE=-1><B>FUNCNAME</B>
-
-</FONT>
-have no effect.
-If
-<FONT SIZE=-1><B>FUNCNAME</B>
-
-</FONT>
-is unset, it loses its special properties, even if it is
-subsequently reset.
-<DT><DD>
-This variable can be used with
-<FONT SIZE=-1><B>BASH_LINENO</B>
-
-</FONT>
-and
-<FONT SIZE=-1><B>BASH_SOURCE</B>.
-
-</FONT>
-Each element of
-<FONT SIZE=-1><B>FUNCNAME</B>
-
-</FONT>
-has corresponding elements in
-<FONT SIZE=-1><B>BASH_LINENO</B>
-
-</FONT>
-and
-<FONT SIZE=-1><B>BASH_SOURCE</B>
-
-</FONT>
-to describe the call stack.
-For instance,
-<B>${FUNCNAME[</B><I>$i</I><B>]}</B>
-was called from the file
-<B>${BASH_SOURCE[</B><I>$i+1</I><B>]}</B>
-at line number
-<B>${BASH_LINENO[</B><I>$i</I><B>]}</B>.
-The <B>caller</B> builtin displays the current call stack using this
-information.
-
-<DT><B>GROUPS</B>
-
-<DD>
-An array variable containing the list of groups of which the current
-user is a member.
-Assignments to
-<FONT SIZE=-1><B>GROUPS</B>
-
-</FONT>
-have no effect.
-If
-<FONT SIZE=-1><B>GROUPS</B>
-
-</FONT>
-is unset, it loses its special properties, even if it is
-subsequently reset.
-<DT><B>HISTCMD</B>
-
-<DD>
-The history number, or index in the history list, of the current
-command.
-Assignments to
-<FONT SIZE=-1><B>HISTCMD</B>
-
-</FONT>
-have no effect.
-If
-<FONT SIZE=-1><B>HISTCMD</B>
-
-</FONT>
-is unset, it loses its special properties, even if it is
-subsequently reset.
-<DT><B>HOSTNAME</B>
-
-<DD>
-Automatically set to the name of the current host.
-<DT><B>HOSTTYPE</B>
-
-<DD>
-Automatically set to a string that uniquely
-describes the type of machine on which
-<B>bash</B>
-
-is executing.
-The default is system-dependent.
-<DT><B>LINENO</B>
-
-<DD>
-Each time this parameter is referenced, the shell substitutes
-a decimal number representing the current sequential line number
-(starting with 1) within a script or function.
-When not in a script or function, the value substituted is not
-guaranteed to be meaningful.
-If
-<FONT SIZE=-1><B>LINENO</B>
-
-</FONT>
-is unset, it loses its special properties, even if it is
-subsequently reset.
-<DT><B>MACHTYPE</B>
-
-<DD>
-Automatically set to a string that fully describes the system
-type on which
-<B>bash</B>
-
-is executing, in the standard GNU <I>cpu-company-system</I> format.
-The default is system-dependent.
-<DT><B>MAPFILE</B>
-
-<DD>
-An array variable (see <B>Arrays</B> below) created to hold the text
-read by the <B>mapfile</B> builtin when no variable name is supplied.
-<DT><B>OLDPWD</B>
-
-<DD>
-The previous working directory as set by the
-<B>cd</B>
-
-command.
-<DT><B>OPTARG</B>
-
-<DD>
-The value of the last option argument processed by the
-<B>getopts</B>
-
-builtin command (see
-<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
-
-</FONT>
-below).
-<DT><B>OPTIND</B>
-
-<DD>
-The index of the next argument to be processed by the
-<B>getopts</B>
-
-builtin command (see
-<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
-
-</FONT>
-below).
-<DT><B>OSTYPE</B>
-
-<DD>
-Automatically set to a string that
-describes the operating system on which
-<B>bash</B>
-
-is executing.
-The default is system-dependent.
-<DT><B>PIPESTATUS</B>
-
-<DD>
-An array variable (see
-<B>Arrays</B>
-
-below) containing a list of exit status values from the commands
-in the most-recently-executed foreground pipeline, which may
-consist of only a simple command
-(see
-<FONT SIZE=-1><B>SHELL GRAMMAR</B>
-
-</FONT>
-above).
-<B>Bash</B> sets
-<FONT SIZE=-1><B>PIPESTATUS</B>
-
-</FONT>
-after executing multi-element pipelines,
-timed and negated pipelines,
-simple commands,
-subshells created with the ( operator,
-the
-<B>[[</B>
-
-and
-<B>((</B>
-
-compound commands, and
-after error conditions that result in the
-shell aborting command execution.
-<DT><B>PPID</B>
-
-<DD>
-The process ID of the shell's parent.
-This variable is readonly.
-<DT><B>PWD</B>
-
-<DD>
-The current working directory as set by the
-<B>cd</B>
-
-command.
-<DT><B>RANDOM</B>
-
-<DD>
-Each time this parameter is referenced, it expands to a random integer
-between 0 and 32767.
-Assigning a value to
-<FONT SIZE=-1><B>RANDOM</B>
-
-</FONT>
-initializes (seeds) the sequence of random numbers.
-Seeding the random number generator with the same constant value
-produces the same sequence of values.
-If
-<FONT SIZE=-1><B>RANDOM</B>
-
-</FONT>
-is unset, it loses its special properties, even if it is
-subsequently reset.
-<DT><B>READLINE_ARGUMENT</B>
-
-<DD>
-Any numeric argument given to a
-<B>readline</B>
-
-command that was defined using
-
-(see
-<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
-
-</FONT>
-below)
-when it was invoked.
-<DT><B>READLINE_LINE</B>
-
-<DD>
-The contents of the
-<B>readline</B>
-
-line buffer, for use with
-
-(see
-<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
-
-</FONT>
-below).
-<DT><B>READLINE_MARK</B>
-
-<DD>
-The position of the mark (saved insertion point) in the
-<B>readline</B>
-
-line buffer, for use with
-
-(see
-<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
-
-</FONT>
-below).
-The characters between the insertion point and the mark are often
-called the <I>region</I>.
-<DT><B>READLINE_POINT</B>
-
-<DD>
-The position of the insertion point in the
-<B>readline</B>
-
-line buffer, for use with
-
-(see
-<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
-
-</FONT>
-below).
-<DT><B>REPLY</B>
-
-<DD>
-Set to the line of input read by the
-<B>read</B>
-
-builtin command when no arguments are supplied.
-<DT><B>SECONDS</B>
-<DD>
-Each time this parameter is
-referenced, it expands to the number of seconds since shell invocation.
-If a value is assigned to
-<FONT SIZE=-1><B>SECONDS</B>,
-
-</FONT>
-the value returned upon subsequent
-references is
-the number of seconds since the assignment plus the value assigned.
-The number of seconds at shell invocation and the current time are always
-determined by querying the system clock at one-second resolution.
-If
-<FONT SIZE=-1><B>SECONDS</B>
-
-</FONT>
-is unset, it loses its special properties, even if it is
-subsequently reset.
-<DT><B>SHELLOPTS</B>
-
-<DD>
-A colon-separated list of enabled shell options.
-Each word in the list is a valid argument for the
-<B>-o</B>
-
-option to the
-<B>set</B>
-
-builtin command (see
-<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
-
-</FONT>
-below).
-The options appearing in
-<FONT SIZE=-1><B>SHELLOPTS</B>
-
-</FONT>
-are those reported as
-<I>on</I>
-
-by <B>set -o</B>.
-If this variable is in the environment when
-<B>bash</B>
-
-starts up, the shell enables each option in the list before
-reading any startup files.
-If this variable is exported, child shells will enable each option
-in the list.
-This variable is read-only.
-<DT><B>SHLVL</B>
-
-<DD>
-Incremented by one each time an instance of
-<B>bash</B>
-
-is started.
-<DT><B>SRANDOM</B>
-
-<DD>
-Each time it is referenced, this variable expands to a 32-bit pseudo-random
-number.
-The random number generator is not linear on systems that
-support
-
-<I>/dev/urandom</I>
-
-or
-<I>arc4random</I>(3),
-
-so each returned number
-has no relationship to the numbers preceding it.
-The random number generator cannot be seeded, so assignments to this
-variable have no effect.
-If
-<FONT SIZE=-1><B>SRANDOM</B>
-
-</FONT>
-is unset, it loses its special properties,
-even if it is subsequently reset.
-<DT><B>UID</B>
-
-<DD>
-Expands to the user ID of the current user, initialized at shell startup.
-This variable is readonly.
-
-</DL>
-<P>
-
-The shell uses the following variables. In some cases,
-<B>bash</B>
-
-assigns a default value to a variable; these cases are noted
-below.
-<P>
-
-
-<DL COMPACT>
-<DT><B>BASH_COMPAT</B>
-
-<DD>
-The value is used to set the shell's compatibility level.
-See
-<FONT SIZE=-1><B>SHELL COMPATIBILITY MODE</B>
-
-</FONT>
-below for a description of the various compatibility
-levels and their effects.
-The value may be a decimal number (e.g., 4.2) or an integer (e.g., 42)
-corresponding to the desired compatibility level.
-If
-<FONT SIZE=-1><B>BASH_COMPAT</B>
-
-</FONT>
-is unset or set to the empty string, the compatibility
-level is set to the default for the current version.
-If
-<FONT SIZE=-1><B>BASH_COMPAT</B>
-
-</FONT>
-is set to a value that is not one of the valid
-compatibility levels, the shell prints an error message and sets the
-compatibility level to the default for the current version.
-A subset of the valid values correspond to the compatibility levels
-described below under
-<FONT SIZE=-1><B>SHELL COMPATIBILITY MODE</B>.
-
-</FONT>
-For example, 4.2 and 42 are valid values that correspond
-to the <B>compat42</B> <B>shopt</B> option
-and set the compatibility level to 42.
-The current version is also a valid value.
-<DT><B>BASH_ENV</B>
-
-<DD>
-If this parameter is set when <B>bash</B> is executing a shell script,
-its expanded value is interpreted as a filename containing commands to
-initialize the shell before it reads and executes commands from the
-script.
-The value of
-<FONT SIZE=-1><B>BASH_ENV</B>
-
-</FONT>
-is subjected to parameter expansion, command substitution, and arithmetic
-expansion before being interpreted as a filename.
-<FONT SIZE=-1><B>PATH</B>
-
-</FONT>
-is not used to search for the resultant filename.
-<DT><B>BASH_XTRACEFD</B>
-
-<DD>
-If set to an integer corresponding to a valid file descriptor,
-<B>bash</B> writes the trace output generated when
-
-is enabled to that file descriptor,
-instead of the standard error.
-The file descriptor is closed when
-<FONT SIZE=-1><B>BASH_XTRACEFD</B>
-
-</FONT>
-is unset or assigned a new value.
-Unsetting
-<FONT SIZE=-1><B>BASH_XTRACEFD</B>
-
-</FONT>
-or assigning it the empty string causes the
-trace output to be sent to the standard error.
-Note that setting
-<FONT SIZE=-1><B>BASH_XTRACEFD</B>
-
-</FONT>
-to 2 (the standard error file
-descriptor) and then unsetting it will result in the standard error
-being closed.
-<DT><B>CDPATH</B>
-
-<DD>
-The search path for the
-<B>cd</B>
-
-command.
-This is a colon-separated list of directories where the shell looks for
-directories specified as arguments to the
-<B>cd</B>
-
-command.
-A sample value is
-
-<DT><B>CHILD_MAX</B>
-
-<DD>
-Set the number of exited child status values for the shell to remember.
-<B>Bash</B> will not allow this value to be decreased below a
-<FONT SIZE=-1>POSIX</FONT>
--mandated minimum,
-and there is a maximum value (currently 8192) that this may not exceed.
-The minimum value is system-dependent.
-<DT><B>COLUMNS</B>
-
-<DD>
-Used by the <B>select</B> compound command to determine the terminal width
-when printing selection lists.
-Automatically set if the
-<B>checkwinsize</B>
-
-option is enabled or in an interactive shell upon receipt of a
-<FONT SIZE=-1><B>SIGWINCH</B>.
-
-</FONT>
-<DT><B>COMPREPLY</B>
-
-<DD>
-An array variable from which <B>bash</B> reads the possible completions
-generated by a shell function invoked by the programmable completion
-facility (see <B>Programmable Completion</B> below).
-Each array element contains one possible completion.
-<DT><B>EMACS</B>
-
-<DD>
-If <B>bash</B> finds this variable in the environment when the shell starts
-with value
-
-it assumes that the shell is running in an Emacs shell buffer and disables
-line editing.
-<DT><B>ENV</B>
-
-<DD>
-Expanded and executed similarly to
-<FONT SIZE=-1><B>BASH_ENV</B>
-
-</FONT>
-(see
-<FONT SIZE=-1><B>INVOCATION</B>
-
-</FONT>
-above) when an interactive shell is invoked in posix mode.
-<DT><B>EXECIGNORE</B>
-
-<DD>
-A colon-separated list of shell patterns (see <B>Pattern Matching</B>)
-defining the set of filenames to be ignored by command search using
-<FONT SIZE=-1><B>PATH</B>.
-
-</FONT>
-Files whose full pathnames match one of these patterns are not considered
-executable files for the purposes of completion and command execution
-via
-<FONT SIZE=-1><B>PATH</B>
-
-</FONT>
-lookup.
-This does not affect the behavior of the <B>[</B>, <B>test</B>, and <B>[[</B>
-commands.
-Full pathnames in the command hash table are not subject to
-<FONT SIZE=-1><B>EXECIGNORE</B>.
-
-</FONT>
-Use this variable to ignore shared library files that have the executable
-bit set, but are not executable files.
-The pattern matching honors the setting of the <B>extglob</B> shell
-option.
-<DT><B>FCEDIT</B>
-
-<DD>
-The default editor for the
-<B>fc</B>
-
-builtin command.
-<DT><B>FIGNORE</B>
-
-<DD>
-A colon-separated list of suffixes to ignore when performing
-filename completion (see
-<FONT SIZE=-1><B>READLINE</B>
-
-</FONT>
-below).
-A filename whose suffix matches one of the entries in
-<FONT SIZE=-1><B>FIGNORE</B>
-
-</FONT>
-is excluded from the list of matched filenames.
-A sample value is
-
-<DT><B>FUNCNEST</B>
-
-<DD>
-If set to a numeric value greater than 0, defines a maximum function
-nesting level.
-Function invocations that exceed this nesting level
-cause the current command to abort.
-<DT><B>GLOBIGNORE</B>
-
-<DD>
-A colon-separated list of patterns defining the set of file names to
-be ignored by pathname expansion.
-If a file name matched by a pathname expansion pattern also matches one
-of the patterns in
-<FONT SIZE=-1><B>GLOBIGNORE</B>,
-
-</FONT>
-it is removed from the list of matches.
-The pattern matching honors the setting of the <B>extglob</B> shell
-option.
-<DT><B>GLOBSORT</B>
-
-<DD>
-
-Controls how the results of pathname expansion are sorted.
-The value of this variable specifies the sort criteria and sort order for
-the results of pathname expansion.
-If this variable is unset or set to the null string, pathname expansion
-uses the historical behavior of sorting by name,
-in ascending lexicographic order as determined by the
-<FONT SIZE=-1><B>LC_COLLATE</B>
-
-</FONT>
-shell variable.
-<DT><DD>
-If set, a valid value begins with an optional <I>+</I>, which is ignored,
-or <I>-</I>, which reverses the sort order from ascending to descending,
-followed by a sort specifier.
-The valid sort specifiers are
-<I>name</I>,
-
-<I>numeric</I>,
-
-<I>size</I>,
-
-<I>mtime</I>,
-
-<I>atime</I>,
-
-<I>ctime</I>,
-
-and
-<I>blocks</I>,
-
-which sort the files on name,
-names in numeric rather than lexicographic order,
-file size, modification time, access time,
-inode change time, and number of blocks, respectively.
-If any of the non-name keys compare as equal (e.g., if two files are
-the same size), sorting uses the name as a secondary sort key.
-<DT><DD>
-For example, a value of <I>-mtime</I> sorts the results in descending
-order by modification time (newest first).
-<DT><DD>
-The <I>numeric</I> specifier treats names consisting solely of digits as
-numbers and sorts them using their numeric value
-(so
-
-sorts before
-
-for example).
-When using <I>numeric</I>, names containing non-digits sort after all
-the all-digit names and are sorted by name using the traditional behavior.
-<DT><DD>
-A sort specifier of <I>nosort</I> disables sorting completely;
-<B>bash</B>
-
-returns the results
-in the order they are read from the file system,
-ignoring any leading <I>-</I>.
-<DT><DD>
-If the sort specifier is missing, it defaults to <I>name</I>,
-so a value of <I>+</I> is equivalent to the null string,
-and a value of <I>-</I> sorts by name in descending order.
-Any invalid value restores the historical sorting behavior.
-
-<DT><B>HISTCONTROL</B>
-
-<DD>
-A colon-separated list of values controlling how commands are saved on
-the history list.
-If the list of values includes
-<I>ignorespace</I>,
-
-lines which begin with a
-<B>space</B>
-
-character are not saved in the history list.
-A value of
-<I>ignoredups</I>
-
-causes lines matching the previous history entry not to be saved.
-A value of
-<I>ignoreboth</I>
-
-is shorthand for <I>ignorespace</I> and <I>ignoredups</I>.
-A value of
-<I>erasedups</I>
-
-causes all previous lines matching the current line to be removed from
-the history list before that line is saved.
-Any value not in the above list is ignored.
-If
-<FONT SIZE=-1><B>HISTCONTROL</B>
-
-</FONT>
-is unset, or does not include a valid value,
-<B>bash</B> saves all lines read by the shell parser on the history list,
-subject to the value of
-<FONT SIZE=-1><B>HISTIGNORE</B>.
-
-</FONT>
-If the first line of a multi-line compound command was saved,
-the second and subsequent lines are not tested,
-and are added to the history regardless of the value of
-<FONT SIZE=-1><B>HISTCONTROL</B>.
-
-</FONT>
-If the first line was not saved, the second and subsequent lines of
-the command are not saved either.
-<DT><B>HISTFILE</B>
-
-<DD>
-The name of the file in which command history is saved (see
-<FONT SIZE=-1><B>HISTORY</B>
-
-</FONT>
-below).
-<B>Bash</B> assigns a default value of
-
-<A HREF="file:~/.bash_history"><I>~/.bash_history</I></A>.
-
-If
-<FONT SIZE=-1><B>HISTFILE</B>
-
-</FONT>
-is unset or null,
-the shell does not save the command history when it exits.
-<DT><B>HISTFILESIZE</B>
-
-<DD>
-The maximum number of lines contained in the history file.
-When this variable is assigned a value, the history file is truncated,
-if necessary, to contain no more than
-the number of history entries
-that total no more than that number of lines
-by removing the oldest entries.
-If the history list contains multi-line entries,
-the history file may contain more lines than this maximum
-to avoid leaving partial history entries.
+<p><b>PWD</b></p></td>
+<td width="1%"></td>
+<td width="82%">
+
+
+<p>The current working directory as set by the <b>cd</b>
+command.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="8%">
+
+
+<p><b>RANDOM</b></p></td>
+<td width="1%"></td>
+<td width="82%">
+
+
+<p>Each time this parameter is referenced, it expands to a
+random integer between 0 and 32767. Assigning a value to
+<b><small>RANDOM</small></b> initializes (seeds) the
+sequence of random numbers. Seeding the random number
+generator with the same constant value produces the same
+sequence of values. If <b><small>RANDOM</small></b> is
+unset, it loses its special properties, even if it is
+subsequently reset.</p></td></tr>
+</table>
+
+<p style="margin-left:9%;"><b>READLINE_ARGUMENT</b></p>
+
+<p style="margin-left:18%;">Any numeric argument given to a
+<b>readline</b> command that was defined using “bind
+−x” (see <b><small>SHELL BUILTIN
+COMMANDS</small></b> below) when it was invoked.</p>
+
+<p style="margin-left:9%;"><b>READLINE_LINE</b></p>
+
+<p style="margin-left:18%;">The contents of the
+<b>readline</b> line buffer, for use with “bind
+−x” (see <b><small>SHELL BUILTIN
+COMMANDS</small></b> below).</p>
+
+<p style="margin-left:9%;"><b>READLINE_MARK</b></p>
+
+<p style="margin-left:18%;">The position of the mark (saved
+insertion point) in the <b>readline</b> line buffer, for use
+with “bind −x” (see <b><small>SHELL
+BUILTIN COMMANDS</small></b> below). The characters between
+the insertion point and the mark are often called the
+<i>region</i>.</p>
+
+<p style="margin-left:9%;"><b>READLINE_POINT</b></p>
+
+<p style="margin-left:18%;">The position of the insertion
+point in the <b>readline</b> line buffer, for use with
+“bind −x” (see <b><small>SHELL BUILTIN
+COMMANDS</small></b> below).</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="6%">
+
+
+<p><b>REPLY</b></p></td>
+<td width="3%"></td>
+<td width="82%">
+
+
+<p>Set to the line of input read by the <b>read</b> builtin
+command when no arguments are supplied.</p></td></tr>
+</table>
+
+<p style="margin-left:9%;"><b>SECONDS</b></p>
+
+<p style="margin-left:18%;">Each time this parameter is
+referenced, it expands to the number of seconds since shell
+invocation. If a value is assigned to
+<b><small>SECONDS</small></b><small>,</small> the value
+returned upon subsequent references is the number of seconds
+since the assignment plus the value assigned. The number of
+seconds at shell invocation and the current time are always
+determined by querying the system clock at one-second
+resolution. If <b><small>SECONDS</small></b> is unset, it
+loses its special properties, even if it is subsequently
+reset.</p>
+
+<p style="margin-left:9%;"><b>SHELLOPTS</b></p>
+
+<p style="margin-left:18%;">A colon-separated list of
+enabled shell options. Each word in the list is a valid
+argument for the <b>−o</b> option to the <b>set</b>
+builtin command (see <b><small>SHELL BUILTIN
+COMMANDS</small></b> below). The options appearing in
+<b><small>SHELLOPTS</small></b> are those reported as
+<i>on</i> by <b>set −o</b>. If this variable is in the
+environment when <b>bash</b> starts up, the shell enables
+each option in the list before reading any startup files. If
+this variable is exported, child shells will enable each
+option in the list. This variable is read-only.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="6%">
+
+
+<p><b>SHLVL</b></p></td>
+<td width="3%"></td>
+<td width="77%">
+
+
+<p>Incremented by one each time an instance of <b>bash</b>
+is started.</p></td>
+<td width="5%">
+</td></tr>
+</table>
+
+<p style="margin-left:9%;"><b>SRANDOM</b></p>
+
+<p style="margin-left:18%;">Each time it is referenced,
+this variable expands to a 32-bit pseudo-random number. The
+random number generator is not linear on systems that
+support <i>/dev/urandom</i> or <i>arc4random</i>(3), so each
+returned number has no relationship to the numbers preceding
+it. The random number generator cannot be seeded, so
+assignments to this variable have no effect. If
+<b><small>SRANDOM</small></b> is unset, it loses its special
+properties, even if it is subsequently reset.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="4%">
+
+
+<p><b>UID</b></p></td>
+<td width="5%"></td>
+<td width="82%">
+
+
+<p>Expands to the user ID of the current user, initialized
+at shell startup. This variable is readonly.</p></td></tr>
+</table>
+
+<p style="margin-left:9%; margin-top: 1em">The shell uses
+the following variables. In some cases, <b>bash</b> assigns
+a default value to a variable; these cases are noted below.
+<b><br>
+BASH_COMPAT</b></p>
+
+<p style="margin-left:18%;">The value is used to set the
+shell’s compatibility level. See <b><small>SHELL
+COMPATIBILITY MODE</small></b> below for a description of
+the various compatibility levels and their effects. The
+value may be a decimal number (e.g., 4.2) or an integer
+(e.g., 42) corresponding to the desired compatibility level.
+If <b><small>BASH_COMPAT</small></b> is unset or set to the
+empty string, the compatibility level is set to the default
+for the current version. If
+<b><small>BASH_COMPAT</small></b> is set to a value that is
+not one of the valid compatibility levels, the shell prints
+an error message and sets the compatibility level to the
+default for the current version. A subset of the valid
+values correspond to the compatibility levels described
+below under <b><small>SHELL COMPATIBILITY
+MODE</small></b><small>.</small> For example, 4.2 and 42 are
+valid values that correspond to the <b>compat42 shopt</b>
+option and set the compatibility level to 42. The current
+version is also a valid value.</p>
+
+<p style="margin-left:9%;"><b>BASH_ENV</b></p>
+
+<p style="margin-left:18%;">If this parameter is set when
+<b>bash</b> is executing a shell script, its expanded value
+is interpreted as a filename containing commands to
+initialize the shell before it reads and executes commands
+from the script. The value of <b><small>BASH_ENV</small></b>
+is subjected to parameter expansion, command substitution,
+and arithmetic expansion before being interpreted as a
+filename. <b><small>PATH</small></b> is not used to search
+for the resultant filename.</p>
+
+<p style="margin-left:9%;"><b>BASH_XTRACEFD</b></p>
+
+<p style="margin-left:18%;">If set to an integer
+corresponding to a valid file descriptor, <b>bash</b> writes
+the trace output generated when “set −x”
+is enabled to that file descriptor, instead of the standard
+error. The file descriptor is closed when
+<b><small>BASH_XTRACEFD</small></b> is unset or assigned a
+new value. Unsetting <b><small>BASH_XTRACEFD</small></b> or
+assigning it the empty string causes the trace output to be
+sent to the standard error. Note that setting
+<b><small>BASH_XTRACEFD</small></b> to 2 (the standard error
+file descriptor) and then unsetting it will result in the
+standard error being closed.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="8%">
+
+
+<p><b>CDPATH</b></p></td>
+<td width="1%"></td>
+<td width="82%">
+
+
+<p>The search path for the <b>cd</b> command. This is a
+colon-separated list of directories where the shell looks
+for directories specified as arguments to the <b>cd</b>
+command. A sample value is “.:~:/usr”.</p></td></tr>
+</table>
+
+<p style="margin-left:9%;"><b>CHILD_MAX</b></p>
+
+<p style="margin-left:18%;">Set the number of exited child
+status values for the shell to remember. <b>Bash</b> will
+not allow this value to be decreased below a
+<small>POSIX</small> -mandated minimum, and there is a
+maximum value (currently 8192) that this may not exceed. The
+minimum value is system-dependent.</p>
+
+<p style="margin-left:9%;"><b>COLUMNS</b></p>
+
+<p style="margin-left:18%;">Used by the <b>select</b>
+compound command to determine the terminal width when
+printing selection lists. Automatically set if the
+<b>checkwinsize</b> option is enabled or in an interactive
+shell upon receipt of a
+<b><small>SIGWINCH</small></b><small>.</small></p>
+
+<p style="margin-left:9%;"><b>COMPREPLY</b></p>
+
+<p style="margin-left:18%;">An array variable from which
+<b>bash</b> reads the possible completions generated by a
+shell function invoked by the programmable completion
+facility (see <b>Programmable Completion</b> below). Each
+array element contains one possible completion.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="6%">
+
+
+<p><b>EMACS</b></p></td>
+<td width="3%"></td>
+<td width="82%">
+
+
+<p>If <b>bash</b> finds this variable in the environment
+when the shell starts with value “t”, it assumes
+that the shell is running in an Emacs shell buffer and
+disables line editing.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="6%">
+
+
+<p><b>ENV</b></p></td>
+<td width="3%"></td>
+<td width="82%">
+
+
+<p>Expanded and executed similarly to
+<b><small>BASH_ENV</small></b> (see
+<b><small>INVOCATION</small></b> above) when an interactive
+shell is invoked in posix mode.</p></td></tr>
+</table>
+
+<p style="margin-left:9%;"><b>EXECIGNORE</b></p>
+
+<p style="margin-left:18%;">A colon-separated list of shell
+patterns (see <b>Pattern Matching</b>) defining the set of
+filenames to be ignored by command search using
+<b><small>PATH</small></b><small>.</small> Files whose full
+pathnames match one of these patterns are not considered
+executable files for the purposes of completion and command
+execution via <b><small>PATH</small></b> lookup. This does
+not affect the behavior of the <b>[</b>, <b>test</b>, and
+<b>[[</b> commands. Full pathnames in the command hash table
+are not subject to
+<b><small>EXECIGNORE</small></b><small>.</small> Use this
+variable to ignore shared library files that have the
+executable bit set, but are not executable files. The
+pattern matching honors the setting of the <b>extglob</b>
+shell option.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="8%">
+
+
+<p><b>FCEDIT</b></p></td>
+<td width="1%"></td>
+<td width="59%">
+
+
+<p>The default editor for the <b>fc</b> builtin
+command.</p> </td>
+<td width="23%">
+</td></tr>
+</table>
+
+<p style="margin-left:9%;"><b>FIGNORE</b></p>
+
+<p style="margin-left:18%;">A colon-separated list of
+suffixes to ignore when performing filename completion (see
+<b><small>READLINE</small></b> below). A filename whose
+suffix matches one of the entries in
+<b><small>FIGNORE</small></b> is excluded from the list of
+matched filenames. A sample value is “.o:~”.</p>
+
+<p style="margin-left:9%;"><b>FUNCNEST</b></p>
+
+<p style="margin-left:18%;">If set to a numeric value
+greater than 0, defines a maximum function nesting level.
+Function invocations that exceed this nesting level cause
+the current command to abort.</p>
+
+<p style="margin-left:9%;"><b>GLOBIGNORE</b></p>
+
+<p style="margin-left:18%;">A colon-separated list of
+patterns defining the set of file names to be ignored by
+pathname expansion. If a file name matched by a pathname
+expansion pattern also matches one of the patterns in
+<b><small>GLOBIGNORE</small></b><small>,</small> it is
+removed from the list of matches. The pattern matching
+honors the setting of the <b>extglob</b> shell option.</p>
+
+<p style="margin-left:9%;"><b>GLOBSORT</b></p>
+
+<p style="margin-left:18%;">Controls how the results of
+pathname expansion are sorted. The value of this variable
+specifies the sort criteria and sort order for the results
+of pathname expansion. If this variable is unset or set to
+the null string, pathname expansion uses the historical
+behavior of sorting by name, in ascending lexicographic
+order as determined by the <b><small>LC_COLLATE</small></b>
+shell variable.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If set, a valid
+value begins with an optional <i>+</i>, which is ignored, or
+<i>−</i>, which reverses the sort order from ascending
+to descending, followed by a sort specifier. The valid sort
+specifiers are <i>name</i>, <i>numeric</i>, <i>size</i>,
+<i>mtime</i>, <i>atime</i>, <i>ctime</i>, and <i>blocks</i>,
+which sort the files on name, names in numeric rather than
+lexicographic order, file size, modification time, access
+time, inode change time, and number of blocks, respectively.
+If any of the non-name keys compare as equal (e.g., if two
+files are the same size), sorting uses the name as a
+secondary sort key.</p>
+
+<p style="margin-left:18%; margin-top: 1em">For example, a
+value of <i>−mtime</i> sorts the results in descending
+order by modification time (newest first).</p>
+
+<p style="margin-left:18%; margin-top: 1em">The
+<i>numeric</i> specifier treats names consisting solely of
+digits as numbers and sorts them using their numeric value
+(so “2” sorts before “10”, for
+example). When using <i>numeric</i>, names containing
+non-digits sort after all the all-digit names and are sorted
+by name using the traditional behavior.</p>
+
+<p style="margin-left:18%; margin-top: 1em">A sort
+specifier of <i>nosort</i> disables sorting completely;
+<b>bash</b> returns the results in the order they are read
+from the file system, ignoring any leading
+<i>−</i>.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If the sort
+specifier is missing, it defaults to <i>name</i>, so a value
+of <i>+</i> is equivalent to the null string, and a value of
+<i>-</i> sorts by name in descending order. Any invalid
+value restores the historical sorting behavior.</p>
+
+<p style="margin-left:9%;"><b>HISTCONTROL</b></p>
+
+<p style="margin-left:18%;">A colon-separated list of
+values controlling how commands are saved on the history
+list. If the list of values includes <i>ignorespace</i>,
+lines which begin with a <b>space</b> character are not
+saved in the history list. A value of <i>ignoredups</i>
+causes lines matching the previous history entry not to be
+saved. A value of <i>ignoreboth</i> is shorthand for
+<i>ignorespace</i> and <i>ignoredups</i>. A value of
+<i>erasedups</i> causes all previous lines matching the
+current line to be removed from the history list before that
+line is saved. Any value not in the above list is ignored.
+If <b><small>HISTCONTROL</small></b> is unset, or does not
+include a valid value, <b>bash</b> saves all lines read by
+the shell parser on the history list, subject to the value
+of <b><small>HISTIGNORE</small></b><small>.</small> If the
+first line of a multi-line compound command was saved, the
+second and subsequent lines are not tested, and are added to
+the history regardless of the value of
+<b><small>HISTCONTROL</small></b><small>.</small> If the
+first line was not saved, the second and subsequent lines of
+the command are not saved either.</p>
+
+<p style="margin-left:9%;"><b>HISTFILE</b></p>
+
+<p style="margin-left:18%;">The name of the file in which
+command history is saved (see <b><small>HISTORY</small></b>
+below). <b>Bash</b> assigns a default value of
+<A HREF="file:~/.bash_history"><i>~/.bash_history</i></A>. If <b><small>HISTFILE</small></b> is
+unset or null, the shell does not save the command history
+when it exits.</p>
+
+<p style="margin-left:9%;"><b>HISTFILESIZE</b></p>
+
+<p style="margin-left:18%;">The maximum number of lines
+contained in the history file. When this variable is
+assigned a value, the history file is truncated, if
+necessary, to contain no more than the number of history
+entries that total no more than that number of lines by
+removing the oldest entries. If the history list contains
+multi-line entries, the history file may contain more lines
+than this maximum to avoid leaving partial history entries.
The history file is also truncated to this size after
-writing it when a shell exits or by the
-<B>history</B>
-
-builtin.
-If the value is 0, the history file is truncated to zero size.
-Non-numeric values and numeric values less than zero inhibit truncation.
-The shell sets the default value to the value of
-<FONT SIZE=-1><B>HISTSIZE</B>
-
-</FONT>
-after reading any startup files.
-<DT><B>HISTIGNORE</B>
-
-<DD>
-A colon-separated list of patterns used to decide which command lines
-should be saved on the history list.
-If a command line matches one of the patterns in the value of
-<FONT SIZE=-1><B>HISTIGNORE</B>,
-
-</FONT>
-it is not saved on the history list.
-Each pattern is anchored at the
+writing it when a shell exits or by the <b>history</b>
+builtin. If the value is 0, the history file is truncated to
+zero size. Non-numeric values and numeric values less than
+zero inhibit truncation. The shell sets the default value to
+the value of <b><small>HISTSIZE</small></b> after reading
+any startup files.</p>
+
+<p style="margin-left:9%;"><b>HISTIGNORE</b></p>
+
+<p style="margin-left:18%;">A colon-separated list of
+patterns used to decide which command lines should be saved
+on the history list. If a command line matches one of the
+patterns in the value of
+<b><small>HISTIGNORE</small></b><small>,</small> it is not
+saved on the history list. Each pattern is anchored at the
beginning of the line and must match the complete line
-(<B>bash</B> does not implicitly append a
+(<b>bash</b> does not implicitly append a
+“<b>*</b>”). Each pattern is tested against the
+line after the checks specified by
+<b><small>HISTCONTROL</small></b> are applied. In addition
+to the normal shell pattern matching characters,
+“<b>&</b>” matches the previous history
+line. A backslash escapes the “<b>&</b>”;
+the backslash is removed before attempting a match. If the
+first line of a multi-line compound command was saved, the
+second and subsequent lines are not tested, and are added to
+the history regardless of the value of
+<b><small>HISTIGNORE</small></b><small>.</small> If the
+first line was not saved, the second and subsequent lines of
+the command are not saved either. The pattern matching
+honors the setting of the <b>extglob</b> shell option.
+<b><small><br>
+HISTIGNORE</small></b> subsumes some of the function of
+<b><small>HISTCONTROL</small></b><small>.</small> A pattern
+of “&” is identical to
+“ignoredups”, and a pattern of “[
+]*” is identical to “ignorespace”.
+Combining these two patterns, separating them with a colon,
+provides the functionality of “ignoreboth”.</p>
+
+<p style="margin-left:9%;"><b>HISTSIZE</b></p>
+
+<p style="margin-left:18%;">The number of commands to
+remember in the command history (see
+<b><small>HISTORY</small></b> below). If the value is 0,
+commands are not saved in the history list. Numeric values
+less than zero result in every command being saved on the
+history list (there is no limit). The shell sets the default
+value to 500 after reading any startup files.</p>
+
+<p style="margin-left:9%;"><b>HISTTIMEFORMAT</b></p>
+
+<p style="margin-left:18%;">If this variable is set and not
+null, its value is used as a format string for
+<i>strftime</i>(3) to print the time stamp associated with
+each history entry displayed by the <b>history</b> builtin.
+If this variable is set, the shell writes time stamps to the
+history file so they may be preserved across shell sessions.
+This uses the history comment character to distinguish
+timestamps from other history lines.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="5%">
+
+
+<p><b>HOME</b></p></td>
+<td width="4%"></td>
+<td width="82%">
+
+
+<p>The home directory of the current user; the default
+argument for the <b>cd</b> builtin command. The value of
+this variable is also used when performing tilde
+expansion.</p> </td></tr>
+</table>
+
+<p style="margin-left:9%;"><b>HOSTFILE</b></p>
+
+<p style="margin-left:18%;">Contains the name of a file in
+the same format as <i>/etc/hosts</i> that should be read
+when the shell needs to complete a hostname. The list of
+possible hostname completions may be changed while the shell
+is running; the next time hostname completion is attempted
+after the value is changed, <b>bash</b> adds the contents of
+the new file to the existing list. If
+<b><small>HOSTFILE</small></b> is set, but has no value, or
+does not name a readable file, <b>bash</b> attempts to read
+<i>/etc/hosts</i> to obtain the list of possible hostname
+completions. When <b><small>HOSTFILE</small></b> is unset,
+<b>bash</b> clears the hostname list.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="4%">
+
+
+<p><b>IFS</b></p></td>
+<td width="5%"></td>
+<td width="82%">
+
+
+<p>The <i>Internal Field Separator</i> that is used for
+word splitting after expansion and to split lines into words
+with the <b>read</b> builtin command. Word splitting is
+described below under
+<b><small>EXPANSION</small></b><small>.</small> The default
+value is
+“<space><tab><newline>”.</p> </td></tr>
+</table>
-Each pattern is tested against the line
-after the checks specified by
-<FONT SIZE=-1><B>HISTCONTROL</B>
+<p style="margin-left:9%;"><b>IGNOREEOF</b></p>
-</FONT>
-are applied.
-In addition to the normal shell pattern matching characters,
+<p style="margin-left:18%;">Controls the action of an
+interactive shell on receipt of an <b><small>EOF</small></b>
+character as the sole input. If set, the value is the number
+of consecutive <b><small>EOF</small></b> characters which
+must be typed as the first characters on an input line
+before <b>bash</b> exits. If the variable is set but does
+not have a numeric value, or the value is null, the default
+value is 10. If it is unset, <b><small>EOF</small></b>
+signifies the end of input to the shell.</p>
-matches the previous history line.
-A backslash escapes the
+<p style="margin-left:9%;"><b>INPUTRC</b></p>
-the backslash is removed before attempting a match.
-If the first line of a multi-line compound command was saved,
-the second and subsequent lines are not tested,
-and are added to the history regardless of the value of
-<FONT SIZE=-1><B>HISTIGNORE</B>.
+<p style="margin-left:18%;">The filename for the
+<b>readline</b> startup file, overriding the default of
+<A HREF="file:~/.inputrc"><i>~/.inputrc</i></A> (see <b><small>READLINE</small></b>
+below).</p>
-</FONT>
-If the first line was not saved, the second and subsequent lines of
-the command are not saved either.
-The pattern matching honors the setting of the
-<B>extglob</B>
+<p style="margin-left:9%;"><b>INSIDE_EMACS</b></p>
-shell option.
-<DT><DD>
-<FONT SIZE=-1><B>HISTIGNORE</B>
+<p style="margin-left:18%;">If this variable appears in the
+environment when the shell starts, <b>bash</b> assumes that
+it is running inside an Emacs shell buffer and may disable
+line editing, depending on the value of
+<b><small>TERM</small></b><small>.</small></p>
-</FONT>
-subsumes some of the function of
-<FONT SIZE=-1><B>HISTCONTROL</B>.
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="8%">
-</FONT>
-A pattern of
-is identical to
+<p><b>LANG</b></p></td>
+<td width="1%"></td>
+<td width="82%">
-and a pattern of
-is identical to
+<p>Used to determine the locale category for any category
+not specifically selected with a variable starting with
+<b>LC_</b>.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="8%">
-Combining these two patterns, separating them with a colon,
-provides the functionality of
-
-<DT><B>HISTSIZE</B>
-
-<DD>
-The number of commands to remember in the command history (see
-<FONT SIZE=-1><B>HISTORY</B>
-
-</FONT>
-below).
-If the value is 0, commands are not saved in the history list.
-Numeric values less than zero result in every command being saved
-on the history list (there is no limit).
-The shell sets the default value to 500 after reading any startup files.
-<DT><B>HISTTIMEFORMAT</B>
-
-<DD>
-If this variable is set and not null, its value is used as a format string
-for
-<I>strftime</I>(3)
-
-to print the time stamp associated with each history
-entry displayed by the <B>history</B> builtin.
-If this variable is set, the shell writes time stamps to the history file so
-they may be preserved across shell sessions.
-This uses the history comment character to distinguish timestamps from
-other history lines.
-<DT><B>HOME</B>
-
-<DD>
-The home directory of the current user; the default argument for the
-<B>cd</B> builtin command.
-The value of this variable is also used when performing tilde expansion.
-<DT><B>HOSTFILE</B>
-
-<DD>
-Contains the name of a file in the same format as
-
-<I>/etc/hosts</I>
-
-that should be read when the shell needs to complete a
-hostname.
-The list of possible hostname completions may be changed while the
-shell is running;
-the next time hostname completion is attempted after the
-value is changed,
-<B>bash</B>
-
-adds the contents of the new file to the existing list.
-If
-<FONT SIZE=-1><B>HOSTFILE</B>
-
-</FONT>
-is set, but has no value, or does not name a readable file,
-<B>bash</B> attempts to read
-
-<I>/etc/hosts</I>
-
-to obtain the list of possible hostname completions.
-When
-<FONT SIZE=-1><B>HOSTFILE</B>
-
-</FONT>
-is unset, <B>bash</B> clears the hostname list.
-<DT><B>IFS</B>
-
-<DD>
-The
-<I>Internal Field Separator</I>
-
-that is used
-for word splitting after expansion and to
-split lines into words with the
-<B>read</B>
-
-builtin command.
-Word splitting is described below under
-<FONT SIZE=-1><B>EXPANSION</B>.
-
-</FONT>
-The default value is
-
-<DT><B>IGNOREEOF</B>
-
-<DD>
-Controls the
-action of an interactive shell on receipt of an
-<FONT SIZE=-1><B>EOF</B>
-
-</FONT>
-character as the sole input.
-If set, the value is the number of consecutive
-<FONT SIZE=-1><B>EOF</B>
-
-</FONT>
-characters which must be
-typed as the first characters on an input line before
-<B>bash</B>
-
-exits.
-If the variable is set but does not have a numeric value,
-or the value is null,
-the default value is 10.
-If it is unset,
-<FONT SIZE=-1><B>EOF</B>
-
-</FONT>
-signifies the end of input to the shell.
-<DT><B>INPUTRC</B>
-
-<DD>
-The filename for the
-<B>readline</B>
-
-startup file, overriding the default of
-
-<A HREF="file:~/.inputrc"><I>~/.inputrc</I></A>
-
-(see
-<FONT SIZE=-1><B>READLINE</B>
-
-</FONT>
-below).
-<DT><B>INSIDE_EMACS</B>
-
-<DD>
-If this variable appears in the environment when the shell starts,
-<B>bash</B> assumes that it is running inside an Emacs shell buffer
-and may disable line editing, depending on the value of
-<FONT SIZE=-1><B>TERM</B>.
-
-</FONT>
-<DT><B>LANG</B>
-
-<DD>
-Used to determine the locale category for any category not specifically
-selected with a variable starting with <B>LC_</B>.
-<DT><B>LC_ALL</B>
-
-<DD>
-This variable overrides the value of
-<FONT SIZE=-1><B>LANG</B>
-
-</FONT>
-and any other
-<B>LC_</B> variable specifying a locale category.
-<DT><B>LC_COLLATE</B>
-
-<DD>
-This variable determines the collation order used when sorting the
-results of pathname expansion, and determines the behavior of range
-expressions, equivalence classes, and collating sequences within
-pathname expansion and pattern matching.
-<DT><B>LC_CTYPE</B>
-
-<DD>
-This variable determines the interpretation of characters and the
-behavior of character classes within pathname expansion and pattern
-matching.
-<DT><B>LC_MESSAGES</B>
-
-<DD>
-This variable determines the locale used to translate double-quoted
-strings preceded by a <B>$</B>.
-<DT><B>LC_NUMERIC</B>
-
-<DD>
-This variable determines the locale category used for number formatting.
-<DT><B>LC_TIME</B>
-
-<DD>
-This variable determines the locale category used for data and time
-formatting.
-<DT><B>LINES</B>
-
-<DD>
-Used by the <B>select</B> compound command to determine the column length
-for printing selection lists.
-Automatically set if the
-<B>checkwinsize</B>
-
-option is enabled or in an interactive shell upon receipt of a
-<FONT SIZE=-1><B>SIGWINCH</B>.
-
-</FONT>
-<DT><B>MAIL</B>
-
-<DD>
-If the value is set to a file or directory name and the
-<FONT SIZE=-1><B>MAILPATH</B>
-
-</FONT>
-variable is not set,
-<B>bash</B>
-
-informs the user of the arrival of mail in the specified file or
-Maildir-format directory.
-<DT><B>MAILCHECK</B>
-
-<DD>
-Specifies how
-often (in seconds)
-<B>bash</B>
-
-checks for mail.
-The default is 60 seconds.
-When it is time to check for mail,
-the shell does so before displaying the primary prompt.
-If this variable is unset, or set to a value that is not a number
-greater than or equal to zero, the shell disables mail checking.
-<DT><B>MAILPATH</B>
-
-<DD>
-A colon-separated list of filenames to be checked for mail.
-The message to be printed when mail arrives in a particular file
-may be specified by separating the filename from the message with a
-
-When used in the text of the message, <B>$_</B> expands to the name of
-the current mailfile.
-For example:
-<DL COMPACT><DT><DD>
-<P>
-
-
-<B>MAILPATH</B>='/var/mail/bfox?"
-You have mail"
-:~/shell-mail?"
-$_ has mail!"
-'
-
-<P>
-
-<B>Bash</B>
-
-can be configured to supply
-a default value for this variable (there is no value by default),
-but the location of the user
-mail files that it uses is system dependent (e.g., /var/mail/<B>$USER</B>).
-</DL>
-
-<DT><B>OPTERR</B>
-
-<DD>
-If set to the value 1,
-<B>bash</B>
-
-displays error messages generated by the
-<B>getopts</B>
-
-builtin command (see
-<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
-
-</FONT>
-below).
-<FONT SIZE=-1><B>OPTERR</B>
-
-</FONT>
-is initialized to 1 each time the shell is invoked or a shell
-script is executed.
-<DT><B>PATH</B>
-
-<DD>
-The search path for commands.
-It is a colon-separated list of directories in which
-the shell looks for commands (see
-<FONT SIZE=-1><B>COMMAND EXECUTION</B>
-
-</FONT>
-below).
-A zero-length (null) directory name in the value of
-<FONT SIZE=-1><B>PATH</B>
-
-</FONT>
-indicates the current directory.
-A null directory name may appear as two adjacent colons, or as an initial
-or trailing colon.
-The default path is system-dependent,
-and is set by the administrator who installs
-<B>bash</B>.
-A common value is
-<DL COMPACT><DT><DD>
-<DL COMPACT><DT><DD>
+<p><b>LC_ALL</b></p></td>
+<td width="1%"></td>
+<td width="82%">
-/usr/local/bin:/usr/local/sbin:
-<BR>
+<p>This variable overrides the value of
+<b><small>LANG</small></b> and any other <b>LC_</b> variable
+specifying a locale category.</p></td></tr>
+</table>
-/usr/bin:/usr/sbin:/bin:/sbin
+<p style="margin-left:9%;"><b>LC_COLLATE</b></p>
-</DL>
+<p style="margin-left:18%;">This variable determines the
+collation order used when sorting the results of pathname
+expansion, and determines the behavior of range expressions,
+equivalence classes, and collating sequences within pathname
+expansion and pattern matching.</p>
-</DL>
+<p style="margin-left:9%;"><b>LC_CTYPE</b></p>
-<DT><B>POSIXLY_CORRECT</B>
+<p style="margin-left:18%;">This variable determines the
+interpretation of characters and the behavior of character
+classes within pathname expansion and pattern matching.</p>
-<DD>
-If this variable is in the environment when <B>bash</B> starts, the shell
-enters posix mode before reading the startup files, as if the
-<B>--posix</B>
+<p style="margin-left:9%;"><b>LC_MESSAGES</b></p>
-invocation option had been supplied.
-If it is set while the shell is
-running, <B>bash</B> enables posix mode, as if the command
+<p style="margin-left:18%;">This variable determines the
+locale used to translate double-quoted strings preceded by a
+<b>$</b>.</p>
-had been executed.
-When the shell enters posix mode, it sets this variable if it was
-not already set.
-<DT><B>PROMPT_COMMAND</B>
+<p style="margin-left:9%;"><b>LC_NUMERIC</b></p>
-<DD>
-If this variable is set, and is an array,
-the value of each set element is executed as a command
-prior to issuing each primary prompt.
-If this is set but not an array variable,
-its value is used as a command to execute instead.
-<DT><B>PROMPT_DIRTRIM</B>
+<p style="margin-left:18%;">This variable determines the
+locale category used for number formatting.</p>
-<DD>
-If set to a number greater than zero, the value is used as the number of
-trailing directory components to retain when expanding the <B>\w</B> and
-<B>\W</B> prompt string escapes (see
-<FONT SIZE=-1><B>PROMPTING</B>
+<p style="margin-left:9%;"><b>LC_TIME</b></p>
-</FONT>
-below).
-Characters removed are replaced with an ellipsis.
-<DT><B>PS0</B>
+<p style="margin-left:18%;">This variable determines the
+locale category used for data and time formatting.</p>
-<DD>
-The value of this parameter is expanded (see
-<FONT SIZE=-1><B>PROMPTING</B>
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="6%">
-</FONT>
-below) and displayed by interactive shells after reading a command
-and before the command is executed.
-<DT><B>PS1</B>
-<DD>
-The value of this parameter is expanded (see
-<FONT SIZE=-1><B>PROMPTING</B>
+<p><b>LINES</b></p></td>
+<td width="3%"></td>
+<td width="82%">
-</FONT>
-below) and used as the primary prompt string.
-The default value is
-<DT><B>PS2</B>
+<p>Used by the <b>select</b> compound command to determine
+the column length for printing selection lists.
+Automatically set if the <b>checkwinsize</b> option is
+enabled or in an interactive shell upon receipt of a
+<b><small>SIGWINCH</small></b><small>.</small></p> </td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="6%">
-<DD>
-The value of this parameter is expanded as with
-<FONT SIZE=-1><B>PS1</B>
-</FONT>
-and used as the secondary prompt string.
-The default is
+<p><b>MAIL</b></p></td>
+<td width="3%"></td>
+<td width="82%">
-<DT><B>PS3</B>
-<DD>
-The value of this parameter is used as the prompt for the
-<B>select</B>
+<p>If the value is set to a file or directory name and the
+<b><small>MAILPATH</small></b> variable is not set,
+<b>bash</b> informs the user of the arrival of mail in the
+specified file or Maildir-format directory.</p></td></tr>
+</table>
-command (see
-<FONT SIZE=-1><B>SHELL GRAMMAR</B>
+<p style="margin-left:9%;"><b>MAILCHECK</b></p>
-</FONT>
-above).
-<DT><B>PS4</B>
+<p style="margin-left:18%;">Specifies how often (in
+seconds) <b>bash</b> checks for mail. The default is 60
+seconds. When it is time to check for mail, the shell does
+so before displaying the primary prompt. If this variable is
+unset, or set to a value that is not a number greater than
+or equal to zero, the shell disables mail checking.</p>
-<DD>
-The value of this parameter is expanded as with
-<FONT SIZE=-1><B>PS1</B>
+<p style="margin-left:9%;"><b>MAILPATH</b></p>
-</FONT>
-and the value is printed before each command
-<B>bash</B>
+<p style="margin-left:18%;">A colon-separated list of
+filenames to be checked for mail. The message to be printed
+when mail arrives in a particular file may be specified by
+separating the filename from the message with a
+“?”. When used in the text of the message,
+<b>$_</b> expands to the name of the current mailfile. For
+example: <b><br>
+MAILPATH</b>='/var/mail/bfox?"You have
+mail":~/shell−mail?"$_ has mail!"'
+<b><br>
+Bash</b> can be configured to supply a default value for
+this variable (there is no value by default), but the
+location of the user mail files that it uses is system
+dependent (e.g., /var/mail/<b>$USER</b>).</p>
-displays during an execution trace.
-The first character of the expanded value of
-<FONT SIZE=-1><B>PS4</B>
-
-</FONT>
-is replicated multiple times, as necessary, to indicate multiple
-levels of indirection.
-The default is
-
-<DT><B>SHELL</B>
-
-<DD>
-This variable expands to the full pathname to the shell.
-If it is not set when the shell starts,
-<B>bash</B>
-
-assigns to it the full pathname of the current user's login shell.
-<DT><B>TIMEFORMAT</B>
-
-<DD>
-The value of this parameter is used as a format string specifying
-how the timing information for pipelines prefixed with the
-<B>time</B>
-
-reserved word should be displayed.
-The <B>%</B> character introduces an escape sequence that is
-expanded to a time value or other information.
-The escape sequences and their meanings are as follows; the
-brackets denote optional portions.
-</DL>
-<P>
-
-<DL COMPACT><DT><DD>
-
-<DL COMPACT>
-<DT><B>%%</B>
-
-<DD>
-A literal <B>%</B>.
-<DT><B>%[</B><I>p</I>][l]R
-
-<DD>
-The elapsed time in seconds.
-<DT><B>%[</B><I>p</I>][l]U
-
-<DD>
-The number of CPU seconds spent in user mode.
-<DT><B>%[</B><I>p</I>][l]S
-
-<DD>
-The number of CPU seconds spent in system mode.
-<DT><B>%P</B>
-
-<DD>
-The CPU percentage, computed as (%U + %S) / %R.
-
-</DL></DL>
-
-<DL COMPACT>
-<DT><DD>
-The optional <I>p</I> is a digit specifying the <I>precision</I>,
-the number of fractional digits after a decimal point.
-A value of 0 causes no decimal point or fraction to be output.
-<B>time</B> prints at most six digits after the decimal point;
-values of <I>p</I> greater than 6 are changed to 6.
-If <I>p</I> is not specified,
-<B>time</B> prints three digits after the decimal point.
-<DT><DD>
-The optional <B>l</B> specifies a longer format, including
-minutes, of the form <I>MM</I>m<I>SS</I>.<I>FF</I>s.
-The value of <I>p</I> determines whether or not the fraction is
-included.
-<DT><DD>
-If this variable is not set, <B>bash</B> acts as if it had the
-value <B>$'\nreal\t%3lR\nuser\t%3lU\nsys\t%3lS'</B>.
-If the value is null, <B>bash</B> does not display any timing information.
-A trailing newline is added when the format string is displayed.
-
-<DT><B>TMOUT</B>
-
-<DD>
-If set to a value greater than zero,
-the <B>read</B> builtin uses the value as its
-default timeout.
-The <B>select</B> command terminates if input does not arrive
-after
-<FONT SIZE=-1><B>TMOUT</B>
-
-</FONT>
-seconds when input is coming from a terminal.
-In an interactive shell, the value is interpreted as the
-number of seconds to wait for a line of input after issuing the
-primary prompt.
-<B>Bash</B>
-
-terminates after waiting for that number of seconds if a
-complete line of input does not arrive.
-<DT><B>TMPDIR</B>
-
-<DD>
-If set, <B>bash</B> uses its value as the name of a directory in which
-<B>bash</B> creates temporary files for the shell's use.
-<DT><B>auto_resume</B>
-
-<DD>
-This variable controls how the shell interacts with the user and
-job control.
-If this variable is set, simple commands
-consisting of only a single word,
-without redirections, are treated as candidates for resumption
-of an existing stopped job.
-There is no ambiguity allowed; if there is more than one job
-beginning with or containing
-the word, this selects the most recently accessed job.
-The
-<I>name</I>
-
-of a stopped job, in this context, is the command line used to
-start it, as displayed by <B>jobs</B>.
-If set to the value
-<I>exact</I>,
-
-the word must match the name of a stopped job exactly;
-if set to
-<I>substring</I>,
-
-the word needs to match a substring of the name of a stopped job.
-The
-<I>substring</I>
-
-value provides functionality analogous to the
-<B>%?</B>
-
-job identifier (see
-<FONT SIZE=-1><B>JOB CONTROL</B>
-
-</FONT>
-below).
-If set to any other value (e.g.,
-<I>prefix</I>),
-
-the word must be a prefix of a stopped job's name;
-this provides functionality analogous to the <B>%</B><I>string</I> job identifier.
-<DT><B>histchars</B>
-
-<DD>
-The two or three characters which control history expansion,
-quick substitution, and tokenization
-(see
-<FONT SIZE=-1><B>HISTORY EXPANSION</B>
-
-</FONT>
-below).
-The first character is the <I>history expansion</I> character,
-the character which begins a history expansion, normally
-
-The second character is the <I>quick substitution</I> character, normally
-
-When it appears as the first character on the line,
-history substitution repeats the previous command,
-replacing one string with another.
-The optional third character is the
-<I>history comment</I>
-character, normally
-
-which indicates
-that the remainder of the line is a comment
-when it appears as the first character of a word.
-The history comment character disables history substitution
-for the remaining words on the line.
-It does not necessarily cause the shell parser to treat the rest of the
-line as a comment.
-
-</DL>
-<A NAME="lbAY"> </A>
-<H4>Arrays</H4>
-
-<B>Bash</B>
-
-provides one-dimensional indexed and associative array variables.
-Any variable may be used as an indexed array; the
-<B>declare</B>
-
-builtin explicitly declares an array.
-There is no maximum
-limit on the size of an array, nor any requirement that members
-be indexed or assigned contiguously.
-Indexed arrays are referenced using arithmetic expressions
-that must expand to an integer
-(see
-<FONT SIZE=-1><B>ARITHMETIC EVALUATION</B>
-
-</FONT>
-below)
-and are zero-based;
-associative arrays are referenced using arbitrary strings.
-Unless otherwise noted, indexed array indices must be non-negative integers.
-<P>
-
-The shell performs
-parameter and variable expansion, arithmetic expansion,
-command substitution, and quote removal
-on indexed array subscripts.
-Since this
-can potentially result in empty strings,
-subscript indexing treats
-those as expressions that evaluate to 0.
-<P>
-
-The shell performs
-tilde expansion,
-parameter and variable expansion, arithmetic expansion,
-command substitution, and quote removal
-on associative array subscripts.
-Empty strings cannot be used as associative array keys.
-<P>
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="8%">
-<B>Bash</B> automatically creates an indexed array
-if any variable is assigned to using the syntax
-<DL COMPACT><DT><DD>
-<I>name</I>[<I>subscript</I>]=<I>value</I>
-.
-</DL>
-The
-<I>subscript</I>
+<p><b>OPTERR</b></p></td>
+<td width="1%"></td>
+<td width="82%">
-is treated as an arithmetic expression that must evaluate to a number
-greater than or equal to zero.
-To explicitly declare an indexed array, use
-<DL COMPACT><DT><DD>
-<B>declare -a </B><I>name</I>
-</DL>
+<p>If set to the value 1, <b>bash</b> displays error
+messages generated by the <b>getopts</b> builtin command
+(see <b><small>SHELL BUILTIN COMMANDS</small></b> below).
+<b><small>OPTERR</small></b> is initialized to 1 each time
+the shell is invoked or a shell script is executed.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="8%">
-(see
-<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
-</FONT>
-below).
-<DL COMPACT><DT><DD>
-<B>declare -a</B> <I>name</I>[<I>subscript</I>]
-</DL>
+<p><b>PATH</b></p></td>
+<td width="1%"></td>
+<td width="82%">
-is also accepted; the <I>subscript</I> is ignored.
-<P>
-Associative arrays are created using
-<DL COMPACT><DT><DD>
-<B>declare -A </B><I>name</I>
+<p>The search path for commands. It is a colon-separated
+list of directories in which the shell looks for commands
+(see <b><small>COMMAND EXECUTION</small></b> below). A
+zero-length (null) directory name in the value of
+<b><small>PATH</small></b> indicates the current directory.
+A null directory name may appear as two adjacent colons, or
+as an initial or trailing colon. The default path is
+system-dependent, and is set by the administrator who
+installs <b>bash</b>. A common value is</p></td></tr>
+</table>
-</DL>
-.
-<P>
+<p style="margin-left:24%;">/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin</p>
-Attributes may be specified for an array variable using the
-<B>declare</B>
+<p style="margin-left:9%;"><b>POSIXLY_CORRECT</b></p>
-and
-<B>readonly</B>
+<p style="margin-left:18%;">If this variable is in the
+environment when <b>bash</b> starts, the shell enters posix
+mode before reading the startup files, as if the
+<b>−−posix</b> invocation option had been
+supplied. If it is set while the shell is running,
+<b>bash</b> enables posix mode, as if the command “set
+−o posix” had been executed. When the shell
+enters posix mode, it sets this variable if it was not
+already set.</p>
-builtins.
-Each attribute applies to all members of an array.
-<P>
+<p style="margin-left:9%;"><b>PROMPT_COMMAND</b></p>
-Arrays are assigned using compound assignments of the form
-<I>name</I>=<B>(</B>value<I>1</I> ... value<I>n</I><B>)</B>, where each
-<I>value</I> may be of the form [<I>subscript</I>]=<I>string</I>.
-Indexed array assignments do not require anything but <I>string</I>.
-Each <I>value</I> in the list is expanded using the shell expansions
-described below under
-<FONT SIZE=-1><B>EXPANSION</B>,
-
-</FONT>
-but <I>value</I>s that are valid variable assignments
-including the brackets and subscript do not undergo
-brace expansion and word splitting, as with individual
-variable assignments.
-<P>
-
-When assigning to indexed arrays, if the optional brackets and subscript
-are supplied, that index is assigned to;
-otherwise the index of the element assigned is the last index assigned
-to by the statement plus one.
-Indexing starts at zero.
-<P>
-
-When assigning to an associative array, the words in a compound assignment
-may be either assignment statements, for which the subscript is required,
-or a list of words that is interpreted as a sequence of alternating keys
-and values:
-<I>name</I>=<B>( </B><I>key1 value1 key2 value2</I> ...<B>)</B>.
-These are treated identically to
-<I>name</I>=<B>(</B> [<I>key1</I>]=<I>value1</I> [<I>key2</I>]=<I>value2</I>
-...<B>)</B>.
-The first word in the list determines how the remaining words
-are interpreted; all assignments in a list must be of the same type.
-When using key/value pairs, the keys may not be missing or empty;
-a final missing value is treated like the empty string.
-<P>
-
-This syntax is also accepted by the
-<B>declare</B>
-
-builtin.
-Individual array elements may be assigned to using the
-<I>name</I>[<I>subscript</I>]=<I>value</I> syntax introduced above.
-<P>
-
-When assigning to an indexed array, if
-<I>name</I>
-
-is subscripted by a negative number, that number is
-interpreted as relative to one greater than the maximum index of
-<I>name</I>, so negative indices count back from the end of the
-array, and an index of -1 references the last element.
-<P>
-
-The
-
-operator appends to an array variable when assigning
-using the compound assignment syntax; see
-<FONT SIZE=-1><B>PARAMETERS</B>
-
-</FONT>
-above.
-<P>
-
-An array element is referenced using
-${<I>name</I>[<I>subscript</I>]}.
-The braces are required to avoid conflicts with pathname expansion.
-If <I>subscript</I> is <B>@</B> or <B>*</B>, the word expands to
-all members of <I>name</I>,
-unless noted in the description of a builtin or word expansion.
-These subscripts differ only when the
-word appears within double quotes.
-If the word is double-quoted, ${<I>name</I>[*]} expands to a single
-word with the value of each array member separated by the first
-character of the
-<FONT SIZE=-1><B>IFS</B>
-
-</FONT>
-special variable, and ${<I>name</I>[@]} expands each element of
-<I>name</I> to a separate word.
-When there are no array members, ${<I>name</I>[@]} expands to nothing.
-If the double-quoted expansion occurs within a word, the expansion of
-the first parameter is joined with the beginning part of the
-expansion of the original word,
-and the expansion of the last parameter is joined with the last
-part of the
-expansion of the original word.
-This is analogous to the expansion
-of the special parameters <B>*</B> and <B>@</B> (see
-<B>Special Parameters</B>
-
-above).
-<P>
-
-${#<I>name</I>[<I>subscript</I>]} expands to the length of
-${<I>name</I>[<I>subscript</I>]}.
-If <I>subscript</I> is <B>*</B> or <B>@</B>,
-the expansion is the number of elements in the array.
-<P>
-
-If the
-<I>subscript</I>
-
-used to reference an element of an indexed array
-evaluates to a number less than zero, it is
-interpreted as relative to one greater than the maximum index of the array,
-so negative indices count back from the end of the
-array, and an index of -1 references the last element.
-<P>
-
-Referencing an array variable without a subscript is equivalent to
-referencing the array with a subscript of 0.
-Any reference to a variable using a valid subscript is valid;
-<B>bash</B>
-
-creates an array if necessary.
-<P>
-
-An array variable is considered set if a subscript has been assigned a
-value.
-The null string is a valid value.
-<P>
-
-It is possible to obtain the keys (indices) of an array as well as the values.
-${<B>!</B><I>name</I>[<I>@</I>]} and ${<B>!</B><I>name</I>[<I>*</I>]}
-expand to the indices assigned in array variable <I>name</I>.
-The treatment when in double quotes is similar to the expansion of the
-special parameters <I>@</I> and <I>*</I> within double quotes.
-<P>
-
-The
-<B>unset</B>
-
-builtin is used to destroy arrays.
-<B>unset</B> <I>name</I>[<I>subscript</I>]
-unsets the array element at index <I>subscript</I>,
-for both indexed and associative arrays.
-Negative subscripts to indexed arrays are interpreted as described above.
-Unsetting the last element of an array variable does not unset the variable.
-<B>unset</B> <I>name</I>, where <I>name</I> is an array,
-removes the entire array.
-<B>unset</B> <I>name</I>[<I>subscript</I>]
-behaves differently depending on
-whether <I>name</I> is an indexed or associative array
-when <I>subscript</I> is <B>*</B> or <B>@</B>.
-If <I>name</I> is an associative array, this unsets the element with
-subscript <B>*</B> or <B>@</B>.
-If <I>name</I> is an indexed array, unset removes all of the elements but
-does not remove the array itself.
-<P>
-
-When using a variable name with a subscript as an argument to a command,
-such as with <B>unset</B>, without using the word expansion syntax
-described above,
-(e.g., unset a[4]),
-the argument is subject to pathname expansion.
-Quote the argument if pathname expansion is not desired
-(e.g., unset 'a[4]').
-<P>
-
-The
-<B>declare</B>,
-
-<B>local</B>,
-
-and
-<B>readonly</B>
-
-builtins each accept a
-<B>-a</B>
-
-option to specify an indexed array and a
-<B>-A</B>
-
-option to specify an associative array.
-If both options are supplied,
-<B>-A</B>
-
-takes precedence.
-The
-<B>read</B>
-
-builtin accepts a
-<B>-a</B>
-
-option to assign a list of words read from the standard input
-to an array.
-The
-<B>set</B>
-
-and
-<B>declare</B>
-
-builtins display array values in a way that allows them to be
-reused as assignments.
-Other builtins accept array name arguments as well
-(e.g., <B>mapfile</B>); see the descriptions
-of individual builtins below for details.
-The shell provides a number of builtin array variables.
-<A NAME="lbAZ"> </A>
-<H3>EXPANSION</H3>
-
-Expansion is performed on the command line after it has been split into
-words. The shell performs these expansions:
-<I>brace expansion</I>,
-
-<I>tilde expansion</I>,
-
-<I>parameter and variable expansion</I>,
-
-<I>command substitution</I>,
-
-<I>arithmetic expansion</I>,
-
-<I>word splitting</I>,
-
-<I>pathname expansion</I>,
-
-and
-<I>quote removal</I>.
-
-<P>
-
-The order of expansions is:
-brace expansion;
-tilde expansion, parameter and variable expansion, arithmetic expansion,
-and command substitution (done in a left-to-right fashion);
-word splitting;
-pathname expansion;
-and quote removal.
-<P>
-
-On systems that can support it, there is an additional expansion
-available: <I>process substitution</I>.
-This is performed at the
-same time as tilde, parameter, variable, and arithmetic expansion and
-command substitution.
-<P>
-
-<I>Quote removal</I> is always performed last.
-It removes quote characters present in the original word,
-not ones resulting from one of the other expansions,
-unless they have been quoted themselves.
-<P>
+<p style="margin-left:18%;">If this variable is set, and is
+an array, the value of each set element is executed as a
+command prior to issuing each primary prompt. If this is set
+but not an array variable, its value is used as a command to
+execute instead.</p>
-Only brace expansion, word splitting, and pathname expansion
-can increase the number of words of the expansion; other expansions
-expand a single word to a single word.
-The only exceptions to this are the expansions of
-<B>$@</B>
+<p style="margin-left:9%;"><b>PROMPT_DIRTRIM</b></p>
-and
-<B>${</B><I>name</I>[@]} <B></B>,
+<p style="margin-left:18%;">If set to a number greater than
+zero, the value is used as the number of trailing directory
+components to retain when expanding the <b>\w</b> and
+<b>\W</b> prompt string escapes (see
+<b><small>PROMPTING</small></b> below). Characters removed
+are replaced with an ellipsis.</p>
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="6%">
-and, in most cases, <B>$*</B> and <B>${</B><I>name</I><B>[*]}</B>
-as explained above (see
-<FONT SIZE=-1><B>PARAMETERS</B>).
+<p><b>PS0</b></p></td>
+<td width="3%"></td>
+<td width="82%">
-</FONT>
-<A NAME="lbBA"> </A>
-<H4>Brace Expansion</H4>
-<I>Brace expansion</I>
+<p>The value of this parameter is expanded (see
+<b><small>PROMPTING</small></b> below) and displayed by
+interactive shells after reading a command and before the
+command is executed.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="6%">
-is a mechanism to generate arbitrary strings
-sharing a common prefix and suffix, either of which can be empty.
-This mechanism is similar to
-<I>pathname expansion</I>, but the filenames generated
-need not exist.
-Patterns to be brace expanded are formed from an optional
-<I>preamble</I>,
-followed by either a series of comma-separated strings or
-a sequence expression between a pair of braces,
-followed by an optional
-<I>postscript</I>.
+<p><b>PS1</b></p></td>
+<td width="3%"></td>
+<td width="82%">
-The preamble is prefixed to each string contained within the braces,
-and the postscript is then appended to each resulting string,
-expanding left to right.
-<P>
-Brace expansions may be nested.
-The results of each expanded string are not sorted;
-brace expansion preserves left to right order.
-For example, a<B>{</B>d,c,b<B>}</B>e expands into
+<p>The value of this parameter is expanded (see
+<b><small>PROMPTING</small></b> below) and used as the
+primary prompt string. The default value is
+“\s−\v\$ ”.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="6%">
-<P>
-A sequence expression takes the form
-<I>x</I><B>..</B><I>y</I><B>[..</B><I>incr</I><B>]</B>,
-where <I>x</I> and <I>y</I> are either integers or single letters,
-and <I>incr</I>, an optional increment, is an integer.
-When integers are supplied, the expression expands to each number between
-<I>x</I> and <I>y</I>, inclusive.
-If either <I>x</I> or <I>y</I> begins with a zero,
-each generated term will contain the same number of digits,
-zero-padding where necessary.
-When letters are supplied, the expression expands to each character
-lexicographically between <I>x</I> and <I>y</I>, inclusive,
-using the C locale.
-Note that both <I>x</I> and <I>y</I> 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.
-<P>
+<p><b>PS2</b></p></td>
+<td width="3%"></td>
+<td width="82%">
-Brace expansion is performed before any other expansions,
-and any characters special to other expansions are preserved
-in the result.
-It is strictly textual.
-<B>Bash</B>
-does not apply any syntactic interpretation to the context of the
-expansion or the text between the braces.
-<P>
+<p>The value of this parameter is expanded as with
+<b><small>PS1</small></b> and used as the secondary prompt
+string. The default is “> ”.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="6%">
-A correctly-formed brace expansion must contain unquoted opening
-and closing braces, and at least one unquoted comma or a valid
-sequence expression.
-Any incorrectly formed brace expansion is left unchanged.
-<P>
-A
+<p><b>PS3</b></p></td>
+<td width="3%"></td>
+<td width="82%">
-or
-Q ,
-may be quoted with a backslash to prevent its
-being considered part of a brace expression.
-To avoid conflicts with parameter expansion, the string
-is not considered eligible for brace expansion,
-and inhibits brace expansion until the closing
+<p>The value of this parameter is used as the prompt for
+the <b>select</b> command (see <b><small>SHELL
+GRAMMAR</small></b> above).</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="6%">
-<P>
-This construct is typically used as shorthand when the common
-prefix of the strings to be generated is longer than in the
-above example:
-<P>
+<p><b>PS4</b></p></td>
+<td width="3%"></td>
+<td width="82%">
-<DL COMPACT><DT><DD>
-mkdir /usr/local/src/bash/{old,new,dist,bugs}
+<p>The value of this parameter is expanded as with
+<b><small>PS1</small></b> and the value is printed before
+each command <b>bash</b> displays during an execution trace.
+The first character of the expanded value of
+<b><small>PS4</small></b> is replicated multiple times, as
+necessary, to indicate multiple levels of indirection. The
+default is “+ ”.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="6%">
+
-</DL>
+<p><b>SHELL</b></p></td>
+<td width="3%"></td>
+<td width="82%">
-or
-<DL COMPACT><DT><DD>
-chown root /usr/{ucb/{ex,edit},lib/{ex?.?*,how_ex}}
+<p>This variable expands to the full pathname to the shell.
+If it is not set when the shell starts, <b>bash</b> assigns
+to it the full pathname of the current user’s login
+shell.</p> </td></tr>
+</table>
-</DL>
+<p style="margin-left:9%;"><b>TIMEFORMAT</b></p>
-<P>
+<p style="margin-left:18%;">The value of this parameter is
+used as a format string specifying how the timing
+information for pipelines prefixed with the <b>time</b>
+reserved word should be displayed. The <b>%</b> character
+introduces an escape sequence that is expanded to a time
+value or other information. The escape sequences and their
+meanings are as follows; the brackets denote optional
+portions.</p>
-Brace expansion introduces a slight incompatibility with
-historical versions of
-<B>sh</B>.
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="10%">
-<B>sh</B>
-does not treat opening or closing braces specially when they
-appear as part of a word, and preserves them in the output.
-<B>Bash</B>
+<p><b>%%</b></p></td>
+<td width="3%"></td>
+<td width="60%">
-removes braces from words as a consequence of brace expansion.
-For example, a word entered to
-<B>sh</B>
-as
+<p>A literal <b>%</b>.</p></td>
+<td width="9%">
+</td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="10%">
-appears identically in the output.
-<B>Bash</B>
-outputs that word as
+<p><b>%[</b><i>p</i><b>][l]R</b></p></td>
+<td width="3%"></td>
+<td width="60%">
-after brace expansion.
-Start
-<B>bash</B>
-with the
-<B>+B</B>
+<p>The elapsed time in seconds.</p></td>
+<td width="9%">
+</td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="10%">
-option or disable brace expansion with the
-<B>+B</B>
-option to the
-<B>set</B>
+<p><b>%[</b><i>p</i><b>][l]U</b></p></td>
+<td width="3%"></td>
+<td width="60%">
-command (see
-<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
-</FONT>
-below) for strict <B>sh</B> compatibility.
-<A NAME="lbBB"> </A>
-<H4>Tilde Expansion</H4>
+<p>The number of CPU seconds spent in user mode.</p></td>
+<td width="9%">
+</td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="10%">
+
+
+<p><b>%[</b><i>p</i><b>][l]S</b></p></td>
+<td width="3%"></td>
+<td width="60%">
+
+
+<p>The number of CPU seconds spent in system mode.</p></td>
+<td width="9%">
+</td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="10%">
+
+
+<p><b>%P</b></p></td>
+<td width="3%"></td>
+<td width="60%">
+
+
+<p>The CPU percentage, computed as (%U + %S) / %R.</p></td>
+<td width="9%">
+</td></tr>
+</table>
+
+<p style="margin-left:18%; margin-top: 1em">The optional
+<i>p</i> is a digit specifying the <i>precision</i>, the
+number of fractional digits after a decimal point. A value
+of 0 causes no decimal point or fraction to be output.
+<b>time</b> prints at most six digits after the decimal
+point; values of <i>p</i> greater than 6 are changed to 6.
+If <i>p</i> is not specified, <b>time</b> prints three
+digits after the decimal point.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The optional
+<b>l</b> specifies a longer format, including minutes, of
+the form <i>MM</i>m<i>SS</i>.<i>FF</i>s. The value of
+<i>p</i> determines whether or not the fraction is
+included.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If this
+variable is not set, <b>bash</b> acts as if it had the value
+<b>$'\nreal\t%3lR\nuser\t%3lU\nsys\t%3lS'</b>. If the value
+is null, <b>bash</b> does not display any timing
+information. A trailing newline is added when the format
+string is displayed.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="8%">
+
+
+<p style="margin-top: 1em"><b>TMOUT</b></p></td>
+<td width="1%"></td>
+<td width="82%">
+
+
+<p style="margin-top: 1em">If set to a value greater than
+zero, the <b>read</b> builtin uses the value as its default
+timeout. The <b>select</b> command terminates if input does
+not arrive after <b><small>TMOUT</small></b> seconds when
+input is coming from a terminal. In an interactive shell,
+the value is interpreted as the number of seconds to wait
+for a line of input after issuing the primary prompt.
+<b>Bash</b> terminates after waiting for that number of
+seconds if a complete line of input does not arrive.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="8%">
+
+
+<p><b>TMPDIR</b></p></td>
+<td width="1%"></td>
+<td width="82%">
+
+
+<p>If set, <b>bash</b> uses its value as the name of a
+directory in which <b>bash</b> creates temporary files for
+the shell’s use.</p></td></tr>
+</table>
+
+<p style="margin-left:9%;"><b>auto_resume</b></p>
+
+<p style="margin-left:18%;">This variable controls how the
+shell interacts with the user and job control. If this
+variable is set, simple commands consisting of only a single
+word, without redirections, are treated as candidates for
+resumption of an existing stopped job. There is no ambiguity
+allowed; if there is more than one job beginning with or
+containing the word, this selects the most recently accessed
+job. The <i>name</i> of a stopped job, in this context, is
+the command line used to start it, as displayed by
+<b>jobs</b>. If set to the value <i>exact</i>, the word must
+match the name of a stopped job exactly; if set to
+<i>substring</i>, the word needs to match a substring of the
+name of a stopped job. The <i>substring</i> value provides
+functionality analogous to the <b>%?</b> job identifier (see
+<b><small>JOB CONTROL</small></b> below). If set to any
+other value (e.g., <i>prefix</i>), the word must be a prefix
+of a stopped job’s name; this provides functionality
+analogous to the <b>%</b><i>string</i> job identifier.</p>
+
+<p style="margin-left:9%;"><b>histchars</b></p>
+
+<p style="margin-left:18%;">The two or three characters
+which control history expansion, quick substitution, and
+tokenization (see <b><small>HISTORY EXPANSION</small></b>
+below). The first character is the <i>history expansion</i>
+character, the character which begins a history expansion,
+normally “<b>!</b>”. The second character is the
+<i>quick substitution</i> character, normally
+“<b>^</b>”. When it appears as the first
+character on the line, history substitution repeats the
+previous command, replacing one string with another. The
+optional third character is the <i>history comment</i>
+character, normally “<b>#</b>”, which indicates
+that the remainder of the line is a comment when it appears
+as the first character of a word. The history comment
+character disables history substitution for the remaining
+words on the line. It does not necessarily cause the shell
+parser to treat the rest of the line as a comment.</p>
+
+<h3>Arrays
+<a name="Arrays"></a>
+</h3>
+
+
+<p style="margin-left:9%; margin-top: 1em"><b>Bash</b>
+provides one-dimensional indexed and associative array
+variables. Any variable may be used as an indexed array; the
+<b>declare</b> builtin explicitly declares an array. There
+is no maximum limit on the size of an array, nor any
+requirement that members be indexed or assigned
+contiguously. Indexed arrays are referenced using arithmetic
+expressions that must expand to an integer (see
+<b><small>ARITHMETIC EVALUATION</small></b> below) and are
+zero-based; associative arrays are referenced using
+arbitrary strings. Unless otherwise noted, indexed array
+indices must be non-negative integers.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The shell
+performs parameter and variable expansion, arithmetic
+expansion, command substitution, and quote removal on
+indexed array subscripts. Since this can potentially result
+in empty strings, subscript indexing treats those as
+expressions that evaluate to 0.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The shell
+performs tilde expansion, parameter and variable expansion,
+arithmetic expansion, command substitution, and quote
+removal on associative array subscripts. Empty strings
+cannot be used as associative array keys.</p>
+
+<p style="margin-left:9%; margin-top: 1em"><b>Bash</b>
+automatically creates an indexed array if any variable is
+assigned to using the syntax</p>
+
+
+<p style="margin-left:18%;"><i>name</i>[<i>subscript</i>]=<i>value</i>
+.</p>
+
+<p style="margin-left:9%;">The <i>subscript</i> is treated
+as an arithmetic expression that must evaluate to a number
+greater than or equal to zero. To explicitly declare an
+indexed array, use</p>
+
+<p style="margin-left:18%;"><b>declare
+−a </b><i>name</i></p>
+
+<p style="margin-left:9%;">(see <b><small>SHELL BUILTIN
+COMMANDS</small></b> below).</p>
+
+<p style="margin-left:18%;"><b>declare −a</b>
+<i>name</i>[<i>subscript</i>]</p>
+
+<p style="margin-left:9%;">is also accepted; the
+<i>subscript</i> is ignored.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Associative
+arrays are created using</p>
+
+<p style="margin-left:18%;"><b>declare
+−A </b><i>name</i></p>
+
+<p style="margin-left:9%;">.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Attributes may
+be specified for an array variable using the <b>declare</b>
+and <b>readonly</b> builtins. Each attribute applies to all
+members of an array.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Arrays are
+assigned using compound assignments of the form
+<i>name</i>=<b>(</b>value<i>1</i> ... value<i>n</i><b>)</b>,
+where each <i>value</i> may be of the form
+[<i>subscript</i>]=<i>string</i>. Indexed array assignments
+do not require anything but <i>string</i>. Each <i>value</i>
+in the list is expanded using the shell expansions described
+below under <b><small>EXPANSION</small></b><small>,</small>
+but <i>value</i>s that are valid variable assignments
+including the brackets and subscript do not undergo brace
+expansion and word splitting, as with individual variable
+assignments.</p>
+
+<p style="margin-left:9%; margin-top: 1em">When assigning
+to indexed arrays, if the optional brackets and subscript
+are supplied, that index is assigned to; otherwise the index
+of the element assigned is the last index assigned to by the
+statement plus one. Indexing starts at zero.</p>
+
+<p style="margin-left:9%; margin-top: 1em">When assigning
+to an associative array, the words in a compound assignment
+may be either assignment statements, for which the subscript
+is required, or a list of words that is interpreted as a
+sequence of alternating keys and values:
+<i>name</i>=<b>(</b> <i>key1 value1 key2 value2</i>
+...<b>)</b>. These are treated identically to
+<i>name</i>=<b>(</b> [<i>key1</i>]=<i>value1</i>
+[<i>key2</i>]=<i>value2</i> ...<b>)</b>. The first word in
+the list determines how the remaining words are interpreted;
+all assignments in a list must be of the same type. When
+using key/value pairs, the keys may not be missing or empty;
+a final missing value is treated like the empty string.</p>
+
+<p style="margin-left:9%; margin-top: 1em">This syntax is
+also accepted by the <b>declare</b> builtin. Individual
+array elements may be assigned to using the
+<i>name</i>[<i>subscript</i>]=<i>value</i> syntax introduced
+above.</p>
+
+<p style="margin-left:9%; margin-top: 1em">When assigning
+to an indexed array, if <i>name</i> is subscripted by a
+negative number, that number is interpreted as relative to
+one greater than the maximum index of <i>name</i>, so
+negative indices count back from the end of the array, and
+an index of −1 references the last element.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The
+“+=” operator appends to an array variable when
+assigning using the compound assignment syntax; see
+<b><small>PARAMETERS</small></b> above.</p>
+
+<p style="margin-left:9%; margin-top: 1em">An array element
+is referenced using ${<i>name</i>[<i>subscript</i>]}. The
+braces are required to avoid conflicts with pathname
+expansion. If <i>subscript</i> is <b>@</b> or <b>*</b>, the
+word expands to all members of <i>name</i>, unless noted in
+the description of a builtin or word expansion. These
+subscripts differ only when the word appears within double
+quotes. If the word is double-quoted, ${<i>name</i>[*]}
+expands to a single word with the value of each array member
+separated by the first character of the
+<b><small>IFS</small></b> special variable, and
+${<i>name</i>[@]} expands each element of <i>name</i> to a
+separate word. When there are no array members,
+${<i>name</i>[@]} expands to nothing. If the double-quoted
+expansion occurs within a word, the expansion of the first
+parameter is joined with the beginning part of the expansion
+of the original word, and the expansion of the last
+parameter is joined with the last part of the expansion of
+the original word. This is analogous to the expansion of the
+special parameters <b>*</b> and <b>@</b> (see <b>Special
+Parameters</b> above).</p>
+
+
+<p style="margin-left:9%; margin-top: 1em">${#<i>name</i>[<i>subscript</i>]}
+expands to the length of ${<i>name</i>[<i>subscript</i>]}.
+If <i>subscript</i> is <b>*</b> or <b>@</b>, the expansion
+is the number of elements in the array.</p>
+
+<p style="margin-left:9%; margin-top: 1em">If the
+<i>subscript</i> used to reference an element of an indexed
+array evaluates to a number less than zero, it is
+interpreted as relative to one greater than the maximum
+index of the array, so negative indices count back from the
+end of the array, and an index of −1 references the
+last element.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Referencing an
+array variable without a subscript is equivalent to
+referencing the array with a subscript of 0. Any reference
+to a variable using a valid subscript is valid; <b>bash</b>
+creates an array if necessary.</p>
+
+<p style="margin-left:9%; margin-top: 1em">An array
+variable is considered set if a subscript has been assigned
+a value. The null string is a valid value.</p>
+
+<p style="margin-left:9%; margin-top: 1em">It is possible
+to obtain the keys (indices) of an array as well as the
+values. ${<b>!</b><i>name</i>[<i>@</i>]} and
+${<b>!</b><i>name</i>[<i>*</i>]} expand to the indices
+assigned in array variable <i>name</i>. The treatment when
+in double quotes is similar to the expansion of the special
+parameters <i>@</i> and <i>*</i> within double quotes.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The <b>unset</b>
+builtin is used to destroy arrays. <b>unset</b>
+<i>name</i>[<i>subscript</i>] unsets the array element at
+index <i>subscript</i>, for both indexed and associative
+arrays. Negative subscripts to indexed arrays are
+interpreted as described above. Unsetting the last element
+of an array variable does not unset the variable.
+<b>unset</b> <i>name</i>, where <i>name</i> is an array,
+removes the entire array. <b>unset</b>
+<i>name</i>[<i>subscript</i>] behaves differently depending
+on whether <i>name</i> is an indexed or associative array
+when <i>subscript</i> is <b>*</b> or <b>@</b>. If
+<i>name</i> is an associative array, this unsets the element
+with subscript <b>*</b> or <b>@</b>. If <i>name</i> is an
+indexed array, unset removes all of the elements but does
+not remove the array itself.</p>
+
+<p style="margin-left:9%; margin-top: 1em">When using a
+variable name with a subscript as an argument to a command,
+such as with <b>unset</b>, without using the word expansion
+syntax described above, (e.g., unset a[4]), the argument is
+subject to pathname expansion. Quote the argument if
+pathname expansion is not desired (e.g., unset 'a[4]').</p>
+
+<p style="margin-left:9%; margin-top: 1em">The
+<b>declare</b>, <b>local</b>, and <b>readonly</b> builtins
+each accept a <b>−a</b> option to specify an indexed
+array and a <b>−A</b> option to specify an associative
+array. If both options are supplied, <b>−A</b> takes
+precedence. The <b>read</b> builtin accepts a
+<b>−a</b> option to assign a list of words read from
+the standard input to an array. The <b>set</b> and
+<b>declare</b> builtins display array values in a way that
+allows them to be reused as assignments. Other builtins
+accept array name arguments as well (e.g., <b>mapfile</b>);
+see the descriptions of individual builtins below for
+details. The shell provides a number of builtin array
+variables.</p>
+
+<h2>EXPANSION
+<a name="EXPANSION"></a>
+</h2>
+
+
+<p style="margin-left:9%; margin-top: 1em">Expansion is
+performed on the command line after it has been split into
+words. The shell performs these expansions: <i>brace
+expansion</i>, <i>tilde expansion</i>, <i>parameter and
+variable expansion</i>, <i>command substitution</i>,
+<i>arithmetic expansion</i>, <i>word splitting</i>,
+<i>pathname expansion</i>, and <i>quote removal</i>.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The order of
+expansions is: brace expansion; tilde expansion, parameter
+and variable expansion, arithmetic expansion, and command
+substitution (done in a left-to-right fashion); word
+splitting; pathname expansion; and quote removal.</p>
+
+<p style="margin-left:9%; margin-top: 1em">On systems that
+can support it, there is an additional expansion available:
+<i>process substitution</i>. This is performed at the same
+time as tilde, parameter, variable, and arithmetic expansion
+and command substitution.</p>
+
+<p style="margin-left:9%; margin-top: 1em"><i>Quote
+removal</i> is always performed last. It removes quote
+characters present in the original word, not ones resulting
+from one of the other expansions, unless they have been
+quoted themselves.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Only brace
+expansion, word splitting, and pathname expansion can
+increase the number of words of the expansion; other
+expansions expand a single word to a single word. The only
+exceptions to this are the expansions of
+<b>"$@"</b> and
+<b>"${</b><i>name</i><b>[@]}"</b>, and, in most
+cases, <b>$*</b> and <b>${</b><i>name</i><b>[*]}</b> as
+explained above (see
+<b><small>PARAMETERS</small></b><small>).</small></p>
+
+<h3>Brace Expansion
+<a name="Brace Expansion"></a>
+</h3>
+
+
+<p style="margin-left:9%; margin-top: 1em"><i>Brace
+expansion</i> is a mechanism to generate arbitrary strings
+sharing a common prefix and suffix, either of which can be
+empty. This mechanism is similar to <i>pathname
+expansion</i>, but the filenames generated need not exist.
+Patterns to be brace expanded are formed from an optional
+<i>preamble</i>, followed by either a series of
+comma-separated strings or a sequence expression between a
+pair of braces, followed by an optional <i>postscript</i>.
+The preamble is prefixed to each string contained within the
+braces, and the postscript is then appended to each
+resulting string, expanding left to right.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Brace expansions
+may be nested. The results of each expanded string are not
+sorted; brace expansion preserves left to right order. For
+example, a<b>{</b>d,c,b<b>}</b>e expands into “ade ace
+abe”.</p>
+
+<p style="margin-left:9%; margin-top: 1em">A sequence
+expression takes the form
+<i>x</i><b>..</b><i>y</i><b>[..</b><i>incr</i><b>]</b>,
+where <i>x</i> and <i>y</i> are either integers or single
+letters, and <i>incr</i>, an optional increment, is an
+integer. When integers are supplied, the expression expands
+to each number between <i>x</i> and <i>y</i>, inclusive. If
+either <i>x</i> or <i>y</i> begins with a zero, each
+generated term will contain the same number of digits,
+zero-padding where necessary. When letters are supplied, the
+expression expands to each character lexicographically
+between <i>x</i> and <i>y</i>, inclusive, using the C
+locale. Note that both <i>x</i> and <i>y</i> 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.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Brace expansion
+is performed before any other expansions, and any characters
+special to other expansions are preserved in the result. It
+is strictly textual. <b>Bash</b> does not apply any
+syntactic interpretation to the context of the expansion or
+the text between the braces.</p>
+
+<p style="margin-left:9%; margin-top: 1em">A
+correctly-formed brace expansion must contain unquoted
+opening and closing braces, and at least one unquoted comma
+or a valid sequence expression. Any incorrectly formed brace
+expansion is left unchanged.</p>
+
+<p style="margin-left:9%; margin-top: 1em">A
+“{” or Q , may be quoted with a backslash to
+prevent its being considered part of a brace expression. To
+avoid conflicts with parameter expansion, the string
+“${” is not considered eligible for brace
+expansion, and inhibits brace expansion until the closing
+“}”.</p>
+
+<p style="margin-left:9%; margin-top: 1em">This construct
+is typically used as shorthand when the common prefix of the
+strings to be generated is longer than in the above
+example:</p>
+
+<p style="margin-left:18%; margin-top: 1em">mkdir
+/usr/local/src/bash/{old,new,dist,bugs}</p>
+
+<p style="margin-left:9%;">or</p>
+
+<p style="margin-left:18%;">chown root
+/usr/{ucb/{ex,edit},lib/{ex?.?*,how_ex}}</p>
+
+<p style="margin-left:9%; margin-top: 1em">Brace expansion
+introduces a slight incompatibility with historical versions
+of <b>sh</b>. <b>sh</b> does not treat opening or closing
+braces specially when they appear as part of a word, and
+preserves them in the output. <b>Bash</b> removes braces
+from words as a consequence of brace expansion. For example,
+a word entered to <b>sh</b> as “file{1,2}”
+appears identically in the output. <b>Bash</b> outputs that
+word as “file1 file2” after brace expansion.
+Start <b>bash</b> with the <b>+B</b> option or disable brace
+expansion with the <b>+B</b> option to the <b>set</b>
+command (see <b><small>SHELL BUILTIN COMMANDS</small></b>
+below) for strict <b>sh</b> compatibility.</p>
+
+<h3>Tilde Expansion
+<a name="Tilde Expansion"></a>
+</h3>
+
+
+<p style="margin-left:9%; margin-top: 1em">If a word begins
+with an unquoted tilde character (“<b>~</b>”),
+all of the characters preceding the first unquoted slash (or
+all characters, if there is no unquoted slash) are
+considered a <i>tilde-prefix</i>. 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
+<i>login name</i>. If this login name is the null string,
+the tilde is replaced with the value of the shell parameter
+<b><small>HOME</small></b><small>.</small> If
+<b><small>HOME</small></b> is unset, the tilde expands to
+the home directory of the user executing the shell instead.
+Otherwise, the tilde-prefix is replaced with the home
+directory associated with the specified login name.</p>
+
+<p style="margin-left:9%; margin-top: 1em">If the
+tilde-prefix is a “~+”, the value of the shell
+variable <b><small>PWD</small></b> replaces the
+tilde-prefix. If the tilde-prefix is a
+“~−”, the shell substitutes the value of
+the shell variable
+<b><small>OLDPWD</small></b><small>,</small> if it is set.
+If the characters following the tilde in the tilde-prefix
+consist of a number <i>N</i>, optionally prefixed by a
+“+” or a “−”, the tilde-prefix
+is replaced with the corresponding element from the
+directory stack, as it would be displayed by the <b>dirs</b>
+builtin invoked with the characters following the tilde in
+the tilde-prefix as an argument. If the characters following
+the tilde in the tilde-prefix consist of a number without a
+leading “+” or “−”, tilde
+expansion assumes “+”.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The results of
+tilde expansion are treated as if they were quoted, so the
+replacement is not subject to word splitting and pathname
+expansion.</p>
+
+<p style="margin-left:9%; margin-top: 1em">If the login
+name is invalid, or the tilde expansion fails, the
+tilde-prefix is unchanged.</p>
+
+<p style="margin-left:9%; margin-top: 1em"><b>Bash</b>
+checks each variable assignment for unquoted tilde-prefixes
+immediately following a <b>:</b> or the first <b>=</b>, and
+performs tilde expansion in these cases. Consequently, one
+may use filenames with tildes in assignments to
+<b><small>PATH</small></b><small>, <b>MAILPATH</b>,</small>
+and <b><small>CDPATH</small></b><small>,</small> and the
+shell assigns the expanded value.</p>
+
+<p style="margin-left:9%; margin-top: 1em"><b>Bash</b> also
+performs tilde expansion on words satisfying the conditions
+of variable assignments (as described above under
+<b><small>PARAMETERS</small></b><small>)</small> when they
+appear as arguments to simple commands. <b>Bash</b> does not
+do this, except for the <i>declaration</i> commands listed
+above, when in posix mode.</p>
+
+<h3>Parameter Expansion
+<a name="Parameter Expansion"></a>
+</h3>
+
+
+<p style="margin-left:9%; margin-top: 1em">The
+“<b>$</b>” character introduces parameter
+expansion, command substitution, or arithmetic expansion.
+The parameter name or symbol to be expanded may be enclosed
+in braces, which are optional but serve to protect the
+variable to be expanded from characters immediately
+following it which could be interpreted as part of the
+name.</p>
+
+<p style="margin-left:9%; margin-top: 1em">When braces are
+used, the matching ending brace is the first
+“<b>}</b>” not escaped by a backslash or within
+a quoted string, and not within an embedded arithmetic
+expansion, command substitution, or parameter expansion.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The basic form
+of parameter expansion is</p>
+
+
+<p style="margin-left:9%; margin-top: 1em">${<i>parameter</i>}</p>
+
+<p style="margin-left:9%; margin-top: 1em">which
+substitutes the value of <i>parameter</i>. The braces are
+required when <i>parameter</i> is a positional parameter
+with more than one digit, or when <i>parameter</i> is
+followed by a character which is not to be interpreted as
+part of its name. The <i>parameter</i> is a shell parameter
+as described above <b>PARAMETERS</b>) or an array reference
+(<b>Arrays</b>).</p>
+
+<p style="margin-left:9%; margin-top: 1em">If the first
+character of <i>parameter</i> is an exclamation point
+(<b>!</b>), and <i>parameter</i> is not a <i>nameref</i>, it
+introduces a level of indirection. <b>Bash</b> uses the
+value formed by expanding the rest of <i>parameter</i> as
+the new <i>parameter</i>; this new parameter is then
+expanded and that value is used in the rest of the
+expansion, rather than the expansion of the original
+<i>parameter</i>. This is known as <i>indirect
+expansion</i>. The value is subject to tilde expansion,
+parameter expansion, command substitution, and arithmetic
+expansion. If <i>parameter</i> is a nameref, this expands to
+the name of the parameter referenced by <i>parameter</i>
+instead of performing the complete indirect expansion, for
+compatibility. The exceptions to this are the expansions of
+${<b>!</b><i>prefix</i><b>*</b>} and
+${<b>!</b><i>name</i>[<i>@</i>]} described below. The
+exclamation point must immediately follow the left brace in
+order to introduce indirection.</p>
+
+<p style="margin-left:9%; margin-top: 1em">In each of the
+cases below, <i>word</i> is subject to tilde expansion,
+parameter expansion, command substitution, and arithmetic
+expansion.</p>
+
+<p style="margin-left:9%; margin-top: 1em">When not
+performing substring expansion, using the forms documented
+below (e.g., <b>:-</b>), <b>bash</b> tests for a parameter
+that is unset or null. Omitting the colon tests only for a
+parameter that is unset. <br>
+${<i>parameter</i><b>:−</b><i>word</i>}</p>
+
+<p style="margin-left:18%;"><b>Use Default Values</b>. If
+<i>parameter</i> is unset or null, the expansion of
+<i>word</i> is substituted. Otherwise, the value of
+<i>parameter</i> is substituted.</p>
+
+
+<p style="margin-left:9%;">${<i>parameter</i><b>:=</b><i>word</i>}</p>
+
+<p style="margin-left:18%;"><b>Assign Default Values</b>.
+If <i>parameter</i> is unset or null, the expansion of
+<i>word</i> is assigned to <i>parameter</i>, and the
+expansion is the final value of <i>parameter</i>. Positional
+parameters and special parameters may not be assigned in
+this way.</p>
+
+
+<p style="margin-left:9%;">${<i>parameter</i><b>:?</b><i>word</i>}</p>
+
+<p style="margin-left:18%;"><b>Display Error if Null or
+Unset</b>. If <i>parameter</i> is null or unset, the shell
+writes the expansion of <i>word</i> (or a message to that
+effect if <i>word</i> is not present) to the standard error
+and, if it is not interactive, exits with a non-zero status.
+An interactive shell does not exit, but does not execute the
+command associated with the expansion. Otherwise, the value
+of <i>parameter</i> is substituted.</p>
+
+
+<p style="margin-left:9%;">${<i>parameter</i><b>:+</b><i>word</i>}</p>
+
+<p style="margin-left:18%;"><b>Use Alternate Value</b>. If
+<i>parameter</i> is null or unset, nothing is substituted,
+otherwise the expansion of <i>word</i> is substituted. The
+value of <i>parameter</i> is not used.</p>
+
+
+<p style="margin-left:9%;">${<i>parameter</i><b>:</b><i>offset</i>}
+<br>
+
+${<i>parameter</i><b>:</b><i>offset</i><b>:</b><i>length</i>}</p>
+
+<p style="margin-left:18%;"><b>Substring Expansion</b>.
+Expands to up to <i>length</i> characters of the value of
+<i>parameter</i> starting at the character specified by
+<i>offset</i>. If <i>parameter</i> is <b>@</b> or <b>*</b>,
+an indexed array subscripted by <b>@</b> or <b>*</b>, or an
+associative array name, the results differ as described
+below. If <b>:</b><i>length</i> is omitted (the first form
+above), this expands to the substring of the value of
+<i>parameter</i> starting at the character specified by
+<i>offset</i> and extending to the end of the value. If
+<i>offset</i> is omitted, it is treated as 0. If
+<i>length</i> is omitted, but the colon after <i>offset</i>
+is present, it is treated as 0. <i>length</i> and
+<i>offset</i> are arithmetic expressions (see
+<b><small>ARITHMETIC EVALUATION</small></b> below).</p>
+
+<p style="margin-left:18%; margin-top: 1em">If
+<i>offset</i> evaluates to a number less than zero, the
+value is used as an offset in characters from the end of the
+value of <i>parameter</i>. If <i>length</i> evaluates to a
+number less than zero, it is interpreted as an offset in
+characters from the end of the value of <i>parameter</i>
+rather than a number of characters, and the expansion is the
+characters between <i>offset</i> and that result. Note that
+a negative offset must be separated from the colon by at
+least one space to avoid being confused with the <b>:-</b>
+expansion.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If
+<i>parameter</i> is <b>@</b> or <b>*</b>, the result is
+<i>length</i> positional parameters beginning at
+<i>offset</i>. A negative <i>offset</i> is taken relative to
+one greater than the greatest positional parameter, so an
+offset of −1 evaluates to the last positional
+parameter (or 0 if there are no positional parameters). It
+is an expansion error if <i>length</i> evaluates to a number
+less than zero.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If
+<i>parameter</i> is an indexed array name subscripted by @
+or *, the result is the <i>length</i> members of the array
+beginning with ${<i>parameter</i>[<i>offset</i>]}. A
+negative <i>offset</i> is taken relative to one greater than
+the maximum index of the specified array. It is an expansion
+error if <i>length</i> evaluates to a number less than
+zero.</p>
+
+<p style="margin-left:18%; margin-top: 1em">Substring
+expansion applied to an associative array produces undefined
+results.</p>
+
+<p style="margin-left:18%; margin-top: 1em">Substring
+indexing is zero-based unless the positional parameters are
+used, in which case the indexing starts at 1 by default. If
+<i>offset</i> is 0, and the positional parameters are used,
+<b>$0</b> is prefixed to the list.</p>
+
+
+<p style="margin-left:9%;">${<b>!</b><i>prefix</i><b>*</b>}
+<br>
+${<b>!</b><i>prefix</i><b>@</b>}</p>
+
+<p style="margin-left:18%;"><b>Names matching prefix</b>.
+Expands to the names of variables whose names begin with
+<i>prefix</i>, separated by the first character of the
+<b><small>IFS</small></b> special variable. When <i>@</i> is
+used and the expansion appears within double quotes, each
+variable name expands to a separate word.</p>
+
+
+<p style="margin-left:9%;">${<b>!</b><i>name</i>[<i>@</i>]}
+<br>
+${<b>!</b><i>name</i>[<i>*</i>]}</p>
+
+<p style="margin-left:18%;"><b>List of array keys</b>. If
+<i>name</i> is an array variable, expands to the list of
+array indices (keys) assigned in <i>name</i>. If <i>name</i>
+is not an array, expands to 0 if <i>name</i> is set and null
+otherwise. When <i>@</i> is used and the expansion appears
+within double quotes, each key expands to a separate
+word.</p>
+
+<p style="margin-left:9%;">${<b>#</b><i>parameter</i>}</p>
+
+<p style="margin-left:18%;"><b>Parameter length</b>.
+Substitutes the length in characters of the expanded value
+of <i>parameter</i>. If <i>parameter</i> is <b>*</b> or
+<b>@</b>, the value substituted is the number of positional
+parameters. If <i>parameter</i> is an array name subscripted
+by <b>*</b> or <b>@</b>, the value substituted is the number
+of elements in the array. If <i>parameter</i> is an indexed
+array name subscripted by a negative number, that number is
+interpreted as relative to one greater than the maximum
+index of <i>parameter</i>, so negative indices count back
+from the end of the array, and an index of −1
+references the last element.</p>
+
+
+<p style="margin-left:9%;">${<i>parameter</i><b>#</b><i>word</i>}
+<br>
+${<i>parameter</i><b>##</b><i>word</i>}</p>
+
+<p style="margin-left:18%;"><b>Remove matching prefix
+pattern</b>. The <i>word</i> is expanded to produce a
+pattern just as in pathname expansion, and matched against
+the expanded value of <i>parameter</i> using the rules
+described under <b>Pattern Matching</b> below. If the
+pattern matches the beginning of the value of
+<i>parameter</i>, then the result of the expansion is the
+expanded value of <i>parameter</i> with the shortest
+matching pattern (the “#” case) or the longest
+matching pattern (the “##” case) deleted. If
+<i>parameter</i> is <b>@</b> or <b>*</b>, the pattern
+removal operation is applied to each positional parameter in
+turn, and the expansion is the resultant list. If
+<i>parameter</i> is an array variable subscripted with
+<b>@</b> or <b>*</b>, the pattern removal operation is
+applied to each member of the array in turn, and the
+expansion is the resultant list.</p>
+
+
+<p style="margin-left:9%;">${<i>parameter</i><b>%</b><i>word</i>}
+<br>
+${<i>parameter</i><b>%%</b><i>word</i>}</p>
+
+<p style="margin-left:18%;"><b>Remove matching suffix
+pattern</b>. The <i>word</i> is expanded to produce a
+pattern just as in pathname expansion, and matched against
+the expanded value of <i>parameter</i> using the rules
+described under <b>Pattern Matching</b> below. If the
+pattern matches a trailing portion of the expanded value of
+<i>parameter</i>, then the result of the expansion is the
+expanded value of <i>parameter</i> with the shortest
+matching pattern (the “%” case) or the longest
+matching pattern (the “%%” case) deleted. If
+<i>parameter</i> is <b>@</b> or <b>*</b>, the pattern
+removal operation is applied to each positional parameter in
+turn, and the expansion is the resultant list. If
+<i>parameter</i> is an array variable subscripted with
+<b>@</b> or <b>*</b>, the pattern removal operation is
+applied to each member of the array in turn, and the
+expansion is the resultant list.</p>
+
+
+<p style="margin-left:9%;">${<i>parameter</i><b>/</b><i>pattern</i><b>/</b><i>string</i>}
+<br>
+
+${<i>parameter</i><b>//</b><i>pattern</i><b>/</b><i>string</i>}
+<br>
+
+${<i>parameter</i><b>/#</b><i>pattern</i><b>/</b><i>string</i>}
+<br>
+
+${<i>parameter</i><b>/%</b><i>pattern</i><b>/</b><i>string</i>}</p>
+
+<p style="margin-left:18%;"><b>Pattern substitution</b>.
+The <i>pattern</i> is expanded to produce a pattern and
+matched against the expanded value of <i>parameter</i> as
+described under <b>Pattern Matching</b> below. The longest
+match of <i>pattern</i> in the expanded value is replaced
+with <i>string</i>. <i>string</i> undergoes tilde expansion,
+parameter and variable expansion, arithmetic expansion,
+command and process substitution, and quote removal.</p>
+
+<p style="margin-left:18%; margin-top: 1em">In the first
+form above, only the first match is replaced. If there are
+two slashes separating <i>parameter</i> and <i>pattern</i>
+(the second form above), all matches of <i>pattern</i> are
+replaced with <i>string</i>. If <i>pattern</i> is preceded
+by <b>#</b> (the third form above), it must match at the
+beginning of the expanded value of <i>parameter</i>. If
+<i>pattern</i> is preceded by <b>%</b> (the fourth form
+above), it must match at the end of the expanded value of
+<i>parameter</i>.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If the
+expansion of <i>string</i> is null, matches of
+<i>pattern</i> are deleted and the <b>/</b> following
+<i>pattern</i> may be omitted.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If the
+<b>patsub_replacement</b> shell option is enabled using
+<b>shopt</b>, any unquoted instances of <b>&</b> in
+<i>string</i> are replaced with the matching portion of
+<i>pattern</i>.</p>
+
+<p style="margin-left:18%; margin-top: 1em">Quoting any
+part of <i>string</i> inhibits replacement in the expansion
+of the quoted portion, including replacement strings stored
+in shell variables. Backslash escapes <b>&</b> in
+<i>string</i>; the backslash is removed in order to permit a
+literal <b>&</b> in the replacement string. Backslash
+can also be used to escape a backslash; <b>\\</b> results in
+a literal backslash in the replacement. Users should take
+care if <i>string</i> 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 <b>&</b>
+after expanding <i>string</i>; shell programmers should
+quote any occurrences of <b>&</b> they want to be taken
+literally in the replacement and ensure any instances of
+<b>&</b> they want to be replaced are unquoted.</p>
+
+<p style="margin-left:18%; margin-top: 1em">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.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If the
+<b>nocasematch</b> shell option is enabled, the match is
+performed without regard to the case of alphabetic
+characters.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If
+<i>parameter</i> is <b>@</b> or <b>*</b>, the substitution
+operation is applied to each positional parameter in turn,
+and the expansion is the resultant list. If <i>parameter</i>
+is an array variable subscripted with <b>@</b> or <b>*</b>,
+the substitution operation is applied to each member of the
+array in turn, and the expansion is the resultant list.</p>
+
+
+<p style="margin-left:9%;">${<i>parameter</i><b>^</b><i>pattern</i>}
+<br>
+${<i>parameter</i><b>^^</b><i>pattern</i>} <br>
+${<i>parameter</i><b>,</b><i>pattern</i>} <br>
+${<i>parameter</i><b>,,</b><i>pattern</i>}</p>
+
+<p style="margin-left:18%;"><b>Case modification</b>. This
+expansion modifies the case of alphabetic characters in
+<i>parameter</i>. First, the <i>pattern</i> is expanded to
+produce a pattern as described below under <b><small>Pattern
+Matching</small></b><small>.</small> <b>Bash</b> then
+examines characters in the expanded value of
+<i>parameter</i> against <i>pattern</i> as described below.
+If a character matches the pattern, its case is converted.
+The pattern should not attempt to match more than one
+character.</p>
+
+<p style="margin-left:18%; margin-top: 1em">Using
+“^” converts lowercase letters matching
+<i>pattern</i> to uppercase; “,” converts
+matching uppercase letters to lowercase. The <b>^</b> and
+<b>,</b> variants examine the first character in the
+expanded value and convert its case if it matches
+<i>pattern</i>; the <b>^^</b> and <b>,,</b> variants examine
+all characters in the expanded value and convert each one
+that matches <i>pattern</i>. If <i>pattern</i> is omitted,
+it is treated like a <b>?</b>, which matches every
+character.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If
+<i>parameter</i> is <b>@</b> or <b>*</b>, the case
+modification operation is applied to each positional
+parameter in turn, and the expansion is the resultant list.
+If <i>parameter</i> is an array variable subscripted with
+<b>@</b> or <b>*</b>, the case modification operation is
+applied to each member of the array in turn, and the
+expansion is the resultant list.</p>
+
-If a word begins with an unquoted tilde character (
+<p style="margin-left:9%;">${<i>parameter</i><b>@</b><i>operator</i>}</p>
-all of
-the characters preceding the first unquoted slash (or all characters,
-if there is no unquoted slash) are considered a <I>tilde-prefix</I>.
-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 <I>login name</I>.
-If this login name is the null string, the tilde is replaced with the
-value of the shell parameter
-<FONT SIZE=-1><B>HOME</B>.
+<p style="margin-left:18%;"><b>Parameter
+transformation</b>. The expansion is either a transformation
+of the value of <i>parameter</i> or information about
+<i>parameter</i> itself, depending on the value of
+<i>operator</i>. Each <i>operator</i> is a single
+letter:</p>
-</FONT>
-If
-<FONT SIZE=-1><B>HOME</B>
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="1%">
-</FONT>
-is unset, the tilde expands to
-the home directory of the user executing the shell instead.
-Otherwise, the tilde-prefix is replaced with the home directory
-associated with the specified login name.
-<P>
-If the tilde-prefix is a
+<p><b>U</b></p></td>
+<td width="8%"></td>
+<td width="73%">
-the value of the shell variable
-<FONT SIZE=-1><B>PWD</B>
-</FONT>
-replaces the tilde-prefix.
-If the tilde-prefix is a
+<p>The expansion is a string that is the value of
+<i>parameter</i> with lowercase alphabetic characters
+converted to uppercase.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="1%">
-the shell substitutes the value of the shell variable
-<FONT SIZE=-1><B>OLDPWD</B>,
-</FONT>
-if it is set.
-If the characters following the tilde in the tilde-prefix consist
-of a number <I>N</I>, optionally prefixed
-by a
+<p><b>u</b></p></td>
+<td width="8%"></td>
+<td width="73%">
-or a
-the tilde-prefix is replaced with the corresponding
-element from the directory stack, as it would be displayed by the
-<B>dirs</B>
+<p>The expansion is a string that is the value of
+<i>parameter</i> with the first character converted to
+uppercase, if it is alphabetic.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="1%">
-builtin invoked with the characters following the tilde in the
-tilde-prefix as an argument.
-If the characters following the tilde in the tilde-prefix consist of a
-number without a leading
-or
+<p><b>L</b></p></td>
+<td width="8%"></td>
+<td width="73%">
-tilde expansion assumes
-<P>
+<p>The expansion is a string that is the value of
+<i>parameter</i> with uppercase alphabetic characters
+converted to lowercase.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="1%">
-The results of tilde expansion are treated as if they were quoted, so
-the replacement is not subject to word splitting and pathname expansion.
-<P>
-If the login name is invalid, or the tilde expansion fails, the
-tilde-prefix is unchanged.
-<P>
+<p><b>Q</b></p></td>
+<td width="8%"></td>
+<td width="73%">
-<B>Bash</B> checks each variable assignment
-for unquoted tilde-prefixes immediately
-following a
-<B>:</B>
-or the first
-<B>=</B>,
+<p>The expansion is a string that is the value of
+<i>parameter</i> quoted in a format that can be reused as
+input.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="1%">
-and performs tilde expansion in these cases.
-Consequently, one may use filenames with tildes in assignments to
-<FONT SIZE=-1><B>PATH</B>,
-</FONT>
-<FONT SIZE=-1><B>MAILPATH</B>,
+<p><b>E</b></p></td>
+<td width="8%"></td>
+<td width="73%">
-</FONT>
-and
-<FONT SIZE=-1><B>CDPATH</B>,
-</FONT>
-and the shell assigns the expanded value.
-<P>
+<p>The expansion is a string that is the value of
+<i>parameter</i> with backslash escape sequences expanded as
+with the <b>$'</b>...<b>'</b> quoting mechanism.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="1%">
-<B>Bash</B> also performs tilde expansion on words satisfying the conditions
-of variable assignments (as described above under
-<FONT SIZE=-1><B>PARAMETERS</B>)
-
-</FONT>
-when they appear as arguments to simple commands.
-<B>Bash</B> does not do this,
-except for the <I>declaration</I> commands listed above,
-when in posix mode.
-<A NAME="lbBC"> </A>
-<H4>Parameter Expansion</H4>
-
-The
-
-character introduces parameter expansion,
-command substitution, or arithmetic expansion.
-The parameter name
-or symbol to be expanded may be enclosed in braces, which
-are optional but serve to protect the variable to be expanded from
-characters immediately following it which could be
-interpreted as part of the name.
-<P>
-
-When braces are used, the matching ending brace is the first
-
-not escaped by a backslash or within a quoted string, and not within an
-embedded arithmetic expansion, command substitution, or parameter
-expansion.
-<P>
-
-The basic form of parameter expansion is
-<P>
-
-${<I>parameter</I>}
-<P>
-
-which substitutes the value of <I>parameter</I>.
-The braces are required
-when
-<I>parameter</I>
-
-is a positional parameter with more than one digit,
-or when
-<I>parameter</I>
-
-is followed by a character which is not to be
-interpreted as part of its name.
-The <I>parameter</I> is a shell parameter as described above
-<B>PARAMETERS</B>) or an array reference (<B>Arrays</B>).
-
-<P>
-
-If the first character of <I>parameter</I> is an exclamation point (<B>!</B>),
-and <I>parameter</I> is not a <I>nameref</I>,
-it introduces a level of indirection.
-<B>Bash</B> uses the value formed by expanding the rest of
-<I>parameter</I> as the new <I>parameter</I>;
-this new parameter is then expanded and that value is used
-in the rest of the expansion, rather
-than the expansion of the original <I>parameter</I>.
-This is known as <I>indirect expansion</I>.
-The value is subject to tilde expansion,
-parameter expansion, command substitution, and arithmetic expansion.
-If <I>parameter</I> is a nameref, this expands to the name of the
-parameter referenced by <I>parameter</I> instead of performing the
-complete indirect expansion, for compatibility.
-The exceptions to this are the expansions of ${<B>!</B><I>prefix</I><B>*</B>} and
-${<B>!</B><I>name</I>[<I>@</I>]} described below.
-The exclamation point must immediately follow the left brace in order to
-introduce indirection.
-<P>
-
-In each of the cases below, <I>word</I> is subject to tilde expansion,
-parameter expansion, command substitution, and arithmetic expansion.
-<P>
-
-When not performing substring expansion, using the forms documented below
-(e.g., <B>:-</B>),
-<B>bash</B> tests for a parameter that is unset or null.
-Omitting the colon tests only for a parameter that is unset.
-<P>
-
-<DL COMPACT>
-<DT>${<I>parameter</I><B>:-</B><I>word</I>}<DD>
-<B>Use Default Values</B>. If
-<I>parameter</I>
-
-is unset or null, the expansion of
-<I>word</I>
-
-is substituted.
-Otherwise, the value of
-<I>parameter</I>
-
-is substituted.
-<DT>${<I>parameter</I><B>:=</B><I>word</I>}<DD>
-<B>Assign Default Values</B>.
-If
-<I>parameter</I>
-
-is unset or null, the expansion of
-<I>word</I>
-
-is assigned to
-<I>parameter</I>,
-
-and the expansion is the final value of
-<I>parameter</I>.
-
-Positional parameters and special parameters may
-not be assigned in this way.
-<DT>${<I>parameter</I><B>:?</B><I>word</I>}<DD>
-<B>Display Error if Null or Unset</B>.
-If
-<I>parameter</I>
-
-is null or unset, the shell writes
-the expansion of <I>word</I> (or a message to that effect
-if
-<I>word</I>
-
-is not present) to the standard error and, if it
-is not interactive, exits with a non-zero status.
-An interactive shell does not exit, but does not execute the command
-associated with the expansion.
-Otherwise, the value of <I>parameter</I> is substituted.
-<DT>${<I>parameter</I><B>:+</B><I>word</I>}<DD>
-<B>Use Alternate Value</B>.
-If
-<I>parameter</I>
-
-is null or unset, nothing is substituted, otherwise the expansion of
-<I>word</I>
-
-is substituted.
-The value of <I>parameter</I> is not used.
-<DT>
-<DD>
-${<I>parameter</I><B>:</B><I>offset</I>}
-<DT>
-<DD>
-${<I>parameter</I><B>:</B><I>offset</I><B>:</B><I>length</I>}
-<B>Substring Expansion</B>.
-Expands to up to <I>length</I> characters of the value of <I>parameter</I>
-starting at the character specified by <I>offset</I>.
-If <I>parameter</I> is <B>@</B> or <B>*</B>, an indexed array subscripted by
-<B>@</B> or <B>*</B>, or an associative array name, the results differ as
-described below.
-If <B>:</B><I>length</I> is omitted (the first form above), this
-expands to the substring of the value of
-<I>parameter</I> starting at the character specified by <I>offset</I>
-and extending to the end of the value.
-If <I>offset</I> is omitted,
-it is treated as 0.
-If <I>length</I> is omitted,
-but the colon after <I>offset</I> is present,
-it is treated as 0.
-<I>length</I> and <I>offset</I> are arithmetic expressions (see
-<FONT SIZE=-1><B>ARITHMETIC EVALUATION</B>
-
-</FONT>
-below).
-<DT><DD>
-If <I>offset</I> evaluates to a number less than zero, the value
-is used as an offset in characters
-from the end of the value of <I>parameter</I>.
-If <I>length</I> evaluates to a number less than zero,
-it is interpreted as an offset in characters
-from the end of the value of <I>parameter</I> rather than
-a number of characters, and the expansion is the characters between
-<I>offset</I> and that result.
-Note that a negative offset must be separated from the colon by at least
-one space to avoid being confused with the <B>:-</B> expansion.
-<DT><DD>
-If <I>parameter</I> is <B>@</B> or <B>*</B>, the result is <I>length</I>
-positional parameters beginning at <I>offset</I>.
-A negative <I>offset</I> is taken relative to one greater than the greatest
-positional parameter, so an offset of -1 evaluates to the last positional
-parameter (or 0 if there are no positional parameters).
-It is an expansion error if <I>length</I> evaluates to a number less than
-zero.
-<DT><DD>
-If <I>parameter</I> is an indexed array name subscripted by @ or *,
-the result is the <I>length</I>
-members of the array beginning with ${<I>parameter</I>[<I>offset</I>]}.
-A negative <I>offset</I> is taken relative to one greater than the maximum
-index of the specified array.
-It is an expansion error if <I>length</I> evaluates to a number less than
-zero.
-<DT><DD>
-Substring expansion applied to an associative array produces undefined
-results.
-<DT><DD>
-Substring indexing is zero-based unless the positional parameters
-are used, in which case the indexing starts at 1 by default.
-If <I>offset</I> is 0, and the positional parameters are used, <B>$0</B> is
-prefixed to the list.
-<DT>
-<DD>
-${<B>!</B><I>prefix</I><B>*</B>}
-<DT>${<B>!</B><I>prefix</I><B>@</B>}<DD>
-
-<B>Names matching prefix</B>.
-Expands to the names of variables whose names begin with <I>prefix</I>,
-separated by the first character of the
-<FONT SIZE=-1><B>IFS</B>
-
-</FONT>
-special variable.
-When <I>@</I> is used and the expansion appears within double quotes, each
-variable name expands to a separate word.
-<DT>
-<DD>
-${<B>!</B><I>name</I>[<I>@</I>]}
-<DT>${<B>!</B><I>name</I>[<I>*</I>]}<DD>
-
-<B>List of array keys</B>.
-If <I>name</I> is an array variable, expands to the list of array indices
-(keys) assigned in <I>name</I>.
-If <I>name</I> is not an array, expands to 0 if <I>name</I> is set and null
-otherwise.
-When <I>@</I> is used and the expansion appears within double quotes, each
-key expands to a separate word.
-<DT>${<B>#</B><I>parameter</I>}<DD>
-<B>Parameter length</B>.
-Substitutes the length in characters of the expanded value of <I>parameter</I>.
-If
-<I>parameter</I>
-
-is
-<B>*</B>
-
-or
-<B>@</B>,
-
-the value substituted is the number of positional parameters.
-If
-<I>parameter</I>
-
-is an array name subscripted by
-<B>*</B>
-
-or
-<B>@</B>,
-
-the value substituted is the number of elements in the array.
-If
-<I>parameter</I>
-
-is an indexed array name subscripted by a negative number, that number is
-interpreted as relative to one greater than the maximum index of
-<I>parameter</I>, so negative indices count back from the end of the
-array, and an index of -1 references the last element.
-<DT>
-<DD>
-${<I>parameter</I><B>#</B><I>word</I>}
-<DT>${<I>parameter</I><B>##</B><I>word</I>}<DD>
-
-<B>Remove matching prefix pattern</B>.
-The
-<I>word</I>
-
-is expanded to produce a pattern just as in pathname
-expansion, and matched against the expanded value of
-<I>parameter</I>
-
-using the rules described under
-<B>Pattern Matching</B>
-
-below.
-If the pattern matches the beginning of
-the value of
-<I>parameter</I>,
-
-then the result of the expansion is the expanded value of
-<I>parameter</I>
-
-with the shortest matching pattern (the
-
-case) or the longest matching pattern (the
-
-case) deleted.
-If
-<I>parameter</I>
-
-is
-<B>@</B>
-
-or
-<B>*</B>,
-
-the pattern removal operation is applied to each positional
-parameter in turn, and the expansion is the resultant list.
-If
-<I>parameter</I>
-is an array variable subscripted with
-<B>@</B>
+<p><b>P</b></p></td>
+<td width="8%"></td>
+<td width="73%">
-or
-<B>*</B>,
-the pattern removal operation is applied to each member of the
-array in turn, and the expansion is the resultant list.
-<DT>
-<DD>
-${<I>parameter</I><B>%</B><I>word</I>}
-<DT>${<I>parameter</I><B>%%</B><I>word</I>}<DD>
+<p>The expansion is a string that is the result of
+expanding the value of <i>parameter</i> as if it were a
+prompt string (see <b>PROMPTING</b> below).</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="1%">
-<B>Remove matching suffix pattern</B>.
-The <I>word</I> is expanded to produce a pattern just as in
-pathname expansion, and matched against the expanded value of
-<I>parameter</I>
-using the rules described under
-<B>Pattern Matching</B>
+<p><b>A</b></p></td>
+<td width="8%"></td>
+<td width="73%">
-below.
-If the pattern matches a trailing portion of the expanded value of
-<I>parameter</I>,
-then the result of the expansion is the expanded value of
-<I>parameter</I>
+<p>The expansion is a string in the form of an assignment
+statement or <b>declare</b> command that, if evaluated,
+recreates <i>parameter</i> with its attributes and
+value.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="1%">
-with the shortest matching pattern (the
-case) or the longest matching pattern (the
+<p><b>K</b></p></td>
+<td width="8%"></td>
+<td width="73%">
-case) deleted.
-If
-<I>parameter</I>
-is
-<B>@</B>
+<p>Produces a possibly-quoted version of the value of
+<i>parameter</i>, except that it prints the values of
+indexed and associative arrays as a sequence of quoted
+key-value pairs (see <b>Arrays</b> above). The keys and
+values are quoted in a format that can be reused as
+input.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="1%">
-or
-<B>*</B>,
-the pattern removal operation is applied to each positional
-parameter in turn, and the expansion is the resultant list.
-If
-<I>parameter</I>
-
-is an array variable subscripted with
-<B>@</B>
-
-or
-<B>*</B>,
-
-the pattern removal operation is applied to each member of the
-array in turn, and the expansion is the resultant list.
-<DT>
-<DD>
-${<I>parameter</I><B>/</B><I>pattern</I><B>/</B><I>string</I>}
-<DT>${<I>parameter</I><B>//</B><I>pattern</I><B>/</B><I>string</I>}<DD>
-<DT>${<I>parameter</I><B>/#</B><I>pattern</I><B>/</B><I>string</I>}<DD>
-<DT>${<I>parameter</I><B>/%</B><I>pattern</I><B>/</B><I>string</I>}<DD>
-
-<B>Pattern substitution</B>.
-The <I>pattern</I> is expanded to produce a pattern
-and matched against the expanded value of <I>parameter</I>
-as described under
-<B>Pattern Matching</B>
-
-below.
-The longest match of <I>pattern</I>
-in the expanded value is replaced with <I>string</I>.
-<I>string</I> undergoes tilde expansion, parameter and variable expansion,
-arithmetic expansion, command and process substitution, and quote removal.
-<DT><DD>
-In the first form above, only the first match is replaced.
-If there are two slashes separating <I>parameter</I> and <I>pattern</I>
-(the second form above), all matches of <I>pattern</I> are
-replaced with <I>string</I>.
-If <I>pattern</I> is preceded by <B>#</B> (the third form above),
-it must match at the beginning of the expanded value of <I>parameter</I>.
-If <I>pattern</I> is preceded by <B>%</B> (the fourth form above),
-it must match at the end of the expanded value of <I>parameter</I>.
-<DT><DD>
-If the expansion of <I>string</I> is null,
-matches of <I>pattern</I> are deleted
-and the <B>/</B> following <I>pattern</I> may be omitted.
-<DT><DD>
-If the <B>patsub_replacement</B> shell option is enabled using <B>shopt</B>,
-any unquoted instances of <B>&</B> in <I>string</I> are replaced with the
-matching portion of <I>pattern</I>.
-<DT><DD>
-Quoting any part of <I>string</I> inhibits replacement in the
-expansion of the quoted portion, including replacement strings stored
-in shell variables.
-Backslash escapes <B>&</B> in <I>string</I>; the backslash is removed
-in order to permit a literal <B>&</B> in the replacement string.
-Backslash can also be used to escape a backslash; <B>\\</B> results in
-a literal backslash in the replacement.
-Users should take care if <I>string</I> 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 <B>&</B> after
-expanding <I>string</I>;
-shell programmers should quote any occurrences of <B>&</B>
-they want to be taken literally in the replacement
-and ensure any instances of <B>&</B> they want to be replaced are unquoted.
-<DT><DD>
-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.
-<DT><DD>
-If the
-<B>nocasematch</B>
-
-shell option is enabled, the match is performed without regard to the case
-of alphabetic characters.
-<DT><DD>
-If
-<I>parameter</I>
-
-is
-<B>@</B>
-
-or
-<B>*</B>,
-
-the substitution operation is applied to each positional
-parameter in turn, and the expansion is the resultant list.
-If
-<I>parameter</I>
+<p><b>a</b></p></td>
+<td width="8%"></td>
+<td width="73%">
-is an array variable subscripted with
-<B>@</B>
-or
-<B>*</B>,
+<p>The expansion is a string consisting of flag values
+representing <i>parameter</i>’s attributes.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="1%">
-the substitution operation is applied to each member of the
-array in turn, and the expansion is the resultant list.
-<DT>
-<DD>
-${<I>parameter</I><B>^</B><I>pattern</I>}
-<DT>${<I>parameter</I><B>^^</B><I>pattern</I>}<DD>
-<DT>${<I>parameter</I><B>,</B><I>pattern</I>}<DD>
-<DT>${<I>parameter</I><B>,,</B><I>pattern</I>}<DD>
-
-<B>Case modification</B>.
-This expansion modifies the case of alphabetic characters in <I>parameter</I>.
-First, the <I>pattern</I> is expanded to produce a pattern
-as described below under
-<FONT SIZE=-1><B>Pattern Matching</B>.
-
-</FONT>
-<B>Bash</B>
-
-then examines characters in the expanded value of <I>parameter</I>
-against <I>pattern</I> as described below.
-If a character matches the pattern, its case is converted.
-The pattern should not attempt to match more than one character.
-<DT><DD>
-Using
-
-converts lowercase letters matching <I>pattern</I> to uppercase;
-
-converts matching uppercase letters to lowercase.
-The
-<B>^</B> and <B>,</B> variants
-examine the first character in the expanded value
-and convert its case if it matches <I>pattern</I>;
-the
-<B>^^</B> and <B>,,</B> variants
-examine all characters in the expanded value
-and convert each one that matches <I>pattern</I>.
-If <I>pattern</I> is omitted, it is treated like a <B>?</B>, which matches
-every character.
-<DT><DD>
-If
-<I>parameter</I>
-
-is
-<B>@</B>
-
-or
-<B>*</B>,
-
-the case modification operation is applied to each positional
-parameter in turn, and the expansion is the resultant list.
-If
-<I>parameter</I>
-
-is an array variable subscripted with
-<B>@</B>
-
-or
-<B>*</B>,
-
-the case modification operation is applied to each member of the
-array in turn, and the expansion is the resultant list.
-<DT>
-<DD>
-${<I>parameter</I><B>@</B><I>operator</I>}
-<B>Parameter transformation</B>.
-The expansion is either a transformation of the value of <I>parameter</I>
-or information about <I>parameter</I> itself, depending on the value of
-<I>operator</I>. Each <I>operator</I> is a single letter:
-</DL>
-<P>
-
-<DL COMPACT><DT><DD>
-<DL COMPACT>
-<DT><B>U</B>
-
-<DD>
-The expansion is a string that is the value of <I>parameter</I> with lowercase
-alphabetic characters converted to uppercase.
-<DT><B>u</B>
-
-<DD>
-The expansion is a string that is the value of <I>parameter</I> with the first
-character converted to uppercase, if it is alphabetic.
-<DT><B>L</B>
-
-<DD>
-The expansion is a string that is the value of <I>parameter</I> with uppercase
-alphabetic characters converted to lowercase.
-<DT><B>Q</B>
-
-<DD>
-The expansion is a string that is the value of <I>parameter</I> quoted in a
-format that can be reused as input.
-<DT><B>E</B>
-
-<DD>
-The expansion is a string that is the value of <I>parameter</I> with backslash
-escape sequences expanded as with the <B>$'</B>...<B>'</B>
-quoting mechanism.
-<DT><B>P</B>
-
-<DD>
-The expansion is a string that is the result of expanding the value of
-<I>parameter</I> as if it were a prompt string (see <B>PROMPTING</B> below).
-<DT><B>A</B>
-
-<DD>
-The expansion is a string in the form of
-an assignment statement or <B>declare</B> command that, if
-evaluated, recreates <I>parameter</I> with its attributes and value.
-<DT><B>K</B>
-
-<DD>
-Produces a possibly-quoted version of the value of <I>parameter</I>,
-except that it prints the values of
-indexed and associative arrays as a sequence of quoted key-value pairs
-(see <B>Arrays</B> above).
-The keys and values are quoted in a format that can be reused as input.
-<DT><B>a</B>
-
-<DD>
-The expansion is a string consisting of flag values representing
-<I>parameter</I>'s attributes.
-<DT><B>k</B>
-
-<DD>
-Like the K transformation, but expands the keys and values of
-indexed and associative arrays to separate words after word splitting.
-
-</DL>
-<P>
-
-If
-<I>parameter</I>
-
-is
-<B>@</B>
-
-or
-<B>*</B>,
-
-the operation is applied to each positional
-parameter in turn, and the expansion is the resultant list.
-If
-<I>parameter</I>
-
-is an array variable subscripted with
-<B>@</B>
-
-or
-<B>*</B>,
-
-the operation is applied to each member of the
-array in turn, and the expansion is the resultant list.
-<P>
-
-The result of the expansion is subject to word splitting and pathname
-expansion as described below.
-</DL>
-
-<A NAME="lbBD"> </A>
-<H4>Command Substitution</H4>
-
-<I>Command substitution</I> allows the output of a command to replace
-the command itself.
-There are two standard forms:
-<DL COMPACT><DT><DD>
-<P>
-
-<B>$(</B><I>command</I><B>)</B>
-</DL>
-
-or (deprecated)
-<DL COMPACT><DT><DD>
-<B>`</B><I>command</I><B>`</B>.
-</DL>
-
-<P>
-
-<B>Bash</B>
-
-performs the expansion by executing <I>command</I> in a subshell environment
-and replacing the command substitution with the standard output of the
-command, with any trailing newlines deleted.
-Embedded newlines are not deleted, but they may be removed during
-word splitting.
-The command substitution <B>$(cat </B><I>file</I>) can be replaced by
-the equivalent but faster <B>$(< </B><I>file</I>).
-<P>
-
-With the old-style backquote form of substitution,
-backslash retains its literal meaning except when followed by
-<B>$</B>,
-
-<B>`</B>,
-
-or
-<B>\</B>.
-
-The first backquote not preceded by a backslash terminates the
-command substitution.
-When using the $(<I>command</I>) form, all characters between the
-parentheses make up the command; none are treated specially.
-<P>
-
-There is an alternate form of command substitution:
-<DL COMPACT><DT><DD>
-<P>
-
-<B>${</B><I>c</I> <I>command</I><B>;</B><B>}</B>
-</DL>
-
-<P>
-
-which executes <I>command</I> in the current execution environment
-and captures its output, again with trailing newlines removed.
-<P>
-
-The character <I>c</I> following the open brace must be a space, tab,
-newline, or <B>|</B>, and the close brace must be in a position
-where a reserved word may appear (i.e., preceded by a command terminator
-such as semicolon).
-<B>Bash</B> allows the close brace to be joined to the remaining characters in
-the word without being followed by a shell metacharacter as a reserved
-word would usually require.
-<P>
-
-Any side effects of <I>command</I> take effect immediately
-in the current execution environment and persist in the current
-environment after the command completes (e.g., the <B>exit</B> builtin
-exits the shell).
-<P>
-
-This type of command substitution superficially resembles executing an
-unnamed shell function: local variables are created as when a shell
-function is executing, and the <B>return</B> builtin forces
-<I>command</I> to complete;
-however, the rest of the execution environment,
-including the positional parameters, is shared with the caller.
-<P>
-
-If the first character following the open brace
-is a <B>|</B>, the construct expands to the
-value of the <B>REPLY</B> shell variable after <I>command</I> executes,
-without removing any trailing newlines,
-and the standard output of <I>command</I> remains the same as in the
-calling shell.
-<B>Bash</B> creates <B>REPLY</B> as an initially-unset local variable when
-<I>command</I> executes, and restores <B>REPLY</B> to the value it had
-before the command substitution after <I>command</I> completes,
-as with any local variable.
-<P>
-
-Command substitutions may be nested. To nest when using the backquoted form,
-escape the inner backquotes with backslashes.
-<P>
-
-If the substitution appears within double quotes, <B>bash</B> does not perform
-word splitting and pathname expansion on the results.
-<A NAME="lbBE"> </A>
-<H4>Arithmetic Expansion</H4>
-
-Arithmetic expansion evaluates an arithmetic expression
-and substitutes the result.
-The format for arithmetic expansion is:
-<DL COMPACT><DT><DD>
-<P>
-
-<B>$((</B><I>expression</I><B>))</B>
-</DL>
-
-<P>
-
-The
-<I>expression</I>
-
-undergoes the same expansions
-as if it were within double quotes,
-but unescaped double quote characters
-in <I>expression</I> 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.
-Since the way Bash handles double quotes
-can potentially result in empty strings,
-arithmetic expansion treats
-those as expressions that evaluate to 0.
-Arithmetic expansions may be nested.
-<P>
-
-The evaluation is performed according to the rules listed below under
-<FONT SIZE=-1><B>ARITHMETIC EVALUATION</B>.
-
-</FONT>
-If
-<I>expression</I>
-
-is invalid,
-<B>bash</B>
-
-prints a message to standard error indicating failure,
-does not perform the substitution,
-and does not execute the command associated with the expansion.
-<A NAME="lbBF"> </A>
-<H4>Process Substitution</H4>
-
-<I>Process substitution</I> allows a process's input or output to be
-referred to using a filename.
-It takes the form of
-<B><(</B><I>list</I><B>)</B>
-or
-<B>>(</B><I>list</I><B>)</B>.
-The process <I>list</I> is run asynchronously, and its input or output
-appears as a filename.
-This filename is
-passed as an argument to the current command as the result of the
-expansion.
-<P>
-
-If the
-<B>>(</B><I>list</I><B>)</B> form is used, writing to
-the file provides input for <I>list</I>.
-If the
-<B><(</B><I>list</I><B>)</B> form is used, reading the file
-obtains the output of <I>list</I>.
-No space may appear between the <B><</B> or <B>></B>
-and the left parenthesis, otherwise the construct would be interpreted
-as a redirection.
-<P>
-
-Process substitution is supported on systems that support named
-pipes (<I>FIFOs</I>) or the <I>/dev/fd</I> method of naming open files.
-<P>
-
-When available, process substitution is performed
-simultaneously with parameter and variable expansion,
-command substitution,
-and arithmetic expansion.
-<A NAME="lbBG"> </A>
-<H4>Word Splitting</H4>
-
-The shell scans the results of
-parameter expansion,
-command substitution,
-and
-arithmetic expansion
-that did not occur within double quotes for
-<I>word splitting</I>.
-
-Words that were not expanded are not split.
-<P>
-
-The shell treats each character of
-<FONT SIZE=-1><B>IFS</B>
-
-</FONT>
-as a delimiter,
-and splits the results of the other expansions into words
-using these characters as field terminators.
-<P>
-An <I>IFS whitespace</I> character is whitespace as defined above
-(see <B>Definitions</B>) that appears in the value of
-<FONT SIZE=-1><B>IFS</B>.
+<p><b>k</b></p></td>
+<td width="8%"></td>
+<td width="73%">
-</FONT>
-Space, tab, and newline are always considered IFS whitespace, even
-if they don't appear in the locale's <B>space</B> category.
-<P>
-If
-<FONT SIZE=-1><B>IFS</B>
+<p>Like the K transformation, but expands the keys and
+values of indexed and associative arrays to separate words
+after word splitting.</p></td></tr>
+</table>
-</FONT>
-is unset, field splitting acts as if its value were
-<B><space><tab><newline></B>,
+<p style="margin-left:18%; margin-top: 1em">If
+<i>parameter</i> is <b>@</b> or <b>*</b>, the operation is
+applied to each positional parameter in turn, and the
+expansion is the resultant list. If <i>parameter</i> is an
+array variable subscripted with <b>@</b> or <b>*</b>, the
+operation is applied to each member of the array in turn,
+and the expansion is the resultant list.</p>
-and treats these characters as IFS whitespace.
-If the value of
-<FONT SIZE=-1><B>IFS</B>
+<p style="margin-left:18%; margin-top: 1em">The result of
+the expansion is subject to word splitting and pathname
+expansion as described below.</p>
-</FONT>
-is null, no word splitting occurs,
-but implicit null arguments (see below) are still removed.
-<P>
+<h3>Command Substitution
+<a name="Command Substitution"></a>
+</h3>
-Word splitting begins by removing sequences of IFS whitespace characters
-from the beginning and end of the results of the previous expansions,
-then splits the remaining words.
-<P>
-If the value of
-<FONT SIZE=-1><B>IFS</B>
+<p style="margin-left:9%; margin-top: 1em"><i>Command
+substitution</i> allows the output of a command to replace
+the command itself. There are two standard forms:</p>
-</FONT>
-consists solely of IFS whitespace,
+
+<p style="margin-left:18%; margin-top: 1em"><b>$(</b><i>command</i><b>)</b></p>
+
+<p style="margin-left:9%;">or (deprecated)</p>
+
+
+<p style="margin-left:18%;"><b>`</b><i>command</i><b>`</b>.</p>
+
+<p style="margin-left:9%; margin-top: 1em"><b>Bash</b>
+performs the expansion by executing <i>command</i> in a
+subshell environment and replacing the command substitution
+with the standard output of the command, with any trailing
+newlines deleted. Embedded newlines are not deleted, but
+they may be removed during word splitting. The command
+substitution <b>$(cat</b> <i>file</i><b>)</b> can be
+replaced by the equivalent but faster <b>$(<</b>
+<i>file</i><b>)</b>.</p>
+
+<p style="margin-left:9%; margin-top: 1em">With the
+old-style backquote form of substitution, backslash retains
+its literal meaning except when followed by <b>$</b>,
+<b>`</b>, or <b>\</b>. The first backquote not preceded by a
+backslash terminates the command substitution. When using
+the $(<i>command</i>) form, all characters between the
+parentheses make up the command; none are treated
+specially.</p>
+
+<p style="margin-left:9%; margin-top: 1em">There is an
+alternate form of command substitution:</p>
+
+<p style="margin-left:18%; margin-top: 1em"><b>${</b><i>c
+command</i><b>;}</b></p>
+
+<p style="margin-left:9%; margin-top: 1em">which executes
+<i>command</i> in the current execution environment and
+captures its output, again with trailing newlines
+removed.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The character
+<i>c</i> following the open brace must be a space, tab,
+newline, or <b>|</b>, and the close brace must be in a
+position where a reserved word may appear (i.e., preceded by
+a command terminator such as semicolon). <b>Bash</b> allows
+the close brace to be joined to the remaining characters in
+the word without being followed by a shell metacharacter as
+a reserved word would usually require.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Any side effects
+of <i>command</i> take effect immediately in the current
+execution environment and persist in the current environment
+after the command completes (e.g., the <b>exit</b> builtin
+exits the shell).</p>
+
+<p style="margin-left:9%; margin-top: 1em">This type of
+command substitution superficially resembles executing an
+unnamed shell function: local variables are created as when
+a shell function is executing, and the <b>return</b> builtin
+forces <i>command</i> to complete; however, the rest of the
+execution environment, including the positional parameters,
+is shared with the caller.</p>
+
+<p style="margin-left:9%; margin-top: 1em">If the first
+character following the open brace is a <b>|</b>, the
+construct expands to the value of the <b>REPLY</b> shell
+variable after <i>command</i> executes, without removing any
+trailing newlines, and the standard output of <i>command</i>
+remains the same as in the calling shell. <b>Bash</b>
+creates <b>REPLY</b> as an initially-unset local variable
+when <i>command</i> executes, and restores <b>REPLY</b> to
+the value it had before the command substitution after
+<i>command</i> completes, as with any local variable.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Command
+substitutions may be nested. To nest when using the
+backquoted form, escape the inner backquotes with
+backslashes.</p>
+
+<p style="margin-left:9%; margin-top: 1em">If the
+substitution appears within double quotes, <b>bash</b> does
+not perform word splitting and pathname expansion on the
+results.</p>
+
+<h3>Arithmetic Expansion
+<a name="Arithmetic Expansion"></a>
+</h3>
+
+
+<p style="margin-left:9%; margin-top: 1em">Arithmetic
+expansion evaluates an arithmetic expression and substitutes
+the result. The format for arithmetic expansion is:</p>
+
+
+<p style="margin-left:18%; margin-top: 1em"><b>$((</b><i>expression</i><b>))</b></p>
+
+<p style="margin-left:9%; margin-top: 1em">The
+<i>expression</i> undergoes the same expansions as if it
+were within double quotes, but unescaped double quote
+characters in <i>expression</i> 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. Since the way Bash handles
+double quotes can potentially result in empty strings,
+arithmetic expansion treats those as expressions that
+evaluate to 0. Arithmetic expansions may be nested.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The evaluation
+is performed according to the rules listed below under
+<b><small>ARITHMETIC EVALUATION</small></b><small>.</small>
+If <i>expression</i> is invalid, <b>bash</b> prints a
+message to standard error indicating failure, does not
+perform the substitution, and does not execute the command
+associated with the expansion.</p>
+
+<h3>Process Substitution
+<a name="Process Substitution"></a>
+</h3>
+
+
+<p style="margin-left:9%; margin-top: 1em"><i>Process
+substitution</i> allows a process’s input or output to
+be referred to using a filename. It takes the form of
+<b><(</b><i>list</i><b>)</b> or
+<b>>(</b><i>list</i><b>)</b>. The process <i>list</i> is
+run asynchronously, and its input or output appears as a
+filename. This filename is passed as an argument to the
+current command as the result of the expansion.</p>
+
+<p style="margin-left:9%; margin-top: 1em">If the
+<b>>(</b><i>list</i><b>)</b> form is used, writing to the
+file provides input for <i>list</i>. If the
+<b><(</b><i>list</i><b>)</b> form is used, reading the
+file obtains the output of <i>list</i>. No space may appear
+between the <b><</b> or <b>></b> and the left
+parenthesis, otherwise the construct would be interpreted as
+a redirection.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Process
+substitution is supported on systems that support named
+pipes (<i>FIFOs</i>) or the <i>/dev/fd</i> method of naming
+open files.</p>
+
+<p style="margin-left:9%; margin-top: 1em">When available,
+process substitution is performed simultaneously with
+parameter and variable expansion, command substitution, and
+arithmetic expansion.</p>
+
+<h3>Word Splitting
+<a name="Word Splitting"></a>
+</h3>
+
+
+<p style="margin-left:9%; margin-top: 1em">The shell scans
+the results of parameter expansion, command substitution,
+and arithmetic expansion that did not occur within double
+quotes for <i>word splitting</i>. Words that were not
+expanded are not split.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The shell treats
+each character of <b><small>IFS</small></b> as a delimiter,
+and splits the results of the other expansions into words
+using these characters as field terminators.</p>
+
+<p style="margin-left:9%; margin-top: 1em">An <i>IFS
+whitespace</i> character is whitespace as defined above (see
+<b>Definitions</b>) that appears in the value of
+<b><small>IFS</small></b><small>.</small> Space, tab, and
+newline are always considered IFS whitespace, even if they
+don’t appear in the locale’s <b>space</b>
+category.</p>
+
+<p style="margin-left:9%; margin-top: 1em">If
+<b><small>IFS</small></b> is unset, field splitting acts as
+if its value were
+<b><space><tab><newline></b>, and treats
+these characters as IFS whitespace. If the value of
+<b><small>IFS</small></b> is null, no word splitting occurs,
+but implicit null arguments (see below) are still
+removed.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Word splitting
+begins by removing sequences of IFS whitespace characters
+from the beginning and end of the results of the previous
+expansions, then splits the remaining words.</p>
+
+<p style="margin-left:9%; margin-top: 1em">If the value of
+<b><small>IFS</small></b> consists solely of IFS whitespace,
any sequence of IFS whitespace characters delimits a field,
so a field consists of characters that are not unquoted IFS
-whitespace, and null fields result only from quoting.
-<P>
-
-If
-<FONT SIZE=-1><B>IFS</B>
-
-</FONT>
-contains a non-whitespace character, then any character in
-the value of
-<FONT SIZE=-1><B>IFS</B>
-
-</FONT>
-that is not IFS whitespace,
-along with any adjacent IFS whitespace characters, delimits a field.
-This means that adjacent non-IFS-whitespace delimiters produce a
-null field.
-A sequence of IFS whitespace characters also delimits a field.
-<P>
-
-Explicit null arguments (<B>"
-"
-</B> or
-<B>''</B>) are retained
-and passed to commands as empty strings.
-Unquoted implicit null arguments, resulting from the expansion of
-parameters that have no values, are removed.
-Expanding a parameter with no value within double quotes
-produces a null field,
-which is retained and passed to a command as an empty string.
-<P>
-
-When a quoted null argument appears as part of a word whose expansion is
+whitespace, and null fields result only from quoting.</p>
+
+<p style="margin-left:9%; margin-top: 1em">If
+<b><small>IFS</small></b> contains a non-whitespace
+character, then any character in the value of
+<b><small>IFS</small></b> that is not IFS whitespace, along
+with any adjacent IFS whitespace characters, delimits a
+field. This means that adjacent non-IFS-whitespace
+delimiters produce a null field. A sequence of IFS
+whitespace characters also delimits a field.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Explicit null
+arguments (<b>""</b> or <b>''</b>) are retained
+and passed to commands as empty strings. Unquoted implicit
+null arguments, resulting from the expansion of parameters
+that have no values, are removed. Expanding a parameter with
+no value within double quotes produces a null field, which
+is retained and passed to a command as an empty string.</p>
+
+<p style="margin-left:9%; margin-top: 1em">When a quoted
+null argument appears as part of a word whose expansion is
non-null, word splitting removes the null argument portion,
-leaving the non-null expansion.
-That is, the word
+leaving the non-null expansion. That is, the word
+“−d''” becomes “−d”
+after word splitting and null argument removal.</p>
+
+<h3>Pathname Expansion
+<a name="Pathname Expansion"></a>
+</h3>
+
+
+<p style="margin-left:9%; margin-top: 1em">After word
+splitting, unless the <b>−f</b> option has been set,
+<b>bash</b> scans each word for the characters <b>*</b>,
+<b>?</b>, and <b>[</b>. If one of these characters appears,
+and is not quoted, then the word is regarded as a
+<i>pattern</i>, and replaced with a sorted list of filenames
+matching the pattern (see <b><small>Pattern
+Matching</small></b> below) subject to the value of the
+<b>GLOBSORT</b> shell variable.</p>
+
+<p style="margin-left:9%; margin-top: 1em">If no matching
+filenames are found, and the shell option <b>nullglob</b> is
+not enabled, the word is left unchanged. If the
+<b>nullglob</b> option is set, and no matches are found, the
+word is removed. If the <b>failglob</b> shell option is set,
+and no matches are found, <b>bash</b> prints an error
+message and does not execute the command. If the shell
+option <b>nocaseglob</b> is enabled, the match is performed
+without regard to the case of alphabetic characters.</p>
+
+<p style="margin-left:9%; margin-top: 1em">When a pattern
+is used for pathname expansion, the character
+“.” at the start of a name or immediately
+following a slash must be matched explicitly, unless the
+shell option <b>dotglob</b> is set. In order to match the
+filenames <i>.</i> and <i>..</i>, the pattern must begin
+with “.” (for example, “.?”), even
+if <b>dotglob</b> is set. If the <b>globskipdots</b> shell
+option is enabled, the filenames <i>.</i> and <i>..</i>
+never match, even if the pattern begins with a
+“.”. When not matching pathnames, the
+“.” character is not treated specially.</p>
+
+<p style="margin-left:9%; margin-top: 1em">When matching a
+pathname, the slash character must always be matched
+explicitly by a slash in the pattern, but in other matching
+contexts it can be matched by a special pattern character as
+described below under <b><small>Pattern
+Matching</small></b><small>.</small></p>
+
+<p style="margin-left:9%; margin-top: 1em">See the
+description of <b>shopt</b> below under <b><small>SHELL
+BUILTIN COMMANDS</small></b> for a description of the
+<b>nocaseglob</b>, <b>nullglob</b>, <b>globskipdots</b>,
+<b>failglob</b>, and <b>dotglob</b> shell options.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The
+<b><small>GLOBIGNORE</small></b> shell variable may be used
+to restrict the set of file names matching a <i>pattern</i>.
+If <b><small>GLOBIGNORE</small></b> is set, each matching
+file name that also matches one of the patterns in
+<b><small>GLOBIGNORE</small></b> is removed from the list of
+matches. If the <b>nocaseglob</b> option is set, the
+matching against the patterns in
+<b><small>GLOBIGNORE</small></b> is performed without regard
+to case. The filenames <i>.</i> and <i>..</i> are always
+ignored when <b><small>GLOBIGNORE</small></b> is set and not
+null. However, setting <b><small>GLOBIGNORE</small></b> to a
+non-null value has the effect of enabling the <b>dotglob</b>
+shell option, so all other filenames beginning with a
+“.” match. To get the old behavior of ignoring
+filenames beginning with a “.”, make
+“.*” one of the patterns in
+<b><small>GLOBIGNORE</small></b> . The <b>dotglob</b> option
+is disabled when <b><small>GLOBIGNORE</small></b> is unset.
+The <b>GLOBIGNORE</b> pattern matching honors the setting of
+the <b>extglob</b> shell option.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The value of the
+<b><small>GLOBSORT</small></b> shell variable controls how
+the results of pathname expansion are sorted, as described
+above under <b>Shell Variables</b>.</p>
+
+<p style="margin-left:9%; margin-top: 1em"><b>Pattern
+Matching</b></p>
+
+<p style="margin-left:9%; margin-top: 1em">Any character
+that appears in a pattern, other than the special pattern
+characters described below, matches itself. The NUL
+character may not occur in a pattern. A backslash escapes
+the following character; the escaping backslash is discarded
+when matching. The special pattern characters must be quoted
+if they are to be matched literally.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The special
+pattern characters have the following meanings:</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="6%">
+
+
+<p style="margin-top: 1em"><b>*</b></p></td>
+<td width="3%"></td>
+<td width="73%">
+
+
+<p style="margin-top: 1em">Matches any string, including
+the null string. When the <b>globstar</b> shell option is
+enabled, and <b>*</b> is used in a pathname expansion
+context, two adjacent <b>*</b>s used as a single pattern
+match all files and zero or more directories and
+subdirectories. If followed by a <b>/</b>, two adjacent
+<b>*</b>s match only directories and subdirectories.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="6%">
-becomes
-after word splitting and null argument removal.
-<A NAME="lbBH"> </A>
-<H4>Pathname Expansion</H4>
+<p><b>?</b></p></td>
+<td width="3%"></td>
+<td width="73%">
-After word splitting,
-unless the
-<B>-f</B>
-option has been set,
-<B>bash</B>
+<p>Matches any single character.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="6%">
-scans each word for the characters
-<B>*</B>,
-<B>?</B>,
+<p><b>[</b>...<b>]</b></p></td>
+<td width="3%"></td>
+<td width="73%">
-and
-<B>[</B>.
-If one of these characters appears, and is not quoted, then the word is
-regarded as a
-<I>pattern</I>,
+<p>Matches any one of the characters enclosed between the
+brackets. This is known as a <i>bracket expression</i> and
+matches a single character. A pair of characters separated
+by a hyphen denotes a <i>range expression</i>; any character
+that falls between those two characters, inclusive, using
+the current locale’s collating sequence and character
+set, matches. If the first character following the <b>[</b>
+is a <b>!</b> or a <b>^</b> then any character not within
+the range matches. To match a <b>−</b>, include it as
+the first or last character in the set. To match a <b>]</b>,
+include it as the first character in the set.</p></td></tr>
+</table>
+
+<p style="margin-left:27%; margin-top: 1em">The 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 <b><small>LC_COLLATE</small></b> or
+<b><small>LC_ALL</small></b> shell variables, if set. To
+obtain the traditional interpretation of range expressions,
+where <b>[a−d]</b> is equivalent to <b>[abcd]</b>, set
+the value of the <b>LC_COLLATE</b> or <b>LC_ALL</b> shell
+variables to <b>C</b>, or enable the <b>globasciiranges</b>
+shell option.</p>
+
+<p style="margin-left:27%; margin-top: 1em">Within a
+bracket expression, <i>character classes</i> can be
+specified using the syntax <b>[:</b><i>class</i><b>:]</b>,
+where <i>class</i> is one of the following classes defined
+in the <small>POSIX</small> standard:</p>
+
+<p style="margin-left:27%; margin-top: 1em"><b>alnum alpha
+ascii blank cntrl digit graph lower print punct space upper
+word xdigit</b></p>
+
+<p style="margin-left:27%; margin-top: 1em">A character
+class matches any character belonging to that class. The
+<b>word</b> character class matches letters, digits, and the
+character _.</p>
+
+<p style="margin-left:27%; margin-top: 1em">Within a
+bracket expression, an <i>equivalence class</i> can be
+specified using the syntax <b>[=</b><i>c</i><b>=]</b>, which
+matches all characters with the same collation weight (as
+defined by the current locale) as the character
+<i>c</i>.</p>
-and replaced with a sorted list of filenames matching the pattern
-(see
-<FONT SIZE=-1><B>Pattern Matching</B>
+<p style="margin-left:27%; margin-top: 1em">Within a
+bracket expression, the syntax
+<b>[.</b><i>symbol</i><b>.]</b> matches the collating symbol
+<i>symbol</i>.</p>
+
+<p style="margin-left:9%; margin-top: 1em">If the
+<b>extglob</b> shell option is enabled using the
+<b>shopt</b> builtin, the shell recognizes several extended
+pattern matching operators. In the following description, a
+<i>pattern-list</i> is a list of one or more patterns
+separated by a <b>|</b>. Composite patterns may be formed
+using one or more of the following sub-patterns:</p>
-</FONT>
-below)
-subject to the value of the <B>GLOBSORT</B> shell variable.
-<P>
-If no matching filenames are found,
-and the shell option
-<B>nullglob</B>
+<p style="margin-left:18%;"><b>?(</b><i>pattern-list</i><b>)</b></p>
-is not enabled, the word is left unchanged.
-If the
-<B>nullglob</B>
+<p style="margin-left:27%;">Matches zero or one occurrence
+of the given patterns.</p>
-option is set, and no matches are found,
-the word is removed.
-If the
-<B>failglob</B>
-shell option is set, and no matches are found,
-<B>bash</B> prints an error message and does not execute the command.
-If the shell option
-<B>nocaseglob</B>
+<p style="margin-left:18%;"><b>*(</b><i>pattern-list</i><b>)</b></p>
+
+<p style="margin-left:27%;">Matches zero or more
+occurrences of the given patterns.</p>
-is enabled, the match is performed without regard to the case
-of alphabetic characters.
-<P>
-When a pattern is used for pathname expansion,
-the character
+<p style="margin-left:18%;"><b>+(</b><i>pattern-list</i><b>)</b></p>
+
+<p style="margin-left:27%;">Matches one or more occurrences
+of the given patterns.</p>
+
-at the start of a name or immediately following a slash
-must be matched explicitly, unless the shell option
-<B>dotglob</B>
+<p style="margin-left:18%;"><b>@(</b><i>pattern-list</i><b>)</b></p>
-is set.
-In order to match the filenames
+<p style="margin-left:27%;">Matches one of the given
+patterns.</p>
-<I>.</I>
-and
+<p style="margin-left:18%;"><b>!(</b><i>pattern-list</i><b>)</b></p>
-<I>..</I>,
+<p style="margin-left:27%;">Matches anything except one of
+the given patterns.</p>
-the pattern must begin with
+<p style="margin-left:9%; margin-top: 1em">The
+<b>extglob</b> 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 <b>extglob</b> is
+enabled before parsing constructs containing the patterns,
+including shell functions and command substitutions.</p>
+
+<p style="margin-left:9%; margin-top: 1em">When matching
+filenames, the <b>dotglob</b> shell option determines the
+set of filenames that are tested: when <b>dotglob</b> is
+enabled, the set of filenames includes all files beginning
+with “.”, but <i>.</i> and <i>..</i> 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 “.”. If the
+<b>globskipdots</b> shell option is enabled, the filenames
+<i>.</i> and <i>..</i> never appear in the set. As above,
+“.” only has a special meaning when matching
+filenames.</p>
-(for example,
+<p style="margin-left:9%; margin-top: 1em">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 strings, or using arrays of strings instead
+of a single long string, may be faster.</p>
-even if
-<B>dotglob</B>
+<h3>Quote Removal
+<a name="Quote Removal"></a>
+</h3>
-is set.
-If the
-<B>globskipdots</B>
-shell option is enabled, the filenames
+<p style="margin-left:9%; margin-top: 1em">After the
+preceding expansions, all unquoted occurrences of the
+characters <b>\</b>, <b>'</b>, and <b>"</b> that did
+not result from one of the above expansions are removed.</p>
-<I>.</I>
+<h2>REDIRECTION
+<a name="REDIRECTION"></a>
+</h2>
-and
-<I>..</I>
+<p style="margin-left:9%; margin-top: 1em">Before a command
+is executed, its input and output may be <i>redirected</i>
+using a special notation interpreted by the shell.
+<i>Redirection</i> 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. When used with the <b>exec</b> builtin,
+redirections modify file handles in the current shell
+execution environment. The following redirection operators
+may precede or appear anywhere within a <i>simple
+command</i> or may follow a <i>command</i>. Redirections are
+processed in the order they appear, from left to right.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Each redirection
+that may be preceded by a file descriptor number may instead
+be preceded by a word of the form {<i>varname</i>}. In this
+case, for each redirection operator except
+<b>>&−</b> and <b><&−</b>, the
+shell allocates a file descriptor greater than or equal to
+10 and assigns it to <i>varname</i>. If {<i>varname</i>}
+precedes <b>>&−</b> or <b><&−</b>,
+the value of <i>varname</i> defines the file descriptor to
+close. If {<i>varname</i>} is supplied, the redirection
+persists beyond the scope of the command, which allows the
+shell programmer to manage the file descriptor’s
+lifetime manually without using the <b>exec</b> builtin. The
+<b>varredir_close</b> shell option manages this
+behavior.</p>
+
+<p style="margin-left:9%; margin-top: 1em">In the following
+descriptions, if the file descriptor number is omitted, and
+the first character of the redirection operator is
+“<”, the redirection refers to the standard
+input (file descriptor 0). If the first character of the
+redirection operator is “>”, the redirection
+refers to the standard output (file descriptor 1).</p>
-never match, even if the pattern begins with a
+<p style="margin-left:9%; margin-top: 1em">The <i>word</i>
+following the redirection operator in the following
+descriptions, unless otherwise noted, is subjected to brace
+expansion, tilde expansion, parameter and variable
+expansion, command substitution, arithmetic expansion, quote
+removal, pathname expansion, and word splitting. If it
+expands to more than one word, <b>bash</b> reports an
+error.</p>
-When not matching pathnames, the
+<p style="margin-left:9%; margin-top: 1em">The order of
+redirections is significant. For example, the command</p>
-character is not treated specially.
-<P>
+<p style="margin-left:18%; margin-top: 1em">ls <b>></b>
+dirlist 2<b>>&</b>1</p>
-When matching a pathname, the slash character must always be
-matched explicitly by a slash in the pattern, but in other matching
-contexts it can be matched by a special pattern character as described
-below under
-<FONT SIZE=-1><B>Pattern Matching</B>.
+<p style="margin-left:9%; margin-top: 1em">directs both
+standard output and standard error to the file
+<i>dirlist</i>, while the command</p>
-</FONT>
-<P>
+<p style="margin-left:18%; margin-top: 1em">ls
+2<b>>&</b>1 <b>></b> dirlist</p>
+
+<p style="margin-left:9%; margin-top: 1em">directs only the
+standard output to file <i>dirlist</i>, because the standard
+error was directed to the standard output before the
+standard output was redirected to <i>dirlist</i>.</p>
+
+<p style="margin-left:9%; margin-top: 1em"><b>Bash</b>
+handles several filenames specially when they are used in
+redirections, as described in the following table. If the
+operating system on which <b>bash</b> is running provides
+these special files, <b>bash</b> uses them; otherwise it
+emulates them internally with the behavior described
+below.</p>
+
+<p style="margin-left:18%;"><b>/dev/fd/</b><i>fd</i></p>
-See the description of
-<B>shopt</B>
+<p style="margin-left:27%;">If <i>fd</i> is a valid
+integer, duplicate file descriptor <i>fd</i>.</p>
-below under
-<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
+<p style="margin-left:18%;"><b>/dev/stdin</b></p>
-</FONT>
-for a description of the
-<B>nocaseglob</B>,
+<p style="margin-left:27%;">File descriptor 0 is
+duplicated.</p>
-<B>nullglob</B>,
+<p style="margin-left:18%;"><b>/dev/stdout</b></p>
-<B>globskipdots</B>,
+<p style="margin-left:27%;">File descriptor 1 is
+duplicated.</p>
-<B>failglob</B>,
+<p style="margin-left:18%;"><b>/dev/stderr</b></p>
-and
-<B>dotglob</B>
+<p style="margin-left:27%;">File descriptor 2 is
+duplicated.</p>
-shell options.
-<P>
-The
-<FONT SIZE=-1><B>GLOBIGNORE</B>
+<p style="margin-left:18%;"><b>/dev/tcp/</b><i>host</i><b>/</b><i>port</i></p>
-</FONT>
-shell variable may be used to restrict the set of file names matching a
-<I>pattern</I>.
+<p style="margin-left:27%;">If <i>host</i> is a valid
+hostname or Internet address, and <i>port</i> is an integer
+port number or service name, <b>bash</b> attempts to open
+the corresponding TCP socket.</p>
-If
-<FONT SIZE=-1><B>GLOBIGNORE</B>
-</FONT>
-is set, each matching file name that also matches one of the patterns in
-<FONT SIZE=-1><B>GLOBIGNORE</B>
+<p style="margin-left:18%;"><b>/dev/udp/</b><i>host</i><b>/</b><i>port</i></p>
-</FONT>
-is removed from the list of matches.
-If the <B>nocaseglob</B> option is set, the matching against the patterns in
-<FONT SIZE=-1><B>GLOBIGNORE</B>
+<p style="margin-left:27%;">If <i>host</i> is a valid
+hostname or Internet address, and <i>port</i> is an integer
+port number or service name, <b>bash</b> attempts to open
+the corresponding UDP socket.</p>
-</FONT>
-is performed without regard to case.
-The filenames
+<p style="margin-left:9%; margin-top: 1em">A failure to
+open or create a file causes the redirection to fail.</p>
-<I>.</I>
+<p style="margin-left:9%; margin-top: 1em">Redirections
+using file descriptors greater than 9 should be used with
+care, as they may conflict with file descriptors the shell
+uses internally.</p>
-and
+<h3>Redirecting Input
+<a name="Redirecting Input"></a>
+</h3>
-<I>..</I>
-are always ignored when
-<FONT SIZE=-1><B>GLOBIGNORE</B>
+<p style="margin-left:9%; margin-top: 1em">Redirecting
+input opens the file whose name results from the expansion
+of <i>word</i> for reading on file descriptor <i>n</i>, or
+the standard input (file descriptor 0) if <i>n</i> is not
+specified.</p>
-</FONT>
-is set and not null.
-However, setting
-<FONT SIZE=-1><B>GLOBIGNORE</B>
+<p style="margin-left:9%; margin-top: 1em">The general
+format for redirecting input is:</p>
-</FONT>
-to a non-null value has the effect of enabling the
-<B>dotglob</B>
-shell option, so all other filenames beginning with a
+<p style="margin-left:18%; margin-top: 1em">[<i>n</i>]<b><</b><i>word</i></p>
-match.
-To get the old behavior of ignoring filenames beginning with a
+<h3>Redirecting Output
+<a name="Redirecting Output"></a>
+</h3>
-make
-one of the patterns in
-<FONT SIZE=-1><B>GLOBIGNORE</B>
+<p style="margin-left:9%; margin-top: 1em">Redirecting
+output opens the file whose name results from the expansion
+of <i>word</i> for writing on file descriptor <i>n</i>, or
+the standard output (file descriptor 1) if <i>n</i> is not
+specified. If the file does not exist it is created; if it
+does exist it is truncated to zero size.</p>
-</FONT>
-.
-The
-<B>dotglob</B>
+<p style="margin-left:9%; margin-top: 1em">The general
+format for redirecting output is:</p>
-option is disabled when
-<FONT SIZE=-1><B>GLOBIGNORE</B>
-</FONT>
-is unset.
-The
-<B>GLOBIGNORE</B>
+<p style="margin-left:18%; margin-top: 1em">[<i>n</i>]<b>></b><i>word</i></p>
-pattern matching honors the setting of the <B>extglob</B> shell
-option.
-<P>
+<p style="margin-left:9%; margin-top: 1em">If the
+redirection operator is <b>></b>, and the
+<b>noclobber</b> option to the <b>set</b> builtin command
+has been enabled, the redirection fails if the file whose
+name results from the expansion of <i>word</i> exists and is
+a regular file. If the redirection operator is <b>>|</b>,
+or the redirection operator is <b>></b> and the
+<b>noclobber</b> option to the <b>set</b> builtin is not
+enabled, <b>bash</b> attempts the redirection even if the
+file named by <i>word</i> exists.</p>
-The value of the
-<FONT SIZE=-1><B>GLOBSORT</B>
+<h3>Appending Redirected Output
+<a name="Appending Redirected Output"></a>
+</h3>
-</FONT>
-shell variable controls how the results of pathname expansion are sorted,
-as described above under
-<B>Shell Variables</B>.
-<P>
-
-<B>Pattern Matching</B>
-
-<P>
-
-Any character that appears in a pattern, other than the special pattern
-characters described below, matches itself.
-The NUL character may not occur in a pattern.
-A backslash escapes the following character; the escaping backslash is
-discarded when matching.
-The special pattern characters must be quoted if
-they are to be matched literally.
-<P>
-
-The special pattern characters have the following meanings:
-<P>
-
-
-<DL COMPACT><DT><DD>
-<DL COMPACT>
-<DT><B>*</B>
-
-<DD>
-Matches any string, including the null string.
-When the <B>globstar</B> shell option is enabled, and <B>*</B> is used in
-a pathname expansion context, two adjacent <B>*</B>s used as a single
-pattern match all files and zero or more directories and
-subdirectories.
-If followed by a <B>/</B>, two adjacent <B>*</B>s match only directories
-and subdirectories.
-<DT><B>?</B>
-
-<DD>
-Matches any single character.
-<DT><B>[</B>...<B>]</B>
-
-<DD>
-
-Matches any one of the characters enclosed between the brackets.
-This is known as a <I>bracket expression</I>
-and matches a single character.
-A pair of characters separated by a hyphen denotes a
-<I>range expression</I>;
-any character that falls between those two characters, inclusive,
-using the current locale's collating sequence and character set, matches.
-If the first character following the
-<B>[</B>
-
-is a
-<B>!</B>
-
-or a
-<B>^</B>
-
-then any character not within the range matches.
-To match a
-<B>-</B>,
-
-include it as the first or last character in the set.
-To match a
-<B>]</B>,
-
-include it as the first character in the set.
-<DT><DD>
-The 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
-<FONT SIZE=-1><B>LC_COLLATE</B>
-
-</FONT>
-or
-<FONT SIZE=-1><B>LC_ALL</B>
-
-</FONT>
-shell variables, if set.
-To obtain the traditional interpretation of range expressions, where
-<B>[a-d]</B>
-
-is equivalent to
-<B>[abcd]</B>,
-
-set the value of the
-<B>LC_COLLATE</B>
-
-or
-<B>LC_ALL</B>
-
-shell variables to
-<B>C</B>,
-
-or enable the
-<B>globasciiranges</B>
-
-shell option.
-<DT><DD>
-Within a bracket expression,
-<I>character classes</I> can be specified using the syntax
-<B>[:</B><I>class</I><B>:]</B>, where <I>class</I> is one of the
-following classes defined in the
-<FONT SIZE=-1>POSIX</FONT>
-standard:
-<DT><DD>
-<DL COMPACT><DT><DD>
-<B>
-</B>
-
-alnum alpha ascii blank cntrl digit graph lower print punct space upper word xdigit
-</DL>
-
-<DT><DD>
-A character class matches any character belonging to that class.
-The <B>word</B> character class matches letters, digits, and the character _.
-<DT><DD>
-Within a bracket expression,
-an <I>equivalence class</I> can be specified using the syntax
-<B>[=</B><I>c</I><B>=]</B>, which matches all characters with the
-same collation weight (as defined by the current locale) as
-the character <I>c</I>.
-<DT><DD>
-Within a bracket expression,
-the syntax <B>[.</B><I>symbol</I><B>.]</B> matches the collating symbol
-<I>symbol</I>.
-</DL></DL>
-
-<P>
-
-If the <B>extglob</B> shell option is enabled using the <B>shopt</B>
-builtin, the shell recognizes several extended pattern matching operators.
-In the following description, a <I>pattern-list</I> is a list of one
-or more patterns separated by a <B>|</B>.
-Composite patterns may be formed using one or more of the following
-sub-patterns:
-<P>
-
-
-<DL COMPACT><DT><DD>
-<DL COMPACT>
-<DT><B>?(</B><I>pattern-list</I><B>)</B><DD>
-Matches zero or one occurrence of the given patterns.
-<DT><B>*(</B><I>pattern-list</I><B>)</B><DD>
-Matches zero or more occurrences of the given patterns.
-<DT><B>+(</B><I>pattern-list</I><B>)</B><DD>
-Matches one or more occurrences of the given patterns.
-<DT><B>@(</B><I>pattern-list</I><B>)</B><DD>
-Matches one of the given patterns.
-<DT><B>!(</B><I>pattern-list</I><B>)</B><DD>
-Matches anything except one of the given patterns.
-</DL></DL>
-
-
-<P>
-
-The <B>extglob</B> 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 <B>extglob</B> is enabled before parsing constructs containing the
-patterns, including shell functions and command substitutions.
-<P>
-
-When matching filenames, the <B>dotglob</B> shell option determines
-the set of filenames that are tested:
-when <B>dotglob</B> is enabled, the set of filenames includes all files
-beginning with
-
-but
-
-<I>.</I>
+<p style="margin-left:9%; margin-top: 1em">Redirecting
+output in this fashion opens the file whose name results
+from the expansion of <i>word</i> for appending on file
+descriptor <i>n</i>, or the standard output (file descriptor
+1) if <i>n</i> is not specified. If the file does not exist
+it is created.</p>
-and
-
-<I>..</I>
+<p style="margin-left:9%; margin-top: 1em">The general
+format for appending output is:</p>
-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
+<p style="margin-left:18%; margin-top: 1em">[<i>n</i>]<b>>></b><i>word</i></p>
-If the
-<B>globskipdots</B>
+<h3>Redirecting Standard Output and Standard Error
+<a name="Redirecting Standard Output and Standard Error"></a>
+</h3>
-shell option is enabled, the filenames
-
-<I>.</I>
-
-and
-
-<I>..</I>
-
-never appear in the set.
-As above,
-
-only has a special meaning when matching filenames.
-<P>
-
-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 strings, or using arrays of
-strings instead of a single long string, may be faster.
-<A NAME="lbBI"> </A>
-<H4>Quote Removal</H4>
-After the preceding expansions, all unquoted occurrences of the
-characters
-<B>\</B>,
+<p style="margin-left:9%; margin-top: 1em">This construct
+redirects both the standard output (file descriptor 1) and
+the standard error output (file descriptor 2) to the file
+whose name is the expansion of <i>word</i>.</p>
-<B>'</B>,
+<p style="margin-left:9%; margin-top: 1em">There are two
+formats for redirecting standard output and standard
+error:</p>
-and <B>"
-</B> that did not result from one of the above
-expansions are removed.
-<A NAME="lbBJ"> </A>
-<H3>REDIRECTION</H3>
-Before a command is executed, its input and output may be
-<I>redirected</I>
+<p style="margin-left:18%; margin-top: 1em"><b>&></b><i>word</i></p>
-using a special notation interpreted by the shell.
-<I>Redirection</I> 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.
-When used with the <B>exec</B> builtin,
-redirections modify file handles in the current shell execution environment.
-The following redirection
-operators may precede or appear anywhere within a
-<I>simple command</I>
-
-or may follow a
-<I>command</I>.
-
-Redirections are processed in the order they appear, from
-left to right.
-<P>
-
-Each redirection that may be preceded by a file descriptor number
-may instead be preceded by a word of the form {<I>varname</I>}.
-In this case, for each redirection operator except
-<B>>&-</B>
-
-and
-<B><&-</B>,
-
-the shell allocates a file descriptor greater
-than or equal to 10 and assigns it to <I>varname</I>.
-If {<I>varname</I>} precedes
-<B>>&-</B>
-
-or
-<B><&-</B>,
-
-the value of <I>varname</I> defines the file descriptor to close.
-If {<I>varname</I>} is supplied, the redirection persists beyond
-the scope of the command, which allows the shell programmer to
-manage the file descriptor's lifetime manually without using
-the <B>exec</B> builtin.
-The <B>varredir_close</B> shell option manages this behavior.
-<P>
-
-In the following descriptions, if the file descriptor number is
-omitted, and the first character of the redirection operator is
-
-the redirection refers to the standard input (file descriptor 0).
-If the first character of the redirection operator is
-
-the redirection refers to the standard output (file descriptor 1).
-<P>
-
-The <I>word</I> following the redirection operator in the following
-descriptions, unless otherwise noted, is subjected to
-brace expansion,
-tilde expansion,
-parameter and variable expansion,
-command substitution,
-arithmetic expansion,
-quote removal,
-pathname expansion,
-and word splitting.
-If it expands to more than one word,
-<B>bash</B>
+<p style="margin-left:9%;">and</p>
-reports an error.
-<P>
-
-The order of redirections is significant.
-For example,
-the command
-<DL COMPACT><DT><DD>
-<P>
-
-ls <B>></B> dirlist 2<B>>&</B>1
-</DL>
-<P>
+<p style="margin-left:18%;"><b>>&</b><i>word</i></p>
-directs both standard output and standard error to the file
-<I>dirlist</I>,
+<p style="margin-left:9%; margin-top: 1em">Of the two
+forms, the first is preferred. This is semantically
+equivalent to</p>
-while the command
-<DL COMPACT><DT><DD>
-<P>
-ls 2<B>>&</B>1 <B>></B> dirlist
-</DL>
+<p style="margin-left:18%; margin-top: 1em"><b>></b><i>word</i>
+2<b>>&</b>1</p>
-<P>
+<p style="margin-left:9%; margin-top: 1em">When using the
+second form, <i>word</i> may not expand to a number or
+<b>−</b>. If it does, other redirection operators
+apply (see <b>Duplicating File Descriptors</b> below) for
+compatibility reasons.</p>
-directs only the standard output to file
-<I>dirlist</I>,
+<h3>Appending Standard Output and Standard Error
+<a name="Appending Standard Output and Standard Error"></a>
+</h3>
-because the standard error was directed to the standard output
-before the standard output was redirected to
-<I>dirlist</I>.
-<P>
+<p style="margin-left:9%; margin-top: 1em">This construct
+appends both the standard output (file descriptor 1) and the
+standard error output (file descriptor 2) to the file whose
+name is the expansion of <i>word</i>.</p>
-<B>Bash</B> handles several filenames specially when they are used in
-redirections, as described in the following table.
-If the operating system on which <B>bash</B> is running provides these
-special files, <B>bash</B> uses them; otherwise it emulates them
-internally with the behavior described below.
-<DL COMPACT><DT><DD>
-<P>
+<p style="margin-left:9%; margin-top: 1em">The format for
+appending standard output and standard error is:</p>
-<DL COMPACT>
-<DT><B>/dev/fd/</B><I>fd</I>
+<p style="margin-left:18%; margin-top: 1em"><b>&>></b><i>word</i></p>
-<DD>
-If <I>fd</I> is a valid integer, duplicate file descriptor <I>fd</I>.
-<DT><B>/dev/stdin</B>
+<p style="margin-left:9%; margin-top: 1em">This is
+semantically equivalent to</p>
-<DD>
-File descriptor 0 is duplicated.
-<DT><B>/dev/stdout</B>
-<DD>
-File descriptor 1 is duplicated.
-<DT><B>/dev/stderr</B>
+<p style="margin-left:18%; margin-top: 1em"><b>>></b><i>word</i>
+2<b>>&</b>1</p>
-<DD>
-File descriptor 2 is duplicated.
-<DT><B>/dev/tcp/</B><I>host</I>/<I>port</I>
+<p style="margin-left:9%; margin-top: 1em">(see
+<b>Duplicating File Descriptors</b> below).</p>
-<DD>
-If <I>host</I> is a valid hostname or Internet address, and <I>port</I>
-is an integer port number or service name, <B>bash</B> attempts to open
-the corresponding TCP socket.
-<DT><B>/dev/udp/</B><I>host</I>/<I>port</I>
+<h3>Here Documents
+<a name="Here Documents"></a>
+</h3>
-<DD>
-If <I>host</I> is a valid hostname or Internet address, and <I>port</I>
-is an integer port number or service name, <B>bash</B> attempts to open
-the corresponding UDP socket.
-</DL></DL>
+<p style="margin-left:9%; margin-top: 1em">This type of
+redirection instructs the shell to read input from the
+current source until it reads a line containing only
+<i>delimiter</i> (with no trailing blanks). All of the lines
+read up to that point then become the standard input (or
+file descriptor <i>n</i> if <i>n</i> is specified) for a
+command.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The format of
+here-documents is:</p>
+
+
+<p style="margin-left:18%; margin-top: 1em">[<i>n</i>]<b><<</b>[<b>−</b>]<i>word
+<br>
+here-document <br>
+delimiter</i></p>
+
+<p style="margin-left:9%; margin-top: 1em">The shell does
+not perform parameter and variable expansion, command
+substitution, arithmetic expansion, or pathname expansion on
+<i>word</i>.</p>
+
+<p style="margin-left:9%; margin-top: 1em">If any part of
+<i>word</i> is quoted, the <i>delimiter</i> is the result of
+quote removal on <i>word</i>, and the lines in the
+here-document are not expanded. If <i>word</i> is unquoted,
+the <i>delimiter</i> is <i>word</i> itself, and the
+here-document text is treated similarly to a double-quoted
+string: all lines of the here-document are subjected to
+parameter expansion, command substitution, and arithmetic
+expansion, the character sequence <b>\<newline></b> is
+treated literally, and <b>\</b> must be used to quote the
+characters <b>\</b>, <b>$</b>, and <b>`</b>; however, double
+quote characters have no special meaning.</p>
+
+<p style="margin-left:9%; margin-top: 1em">If the
+redirection operator is <b><<−</b>, then the
+shell strips all leading tab characters from input lines and
+the line containing <i>delimiter</i>. This allows
+here-documents within shell scripts to be indented in a
+natural fashion.</p>
-<P>
+<p style="margin-left:9%; margin-top: 1em">If the delimiter
+is not quoted, the shell treats the <b>\<newline></b>
+sequence as a line continuation: the two lines are joined
+and the backslash-newline is removed. This happens while
+reading the here-document, before the check for the ending
+delimiter, so joined lines can form the end delimiter.</p>
-A failure to open or create a file causes the redirection to fail.
-<P>
+<h3>Here Strings
+<a name="Here Strings"></a>
+</h3>
-Redirections using file descriptors greater than 9 should be used with
-care, as they may conflict with file descriptors the shell uses
-internally.
-<A NAME="lbBK"> </A>
-<H4>Redirecting Input</H4>
-Redirecting input opens the file whose name results from
-the expansion of
-<I>word</I>
+<p style="margin-left:9%; margin-top: 1em">A variant of
+here documents, the format is:</p>
-for reading on file descriptor
-<I>n</I>,
-or the standard input (file descriptor 0) if
-<I>n</I>
+<p style="margin-left:18%; margin-top: 1em">[<i>n</i>]<b><<<</b><i>word</i></p>
-is not specified.
-<P>
+<p style="margin-left:9%; margin-top: 1em">The <i>word</i>
+undergoes tilde expansion, parameter and variable expansion,
+command substitution, arithmetic expansion, and quote
+removal. Pathname expansion and word splitting are not
+performed. The result is supplied as a single string, with a
+newline appended, to the command on its standard input (or
+file descriptor <i>n</i> if <i>n</i> is specified).</p>
-The general format for redirecting input is:
-<DL COMPACT><DT><DD>
-<P>
+<h3>Duplicating File Descriptors
+<a name="Duplicating File Descriptors"></a>
+</h3>
-[<I>n</I>]<B><</B><I>word</I>
-</DL>
-<A NAME="lbBL"> </A>
-<H4>Redirecting Output</H4>
+<p style="margin-left:9%; margin-top: 1em">The redirection
+operator</p>
-Redirecting output opens the file whose name results from
-the expansion of
-<I>word</I>
-for writing on file descriptor
-<I>n</I>,
+<p style="margin-left:18%; margin-top: 1em">[<i>n</i>]<b><&</b><i>word</i></p>
-or the standard output (file descriptor 1) if
-<I>n</I>
+<p style="margin-left:9%; margin-top: 1em">is used to
+duplicate input file descriptors. If <i>word</i> expands to
+one or more digits, file descriptor <i>n</i> is made to be a
+copy of that file descriptor. It is a redirection error if
+the digits in <i>word</i> do not specify a file descriptor
+open for input. If <i>word</i> evaluates to <b>−</b>,
+file descriptor <i>n</i> is closed. If <i>n</i> is not
+specified, this uses the standard input (file descriptor
+0).</p>
-is not specified.
-If the file does not exist it is created;
-if it does exist it is truncated to zero size.
-<P>
+<p style="margin-left:9%; margin-top: 1em">The operator</p>
-The general format for redirecting output is:
-<DL COMPACT><DT><DD>
-<P>
-[<I>n</I>]<B>></B><I>word</I>
-</DL>
+<p style="margin-left:18%; margin-top: 1em">[<i>n</i>]<b>>&</b><i>word</i></p>
-<P>
+<p style="margin-left:9%; margin-top: 1em">is used
+similarly to duplicate output file descriptors. If <i>n</i>
+is not specified, this uses the standard output (file
+descriptor 1). It is a redirection error if the digits in
+<i>word</i> do not specify a file descriptor open for
+output. If <i>word</i> evaluates to <b>−</b>, file
+descriptor <i>n</i> is closed. As a special case, if
+<i>n</i> is omitted, and <i>word</i> does not expand to one
+or more digits or <b>−</b>, this redirects the
+standard output and standard error as described
+previously.</p>
-If the redirection operator is
-<B>></B>,
+<h3>Moving File Descriptors
+<a name="Moving File Descriptors"></a>
+</h3>
-and the
-<B>noclobber</B>
-option to the
-<B>set</B>
+<p style="margin-left:9%; margin-top: 1em">The redirection
+operator</p>
+
+
+<p style="margin-left:18%; margin-top: 1em">[<i>n</i>]<b><&</b><i>digit</i><b>−</b></p>
+
+<p style="margin-left:9%; margin-top: 1em">moves the file
+descriptor <i>digit</i> to file descriptor <i>n</i>, or the
+standard input (file descriptor 0) if <i>n</i> is not
+specified. <i>digit</i> is closed after being duplicated to
+<i>n</i>.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Similarly, the
+redirection operator</p>
+
+
+<p style="margin-left:18%; margin-top: 1em">[<i>n</i>]<b>>&</b><i>digit</i><b>−</b></p>
+
+<p style="margin-left:9%; margin-top: 1em">moves the file
+descriptor <i>digit</i> to file descriptor <i>n</i>, or the
+standard output (file descriptor 1) if <i>n</i> is not
+specified.</p>
+
+<h3>Opening File Descriptors for Reading and Writing
+<a name="Opening File Descriptors for Reading and Writing"></a>
+</h3>
+
+
+<p style="margin-left:9%; margin-top: 1em">The redirection
+operator</p>
+
+
+<p style="margin-left:18%; margin-top: 1em">[<i>n</i>]<b><></b><i>word</i></p>
+
+<p style="margin-left:9%; margin-top: 1em">opens the file
+whose name is the expansion of <i>word</i> for both reading
+and writing on file descriptor <i>n</i>, or on file
+descriptor 0 if <i>n</i> is not specified. If the file does
+not exist, it is created.</p>
+
+<h2>ALIASES
+<a name="ALIASES"></a>
+</h2>
+
+
+<p style="margin-left:9%; margin-top: 1em"><i>Aliases</i>
+allow a string to be substituted for a word that is in a
+position in the input where it can be the first word of a
+simple command. Aliases have names and corresponding values
+that are set and unset using the <b>alias</b> and
+<b>unalias</b> builtin commands (see <b><small>SHELL BUILTIN
+COMMANDS</small></b> below).</p>
+
+<p style="margin-left:9%; margin-top: 1em">If the shell
+reads an unquoted word in the right position, it checks the
+word to see if it matches an alias name. If it matches, the
+shell replaces the word with the alias value, and reads that
+value as if it had been read instead of the word. The shell
+doesn’t look at any characters following the word
+before attempting alias substitution.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The characters
+<b>/</b>, <b>$</b>, <b>`</b>, and <b>=</b> and any of the
+shell <i>metacharacters</i> or quoting characters listed
+above may not appear in an alias name. The replacement text
+may contain any valid shell input, including shell
+metacharacters. The first word of the replacement text 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 <b>ls</b> to <b>ls −F</b>, for
+instance, and <b>bash</b> does not try to recursively expand
+the replacement text.</p>
+
+<p style="margin-left:9%; margin-top: 1em">If the last
+character of the alias value is a <i>blank</i>, the shell
+checks the next command word following the alias for alias
+expansion.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Aliases are
+created and listed with the <b>alias</b> command, and
+removed with the <b>unalias</b> command.</p>
+
+<p style="margin-left:9%; margin-top: 1em">There is no
+mechanism for using arguments in the replacement text. If
+arguments are needed, use a shell function (see
+<b><small>FUNCTIONS</small></b> below) instead.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Aliases are not
+expanded when the shell is not interactive, unless the
+<b>expand_aliases</b> shell option is set using <b>shopt</b>
+(see the description of <b>shopt</b> under <b><small>SHELL
+BUILTIN COMMANDS</small></b> below).</p>
+
+<p style="margin-left:9%; margin-top: 1em">The rules
+concerning the definition and use of aliases are somewhat
+confusing. <b>Bash</b> always reads at least one complete
+line of input, and all lines that make up a compound
+command, before executing any of the commands on that line
+or the compound command. Aliases are expanded when a command
+is read, not when it is executed. Therefore, an alias
+definition appearing on the same line as another command
+does not take effect until the shell reads the next line of
+input, and an alias definition in a compound command does
+not take effect until the shell parses and executes the
+entire compound command. The commands following the alias
+definition on that line, or in the rest of a compound
+command, are not affected by the new alias. This behavior is
+also an issue when functions are executed. Aliases are
+expanded when a function definition is read, not when the
+function is executed, because a function definition is
+itself a command. As a consequence, aliases defined in a
+function are not available until after that function is
+executed. To be safe, always put alias definitions on a
+separate line, and do not use <b>alias</b> in compound
+commands.</p>
+
+<p style="margin-left:9%; margin-top: 1em">For almost every
+purpose, shell functions are preferable to aliases.</p>
+
+<h2>FUNCTIONS
+<a name="FUNCTIONS"></a>
+</h2>
+
+
+<p style="margin-left:9%; margin-top: 1em">A shell
+function, defined as described above under <b><small>SHELL
+GRAMMAR</small></b><small>,</small> stores a series of
+commands for later execution. When the name of a shell
+function is used as a simple command name, the shell
+executes the list of commands associated with that function
+name. Functions are executed in the context of the calling
+shell; there is no new process created to interpret them
+(contrast this with the execution of a shell script).</p>
+
+<p style="margin-left:9%; margin-top: 1em">When a function
+is executed, the arguments to the function become the
+positional parameters during its execution. The special
+parameter <b>#</b> is updated to reflect the new positional
+parameters. Special parameter <b>0</b> is unchanged. The
+first element of the <b><small>FUNCNAME</small></b> variable
+is set to the name of the function while the function is
+executing.</p>
+
+<p style="margin-left:9%; margin-top: 1em">All other
+aspects of the shell execution environment are identical
+between a function and its caller with these exceptions: the
+<b><small>DEBUG</small></b> and <b>RETURN</b> traps (see the
+description of the <b>trap</b> builtin under <b><small>SHELL
+BUILTIN COMMANDS</small></b> below) are not inherited unless
+the function has been given the <b>trace</b> attribute (see
+the description of the <b><small>declare</small></b> builtin
+below) or the <b>−o functrace</b> shell option has
+been enabled with the <b>set</b> builtin (in which case all
+functions inherit the <b>DEBUG</b> and <b>RETURN</b> traps),
+and the <b><small>ERR</small></b> trap is not inherited
+unless the <b>−o errtrace</b> shell option has been
+enabled.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Variables local
+to the function are declared with the <b>local</b> builtin
+command (<i>local variables</i>). Ordinarily, variables and
+their values are shared between the function and its caller.
+If a variable is declared <b>local</b>, the variable’s
+visible scope is restricted to that function and its
+children (including the functions it calls).</p>
+
+<p style="margin-left:9%; margin-top: 1em">In the following
+description, the <i>current scope</i> 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. A local variable at the current scope is
+a variable declared using the <b>local</b> or <b>declare</b>
+builtins in the function that is currently executing.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Local variables
+“shadow” variables with the same name declared
+at previous scopes. For instance, a local variable declared
+in a function hides variables with the same name declared at
+previous scopes, including global variables: references and
+assignments refer to the local variable, leaving the
+variables at previous scopes unmodified. When the function
+returns, the global variable is once again visible.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The shell uses
+<i>dynamic scoping</i> 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 function sees
+depends on its value within its caller, if any, whether 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.</p>
+
+<p style="margin-left:9%; margin-top: 1em">For example, if
+a variable <i>var</i> is declared as local in function
+<i>func1</i>, and <i>func1</i> calls another function
+<i>func2</i>, references to <i>var</i> made from within
+<i>func2</i> resolve to the local variable <i>var</i> from
+<i>func1</i>, shadowing any global variable named
+<i>var</i>.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The <b>unset</b>
+builtin also acts using the same dynamic scope: if a
+variable is local to the current scope, <b>unset</b> unsets
+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 remains 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 becomes visible. If the unset
+acts on a variable at a previous scope, any instance of a
+variable with that name that had been shadowed becomes
+visible (see below how the <b>localvar_unset</b> shell
+option changes this behavior).</p>
+
+<p style="margin-left:9%; margin-top: 1em">The
+<b><small>FUNCNEST</small></b> variable, if set to a numeric
+value greater than 0, defines a maximum function nesting
+level. Function invocations that exceed the limit cause the
+entire command to abort.</p>
+
+<p style="margin-left:9%; margin-top: 1em">If the builtin
+command <b>return</b> is executed in a function, the
+function completes and execution resumes with the next
+command after the function call. If <b>return</b> is
+supplied a numeric argument, that is the function’s
+return status; otherwise the function’s return status
+is the exit status of the last command executed before the
+<b>return</b>. Any command associated with the <b>RETURN</b>
+trap is executed before execution resumes. When a function
+completes, the values of the positional parameters and the
+special parameter <b>#</b> are restored to the values they
+had prior to the function’s execution.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The
+<b>−f</b> option to the <b>declare</b> or
+<b>typeset</b> builtin commands lists function names and
+definitions. The <b>−F</b> option to <b>declare</b> or
+<b>typeset</b> lists the function names only (and optionally
+the source file and line number, if the <b>extdebug</b>
+shell 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 <b>−f</b> option to the <b>export</b>
+builtin. The <b>−f</b> option to the <b>unset</b>
+builtin deletes a function definition.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Functions may be
+recursive. The <b>FUNCNEST</b> variable may be used to limit
+the depth of the function call stack and restrict the number
+of function invocations. By default, <b>bash</b> imposes no
+limit on the number of recursive calls.</p>
+
+<h2>ARITHMETIC EVALUATION
+<a name="ARITHMETIC EVALUATION"></a>
+</h2>
+
+
+<p style="margin-left:9%; margin-top: 1em">The shell allows
+arithmetic expressions to be evaluated, under certain
+circumstances (see the <b>let</b> and <b>declare</b> builtin
+commands, the <b>((</b> compound command, the arithmetic
+<b>for</b> command, the <b>[[</b> conditional command, and
+<b>Arithmetic Expansion</b>).</p>
+
+<p style="margin-left:9%; margin-top: 1em">Evaluation is
+done in the largest fixed-width integers available, with no
+check for overflow, though division by 0 is trapped and
+flagged as an error. The operators and their precedence,
+associativity, and values are the same as in the C language.
+The following list of operators is grouped into levels of
+equal-precedence operators. The levels are listed in order
+of decreasing precedence. <i><br>
+id</i><b>++</b> <i>id</i><b>−−</b></p>
+
+<p style="margin-left:18%;">variable post-increment and
+post-decrement</p>
-builtin command has been enabled, the redirection fails if the file
-whose name results from the expansion of <I>word</I> exists and is
-a regular file.
-If the redirection operator is
-<B>>|</B>,
+<p style="margin-left:9%;"><b>++</b><i>id</i>
+<b>−−</b><i>id</i></p>
-or the redirection operator is
-<B>></B>
+<p style="margin-left:18%;">variable pre-increment and
+pre-decrement</p>
-and the
-<B>noclobber</B>
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="6%">
-option to the
-<B>set</B>
-builtin is not enabled,
-<B>bash</B> attempts the redirection
-even if the file named by <I>word</I> exists.
-<A NAME="lbBM"> </A>
-<H4>Appending Redirected Output</H4>
+<p><b>− +</b></p></td>
+<td width="3%"></td>
+<td width="45%">
-Redirecting output in this fashion opens
-the file whose name results from the expansion of
-<I>word</I>
-for appending on file descriptor
-<I>n</I>,
+<p>unary minus and plus</p></td>
+<td width="37%">
+</td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="6%">
-or the standard output (file descriptor 1) if
-<I>n</I>
-is not specified.
-If the file does not exist it is created.
-<P>
+<p><b>! ~</b></p></td>
+<td width="3%"></td>
+<td width="45%">
-The general format for appending output is:
-<DL COMPACT><DT><DD>
-<P>
-[<I>n</I>]<B>>></B><I>word</I>
-</DL>
+<p>logical and bitwise negation</p></td>
+<td width="37%">
+</td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="6%">
-<A NAME="lbBN"> </A>
-<H4>Redirecting Standard Output and Standard Error</H4>
-This construct redirects both the
-standard output (file descriptor 1) and
-the standard error output (file descriptor 2)
-to the file whose name is the expansion of
-<I>word</I>.
+<p><b>**</b></p></td>
+<td width="3%"></td>
+<td width="45%">
-<P>
-There are two formats for redirecting standard output and
-standard error:
-<DL COMPACT><DT><DD>
-<P>
+<p>exponentiation</p></td>
+<td width="37%">
+</td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="6%">
-<B>&></B><I>word</I>
-</DL>
-and
-<DL COMPACT><DT><DD>
-<B>>&</B><I>word</I>
-</DL>
+<p><b>* / %</b></p></td>
+<td width="3%"></td>
+<td width="45%">
-<P>
-Of the two forms, the first is preferred.
-This is semantically equivalent to
-<DL COMPACT><DT><DD>
-<P>
+<p>multiplication, division, remainder</p></td>
+<td width="37%">
+</td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="6%">
-<B>></B><I>word</I> 2<B>>&</B>1
-</DL>
-<P>
+<p><b>+ −</b></p></td>
+<td width="3%"></td>
+<td width="45%">
-When using the second form, <I>word</I> may not expand to a number or
-<B>-</B>.
-If it does, other redirection operators apply
-(see <B>Duplicating File Descriptors</B> below) for compatibility
-reasons.
-<A NAME="lbBO"> </A>
-<H4>Appending Standard Output and Standard Error</H4>
-This construct appends both the
-standard output (file descriptor 1) and
-the standard error output (file descriptor 2)
-to the file whose name is the expansion of
-<I>word</I>.
+<p>addition, subtraction</p></td>
+<td width="37%">
+</td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="6%">
-<P>
-The format for appending standard output and standard error is:
-<DL COMPACT><DT><DD>
-<P>
+<p><b><< >></b></p></td>
+<td width="3%"></td>
+<td width="45%">
-<B>&>></B><I>word</I>
-</DL>
-<P>
+<p>left and right bitwise shifts</p></td>
+<td width="37%">
+</td></tr>
+</table>
-This is semantically equivalent to
-<DL COMPACT><DT><DD>
-<P>
+<p style="margin-left:9%;"><b><= >= < ></b></p>
-<B>>></B><I>word</I> 2<B>>&</B>1
-</DL>
+<p style="margin-left:18%;">comparison</p>
-<P>
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="6%">
-(see <B>Duplicating File Descriptors</B> below).
-<A NAME="lbBP"> </A>
-<H4>Here Documents</H4>
-This type of redirection instructs the shell to read input from the
-current source until it reads a line containing only
-<I>delimiter</I>
+<p><b>== !=</b></p></td>
+<td width="3%"></td>
+<td width="29%">
-(with no trailing blanks).
-All of the lines read up to that point then become the standard
-input (or file descriptor <I>n</I> if <I>n</I> is specified) for a command.
-<P>
-The format of here-documents is:
-<DL COMPACT><DT><DD>
-<P>
+<p>equality and inequality</p></td>
+<td width="53%">
+</td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="6%">
-<PRE>
-[<I>n</I>]<B><<</B>[<B>-</B>]<I>word</I>
- <I>here-document</I>
-<I>delimiter</I>
-</PRE>
-</DL>
+<p><b>&</b></p></td>
+<td width="3%"></td>
+<td width="29%">
-<P>
-The shell does not perform
-parameter and variable expansion, command substitution,
-arithmetic expansion, or pathname expansion on
-<I>word</I>.
+<p>bitwise AND</p></td>
+<td width="53%">
+</td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="6%">
-<P>
-If any part of
-<I>word</I>
+<p><b>^</b></p></td>
+<td width="3%"></td>
+<td width="29%">
-is quoted, the
-<I>delimiter</I>
-is the result of quote removal on
-<I>word</I>,
+<p>bitwise exclusive OR</p></td>
+<td width="53%">
+</td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="6%">
-and the lines in the here-document are not expanded.
-If <I>word</I> is unquoted, the
-<I>delimiter</I>
-is <I>word</I> itself,
-and the here-document text is treated similarly to a double-quoted string:
-all lines of the here-document are subjected to
-parameter expansion, command substitution, and arithmetic expansion,
-the character sequence
-<B>\<newline></B>
+<p><b>|</b></p></td>
+<td width="3%"></td>
+<td width="29%">
-is treated literally, and
-<B>\</B>
-must be used to quote the characters
-<B>\</B>,
+<p>bitwise OR</p></td>
+<td width="53%">
+</td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="6%">
-<B>$</B>,
-and
-<B>`</B>;
+<p><b>&&</b></p></td>
+<td width="3%"></td>
+<td width="29%">
-however, double quote characters have no special meaning.
-<P>
-If the redirection operator is
-<B><<-</B>,
+<p>logical AND</p></td>
+<td width="53%">
+</td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="6%">
-then the shell strips all leading tab characters from input lines
-and the line containing
-<I>delimiter</I>.
-This allows
-here-documents within shell scripts to be indented in a
-natural fashion.
-<P>
+<p><b>||</b></p></td>
+<td width="3%"></td>
+<td width="29%">
-If the delimiter is not quoted, the
-<B>\<newline></B>
-sequence is treated as a line continuation: the two lines are joined
-and the backslash-newline is removed.
-This happens while reading the here-document, before the check for
-the ending delimiter, so joined lines can form the end delimiter.
-<A NAME="lbBQ"> </A>
-<H4>Here Strings</H4>
+<p>logical OR</p></td>
+<td width="53%">
+</td></tr>
+</table>
-A variant of here documents, the format is:
-<DL COMPACT><DT><DD>
-<P>
-<PRE>
-[<I>n</I>]<B><<<</B><I>word</I>
-</PRE>
+<p style="margin-left:9%;"><i>expr</i><b>?</b><i>expr</i><b>:</b><i>expr</i></p>
-</DL>
+<p style="margin-left:18%;">conditional operator</p>
-<P>
+<p style="margin-left:9%;"><b>= *= /= %= += −=
+<<= >>= &= ^= |=</b></p>
-The <I>word</I> undergoes
-tilde expansion, parameter and variable expansion,
-command substitution, arithmetic expansion, and quote removal.
-Pathname expansion and word splitting are not performed.
-The result is supplied as a single string, with a newline appended,
-to the command on its
-standard input (or file descriptor <I>n</I> if <I>n</I> is specified).
-<A NAME="lbBR"> </A>
-<H4>Duplicating File Descriptors</H4>
+<p style="margin-left:18%;">assignment</p>
-The redirection operator
-<DL COMPACT><DT><DD>
-<P>
+<p style="margin-left:9%;"><i>expr1</i> <b>,</b>
+<i>expr2</i></p>
-[<I>n</I>]<B><&</B><I>word</I>
-</DL>
+<p style="margin-left:18%;">comma</p>
-<P>
+<p style="margin-left:9%; margin-top: 1em">Shell variables
+are allowed as operands; parameter expansion is performed
+before the expression is evaluated. Within an expression,
+shell variables may also be referenced by name without using
+the parameter expansion syntax. This means you can use
+"x", where <i>x</i> is a shell variable name, in
+an arithmetic expression, and the shell will evaluate its
+value as an expression and use the result. A shell variable
+that is null or unset evaluates to 0 when referenced by name
+in an expression.</p>
-is used to duplicate input file descriptors.
-If
-<I>word</I>
+<p style="margin-left:9%; margin-top: 1em">The value of a
+variable is evaluated as an arithmetic expression when it is
+referenced, or when a variable which has been given the
+<i>integer</i> attribute using <b>declare −i</b> is
+assigned a value. A null value evaluates to 0. A shell
+variable need not have its <i>integer</i> attribute enabled
+to be used in an expression.</p>
-expands to one or more digits, file descriptor
-<I>n</I>
+<p style="margin-left:9%; margin-top: 1em">Integer
+constants follow the C language definition, without suffixes
+or character constants. Constants with a leading 0 are
+interpreted as octal numbers. A leading 0x or 0X denotes
+hexadecimal. Otherwise, numbers take the form
+[<i>base#</i>]n, where the optional <i>base</i> is a decimal
+number between 2 and 64 representing the arithmetic base,
+and <i>n</i> is a number in that base. If <i>base#</i> is
+omitted, then base 10 is used. When specifying <i>n</i>, if
+a non-digit is required, the digits greater than 9 are
+represented by the lowercase letters, the uppercase letters,
+@, and _, in that order. If <i>base</i> is less than or
+equal to 36, lowercase and uppercase letters may be used
+interchangeably to represent numbers between 10 and 35.</p>
-is made to be a copy of that file descriptor.
-It is a redirection error if the digits in
-<I>word</I>
+<p style="margin-left:9%; margin-top: 1em">Operators are
+evaluated in precedence order. Sub-expressions in
+parentheses are evaluated first and may override the
+precedence rules above.</p>
-do not specify a file descriptor open for input.
-If
-<I>word</I>
+<h2>CONDITIONAL EXPRESSIONS
+<a name="CONDITIONAL EXPRESSIONS"></a>
+</h2>
-evaluates to
-<B>-</B>,
-file descriptor
-<I>n</I>
+<p style="margin-left:9%; margin-top: 1em">Conditional
+expressions are used by the <b>[[</b> compound command and
+the <b>test</b> and <b>[</b> builtin commands to test file
+attributes and perform string and arithmetic comparisons.
+The <b>test</b> and <b>[</b> commands determine their
+behavior based on the number of arguments; see the
+descriptions of those commands for any other
+command-specific actions.</p>
-is closed.
-If
-<I>n</I>
+<p style="margin-left:9%; margin-top: 1em">Expressions are
+formed from the unary or binary primaries listed below.
+Unary expressions are often used to examine the status of a
+file or shell variable. Binary operators are used for
+string, numeric, and file attribute comparisons.</p>
-is not specified, this uses the standard input (file descriptor 0).
-<P>
+<p style="margin-left:9%; margin-top: 1em"><b>Bash</b>
+handles several filenames specially when they are used in
+expressions. If the operating system on which <b>bash</b> is
+running provides these special files, bash will use them;
+otherwise it will emulate them internally with this
+behavior: If any <i>file</i> argument to one of the
+primaries is of the form <i>/dev/fd/n</i>, then <b>bash</b>
+checks file descriptor <i>n</i>. If the <i>file</i> argument
+to one of the primaries is one of <i>/dev/stdin</i>,
+<i>/dev/stdout</i>, or <i>/dev/stderr</i>, <b>bash</b>
+checks file descriptor 0, 1, or 2, respectively.</p>
-The operator
-<DL COMPACT><DT><DD>
-<P>
+<p style="margin-left:9%; margin-top: 1em">Unless otherwise
+specified, primaries that operate on files follow symbolic
+links and operate on the target of the link, rather than the
+link itself.</p>
-[<I>n</I>]<B>>&</B><I>word</I>
-</DL>
+<p style="margin-left:9%; margin-top: 1em">When used with
+<b>[[</b>, or when the shell is in posix mode, the
+<b><</b> and <b>></b> operators sort lexicographically
+using the current locale. When the shell is not in posix
+mode, the <b>test</b> command sorts using ASCII ordering.
+<b><br>
+−a</b> <i>file</i></p>
-<P>
+<p style="margin-left:18%;">True if <i>file</i> exists.</p>
-is used similarly to duplicate output file descriptors.
-If
-<I>n</I>
+<p style="margin-left:9%;"><b>−b</b> <i>file</i></p>
-is not specified, this uses the standard output (file descriptor 1).
-It is a redirection error if the digits in
-<I>word</I>
+<p style="margin-left:18%;">True if <i>file</i> exists and
+is a block special file.</p>
-do not specify a file descriptor open for output.
-If
-<I>word</I>
+<p style="margin-left:9%;"><b>−c</b> <i>file</i></p>
-evaluates to
-<B>-</B>,
+<p style="margin-left:18%;">True if <i>file</i> exists and
+is a character special file.</p>
-file descriptor
-<I>n</I>
+<p style="margin-left:9%;"><b>−d</b> <i>file</i></p>
-is closed.
-As a special case, if <I>n</I> is omitted,
-and <I>word</I> does not expand to one or more digits or <B>-</B>,
-this redirects the standard output and standard error as described
-previously.
-<A NAME="lbBS"> </A>
-<H4>Moving File Descriptors</H4>
+<p style="margin-left:18%;">True if <i>file</i> exists and
+is a directory.</p>
-The redirection operator
-<DL COMPACT><DT><DD>
-<P>
+<p style="margin-left:9%;"><b>−e</b> <i>file</i></p>
-[<I>n</I>]<B><&</B><I>digit</I><B>-</B>
-</DL>
+<p style="margin-left:18%;">True if <i>file</i> exists.</p>
-<P>
+<p style="margin-left:9%;"><b>−f</b> <i>file</i></p>
-moves the file descriptor <I>digit</I> to file descriptor
-<I>n</I>,
+<p style="margin-left:18%;">True if <i>file</i> exists and
+is a regular file.</p>
-or the standard input (file descriptor 0) if <I>n</I> is not specified.
-<I>digit</I> is closed after being duplicated to <I>n</I>.
-<P>
+<p style="margin-left:9%;"><b>−g</b> <i>file</i></p>
-Similarly, the redirection operator
-<DL COMPACT><DT><DD>
-<P>
+<p style="margin-left:18%;">True if <i>file</i> exists and
+is set-group-id.</p>
-[<I>n</I>]<B>>&</B><I>digit</I><B>-</B>
-</DL>
+<p style="margin-left:9%;"><b>−h</b> <i>file</i></p>
-<P>
+<p style="margin-left:18%;">True if <i>file</i> exists and
+is a symbolic link.</p>
-moves the file descriptor <I>digit</I> to file descriptor
-<I>n</I>,
+<p style="margin-left:9%;"><b>−k</b> <i>file</i></p>
-or the standard output (file descriptor 1) if <I>n</I> is not specified.
-<A NAME="lbBT"> </A>
-<H4>Opening File Descriptors for Reading and Writing</H4>
+<p style="margin-left:18%;">True if <i>file</i> exists and
+its “sticky” bit is set.</p>
-The redirection operator
-<DL COMPACT><DT><DD>
-<P>
+<p style="margin-left:9%;"><b>−p</b> <i>file</i></p>
-[<I>n</I>]<B><></B><I>word</I>
-</DL>
+<p style="margin-left:18%;">True if <i>file</i> exists and
+is a named pipe (FIFO).</p>
-<P>
+<p style="margin-left:9%;"><b>−r</b> <i>file</i></p>
-opens the file whose name is the expansion of
-<I>word</I>
+<p style="margin-left:18%;">True if <i>file</i> exists and
+is readable.</p>
-for both reading and writing on file descriptor
-<I>n</I>,
+<p style="margin-left:9%;"><b>−s</b> <i>file</i></p>
-or on file descriptor 0 if
-<I>n</I>
+<p style="margin-left:18%;">True if <i>file</i> exists and
+has a size greater than zero.</p>
-is not specified.
-If the file does not exist, it is created.
-<A NAME="lbBU"> </A>
-<H3>ALIASES</H3>
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="6%">
-<I>Aliases</I> allow a string to be substituted for a word that is in
-a position in the input where it can be the first word of a simple
-command.
-Aliases have names and corresponding values that are set
-and unset using the <B>alias</B> and <B>unalias</B> builtin commands
-(see
-<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
-
-</FONT>
-below).
-<P>
-
-If the shell reads an unquoted word in the right position, it checks
-the word to see if it matches an alias name.
-If it matches, the shell
-replaces the word with the alias value, and reads that value as if it
-had been read instead of the word.
-The shell doesn't look at any characters following the word before
-attempting alias substitution.
-<P>
-
-The characters <B>/</B>, <B>$</B>, <B>`</B>, and <B>=</B> and
-any of the shell <I>metacharacters</I> or quoting characters
-listed above may not appear in an alias name.
-The replacement text may contain any valid shell input,
-including shell metacharacters.
-The first word of the replacement text 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
-<B>ls</B>
-
-to
-<B>ls -F</B>,
-
-for instance, and
-<B>bash</B>
-
-does not try to recursively expand the replacement text.
-<P>
-
-If the last character of the alias value is a
-<I>blank</I>,
-
-the shell checks the next command
-word following the alias for alias expansion.
-<P>
-
-Aliases are created and listed with the
-<B>alias</B>
-
-command, and removed with the
-<B>unalias</B>
-
-command.
-<P>
-
-There is no mechanism for using arguments in the replacement text.
-If arguments are needed, use a shell function (see
-<FONT SIZE=-1><B>FUNCTIONS</B>
-
-</FONT>
-below) instead.
-<P>
-
-Aliases are not expanded when the shell is not interactive, unless
-the
-<B>expand_aliases</B>
-
-shell option is set using
-<B>shopt</B>
-
-(see the description of
-<B>shopt</B>
-
-under
-<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
-
-</FONT>
-below).
-<P>
-
-The rules concerning the definition and use of aliases are
-somewhat confusing.
-<B>Bash</B>
-
-always reads at least one complete line of input,
-and all lines that make up a compound command,
-before executing any of the commands on that line or the compound command.
-Aliases are expanded when a command is read, not when it is executed.
-Therefore, an
-alias definition appearing on the same line as another
-command does not take effect until the shell reads the next line of input,
-and an alias definition in a compound command does not take
-effect until the shell parses and executes the entire compound command.
-The commands following the alias definition
-on that line,
-or in the rest of a compound command,
-are not affected by the new alias.
-This behavior is also an issue when functions are executed.
-Aliases are expanded when a function definition is read,
-not when the function is executed, because a function definition
-is itself a command.
-As a consequence, aliases
-defined in a function are not available until after that
-function is executed.
-To be safe, always put
-alias definitions on a separate line, and do not use
-<B>alias</B>
-
-in compound commands.
-<P>
-
-For almost every purpose, shell functions are preferable to aliases.
-<A NAME="lbBV"> </A>
-<H3>FUNCTIONS</H3>
-
-A shell function, defined as described above under
-<FONT SIZE=-1><B>SHELL GRAMMAR</B>,
-
-</FONT>
-stores a series of commands for later execution.
-When the name of a shell function is used as a simple command name,
-the shell executes
-the list of commands associated with that function name.
-Functions are executed in the context of the
-calling shell; there is no new process created to interpret
-them (contrast this with the execution of a shell script).
-<P>
-
-When a function is executed, the arguments to the
-function become the positional parameters
-during its execution.
-The special parameter
-<B>#</B>
-
-is updated to reflect the new positional parameters.
-Special parameter <B>0</B> is unchanged.
-The first element of the
-<FONT SIZE=-1><B>FUNCNAME</B>
-
-</FONT>
-variable is set to the name of the function while the function
-is executing.
-<P>
-
-All other aspects of the shell execution
-environment are identical between a function and its caller
-with these exceptions: the
-<FONT SIZE=-1><B>DEBUG</B>
-
-</FONT>
-and
-<B>RETURN</B>
-
-traps (see the description of the
-<B>trap</B>
-
-builtin under
-<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
-
-</FONT>
-below) are not inherited unless the function has been given the
-<B>trace</B> attribute (see the description of the
-<FONT SIZE=-1><B>declare</B>
-
-</FONT>
-builtin below) or the
-<B>-o functrace</B> shell option has been enabled with
-the <B>set</B> builtin
-(in which case all functions inherit the <B>DEBUG</B> and <B>RETURN</B> traps),
-and the
-<FONT SIZE=-1><B>ERR</B>
-
-</FONT>
-trap is not inherited unless the <B>-o errtrace</B> shell option has
-been enabled.
-<P>
-
-Variables local to the function are declared with the
-<B>local</B>
-
-builtin command (<I>local variables</I>).
-Ordinarily, variables and their values
-are shared between the function and its caller.
-If a variable is declared <B>local</B>, the variable's visible scope
-is restricted to that function and its children (including the functions
-it calls).
-<P>
-
-In the following description, the <I>current scope</I> is a currently-
-executing function.
-Previous scopes consist of that function's caller and so on,
-back to the
-
-scope, where the shell is not executing any shell function.
-A local variable at the current scope is a variable
-declared using the <B>local</B> or <B>declare</B> builtins in the
-function that is currently executing.
-<P>
-
-Local variables
-
-variables with the same name declared at previous scopes.
-For instance, a local variable declared in a function
-hides variables with the same name declared at previous scopes,
-including global variables: references and assignments
-refer to the local variable, leaving the variables
-at previous scopes unmodified.
-When the function returns, the global variable is once again visible.
-<P>
-
-The shell uses <I>dynamic scoping</I> 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 function sees depends
-on its value within its caller, if any, whether 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.
-<P>
-
-For example, if a variable <I>var</I> is declared as local in function
-<I>func1</I>, and <I>func1</I> calls another function <I>func2</I>,
-references to <I>var</I> made from within <I>func2</I> resolve to the
-local variable <I>var</I> from <I>func1</I>, shadowing any global variable
-named <I>var</I>.
-<P>
-
-The <B>unset</B> builtin also acts using the same dynamic scope: if a
-variable is local to the current scope, <B>unset</B> unsets 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 remains 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 becomes visible.
-If the unset acts on a variable at a previous scope, any instance of a
-variable with that name that had been shadowed becomes visible
-(see below how the <B>localvar_unset</B> shell option changes this behavior).
-<P>
-
-The
-<FONT SIZE=-1><B>FUNCNEST</B>
-
-</FONT>
-variable, if set to a numeric value greater
-than 0, defines a maximum function nesting level.
-Function invocations that exceed the limit cause the entire command to
-abort.
-<P>
-
-If the builtin command
-<B>return</B>
-
-is executed in a function, the function completes and
-execution resumes with the next command after the function
-call.
-If <B>return</B> is supplied a numeric argument,
-that is the function's return status; otherwise the function's
-return status is the exit status of the last command executed
-before the <B>return</B>.
-Any command associated with the <B>RETURN</B> trap is executed
-before execution resumes.
-When a function completes, the values of the
-positional parameters and the special parameter
-<B>#</B>
-
-are restored to the values they had prior to the function's
-execution.
-<P>
-
-The
-<B>-f</B>
-
-option to the
-<B>declare</B>
-
-or
-<B>typeset</B>
-
-builtin commands
-lists function names and definitions.
-The
-<B>-F</B>
-
-option to
-<B>declare</B>
-
-or
-<B>typeset</B>
-
-lists the function names only
-(and optionally the source file and line number, if the <B>extdebug</B>
-shell 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
-<B>-f</B>
-
-option to the
-<B>export</B>
-
-builtin.
-The <B>-f</B> option to
-the
-<B>unset</B>
-
-builtin deletes a function definition.
-<P>
-
-Functions may be recursive.
-The <B>FUNCNEST</B> variable may be used to limit the depth of the
-function call stack and restrict the number of function invocations.
-By default, <B>bash</B> imposes no limit on the number of recursive calls.
-<A NAME="lbBW"> </A>
-<H3>ARITHMETIC EVALUATION</H3>
-
-The shell allows arithmetic expressions to be evaluated, under
-certain circumstances
-(see the <B>let</B> and <B>declare</B> builtin commands,
-the <B>((</B> compound command,
-the arithmetic <B>for</B> command,
-the <B>[[</B> conditional command,
-and <B>Arithmetic Expansion</B>).
-<P>
-
-Evaluation is done in the largest fixed-width integers available,
-with no check for overflow,
-though division by 0 is trapped and flagged as an error.
-The operators and their precedence, associativity, and values
-are the same as in the C language.
-The following list of operators is grouped into levels of
-equal-precedence operators.
-The levels are listed in order of decreasing precedence.
-<P>
-
-
-<DL COMPACT>
-<DT><B></B><I>id</I>++ <I>id</I>--
-
-<DD>
-variable post-increment and post-decrement
-<DT><B>++</B><I>id</I> --<I>id</I>
-
-<DD>
-variable pre-increment and pre-decrement
-<DT><B>- +</B>
-
-<DD>
-unary minus and plus
-<DT><B>! ~</B>
-
-<DD>
-logical and bitwise negation
-<DT><B>**</B>
-
-<DD>
-exponentiation
-<DT><B>* / %</B>
-
-<DD>
-multiplication, division, remainder
-<DT><B>+ -</B>
-
-<DD>
-addition, subtraction
-<DT><B><< >></B>
-
-<DD>
-left and right bitwise shifts
-<DT><B><= >= < ></B>
-
-<DD>
-comparison
-<DT><B>== !=</B>
-
-<DD>
-equality and inequality
-<DT><B>&</B>
-
-<DD>
-bitwise AND
-<DT><B>^</B>
-
-<DD>
-bitwise exclusive OR
-<DT><B>|</B>
-
-<DD>
-bitwise OR
-<DT><B>&&</B>
-
-<DD>
-logical AND
-<DT><B>||</B>
-
-<DD>
-logical OR
-<DT><B></B><I>expr</I>?<I>expr</I>:<I>expr</I>
-
-<DD>
-conditional operator
-<DT><B>= *= /= %= += -= <<= >>= &= ^= |=</B>
-
-<DD>
-assignment
-<DT><B></B><I>expr1</I> , <I>expr2</I>
-
-<DD>
-comma
-
-</DL>
-<P>
-
-Shell variables are allowed as operands; parameter expansion is
-performed before the expression is evaluated.
-Within an expression, shell variables may also be referenced by name
-without using the parameter expansion syntax.
-This means you can use "x", where <I>x</I> is a shell variable name,
-in an arithmetic expression, and the shell will evaluate its value as
-an expression and use the result.
-A shell variable that is null or unset evaluates to 0 when referenced
-by name in an expression.
-<P>
-
-The value of a variable is evaluated as an arithmetic expression
-when it is referenced, or when a variable which has been given the
-<I>integer</I> attribute using <B>declare -i</B> is assigned a value.
-A null value evaluates to 0.
-A shell variable need not have its <I>integer</I> attribute
-enabled to be used in an expression.
-<P>
-
-Integer constants follow the C language definition, without suffixes or
-character constants.
-Constants with a leading 0 are interpreted as octal numbers.
-A leading 0x or 0X denotes hexadecimal.
-Otherwise, numbers take the form [<I>base#</I>]n, where the optional <I>base</I>
-is a decimal number between 2 and 64 representing the arithmetic
-base, and <I>n</I> is a number in that base.
-If <I>base#</I> is omitted, then base 10 is used.
-When specifying <I>n</I>,
-if a non-digit is required,
-the digits greater than 9 are represented by the lowercase letters,
-the uppercase letters, @, and _, in that order.
-If <I>base</I> is less than or equal to 36, lowercase and uppercase
-letters may be used interchangeably to represent numbers between 10
-and 35.
-<P>
-
-Operators are evaluated in precedence order.
-Sub-expressions in parentheses are evaluated first
-and may override the precedence rules above.
-<A NAME="lbBX"> </A>
-<H3>CONDITIONAL EXPRESSIONS</H3>
-
-Conditional expressions are used by the <B>[[</B> compound command and
-the <B>test</B> and <B>[</B> builtin commands to test file attributes
-and perform string and arithmetic comparisons.
-The <B>test</B> and <B>[</B> commands determine their behavior based on
-the number of arguments; see the descriptions of those commands for any
-other command-specific actions.
-<P>
-
-Expressions are formed from the unary or binary primaries listed below.
-Unary expressions are often used to examine the status of a file
-or shell variable.
-Binary operators are used for string, numeric, and file attribute
-comparisons.
-<P>
-
-<B>Bash</B> handles several filenames specially when they are used in
-expressions.
-If the operating system on which <B>bash</B> is running provides these
-special files, bash will use them; otherwise it will emulate them
-internally with this behavior:
-If any <I>file</I> argument to one of the primaries is of the form
-
-<I>/dev/fd/n</I>,
-
-then <B>bash</B> checks file descriptor <I>n</I>.
-If the <I>file</I> argument to one of the primaries is one of
-
-<I>/dev/stdin</I>,
-
-
-<I>/dev/stdout</I>,
-
-or
-
-<I>/dev/stderr</I>,
-
-<B>bash</B> checks file descriptor 0, 1, or 2, respectively.
-<P>
-
-Unless otherwise specified, primaries that operate on files follow symbolic
-links and operate on the target of the link, rather than the link itself.
-<P>
-
-When used with <B>[[</B>,
-or when the shell is in posix mode,
-the <B><</B> and <B>></B> operators sort
-lexicographically using the current locale.
-When the shell is not in posix mode,
-the <B>test</B> command sorts using ASCII ordering.
-<P>
-
-
-<DL COMPACT>
-<DT><B>-a </B><I>file</I>
-
-<DD>
-True if <I>file</I> exists.
-<DT><B>-b </B><I>file</I>
-
-<DD>
-True if <I>file</I> exists and is a block special file.
-<DT><B>-c </B><I>file</I>
-
-<DD>
-True if <I>file</I> exists and is a character special file.
-<DT><B>-d </B><I>file</I>
-
-<DD>
-True if <I>file</I> exists and is a directory.
-<DT><B>-e </B><I>file</I>
-
-<DD>
-True if <I>file</I> exists.
-<DT><B>-f </B><I>file</I>
-
-<DD>
-True if <I>file</I> exists and is a regular file.
-<DT><B>-g </B><I>file</I>
-
-<DD>
-True if <I>file</I> exists and is set-group-id.
-<DT><B>-h </B><I>file</I>
-
-<DD>
-True if <I>file</I> exists and is a symbolic link.
-<DT><B>-k </B><I>file</I>
-
-<DD>
-True if <I>file</I> exists and its
-bit is set.
-<DT><B>-p </B><I>file</I>
+<p><b>−t</b> <i>fd</i></p></td>
+<td width="3%"></td>
+<td width="77%">
+
+
+<p>True if file descriptor <i>fd</i> is open and refers to
+a terminal.</p></td>
+<td width="5%">
+</td></tr>
+</table>
+
+<p style="margin-left:9%;"><b>−u</b> <i>file</i></p>
+
+<p style="margin-left:18%;">True if <i>file</i> exists and
+its set-user-id bit is set.</p>
+
+<p style="margin-left:9%;"><b>−w</b> <i>file</i></p>
+
+<p style="margin-left:18%;">True if <i>file</i> exists and
+is writable.</p>
+
+<p style="margin-left:9%;"><b>−x</b> <i>file</i></p>
+
+<p style="margin-left:18%;">True if <i>file</i> exists and
+is executable.</p>
+
+<p style="margin-left:9%;"><b>−G</b> <i>file</i></p>
+
+<p style="margin-left:18%;">True if <i>file</i> exists and
+is owned by the effective group id.</p>
+
+<p style="margin-left:9%;"><b>−L</b> <i>file</i></p>
+
+<p style="margin-left:18%;">True if <i>file</i> exists and
+is a symbolic link.</p>
+
+<p style="margin-left:9%;"><b>−N</b> <i>file</i></p>
+
+<p style="margin-left:18%;">True if <i>file</i> exists and
+has been modified since it was last accessed.</p>
+
+<p style="margin-left:9%;"><b>−O</b> <i>file</i></p>
+
+<p style="margin-left:18%;">True if <i>file</i> exists and
+is owned by the effective user id.</p>
-<DD>
-True if <I>file</I> exists and is a named pipe (FIFO).
-<DT><B>-r </B><I>file</I>
+<p style="margin-left:9%;"><b>−S</b> <i>file</i></p>
-<DD>
-True if <I>file</I> exists and is readable.
-<DT><B>-s </B><I>file</I>
+<p style="margin-left:18%;">True if <i>file</i> exists and
+is a socket.</p>
-<DD>
-True if <I>file</I> exists and has a size greater than zero.
-<DT><B>-t </B><I>fd</I>
+<p style="margin-left:9%;"><b>−o</b>
+<i>optname</i></p>
-<DD>
-True if file descriptor
-<I>fd</I>
+<p style="margin-left:18%;">True if the shell option
+<i>optname</i> is enabled. See the list of options under the
+description of the <b>−o</b> option to the <b>set</b>
+builtin below.</p>
-is open and refers to a terminal.
-<DT><B>-u </B><I>file</I>
+<p style="margin-left:9%;"><b>−v</b>
+<i>varname</i></p>
-<DD>
-True if <I>file</I> exists and its set-user-id bit is set.
-<DT><B>-w </B><I>file</I>
-
-<DD>
-True if <I>file</I> exists and is writable.
-<DT><B>-x </B><I>file</I>
+<p style="margin-left:18%;">True if the shell variable
+<i>varname</i> is set (has been assigned a value). If
+<i>varname</i> is an indexed array variable name subscripted
+by <i>@</i> or <i>*</i>, this returns true if the array has
+any set elements. If <i>varname</i> is an associative array
+variable name subscripted by <i>@</i> or <i>*</i>, this
+returns true if an element with that key is set.</p>
-<DD>
-True if <I>file</I> exists and is executable.
-<DT><B>-G </B><I>file</I>
+<p style="margin-left:9%;"><b>−R</b>
+<i>varname</i></p>
-<DD>
-True if <I>file</I> exists and is owned by the effective group id.
-<DT><B>-L </B><I>file</I>
+<p style="margin-left:18%;">True if the shell variable
+<i>varname</i> is set and is a name reference.</p>
-<DD>
-True if <I>file</I> exists and is a symbolic link.
-<DT><B>-N </B><I>file</I>
+<p style="margin-left:9%;"><b>−z</b>
+<i>string</i></p>
-<DD>
-True if <I>file</I> exists and has been modified since it was last
-accessed.
-<DT><B>-O </B><I>file</I>
-
-<DD>
-True if <I>file</I> exists and is owned by the effective user id.
-<DT><B>-S </B><I>file</I>
+<p style="margin-left:18%;">True if the length of
+<i>string</i> is zero.</p>
-<DD>
-True if <I>file</I> exists and is a socket.
-<DT><B>-o </B><I>optname</I>
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="8%">
-<DD>
-True if the shell option
-<I>optname</I>
-is enabled.
-See the list of options under the description of the
-<B>-o</B>
+<p><i>string</i></p></td>
+<td width="83%">
+</td></tr>
+</table>
-option to the
-<B>set</B>
-
-builtin below.
-<DT><B>-v </B><I>varname</I>
+<p style="margin-left:9%; margin-top: 1em"><b>−n</b>
+<i>string</i></p>
-<DD>
-True if the shell variable
-<I>varname</I>
+<p style="margin-left:18%;">True if the length of
+<i>string</i> is non-zero.</p>
-is set (has been assigned a value).
-If <I>varname</I> is an indexed
-array variable name subscripted by <I>@</I> or <I>*</I>,
-this returns true if the array has any set elements.
-If <I>varname</I> is an associative
-array variable name subscripted by <I>@</I> or <I>*</I>,
-this returns true if an element with that key is set.
-<DT><B>-R </B><I>varname</I>
-
-<DD>
-True if the shell variable
-<I>varname</I>
-
-is set and is a name reference.
-<DT><B>-z </B><I>string</I>
+<p style="margin-left:9%;"><i>string1</i> <b>==</b>
+<i>string2 <br>
+string1</i> <b>=</b> <i>string2</i></p>
-<DD>
-True if the length of <I>string</I> is zero.
-<DT><I>string</I><DD>
-<DT><B>-n </B><I>string</I>
-
-<DD>
-True if the length of
-<I>string</I>
-
-is non-zero.
+<p style="margin-left:18%;">True if the strings are equal.
+<b>=</b> should be used with the <b>test</b> command for
+<small>POSIX</small> conformance. When used with the
+<b>[[</b> command, this performs pattern matching as
+described above (<b>Compound Commands</b>).</p>
-<DT><I>string1</I> <B>==</B> <I>string2</I><DD>
-
-<DT><I>string1</I> <B>=</B> <I>string2</I><DD>
-True if the strings are equal.
-<B>=</B> should be used with the <B>test</B> command for
-<FONT SIZE=-1>POSIX</FONT>
-conformance.
-When used with the <B>[[</B> command, this performs pattern matching as
-described above (<B>Compound Commands</B>).
-<DT><I>string1</I> <B>!=</B> <I>string2</I><DD>
-True if the strings are not equal.
-<DT><I>string1</I> <B><</B> <I>string2</I><DD>
-True if <I>string1</I> sorts before <I>string2</I> lexicographically.
-<DT><I>string1</I> <B>></B> <I>string2</I><DD>
-True if <I>string1</I> sorts after <I>string2</I> lexicographically.
-
-<DT>
-<DD>
-<I>file1</I> <B>-ef</B> <I>file2</I>
-True if <I>file1</I> and <I>file2</I> refer to the same device and
-inode numbers.
-<DT><I>file1</I> -<B>nt</B> <I>file2</I><DD>
-True if <I>file1</I> is newer (according to modification date) than <I>file2</I>,
-or if <I>file1</I> exists and file2 does not.
-<DT><I>file1</I> -<B>ot</B> <I>file2</I><DD>
-True if <I>file1</I> is older than <I>file2</I>, or if <I>file2</I> exists
-and <I>file1</I> does not.
-
-<DT><I>arg1</I> <B>OP</B> <I>arg2</I>
-
-<DD>
-<FONT SIZE=-1><B>OP</B>
-
-</FONT>
-is one of
-<B>-eq</B>,
-
-<B>-ne</B>,
-
-<B>-lt</B>,
-
-<B>-le</B>,
-
-<B>-gt</B>,
-
-or
-<B>-ge</B>.
-
-These arithmetic binary operators return true if <I>arg1</I>
+<p style="margin-left:9%;"><i>string1</i> <b>!=</b>
+<i>string2</i></p>
+
+<p style="margin-left:18%;">True if the strings are not
+equal.</p>
+
+<p style="margin-left:9%;"><i>string1</i> <b><</b>
+<i>string2</i></p>
+
+<p style="margin-left:18%;">True if <i>string1</i> sorts
+before <i>string2</i> lexicographically.</p>
+
+<p style="margin-left:9%;"><i>string1</i> <b>></b>
+<i>string2</i></p>
+
+<p style="margin-left:18%;">True if <i>string1</i> sorts
+after <i>string2</i> lexicographically.</p>
+
+<p style="margin-left:9%;"><i>file1</i> <b>−ef</b>
+<i>file2</i></p>
+
+<p style="margin-left:18%;">True if <i>file1</i> and
+<i>file2</i> refer to the same device and inode numbers.</p>
+
+<p style="margin-left:9%;"><i>file1</i> −<b>nt</b>
+<i>file2</i></p>
+
+<p style="margin-left:18%;">True if <i>file1</i> is newer
+(according to modification date) than <i>file2</i>, or if
+<i>file1</i> exists and <i>file2</i> does not.</p>
+
+<p style="margin-left:9%;"><i>file1</i> −<b>ot</b>
+<i>file2</i></p>
+
+<p style="margin-left:18%;">True if <i>file1</i> is older
+than <i>file2</i>, or if <i>file2</i> exists and
+<i>file1</i> does not.</p>
+
+<p style="margin-left:9%;"><i>arg1</i> <b>OP</b>
+<i>arg2</i></p>
+
+<p style="margin-left:18%;"><b><small>OP</small></b> is one
+of <b>−eq</b>, <b>−ne</b>, <b>−lt</b>,
+<b>−le</b>, <b>−gt</b>, or <b>−ge</b>.
+These arithmetic binary operators return true if <i>arg1</i>
is equal to, not equal to, less than, less than or equal to,
-greater than, or greater than or equal to <I>arg2</I>, respectively.
-<I>arg1</I>
-
-and
-<I>arg2</I>
-
-may be positive or negative integers.
-When used with the <B>[[</B> command,
-<I>arg1</I>
-
-and
-<I>arg2</I>
-
-are evaluated as arithmetic expressions (see
-<FONT SIZE=-1><B>ARITHMETIC EVALUATION</B>
-
-</FONT>
-above).
-Since the expansions the <B>[[</B> command performs on
-<I>arg1</I>
-
-and
-<I>arg2</I>
-
-can potentially result in empty strings,
-arithmetic expression evaluation treats
-those as expressions that evaluate to 0.
-
-</DL>
-<A NAME="lbBY"> </A>
-<H3>SIMPLE COMMAND EXPANSION</H3>
-
-When the shell executes a simple command, it performs the following
-expansions, assignments, and redirections, from left to right, in
-the following order.
-<DL COMPACT>
-<DT>1.<DD>
-The words that the parser has marked as variable assignments (those
-preceding the command name) and redirections are saved for later
-processing.
-<DT>2.<DD>
-The words that are not variable assignments or redirections are
-expanded.
-If any words remain after expansion, the first word
-is taken to be the name of the command and the remaining words are
-the arguments.
-<DT>3.<DD>
-Redirections are performed as described above under
-<FONT SIZE=-1><B>REDIRECTION</B>.
-
-</FONT>
-<DT>4.<DD>
-The text after the <B>=</B> in each variable assignment undergoes tilde
-expansion, parameter expansion, command substitution, arithmetic expansion,
-and quote removal before being assigned to the variable.
-</DL>
-<P>
-
-If no command name results, the variable assignments affect the 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.
-<P>
-
-If no command name results, redirections are performed, but do not
-affect the current shell environment.
-A redirection error causes the command to exit with a non-zero status.
-<P>
-
-If there is a command name left after expansion, execution proceeds as
-described below.
-Otherwise, the command exits.
-If one of the expansions contained a command substitution,
-the exit status of the command is the exit status of
-the last command substitution performed.
-If there were no command substitutions,
-the command exits with a zero status.
-<A NAME="lbBZ"> </A>
-<H3>COMMAND EXECUTION</H3>
-
-After a command has been split into words, if it results in a
-simple command and an optional list of arguments, the shell performs
-the following actions.
-<P>
-
-If the command name contains no slashes, the shell attempts to
-locate it.
-If there exists a shell function by that name, that function is
-invoked as described above in
-<FONT SIZE=-1><B>FUNCTIONS</B>.
-
-</FONT>
-If the name does not match a function, the shell searches for
-it in the list of shell builtins.
-If a match is found, that builtin is invoked.
-<P>
-
-If the name is neither a shell function nor a builtin,
-and contains no slashes,
-<B>bash</B>
-
-searches each element of the
-<FONT SIZE=-1><B>PATH</B>
-
-</FONT>
-for a directory containing an executable file by that name.
-<B>Bash</B>
-
-uses a hash table to remember the full pathnames of executable
-files (see
-<B>hash</B>
-
-under
-<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
-
-</FONT>
-below).
-Bash performs a full search of the directories in
-<FONT SIZE=-1><B>PATH</B>
-
-</FONT>
-only if the command is not found in the hash table.
-If the search is unsuccessful, the shell searches for a defined shell
-function named <B>command_not_found_handle</B>.
-If that function exists, it is invoked in a separate execution environment
-with the original command and
-the original command's arguments as its arguments, and the function's
-exit status becomes the exit status of that subshell.
-If that function is not defined, the shell prints an error
-message and returns an exit status of 127.
-<P>
-
-If the search is successful, or if the command name contains
-one or more slashes, the shell executes the named program in a
-separate execution environment.
-Argument 0 is set to the name given, and the remaining arguments
-to the command are set to the arguments given, if any.
-<P>
-
-If this execution fails because the file is not in executable
+greater than, or greater than or equal to <i>arg2</i>,
+respectively. <i>arg1</i> and <i>arg2</i> may be positive or
+negative integers. When used with the <b>[[</b> command,
+<i>arg1</i> and <i>arg2</i> are evaluated as arithmetic
+expressions (see <b><small>ARITHMETIC EVALUATION</small></b>
+above). Since the expansions the <b>[[</b> command performs
+on <i>arg1</i> and <i>arg2</i> can potentially result in
+empty strings, arithmetic expression evaluation treats those
+as expressions that evaluate to 0.</p>
+
+<h2>SIMPLE COMMAND EXPANSION
+<a name="SIMPLE COMMAND EXPANSION"></a>
+</h2>
+
+
+<p style="margin-left:9%; margin-top: 1em">When the shell
+executes a simple command, it performs the following
+expansions, assignments, and redirections, from left to
+right, in the following order.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="3%">
+
+
+<p>1.</p></td>
+<td width="6%"></td>
+<td width="82%">
+
+
+<p>The words that the parser has marked as variable
+assignments (those preceding the command name) and
+redirections are saved for later processing.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="3%">
+
+
+<p>2.</p></td>
+<td width="6%"></td>
+<td width="82%">
+
+
+<p>The words that are not variable assignments or
+redirections are expanded. If any words remain after
+expansion, the first word is taken to be the name of the
+command and the remaining words are the arguments.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="3%">
+
+
+<p>3.</p></td>
+<td width="6%"></td>
+<td width="82%">
+
+
+<p>Redirections are performed as described above under
+<b><small>REDIRECTION</small></b><small>.</small></p> </td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="3%">
+
+
+<p>4.</p></td>
+<td width="6%"></td>
+<td width="82%">
+
+
+<p>The text after the <b>=</b> in each variable assignment
+undergoes tilde expansion, parameter expansion, command
+substitution, arithmetic expansion, and quote removal before
+being assigned to the variable.</p></td></tr>
+</table>
+
+<p style="margin-left:9%; margin-top: 1em">If no command
+name results, the variable assignments affect the 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.</p>
+
+<p style="margin-left:9%; margin-top: 1em">If no command
+name results, redirections are performed, but do not affect
+the current shell environment. A redirection error causes
+the command to exit with a non-zero status.</p>
+
+<p style="margin-left:9%; margin-top: 1em">If there is a
+command name left after expansion, execution proceeds as
+described below. Otherwise, the command exits. If one of the
+expansions contained a command substitution, the exit status
+of the command is the exit status of the last command
+substitution performed. If there were no command
+substitutions, the command exits with a zero status.</p>
+
+<h2>COMMAND EXECUTION
+<a name="COMMAND EXECUTION"></a>
+</h2>
+
+
+<p style="margin-left:9%; margin-top: 1em">After a command
+has been split into words, if it results in a simple command
+and an optional list of arguments, the shell performs the
+following actions.</p>
+
+<p style="margin-left:9%; margin-top: 1em">If the command
+name contains no slashes, the shell attempts to locate it.
+If there exists a shell function by that name, that function
+is invoked as described above in
+<b><small>FUNCTIONS</small></b><small>.</small> If the name
+does not match a function, the shell searches for it in the
+list of shell builtins. If a match is found, that builtin is
+invoked.</p>
+
+<p style="margin-left:9%; margin-top: 1em">If the name is
+neither a shell function nor a builtin, and contains no
+slashes, <b>bash</b> searches each element of the
+<b><small>PATH</small></b> for a directory containing an
+executable file by that name. <b>Bash</b> uses a hash table
+to remember the full pathnames of executable files (see
+<b>hash</b> under <b><small>SHELL BUILTIN
+COMMANDS</small></b> below). Bash performs a full search of
+the directories in <b><small>PATH</small></b> only if the
+command is not found in the hash table. If the search is
+unsuccessful, the shell searches for a defined shell
+function named <b>command_not_found_handle</b>. If that
+function exists, it is invoked in a separate execution
+environment with the original command and the original
+command’s arguments as its arguments, and the
+function’s exit status becomes the exit status of that
+subshell. If that function is not defined, the shell prints
+an error message and returns an exit status of 127.</p>
+
+<p style="margin-left:9%; margin-top: 1em">If the search is
+successful, or if the command name contains one or more
+slashes, the shell executes the named program in a separate
+execution environment. Argument 0 is set to the name given,
+and the remaining arguments to the command are set to the
+arguments given, if any.</p>
+
+<p style="margin-left:9%; margin-top: 1em">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 <I>shell script</I>, a file containing shell commands,
-and the shell creates a new instance of itself to execute it.
-Bash tries to determine whether the file is a text file or a binary,
-and will not execute files it determines to be binaries.
-This subshell reinitializes itself, so
-that the effect is as if a new shell had been invoked
-to handle the script, with the exception that the locations of
-commands remembered by the parent (see
-<B>hash</B>
-
-below under
-<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
-
-</FONT>
-are retained by the child.
-<P>
-
-If the program is a file beginning with
-<B>#!</B>,
-
-the remainder of the first line specifies an interpreter
-for the program.
-The shell executes the
-specified interpreter on operating systems that do not
-handle this executable format themselves.
-The arguments to the
-interpreter consist of a single optional argument following the
-interpreter name on the first line of the program, followed
-by the name of the program, followed by the command
-arguments, if any.
-<A NAME="lbCA"> </A>
-<H3>COMMAND EXECUTION ENVIRONMENT</H3>
-
-The shell has an <I>execution environment</I>, which consists of the
-following:
-<DL COMPACT>
-<DT>*<DD>
-Open files inherited by the shell at invocation, as modified by
-redirections supplied to the <B>exec</B> builtin.
-<DT>*<DD>
-The current working directory as set by <B>cd</B>, <B>pushd</B>, or
-<B>popd</B>, or inherited by the shell at invocation.
-<DT>*<DD>
-The file creation mode mask as set by <B>umask</B> or inherited from
-the shell's parent.
-<DT>*<DD>
-Current traps set by <B>trap</B>.
-<DT>*<DD>
-Shell parameters that are set by variable assignment or with <B>set</B>
-or inherited from the shell's parent in the environment.
-<DT>*<DD>
-Shell functions defined during execution or inherited from the shell's
-parent in the environment.
-<DT>*<DD>
-Options enabled at invocation (either by default or with command-line
-arguments) or by <B>set</B>.
-<DT>*<DD>
-Options enabled by <B>shopt</B>.
-<DT>*<DD>
-Shell aliases defined with <B>alias</B>.
-<DT>*<DD>
-Various process IDs, including those of background jobs, the value
-of <B>$$</B>, and the value of
-<FONT SIZE=-1><B>PPID</B>.
-
-</FONT>
-</DL>
-<P>
-
-When a simple command other than a builtin or shell function
-is to be executed, it
-is invoked in a separate execution environment that consists of
-the following.
-Unless otherwise noted, the values are inherited from the shell.
-<DL COMPACT>
-<DT>*<DD>
-The shell's open files, plus any modifications and additions specified
-by redirections to the command.
-<DT>*<DD>
-The current working directory.
-<DT>*<DD>
-The file creation mode mask.
-<DT>*<DD>
-Shell variables and functions marked for export, along with variables
-exported for the command, passed in the environment.
-<DT>*<DD>
-Traps caught by the shell are reset to the values inherited from the
-shell's parent, and traps ignored by the shell are ignored.
-</DL>
-<P>
-
-A command invoked in this separate environment cannot affect the
-shell's execution environment.
-<P>
-
-A <I>subshell</I> is a copy of the shell process.
-<P>
-
-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 shell are reset to the values
-that the shell inherited from its parent at invocation.
-Builtin commands that are invoked as part of a pipeline,
-except possibly in the last element depending on the value of the
-<B>lastpipe</B> shell option,
-are also executed in a subshell environment.
-Changes made to the subshell environment
-cannot affect the shell's execution environment.
-<P>
-
-When the shell is in posix mode,
-subshells spawned to execute command substitutions inherit the value of
-the <B>-e</B> option from their parent shell.
-When not in posix mode,
-<B>bash</B> clears the <B>-e</B> option in such subshells.
-See the
-description of the <B>inherit_errexit</B> shell option below
-for how to control this behavior when not in posix mode.
-<P>
-
-If a command is followed by a <B>&</B> and job control is not active, the
-default standard input for the command is the empty file
-
-<I>/dev/null</I>.
-
-Otherwise, the invoked command inherits the file descriptors of the calling
-shell as modified by redirections.
-<A NAME="lbCB"> </A>
-<H3>ENVIRONMENT</H3>
-
-When a program is invoked it is given an array of strings
-called the
-<I>environment</I>.
-
-This is a list of
-<I>name</I>-<I>value</I> pairs, of the form
-<I>name</I>=value.
-
-<P>
-
-The shell 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
-<I>export</I>
-
-to child processes.
-Executed commands inherit the environment.
-The
-<B>export</B>,
-
-<B>declare -x</B>,
-
-and
-<B>unset</B>
-
-commands modify the environment by
-adding and deleting parameters and functions.
-If the value of a parameter
-in the environment is modified, the new value automatically
-becomes part of the environment, replacing the old.
-The environment
-inherited by any executed command consists of the shell's
-initial environment, whose values may be modified in the shell,
-less any pairs removed by the
-<B>unset</B>
-
-or
-<B>export -n</B>
-
-commands, plus any additions via the
-<B>export</B>
-
-and
-<B>declare -x</B>
-
-commands.
-<P>
-
-If any parameter assignments, as described above in
-<FONT SIZE=-1><B>PARAMETERS</B>,
-
-</FONT>
-appear before a
-<I>simple command</I>,
-
-the variable assignments are part of that command's environment
-for as long as it executes.
-These assignment statements affect only the environment seen
-by that command.
-If these assignments precede a call to a shell function, the variables
-are local to the function and exported to that function's children.
-<P>
-
-If the
-<B>-k</B>
-
-option is set (see the
-<B>set</B>
-
-builtin command below), then
-<I>all</I>
-
-parameter assignments are placed in the environment for a command,
-not just those that precede the command name.
-<P>
-
-When
-<B>bash</B>
-
-invokes an external command, the variable
-<B>_</B>
-
-is set to the full pathname of the command and passed to that
-command in its environment.
-<A NAME="lbCC"> </A>
-<H3>EXIT STATUS</H3>
-
-The exit status of an executed command is the value returned by the
-<I>waitpid</I> 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.
-<P>
-
-For the shell's purposes, a command which exits with a
-zero exit status has succeeded.
-So while an exit status of zero indicates success, a non-zero
-exit status indicates failure.
-<P>
-
-When a command terminates on a fatal signal <I>N</I>, <B>bash</B> uses
-the value of 128+<I>N</I> as the exit status.
-<P>
-
-If a command is not found, the child process created to
-execute it returns a status of 127. If a command is found
-but is not executable, the return status is 126.
-<P>
-
-If a command fails because of an error during expansion or redirection,
-the exit status is greater than zero.
-<P>
-
-Shell builtin commands return a status of 0 (<I>true</I>) if
-successful, and non-zero (<I>false</I>) if an error occurs
-while they execute.
-All builtins return an exit status of 2 to indicate incorrect usage,
-generally invalid options or missing arguments.
-<P>
-
-The exit status of the last command is available in the special
-parameter $?.
-<P>
-
-<B>Bash</B> itself returns the exit status of the last command
-executed, unless a syntax error occurs, in which case it exits
-with a non-zero value.
-See also the <B>exit</B> builtin command below.
-<A NAME="lbCD"> </A>
-<H3>SIGNALS</H3>
-
-When <B>bash</B> is interactive, in the absence of any traps, it ignores
-<FONT SIZE=-1><B>SIGTERM</B>
-
-</FONT>
-(so that <B>kill 0</B> does not kill an interactive shell),
-and catches and handles
-<FONT SIZE=-1><B>SIGINT</B>
-
-</FONT>
-(so that the <B>wait</B> builtin is interruptible).
-When <B>bash</B> receives
-<FONT SIZE=-1><B>SIGINT</B>,
-
-</FONT>
-it breaks out of any executing loops.
-In all cases, <B>bash</B> ignores
-<FONT SIZE=-1><B>SIGQUIT</B>.
-
-</FONT>
-If job control is in effect,
-<B>bash</B>
-
-ignores
-<FONT SIZE=-1><B>SIGTTIN</B>,
-
-</FONT>
-<FONT SIZE=-1><B>SIGTTOU</B>,
-
-</FONT>
-and
-<FONT SIZE=-1><B>SIGTSTP</B>.
-
-</FONT>
-<P>
-
-The <B>trap</B> builtin modifies the shell's signal handling, as
-described below.
-<P>
-
-Non-builtin commands <B>bash</B> executes have signal handlers
-set to the values inherited by the shell from its parent,
-unless <B>trap</B> sets them to be ignored, in which case the child
-process will ignore them as well.
-When job control is not in effect, asynchronous commands
-ignore
-<FONT SIZE=-1><B>SIGINT</B>
-
-</FONT>
-and
-<FONT SIZE=-1><B>SIGQUIT</B>
-
-</FONT>
-in addition to these inherited handlers.
-Commands run as a result of command substitution ignore the
-keyboard-generated job control signals
-<FONT SIZE=-1><B>SIGTTIN</B>,
-
-</FONT>
-<FONT SIZE=-1><B>SIGTTOU</B>,
-
-</FONT>
-and
-<FONT SIZE=-1><B>SIGTSTP</B>.
-
-</FONT>
-<P>
-
-The shell exits by default upon receipt of a
-<FONT SIZE=-1><B>SIGHUP</B>.
-
-</FONT>
-Before exiting, an interactive shell resends the
-<FONT SIZE=-1><B>SIGHUP</B>
-
-</FONT>
-to all jobs, running or stopped.
-The shell sends
-<FONT SIZE=-1><B>SIGCONT</B>
-
-</FONT>
-to stopped jobs to ensure that they receive the
-<FONT SIZE=-1><B>SIGHUP </B>
-
-</FONT>
-(see
-<FONT SIZE=-1><B>JOB CONTROL</B>
-
-</FONT>
-below for more information about running and stopped jobs).
-To prevent the shell from
-sending the signal to a particular job, remove it from the
-jobs table with the
-<B>disown</B>
-
-builtin (see
-<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
-
-</FONT>
-below) or mark it not to receive
-<FONT SIZE=-1><B>SIGHUP</B>
-
-</FONT>
-using
-<B>disown -h</B>.
-
-<P>
-
-If the
-<B>huponexit</B>
-
-shell option has been set using
-<B>shopt</B>,
-
-<B>bash</B>
-
-sends a
-<FONT SIZE=-1><B>SIGHUP</B>
-
-</FONT>
-to all jobs when an interactive login shell exits.
-<P>
-
-If <B>bash</B> is waiting for a command to complete and receives a signal
-for which a trap has been set,
-it will not execute the trap until the command completes.
-If <B>bash</B> is waiting for an asynchronous command via the <B>wait</B>
-builtin,
-and it receives a signal for which a trap has been set,
-the <B>wait</B> builtin will return immediately with an exit status
-greater than 128, immediately after which the shell executes the trap.
-<P>
-
-When job control is not enabled, and <B>bash</B> is waiting for a foreground
-command to complete, the shell receives keyboard-generated signals
-such as
-<FONT SIZE=-1><B>SIGINT</B>
-
-</FONT>
-(usually generated by <B>^C</B>) 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 <B>^C</B> sends
-<FONT SIZE=-1><B>SIGINT</B>
-
-</FONT>
-to all processes in that process group.
-Since <B>bash</B> does not enable job control by default when the
-shell is not interactive,
-this scenario is most common in non-interactive shells.
-<P>
-
-When job control is enabled, and <B>bash</B> is waiting for a foreground
-command to complete, the shell does not receive keyboard-generated
-signals, because it is not in the same process group as the terminal.
-This scenario is most common in interactive shells, where <B>bash</B>
-attempts to enable job control by default.
-See
-<FONT SIZE=-1><B>JOB CONTROL</B>
-
-</FONT>
-below for more information about process groups.
-<P>
-
-When job control is not enabled, and <B>bash</B> receives
-<FONT SIZE=-1><B>SIGINT</B>
-
-</FONT>
-while waiting for a foreground command, it waits until that foreground
-command terminates and then decides what to do about the
-<FONT SIZE=-1><B>SIGINT</B>:
-
-</FONT>
-<DL COMPACT>
-<DT>1.<DD>
-If the command terminates due to the
-<FONT SIZE=-1><B>SIGINT</B>,
-
-</FONT>
-<B>bash</B> concludes
-that the user meant to send the
-<FONT SIZE=-1><B>SIGINT</B>
-
-</FONT>
-to the shell as well, and acts on the
-<FONT SIZE=-1><B>SIGINT</B>
-
-</FONT>
-(e.g., by running a
-<FONT SIZE=-1><B>SIGINT</B>
-
-</FONT>
-trap,
-exiting a non-interactive shell,
-or returning to the top level to read a new command).
-<DT>2.<DD>
-If the command does not terminate due to
-<FONT SIZE=-1><B>SIGINT</B>,
-
-</FONT>
-the program handled the
-<FONT SIZE=-1><B>SIGINT</B>
-
-</FONT>
-itself and did not treat it as a fatal signal.
-In that case, <B>bash</B> does not treat
-<FONT SIZE=-1><B>SIGINT</B>
-
-</FONT>
-as a fatal signal, either, instead assuming that the
-<FONT SIZE=-1><B>SIGINT</B>
-
-</FONT>
-was used as part of the program's normal operation
-(e.g., emacs uses it to abort editing
-commands) or deliberately discarded.
-However, <B>bash</B> will run any
-trap set on
-<FONT SIZE=-1><B>SIGINT</B>,
-
-</FONT>
-as it does with any other trapped signal it
-receives while it is waiting for the foreground command to
-complete, for compatibility.
-</DL>
-<P>
-
-When job control is enabled, <B>bash</B> does not receive keyboard-generated
-signals such as
-<FONT SIZE=-1><B>SIGINT</B>
-
-</FONT>
-while it is waiting for a foreground command.
-An interactive shell does not pay attention to the
-<FONT SIZE=-1><B>SIGINT</B>,
-
-</FONT>
-even if the foreground command terminates as a result, other than noting
-its exit status.
-If the shell is not interactive, and
-the foreground command terminates due to the
-<FONT SIZE=-1><B>SIGINT</B>,
-
-</FONT>
-<B>bash</B> pretends it received the
-<FONT SIZE=-1><B>SIGINT</B>
-
-</FONT>
-itself (scenario 1 above), for compatibility.
-<A NAME="lbCE"> </A>
-<H3>JOB CONTROL</H3>
-
-<I>Job control</I>
-
-refers to the ability to selectively stop (<I>suspend</I>)
-the execution of processes and continue (<I>resume</I>)
-their execution at a later point.
-A user typically employs
-this facility via an interactive interface supplied jointly
-by the operating system kernel's terminal driver and
-<B>bash</B>.
-
-<P>
-
-The shell associates a
-<I>job</I>
-
-with each pipeline.
-It keeps a table of currently executing
-jobs, which the
-<B>jobs</B>
-
-command will display.
-Each job has a <I>job number</I>, which <B>jobs</B> displays between brackets.
-Job numbers start at 1.
-When
-<B>bash</B>
-
-starts a job asynchronously (in the
-<I>background</I>),
-
-it prints a line that looks like:
-<DL COMPACT><DT><DD>
-<P>
-
-[1] 25647
-</DL>
-
-<P>
-
-indicating that this job is job number 1 and that the process ID
-of the last process in the pipeline associated with this job is 25647.
-All of the processes in a single pipeline are members of the same job.
-<B>Bash</B>
-
-uses the
-<I>job</I>
-
-abstraction as the basis for job control.
-<P>
-
-To facilitate the implementation of the user interface to job control,
-each process has a <I>process group ID</I>, and
-the operating system maintains the notion of a <I>current terminal
-process group ID</I>.
-This terminal process group ID is associated with the
-<I>controlling terminal</I>.
-<P>
-
-Processes that have the same process group ID are said to be part of
-the same <I>process group</I>.
-Members of the <I>foreground</I> process group (processes whose
-process group ID is equal to the current terminal process group ID)
-receive keyboard-generated signals such as
-<FONT SIZE=-1><B>SIGINT</B>.
-
-</FONT>
-Processes in the foreground process group are said to be
-<I>foreground</I>
-
-processes.
-<I>Background</I>
-
-processes are those whose process group ID differs from the
-controlling terminal's;
-such processes are immune to keyboard-generated signals.
-Only foreground processes are allowed to read from or,
-if the user so specifies with
+a <i>shell script</i>, a file containing shell commands, and
+the shell creates a new instance of itself to execute it.
+Bash tries to determine whether the file is a text file or a
+binary, and will not execute files it determines to be
+binaries. This subshell reinitializes itself, so that the
+effect is as if a new shell had been invoked to handle the
+script, with the exception that the locations of commands
+remembered by the parent (see <b>hash</b> below under
+<b><small>SHELL BUILTIN COMMANDS</small></b> are retained by
+the child.</p>
-write to the controlling terminal.
-The system sends a
-<FONT SIZE=-1><B>SIGTTIN (SIGTTOU)</B>
+<p style="margin-left:9%; margin-top: 1em">If the program
+is a file beginning with <b>#!</b>, the remainder of the
+first line specifies an interpreter for the program. The
+shell executes the specified interpreter on operating
+systems that do not handle this executable format
+themselves. The arguments to the interpreter consist of a
+single optional argument following the interpreter name on
+the first line of the program, followed by the name of the
+program, followed by the command arguments, if any.</p>
-</FONT>
-signal to background processes which attempt to
-read from (write to when
+<h2>COMMAND EXECUTION ENVIRONMENT
+<a name="COMMAND EXECUTION ENVIRONMENT"></a>
+</h2>
-is in effect)
-the terminal,
-which, unless caught, suspends the process.
-<P>
-If the operating system on which
-<B>bash</B>
+<p style="margin-left:9%; margin-top: 1em">The shell has an
+<i>execution environment</i>, which consists of the
+following:</p>
-is running supports
-job control,
-<B>bash</B>
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-contains facilities to use it.
-Typing the
-<I>suspend</I>
-
-character (typically
-<B>^Z</B>,
-
-Control-Z) while a process is running
-stops that process and returns control to
-<B>bash</B>.
-Typing the
-<I>delayed suspend</I>
+<p style="margin-top: 1em">•</p></td>
+<td width="8%"></td>
+<td width="82%">
-character (typically
-<B>^Y</B>,
-Control-Y) causes the process stop when it
-attempts to read input from the terminal, and returns control to
-<B>bash</B>.
+<p style="margin-top: 1em">Open files inherited by the
+shell at invocation, as modified by redirections supplied to
+the <b>exec</b> builtin.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-The user then manipulates the state of this job, using the
-<B>bg</B>
-command to continue it in the background, the
-<B>fg</B>
+<p>•</p></td>
+<td width="8%"></td>
+<td width="82%">
-command to continue it in the foreground, or the
-<B>kill</B>
-command to kill it.
-The suspend character takes effect immediately,
-and has the additional side effect of discarding any pending output
-and typeahead.
-To force a background process to stop, or stop a process
-that's not associated with the current terminal session,
-send it the
-<FONT SIZE=-1><B>SIGSTOP</B>
+<p>The current working directory as set by <b>cd</b>,
+<b>pushd</b>, or <b>popd</b>, or inherited by the shell at
+invocation.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-</FONT>
-signal using <B>kill</B>.
-<P>
-There are a number of ways to refer to a job in the shell.
-The
-<B>%</B>
+<p>•</p></td>
+<td width="8%"></td>
+<td width="82%">
-character introduces a job specification (jobspec).
-<P>
-Job number
-<I>n</I>
+<p>The file creation mode mask as set by <b>umask</b> or
+inherited from the shell’s parent.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-may be referred to as
-<B>%n</B>.
-A job may also be referred to using a prefix of the name used to
-start it, or using a substring that appears in its command line.
-For example,
-<B>%ce</B>
+<p>•</p></td>
+<td width="8%"></td>
+<td width="82%">
-refers to a job whose command name begins with
-<B>ce</B>.
-Using
-<B>%?ce</B>,
+<p>Current traps set by <b>trap</b>.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-on the other hand, refers to any job containing the string
-<B>ce</B>
-in its command line.
-If the prefix or substring matches more than one job,
-<B>bash</B>
+<p>•</p></td>
+<td width="8%"></td>
+<td width="82%">
-reports an error.
-<P>
-The symbols
-<B>%%</B>
+<p>Shell parameters that are set by variable assignment or
+with <b>set</b> or inherited from the shell’s parent
+in the environment.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-and
-<B>%+</B>
-refer to the shell's notion of the
-<I>current job</I>.
-
-A single % (with no accompanying job specification) also refers to the
-current job.
-<B>%-</B>
+<p>•</p></td>
+<td width="8%"></td>
+<td width="82%">
-refers to the
-<I>previous job</I>.
-When a job starts in the background,
-a job stops while in the foreground,
-or a job is resumed in the background,
-it becomes the current job.
-The job that was the current job becomes the previous job.
-When the current job terminates, the previous job becomes the
-current job.
-If there is only a single job, <B>%+</B> and <B>%-</B> can both be used
-to refer to that job.
-In output pertaining to jobs (e.g., the output of the
-<B>jobs</B>
+<p>Shell functions defined during execution or inherited
+from the shell’s parent in the environment.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-command), the current job is always marked with a
-<B>+</B>,
-
-and the previous job with a
-<B>-</B>.
-<P>
+<p>•</p></td>
+<td width="8%"></td>
+<td width="82%">
-Simply naming a job can be used to bring it into the foreground:
-<B>%1</B>
-
-is a synonym for
-
-bringing job 1 from the background into the foreground.
-Similarly,
-resumes job 1 in the background, equivalent to
+<p>Options enabled at invocation (either by default or with
+command-line arguments) or by <b>set</b>.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-<P>
-
-The shell learns immediately whenever a job changes state.
-Normally,
-<B>bash</B>
-waits until it is about to print a prompt before
-notifying the user about
-changes in a job's status so as to not interrupt
-any other output,
-though it will notify of changes in a job's status after a
-foreground command in
-a list completes, before executing the next command in the list.
-If the
-<B>-b</B>
+<p>•</p></td>
+<td width="8%"></td>
+<td width="82%">
-option to the
-<B>set</B>
-builtin command
-is enabled,
-<B>bash</B>
+<p>Options enabled by <b>shopt</b>.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-reports status changes immediately.
-<B>Bash</B> executes any trap on
-<FONT SIZE=-1><B>SIGCHLD</B>
-</FONT>
-for each child that terminates.
-<P>
+<p>•</p></td>
+<td width="8%"></td>
+<td width="82%">
-When a job terminates and <B>bash</B> notifies the user about it,
-<B>bash</B> removes the job from the table.
-It will not appear in <B>jobs</B> output, but <B>wait</B> will
-report its exit status, as long as it's supplied the process ID
-associated with the job as an argument.
-When the table is empty, job numbers start over at 1.
-<P>
-If a user attempts to exit
-<B>bash</B>
+<p>Shell aliases defined with <b>alias</b>.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-while jobs are stopped (or, if the <B>checkjobs</B> shell option has
-been enabled using the <B>shopt</B> builtin, running), the shell prints a
-warning message, and, if the <B>checkjobs</B> option is enabled, lists the
-jobs and their statuses.
-The
-<B>jobs</B>
-command may then be used to inspect their status.
-If the user immediately attempts to exit again,
-without an intervening command,
-<B>bash</B> does not print another warning, and
-terminates any stopped jobs.
-<P>
+<p>•</p></td>
+<td width="8%"></td>
+<td width="82%">
-When the shell is waiting for a job or process using the <B>wait</B>
-builtin, and job control is enabled, <B>wait</B> will return when the
-job changes state.
-The <B>-f</B> option causes <B>wait</B> to wait
-until the job or process terminates before returning.
-<A NAME="lbCF"> </A>
-<H3>PROMPTING</H3>
-When executing interactively,
-<B>bash</B>
+<p>Various process IDs, including those of background jobs,
+the value of <b>$$</b>, and the value of
+<b><small>PPID</small></b><small>.</small></p> </td></tr>
+</table>
-displays the primary prompt
-<FONT SIZE=-1><B>PS1</B>
+<p style="margin-left:9%; margin-top: 1em">When a simple
+command other than a builtin or shell function is to be
+executed, it is invoked in a separate execution environment
+that consists of the following. Unless otherwise noted, the
+values are inherited from the shell.</p>
-</FONT>
-when it is ready to read a command, and the secondary prompt
-<FONT SIZE=-1><B>PS2</B>
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-</FONT>
-when it needs more input to complete a command.
-<P>
-<B>Bash</B>
+<p style="margin-top: 1em">•</p></td>
+<td width="8%"></td>
+<td width="82%">
-examines the value of the array variable <B>PROMPT_COMMAND</B> just before
-printing each primary prompt.
-If any elements in <B>PROMPT_COMMAND</B> are set and non-null, Bash
-executes each value, in numeric order,
-just as if it had been typed on the command line.
-<B>Bash</B>
-displays
-<FONT SIZE=-1><B>PS0</B>
+<p style="margin-top: 1em">The shell’s open files,
+plus any modifications and additions specified by
+redirections to the command.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-</FONT>
-after it reads a command but before executing it.
-<P>
-<B>Bash</B>
+<p>•</p></td>
+<td width="8%"></td>
+<td width="82%">
-displays
-<FONT SIZE=-1><B>PS4</B>
-</FONT>
-as described above
-before tracing each command when the <B>-x</B> option is enabled.
-<P>
-
-<B>Bash</B>
+<p>The current working directory.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-allows the prompt strings
-<B>PS0</B>, <B>PS1</B>, <B>PS2</B>, and <B>PS4</B>,
-to be customized by inserting a number of
-backslash-escaped special characters that are decoded as follows:
-<DL COMPACT><DT><DD>
-<DL COMPACT>
-<DT><B>\a</B>
-<DD>
-An ASCII bell character (07).
+<p>•</p></td>
+<td width="8%"></td>
+<td width="82%">
-<DT><B>\d</B>
-<DD>
-The date in
+<p>The file creation mode mask.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-format (e.g.,
-<DT><B>\D{</B><I>format</I>}
+<p>•</p></td>
+<td width="8%"></td>
+<td width="82%">
-<DD>
-The <I>format</I> is passed to
-<I>strftime</I>(3)
-and the result is inserted
-into the prompt string; an empty <I>format</I> results in a locale-specific
-time representation.
-The braces are required.
-<DT><B>\e</B>
+<p>Shell variables and functions marked for export, along
+with variables exported for the command, passed in the
+environment.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
+
+
+<p>•</p></td>
+<td width="8%"></td>
+<td width="82%">
+
+
+<p>Traps caught by the shell are reset to the values
+inherited from the shell’s parent, and traps ignored
+by the shell are ignored.</p></td></tr>
+</table>
+
+<p style="margin-left:9%; margin-top: 1em">A command
+invoked in this separate environment cannot affect the
+shell’s execution environment.</p>
+
+<p style="margin-left:9%; margin-top: 1em">A
+<i>subshell</i> is a copy of the shell process.</p>
+
+<p style="margin-left:9%; margin-top: 1em">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 shell are reset to the values that the
+shell inherited from its parent at invocation. Builtin
+commands that are invoked as part of a pipeline, except
+possibly in the last element depending on the value of the
+<b>lastpipe</b> shell option, are also executed in a
+subshell environment. Changes made to the subshell
+environment cannot affect the shell’s execution
+environment.</p>
+
+<p style="margin-left:9%; margin-top: 1em">When the shell
+is in posix mode, subshells spawned to execute command
+substitutions inherit the value of the <b>−e</b>
+option from their parent shell. When not in posix mode,
+<b>bash</b> clears the <b>−e</b> option in such
+subshells. See the description of the <b>inherit_errexit</b>
+shell option below for how to control this behavior when not
+in posix mode.</p>
+
+<p style="margin-left:9%; margin-top: 1em">If a command is
+followed by a <b>&</b> and job control is not active,
+the default standard input for the command is the empty file
+<i>/dev/null</i>. Otherwise, the invoked command inherits
+the file descriptors of the calling shell as modified by
+redirections.</p>
+
+<h2>ENVIRONMENT
+<a name="ENVIRONMENT"></a>
+</h2>
+
+
+<p style="margin-left:9%; margin-top: 1em">When a program
+is invoked it is given an array of strings called the
+<i>environment</i>. This is a list of
+<i>name</i>−<i>value</i> pairs, of the form
+<i>name</i>=<i>value</i>.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The shell
+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 <i>export</i> to child processes. Executed commands
+inherit the environment. The <b>export</b>, <b>declare
+−x</b>, and <b>unset</b> commands modify the
+environment by adding and deleting parameters and functions.
+If the value of a parameter in the environment is modified,
+the new value automatically becomes part of the environment,
+replacing the old. The environment inherited by any executed
+command consists of the shell’s initial environment,
+whose values may be modified in the shell, less any pairs
+removed by the <b>unset</b> or <b>export −n</b>
+commands, plus any additions via the <b>export</b> and
+<b>declare −x</b> commands.</p>
+
+<p style="margin-left:9%; margin-top: 1em">If any parameter
+assignments, as described above in
+<b><small>PARAMETERS</small></b><small>,</small> appear
+before a <i>simple command</i>, the variable assignments are
+part of that command’s environment for as long as it
+executes. These assignment statements affect only the
+environment seen by that command. If these assignments
+precede a call to a shell function, the variables are local
+to the function and exported to that function’s
+children.</p>
+
+<p style="margin-left:9%; margin-top: 1em">If the
+<b>−k</b> option is set (see the <b>set</b> builtin
+command below), then <i>all</i> parameter assignments are
+placed in the environment for a command, not just those that
+precede the command name.</p>
+
+<p style="margin-left:9%; margin-top: 1em">When <b>bash</b>
+invokes an external command, the variable <b>_</b> is set to
+the full pathname of the command and passed to that command
+in its environment.</p>
+
+<h2>EXIT STATUS
+<a name="EXIT STATUS"></a>
+</h2>
+
+
+<p style="margin-left:9%; margin-top: 1em">The exit status
+of an executed command is the value returned by the
+<i>waitpid</i> 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.</p>
+
+<p style="margin-left:9%; margin-top: 1em">For the
+shell’s purposes, a command which exits with a zero
+exit status has succeeded. So while an exit status of zero
+indicates success, a non-zero exit status indicates
+failure.</p>
+
+<p style="margin-left:9%; margin-top: 1em">When a command
+terminates on a fatal signal <i>N</i>, <b>bash</b> uses the
+value of 128+<i>N</i> as the exit status.</p>
+
+<p style="margin-left:9%; margin-top: 1em">If a command is
+not found, the child process created to execute it returns a
+status of 127. If a command is found but is not executable,
+the return status is 126.</p>
+
+<p style="margin-left:9%; margin-top: 1em">If a command
+fails because of an error during expansion or redirection,
+the exit status is greater than zero.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Shell builtin
+commands return a status of 0 (<i>true</i>) if successful,
+and non-zero (<i>false</i>) if an error occurs while they
+execute. All builtins return an exit status of 2 to indicate
+incorrect usage, generally invalid options or missing
+arguments.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The exit status
+of the last command is available in the special parameter
+$?.</p>
+
+<p style="margin-left:9%; margin-top: 1em"><b>Bash</b>
+itself returns the exit status of the last command executed,
+unless a syntax error occurs, in which case it exits with a
+non-zero value. See also the <b>exit</b> builtin command
+below.</p>
+
+<h2>SIGNALS
+<a name="SIGNALS"></a>
+</h2>
+
+
+<p style="margin-left:9%; margin-top: 1em">When <b>bash</b>
+is interactive, in the absence of any traps, it ignores
+<b><small>SIGTERM</small></b> (so that <b>kill 0</b> does
+not kill an interactive shell), and catches and handles
+<b><small>SIGINT</small></b> (so that the <b>wait</b>
+builtin is interruptible). When <b>bash</b> receives
+<b><small>SIGINT</small></b><small>,</small> it breaks out
+of any executing loops. In all cases, <b>bash</b> ignores
+<b><small>SIGQUIT</small></b><small>.</small> If job control
+is in effect, <b>bash</b> ignores
+<b><small>SIGTTIN</small></b><small>,
+<b>SIGTTOU</b>,</small> and
+<b><small>SIGTSTP</small></b><small>.</small></p>
+
+<p style="margin-left:9%; margin-top: 1em">The <b>trap</b>
+builtin modifies the shell’s signal handling, as
+described below.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Non-builtin
+commands <b>bash</b> executes have signal handlers set to
+the values inherited by the shell from its parent, unless
+<b>trap</b> sets them to be ignored, in which case the child
+process will ignore them as well. When job control is not in
+effect, asynchronous commands ignore
+<b><small>SIGINT</small></b> and
+<b><small>SIGQUIT</small></b> in addition to these inherited
+handlers. Commands run as a result of command substitution
+ignore the keyboard-generated job control signals
+<b><small>SIGTTIN</small></b><small>,
+<b>SIGTTOU</b>,</small> and
+<b><small>SIGTSTP</small></b><small>.</small></p>
+
+<p style="margin-left:9%; margin-top: 1em">The shell exits
+by default upon receipt of a
+<b><small>SIGHUP</small></b><small>.</small> Before exiting,
+an interactive shell resends the
+<b><small>SIGHUP</small></b> to all jobs, running or
+stopped. The shell sends <b><small>SIGCONT</small></b> to
+stopped jobs to ensure that they receive the
+<b><small>SIGHUP</small></b> (see <b><small>JOB
+CONTROL</small></b> below for more information about running
+and stopped jobs). To prevent the shell from sending the
+signal to a particular job, remove it from the jobs table
+with the <b>disown</b> builtin (see <b><small>SHELL BUILTIN
+COMMANDS</small></b> below) or mark it not to receive
+<b><small>SIGHUP</small></b> using <b>disown
+−h</b>.</p>
+
+<p style="margin-left:9%; margin-top: 1em">If the
+<b>huponexit</b> shell option has been set using
+<b>shopt</b>, <b>bash</b> sends a
+<b><small>SIGHUP</small></b> to all jobs when an interactive
+login shell exits.</p>
+
+<p style="margin-left:9%; margin-top: 1em">If <b>bash</b>
+is waiting for a command to complete and receives a signal
+for which a trap has been set, it will not execute the trap
+until the command completes. If <b>bash</b> is waiting for
+an asynchronous command via the <b>wait</b> builtin, and it
+receives a signal for which a trap has been set, the
+<b>wait</b> builtin will return immediately with an exit
+status greater than 128, immediately after which the shell
+executes the trap.</p>
+
+<p style="margin-left:9%; margin-top: 1em">When job control
+is not enabled, and <b>bash</b> is waiting for a foreground
+command to complete, the shell receives keyboard-generated
+signals such as <b><small>SIGINT</small></b> (usually
+generated by <b>^C</b>) 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
+<b>^C</b> sends <b><small>SIGINT</small></b> to all
+processes in that process group. Since <b>bash</b> does not
+enable job control by default when the shell is not
+interactive, this scenario is most common in non-interactive
+shells.</p>
+
+<p style="margin-left:9%; margin-top: 1em">When job control
+is enabled, and <b>bash</b> is waiting for a foreground
+command to complete, the shell does not receive
+keyboard-generated signals, because it is not in the same
+process group as the terminal. This scenario is most common
+in interactive shells, where <b>bash</b> attempts to enable
+job control by default. See <b><small>JOB
+CONTROL</small></b> below for more information about process
+groups.</p>
+
+<p style="margin-left:9%; margin-top: 1em">When job control
+is not enabled, and <b>bash</b> receives
+<b><small>SIGINT</small></b> while waiting for a foreground
+command, it waits until that foreground command terminates
+and then decides what to do about the
+<b><small>SIGINT</small></b><small>:</small></p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="3%">
+
+
+<p style="margin-top: 1em">1.</p></td>
+<td width="6%"></td>
+<td width="82%">
+
+
+<p style="margin-top: 1em">If the command terminates due to
+the <b><small>SIGINT</small></b><small>,</small> <b>bash</b>
+concludes that the user meant to send the
+<b><small>SIGINT</small></b> to the shell as well, and acts
+on the <b><small>SIGINT</small></b> (e.g., by running a
+<b><small>SIGINT</small></b> trap, exiting a non-interactive
+shell, or returning to the top level to read a new
+command).</p> </td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="3%">
+
+
+<p>2.</p></td>
+<td width="6%"></td>
+<td width="82%">
+
+
+<p>If the command does not terminate due to
+<b><small>SIGINT</small></b><small>,</small> the program
+handled the <b><small>SIGINT</small></b> itself and did not
+treat it as a fatal signal. In that case, <b>bash</b> does
+not treat <b><small>SIGINT</small></b> as a fatal signal,
+either, instead assuming that the
+<b><small>SIGINT</small></b> was used as part of the
+program’s normal operation (e.g., emacs uses it to
+abort editing commands) or deliberately discarded. However,
+<b>bash</b> will run any trap set on
+<b><small>SIGINT</small></b><small>,</small> as it does with
+any other trapped signal it receives while it is waiting for
+the foreground command to complete, for compatibility.</p></td></tr>
+</table>
+
+<p style="margin-left:9%; margin-top: 1em">When job control
+is enabled, <b>bash</b> does not receive keyboard-generated
+signals such as <b><small>SIGINT</small></b> while it is
+waiting for a foreground command. An interactive shell does
+not pay attention to the
+<b><small>SIGINT</small></b><small>,</small> even if the
+foreground command terminates as a result, other than noting
+its exit status. If the shell is not interactive, and the
+foreground command terminates due to the
+<b><small>SIGINT</small></b><small>,</small> <b>bash</b>
+pretends it received the <b><small>SIGINT</small></b> itself
+(scenario 1 above), for compatibility.</p>
+
+<h2>JOB CONTROL
+<a name="JOB CONTROL"></a>
+</h2>
+
+
+<p style="margin-left:9%; margin-top: 1em"><i>Job
+control</i> refers to the ability to selectively stop
+(<i>suspend</i>) the execution of processes and continue
+(<i>resume</i>) their execution at a later point. A user
+typically employs this facility via an interactive interface
+supplied jointly by the operating system kernel’s
+terminal driver and <b>bash</b>.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The shell
+associates a <i>job</i> with each pipeline. It keeps a table
+of currently executing jobs, which the <b>jobs</b> command
+will display. Each job has a <i>job number</i>, which
+<b>jobs</b> displays between brackets. Job numbers start at
+1. When <b>bash</b> starts a job asynchronously (in the
+<i>background</i>), it prints a line that looks like:</p>
+
+<p style="margin-left:18%; margin-top: 1em">[1] 25647</p>
+
+<p style="margin-left:9%; margin-top: 1em">indicating that
+this job is job number 1 and that the process ID of the last
+process in the pipeline associated with this job is 25647.
+All of the processes in a single pipeline are members of the
+same job. <b>Bash</b> uses the <i>job</i> abstraction as the
+basis for job control.</p>
+
+<p style="margin-left:9%; margin-top: 1em">To facilitate
+the implementation of the user interface to job control,
+each process has a <i>process group ID</i>, and the
+operating system maintains the notion of a <i>current
+terminal process group ID</i>. This terminal process group
+ID is associated with the <i>controlling terminal</i>.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Processes that
+have the same process group ID are said to be part of the
+same <i>process group</i>. Members of the <i>foreground</i>
+process group (processes whose process group ID is equal to
+the current terminal process group ID) receive
+keyboard-generated signals such as
+<b><small>SIGINT</small></b><small>.</small> Processes in
+the foreground process group are said to be
+<i>foreground</i> processes. <i>Background</i> processes are
+those whose process group ID differs from the controlling
+terminal’s; such processes are immune to
+keyboard-generated signals. Only foreground processes are
+allowed to read from or, if the user so specifies with
+“stty tostop”, write to the controlling
+terminal. The system sends a <b><small>SIGTTIN
+(SIGTTOU)</small></b> signal to background processes which
+attempt to read from (write to when “tostop” is
+in effect) the terminal, which, unless caught, suspends the
+process.</p>
+
+<p style="margin-left:9%; margin-top: 1em">If the operating
+system on which <b>bash</b> is running supports job control,
+<b>bash</b> contains facilities to use it. Typing the
+<i>suspend</i> character (typically <b>^Z</b>, Control-Z)
+while a process is running stops that process and returns
+control to <b>bash</b>. Typing the <i>delayed suspend</i>
+character (typically <b>^Y</b>, Control-Y) causes the
+process stop when it attempts to read input from the
+terminal, and returns control to <b>bash</b>. The user then
+manipulates the state of this job, using the <b>bg</b>
+command to continue it in the background, the <b>fg</b>
+command to continue it in the foreground, or the <b>kill</b>
+command to kill it. The suspend character takes effect
+immediately, and has the additional side effect of
+discarding any pending output and typeahead. To force a
+background process to stop, or stop a process that’s
+not associated with the current terminal session, send it
+the <b><small>SIGSTOP</small></b> signal using
+<b>kill</b>.</p>
+
+<p style="margin-left:9%; margin-top: 1em">There are a
+number of ways to refer to a job in the shell. The <b>%</b>
+character introduces a job specification (jobspec).</p>
+
+<p style="margin-left:9%; margin-top: 1em">Job number
+<i>n</i> may be referred to as <b>%n</b>. A job may also be
+referred to using a prefix of the name used to start it, or
+using a substring that appears in its command line. For
+example, <b>%ce</b> refers to a job whose command name
+begins with <b>ce</b>. Using <b>%?ce</b>, on the other hand,
+refers to any job containing the string <b>ce</b> in its
+command line. If the prefix or substring matches more than
+one job, <b>bash</b> reports an error.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The symbols
+<b>%%</b> and <b>%+</b> refer to the shell’s notion of
+the <i>current job</i>. A single % (with no accompanying job
+specification) also refers to the current job.
+<b>%−</b> refers to the <i>previous job</i>. When a
+job starts in the background, a job stops while in the
+foreground, or a job is resumed in the background, it
+becomes the current job. The job that was the current job
+becomes the previous job. When the current job terminates,
+the previous job becomes the current job. If there is only a
+single job, <b>%+</b> and <b>%−</b> can both be used
+to refer to that job. In output pertaining to jobs (e.g.,
+the output of the <b>jobs</b> command), the current job is
+always marked with a <b>+</b>, and the previous job with a
+<b>−</b>.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Simply naming a
+job can be used to bring it into the foreground: <b>%1</b>
+is a synonym for “fg %1”, bringing job 1 from
+the background into the foreground. Similarly, “%1
+&” resumes job 1 in the background, equivalent to
+“bg %1”.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The shell learns
+immediately whenever a job changes state. Normally,
+<b>bash</b> waits until it is about to print a prompt before
+notifying the user about changes in a job’s status so
+as to not interrupt any other output, though it will notify
+of changes in a job’s status after a foreground
+command in a list completes, before executing the next
+command in the list. If the <b>−b</b> option to the
+<b>set</b> builtin command is enabled, <b>bash</b> reports
+status changes immediately. <b>Bash</b> executes any trap on
+<b><small>SIGCHLD</small></b> for each child that
+terminates.</p>
+
+<p style="margin-left:9%; margin-top: 1em">When a job
+terminates and <b>bash</b> notifies the user about it,
+<b>bash</b> removes the job from the table. It will not
+appear in <b>jobs</b> output, but <b>wait</b> will report
+its exit status, as long as it’s supplied the process
+ID associated with the job as an argument. When the table is
+empty, job numbers start over at 1.</p>
+
+<p style="margin-left:9%; margin-top: 1em">If a user
+attempts to exit <b>bash</b> while jobs are stopped (or, if
+the <b>checkjobs</b> shell option has been enabled using the
+<b>shopt</b> builtin, running), the shell prints a warning
+message, and, if the <b>checkjobs</b> option is enabled,
+lists the jobs and their statuses. The <b>jobs</b> command
+may then be used to inspect their status. If the user
+immediately attempts to exit again, without an intervening
+command, <b>bash</b> does not print another warning, and
+terminates any stopped jobs.</p>
+
+<p style="margin-left:9%; margin-top: 1em">When the shell
+is waiting for a job or process using the <b>wait</b>
+builtin, and job control is enabled, <b>wait</b> will return
+when the job changes state. The <b>−f</b> option
+causes <b>wait</b> to wait until the job or process
+terminates before returning.</p>
+
+<h2>PROMPTING
+<a name="PROMPTING"></a>
+</h2>
+
+
+<p style="margin-left:9%; margin-top: 1em">When executing
+interactively, <b>bash</b> displays the primary prompt
+<b><small>PS1</small></b> when it is ready to read a
+command, and the secondary prompt <b><small>PS2</small></b>
+when it needs more input to complete a command.</p>
+
+<p style="margin-left:9%; margin-top: 1em"><b>Bash</b>
+examines the value of the array variable
+<b>PROMPT_COMMAND</b> just before printing each primary
+prompt. If any elements in <b>PROMPT_COMMAND</b> are set and
+non-null, Bash executes each value, in numeric order, just
+as if it had been typed on the command line. <b>Bash</b>
+displays <b><small>PS0</small></b> after it reads a command
+but before executing it.</p>
+
+<p style="margin-left:9%; margin-top: 1em"><b>Bash</b>
+displays <b><small>PS4</small></b> as described above before
+tracing each command when the <b>−x</b> option is
+enabled.</p>
+
+<p style="margin-left:9%; margin-top: 1em"><b>Bash</b>
+allows the prompt strings <b>PS0</b>, <b>PS1</b>,
+<b>PS2</b>, and <b>PS4</b>, to be customized by inserting a
+number of backslash-escaped special characters that are
+decoded as follows:</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p style="margin-top: 1em"><b>\a</b></p></td>
+<td width="6%"></td>
+<td width="73%">
-<DD>
-An ASCII escape character (033).
-<DT><B>\h</B>
-<DD>
-The hostname up to the first
+<p style="margin-top: 1em">An ASCII bell character
+(07).</p> </td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
-<DT><B>\H</B>
-<DD>
-The hostname.
-<DT><B>\j</B>
+<p><b>\d</b></p></td>
+<td width="6%"></td>
+<td width="73%">
-<DD>
-The number of jobs currently managed by the shell.
-<DT><B>\l</B>
-<DD>
-The basename of the shell's terminal device name (e.g.,
+<p>The date in “Weekday Month Date” format
+(e.g., “Tue May 26”).</p></td></tr>
+</table>
-<DT><B>\n</B>
-<DD>
-A newline.
-<DT><B>\r</B>
+<p style="margin-left:18%;"><b>\D{</b><i>format</i><b>}</b></p>
-<DD>
-A carriage return.
-<DT><B>\s</B>
+<p style="margin-left:27%;">The <i>format</i> is passed to
+<i>strftime</i>(3) and the result is inserted into the
+prompt string; an empty <i>format</i> results in a
+locale-specific time representation. The braces are
+required.</p>
-<DD>
-The name of the shell: the basename of
-<B>$0</B>
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="5%">
-(the portion following the final slash).
-<DT><B>\t</B>
-<DD>
-The current time in 24-hour HH:MM:SS format.
-<DT><B>\T</B>
+<p><b>\e</b></p></td>
+<td width="4%"></td>
+<td width="73%">
-<DD>
-The current time in 12-hour HH:MM:SS format.
-<DT><B>\@</B>
-<DD>
-The current time in 12-hour am/pm format.
-<DT><B>\A</B>
+<p>An ASCII escape character (033).</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="5%">
-<DD>
-The current time in 24-hour HH:MM format.
-<DT><B>\u</B>
-<DD>
-The username of the current user.
-<DT><B>\v</B>
+<p><b>\h</b></p></td>
+<td width="4%"></td>
+<td width="73%">
-<DD>
-The <B>bash</B> version (e.g., 2.00).
-<DT><B>\V</B>
-<DD>
-The <B>bash</B> release, version + patch level (e.g., 2.00.0)
-<DT><B>\w</B>
+<p>The hostname up to the first “.”.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="5%">
-<DD>
-The value of the <B>PWD</B> shell variable (<B>$PWD</B>),
-with
-<FONT SIZE=-1><B>$HOME</B>
-</FONT>
-abbreviated with a tilde
-(uses the value of the
-<FONT SIZE=-1><B>PROMPT_DIRTRIM</B>
+<p><b>\H</b></p></td>
+<td width="4%"></td>
+<td width="73%">
-</FONT>
-variable).
-<DT><B>\W</B>
-<DD>
-The basename of <B>$PWD</B>,
-with
-<FONT SIZE=-1><B>$HOME</B>
+<p>The hostname.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="5%">
-</FONT>
-abbreviated with a tilde.
-<DT><B>\!</B>
-<DD>
-The history number of this command.
-<DT><B>\#</B>
+<p><b>\j</b></p></td>
+<td width="4%"></td>
+<td width="73%">
-<DD>
-The command number of this command.
-<DT><B>\$</B>
-<DD>
-If the effective UID is 0, a
-<B>#</B>,
+<p>The number of jobs currently managed by the shell.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="5%">
-otherwise a
-<B>$</B>.
-<DT><B>\</B><I>nnn</I>
+<p><b>\l</b></p></td>
+<td width="4%"></td>
+<td width="73%">
-<DD>
-The character corresponding to the octal number <I>nnn</I>.
-<DT><B>\\</B>
-<DD>
-A backslash.
-<DT><B>\[</B>
+<p>The basename of the shell’s terminal device name
+(e.g., “ttys0”).</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="5%">
-<DD>
-Begin a sequence of non-printing characters, which could be used to
-embed a terminal control sequence into the prompt.
-<DT><B>\]</B>
-<DD>
-End a sequence of non-printing characters.
+<p><b>\n</b></p></td>
+<td width="4%"></td>
+<td width="73%">
-</DL></DL>
-<P>
+<p>A newline.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="5%">
-The command number and the history number are usually different:
-the history number of a command is its position in the history
-list, which may include commands restored from the history file
-(see
-<FONT SIZE=-1><B>HISTORY</B>
-</FONT>
-below), while the command number is the position in the sequence
-of commands executed during the current shell session.
-After the string is decoded, it is expanded via
-parameter expansion, command substitution, arithmetic
-expansion, and quote removal, subject to the value of the
-<B>promptvars</B>
+<p><b>\r</b></p></td>
+<td width="4%"></td>
+<td width="73%">
-shell option (see the description of the
-<B>shopt</B>
-command under
-<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
-
-</FONT>
-below).
-This can have unwanted side effects if escaped portions of the string
-appear within command substitution or contain characters special to
-word expansion.
-<A NAME="lbCG"> </A>
-<H3>READLINE</H3>
-
-This is the library that handles reading input when using an interactive
-shell, unless the
-<B>--noediting</B>
-
-option is supplied at shell invocation.
-Line editing is also used when using the <B>-e</B> option to the
-<B>read</B> builtin.
-By default, the line editing commands are similar to those of emacs;
-a vi-style line editing interface is also available.
-Line editing can be enabled at any time using the
-<B>-o emacs</B>
-
-or
-<B>-o vi</B>
-
-options to the
-<B>set</B>
-
-builtin (see
-<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
-
-</FONT>
-below).
-To turn off line editing after the shell is running, use the
-<B>+o emacs</B>
-
-or
-<B>+o vi</B>
-
-options to the
-<B>set</B>
-
-builtin.
-<A NAME="lbCH"> </A>
-<H4>Readline Notation</H4>
-
-This section uses Emacs-style editing concepts and uses its
-notation for keystrokes.
-Control keys are denoted by C-<I>key</I>, e.g., C-n means Control-N.
-Similarly,
-<I>meta</I>
-
-keys are denoted by M-<I>key</I>, so M-x means Meta-X.
-The Meta key is often labeled
-
-or
-
-<P>
-
-On keyboards without a
-<I>Meta</I>
-
-key, M-<I>x</I> means ESC <I>x</I>,
-i.e., press and release the Escape key,
-then press and release the
-<I>x</I>
-
-key, in sequence.
-This makes ESC the <I>meta prefix</I>.
-The combination M-C-<I>x</I> means ESC Control-<I>x</I>:
-press and release the Escape key,
-then press and hold the Control key while pressing the
-<I>x</I>
-
-key, then release both.
-<P>
-
-On some keyboards, the Meta key modifier produces characters with
-the eighth bit (0200) set.
-You can use the <B>enable-meta-key</B> variable
-to control whether or not it does this, if the keyboard allows it.
-On many others, the terminal or terminal emulator converts the metafied
-key to a key sequence beginning with ESC as described in the
-preceding paragraph.
-<P>
-
-If your <I>Meta</I> key produces a key sequence with the ESC meta prefix,
-you can make M-<I>key</I> key bindings you specify (see
-<B>Readline Key Bindings</B>
-
-below) do the same thing by setting the <B>force-meta-prefix</B> variable.
-<P>
-
-<B>Readline</B>
-
-commands may be given numeric
-<I>arguments</I>,
-
-which normally act as a repeat count.
-Sometimes, however, it is the sign of the argument that is significant.
-Passing a negative argument
-to a command that acts in the forward direction (e.g., <B>kill-line</B>)
-makes that command act in a backward direction.
-Commands whose behavior with arguments deviates from this are noted
-below.
-<P>
+<p>A carriage return.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="5%">
-The <I>point</I> is the current cursor position, and <I>mark</I> refers
-to a saved cursor position.
-The text between the point and mark is referred to as the <I>region</I>.
-<B>Readline</B> has the concept of an <I>active region</I>:
-when the region is active, <B>readline</B> redisplay
-highlights the region using the
-value of the <B>active-region-start-color</B> variable.
-The <B>enable-active-region</B> variable turns this on and off.
-Several commands set the region to active; those are noted below.
-<P>
-When a command is described as <I>killing</I> text, the text
-deleted is saved for possible future retrieval
-(<I>yanking</I>).
-The killed text is saved in a <I>kill ring</I>.
-Consecutive kills accumulate the deleted text
-into one unit, which can be yanked all at once.
-Commands which do not kill text separate the chunks of text
-on the kill ring.
-<A NAME="lbCI"> </A>
-<H4>Readline Initialization</H4>
+<p><b>\s</b></p></td>
+<td width="4%"></td>
+<td width="73%">
-<B>Readline</B>
-is customized by putting commands in an initialization
-file (the <I>inputrc</I> file).
-The name of this file is taken from the value of the
-<FONT SIZE=-1><B>INPUTRC</B>
+<p>The name of the shell: the basename of <b>$0</b> (the
+portion following the final slash).</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="5%">
-</FONT>
-shell variable.
-If that variable is unset, the default is
-<A HREF="file:~/.inputrc"><I>~/.inputrc</I></A>.
+<p><b>\t</b></p></td>
+<td width="4%"></td>
+<td width="73%">
-If that file does not exist or cannot be read, <B>readline</B> looks for
-<A HREF="file:/etc/inputrc"><I>/etc/inputrc</I></A>.
+<p>The current time in 24-hour HH:MM:SS format.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="5%">
-When a program that uses the <B>readline</B> library starts up,
-<B>readline</B> reads the initialization file
-and sets the key bindings and variables found there,
-before reading any user input.
-<P>
-There are only a few basic constructs allowed in the inputrc file.
-Blank lines are ignored.
-Lines beginning with a <B>#</B> are comments.
-Lines beginning with a <B>$</B> indicate conditional constructs.
-Other lines denote key bindings and variable settings.
-<P>
+<p><b>\T</b></p></td>
+<td width="4%"></td>
+<td width="73%">
-The default key-bindings in this section
-may be changed using key binding commands in the
-<I>inputrc</I>
-file.
-Programs that use the <B>readline</B> library, including <B>bash</B>,
-may add their own commands and bindings.
-<P>
+<p>The current time in 12-hour HH:MM:SS format.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="5%">
-For example, placing
-<DL COMPACT><DT><DD>
-<P>
-M-Control-u: universal-argument
-</DL>
+<p><b>\@</b></p></td>
+<td width="4%"></td>
+<td width="73%">
-or
-<DL COMPACT><DT><DD>
-C-Meta-u: universal-argument
-</DL>
-<P>
+<p>The current time in 12-hour am/pm format.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="5%">
-into the
-<I>inputrc</I>
-would make M-C-u execute the <B>readline</B> command
-<I>universal-argument</I>.
+<p><b>\A</b></p></td>
+<td width="4%"></td>
+<td width="73%">
-<P>
-Key bindings may contain the following symbolic character names:
-<I>DEL</I>,
+<p>The current time in 24-hour HH:MM format.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="5%">
-<I>ESC</I>,
-<I>ESCAPE</I>,
+<p><b>\u</b></p></td>
+<td width="4%"></td>
+<td width="73%">
-<I>LFD</I>,
-<I>NEWLINE</I>,
+<p>The username of the current user.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="5%">
-<I>RET</I>,
-<I>RETURN</I>,
+<p><b>\v</b></p></td>
+<td width="4%"></td>
+<td width="73%">
-<I>RUBOUT</I>
-(a destructive backspace),
-<I>SPACE</I>,
+<p>The <b>bash</b> version (e.g., 2.00).</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="5%">
-<I>SPC</I>,
-and
-<I>TAB</I>.
+<p><b>\V</b></p></td>
+<td width="4%"></td>
+<td width="73%">
-<P>
-In addition to command names, <B>readline</B> allows keys to be bound
-to a string that is inserted when the key is pressed (a <I>macro</I>).
-The difference between a macro and a command is that a macro is
-enclosed in single or double quotes.
-<A NAME="lbCJ"> </A>
-<H4>Readline Key Bindings</H4>
+<p>The <b>bash</b> release, version + patch level (e.g.,
+2.00.0)</p> </td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="5%">
-The syntax for controlling key bindings in the
-<I>inputrc</I>
-file is simple.
-All that is required is the name of the command or the text of a macro
-and a key sequence to which it should be bound.
-The key sequence may be specified in one of two ways:
-as a symbolic key name,
-possibly with <I>Meta-</I> or <I>Control-</I> prefixes,
-or as a key sequence composed of one or more characters
-enclosed in double quotes.
-The key sequence and name are separated by a colon.
-There can be no whitespace between the name and the colon.
-<P>
+<p><b>\w</b></p></td>
+<td width="4%"></td>
+<td width="73%">
-When using the form <B>keyname</B>:<I>function-name</I> or <I>macro</I>,
-<I>keyname</I>
-is the name of a key spelled out in English. For example:
-<P>
+<p>The value of the <b>PWD</b> shell variable
+(<b>$PWD</b>), with <b><small>$HOME</small></b> abbreviated
+with a tilde (uses the value of the
+<b><small>PROMPT_DIRTRIM</small></b> variable).</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="5%">
-<DL COMPACT><DT><DD>
-<PRE>
-Control-u: universal-argument
-Meta-Rubout: backward-kill-word
-Control-o: "
-> output"
+<p><b>\W</b></p></td>
+<td width="4%"></td>
+<td width="73%">
-</PRE>
+<p>The basename of <b>$PWD</b>, with
+<b><small>$HOME</small></b> abbreviated with a tilde.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="5%">
-</DL>
-<P>
+<p><b>\!</b></p></td>
+<td width="4%"></td>
+<td width="73%">
-In the above example,
-<I>C-u</I>
-is bound to the function
-<B>universal-argument</B>,
+<p>The history number of this command.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="5%">
-<I>M-DEL</I>
-is bound to the function
-<B>backward-kill-word</B>,
+<p><b>\#</b></p></td>
+<td width="4%"></td>
+<td width="73%">
-and
-<I>C-o</I>
-is bound to run the macro
-expressed on the right hand side (that is, to insert the text
+<p>The command number of this command.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="5%">
-into the line).
-<P>
-In the second form,
-<B>"
-keyseq"
-</B>:<I>function-name</I> or <I>macro</I>,
-<B>keyseq</B>
+<p><b>\$</b></p></td>
+<td width="4%"></td>
+<td width="73%">
-differs from
-<B>keyname</B>
-above in that strings denoting
-an entire key sequence may be specified by placing the sequence
-within double quotes.
-Some GNU Emacs style key escapes can be
-used, as in the following example, but none of
-the symbolic character names are recognized.
-<P>
+<p>If the effective UID is 0, a <b>#</b>, otherwise a
+<b>$</b>.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="5%">
-<DL COMPACT><DT><DD>
-<PRE>
-"
-\C-u"
-: universal-argument
-"
-\C-x\C-r"
-: re-read-init-file
-"
-\e[11~"
-: "
-Function Key 1"
+<p><b>\</b><i>nnn</i></p></td>
+<td width="4%"></td>
+<td width="73%">
-</PRE>
+<p>The character corresponding to the octal number
+<i>nnn</i>.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="5%">
-</DL>
-<P>
+<p><b>\\</b></p></td>
+<td width="4%"></td>
+<td width="73%">
-In this example,
-<I>C-u</I>
-is again bound to the function
-<B>universal-argument</B>.
+<p>A backslash.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="5%">
-<I>C-x C-r</I>
+<p><b>\[</b></p></td>
+<td width="4%"></td>
+<td width="73%">
+
+
+<p>Begin a sequence of non-printing characters, which could
+be used to embed a terminal control sequence into the
+prompt.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="5%">
+
+
+<p><b>\]</b></p></td>
+<td width="4%"></td>
+<td width="73%">
+
+
+<p>End a sequence of non-printing characters.</p></td></tr>
+</table>
+
+<p style="margin-left:9%; margin-top: 1em">The command
+number and the history number are usually different: the
+history number of a command is its position in the history
+list, which may include commands restored from the history
+file (see <b><small>HISTORY</small></b> below), while the
+command number is the position in the sequence of commands
+executed during the current shell session. After the string
+is decoded, it is expanded via parameter expansion, command
+substitution, arithmetic expansion, and quote removal,
+subject to the value of the <b>promptvars</b> shell option
+(see the description of the <b>shopt</b> command under
+<b><small>SHELL BUILTIN COMMANDS</small></b> below). This
+can have unwanted side effects if escaped portions of the
+string appear within command substitution or contain
+characters special to word expansion.</p>
+
+<h2>READLINE
+<a name="READLINE"></a>
+</h2>
+
+
+<p style="margin-left:9%; margin-top: 1em">This is the
+library that handles reading input when using an interactive
+shell, unless the <b>−−noediting</b> option is
+supplied at shell invocation. Line editing is also used when
+using the <b>−e</b> option to the <b>read</b> builtin.
+By default, the line editing commands are similar to those
+of emacs; a vi-style line editing interface is also
+available. Line editing can be enabled at any time using the
+<b>−o emacs</b> or <b>−o vi</b> options to the
+<b>set</b> builtin (see <b><small>SHELL BUILTIN
+COMMANDS</small></b> below). To turn off line editing after
+the shell is running, use the <b>+o emacs</b> or <b>+o
+vi</b> options to the <b>set</b> builtin.</p>
+
+<h3>Readline Notation
+<a name="Readline Notation"></a>
+</h3>
+
+
+<p style="margin-left:9%; margin-top: 1em">This section
+uses Emacs-style editing concepts and uses its notation for
+keystrokes. Control keys are denoted by C−<i>key</i>,
+e.g., C−n means Control−N. Similarly,
+<i>meta</i> keys are denoted by M−<i>key</i>, so
+M−x means Meta−X. The Meta key is often labeled
+“Alt” or “Option”.</p>
+
+<p style="margin-left:9%; margin-top: 1em">On keyboards
+without a <i>Meta</i> key, M−<i>x</i> means ESC
+<i>x</i>, i.e., press and release the Escape key, then press
+and release the <i>x</i> key, in sequence. This makes ESC
+the <i>meta prefix</i>. The combination
+M−C−<i>x</i> means ESC Control−<i>x</i>:
+press and release the Escape key, then press and hold the
+Control key while pressing the <i>x</i> key, then release
+both.</p>
+
+<p style="margin-left:9%; margin-top: 1em">On some
+keyboards, the Meta key modifier produces characters with
+the eighth bit (0200) set. You can use the
+<b>enable−meta−key</b> variable to control
+whether or not it does this, if the keyboard allows it. On
+many others, the terminal or terminal emulator converts the
+metafied key to a key sequence beginning with ESC as
+described in the preceding paragraph.</p>
+
+<p style="margin-left:9%; margin-top: 1em">If your
+<i>Meta</i> key produces a key sequence with the ESC meta
+prefix, you can make M-<i>key</i> key bindings you specify
+(see <b>Readline Key Bindings</b> below) do the same thing
+by setting the <b>force−meta−prefix</b>
+variable.</p>
+
+<p style="margin-left:9%; margin-top: 1em"><b>Readline</b>
+commands may be given numeric <i>arguments</i>, which
+normally act as a repeat count. Sometimes, however, it is
+the sign of the argument that is significant. Passing a
+negative argument to a command that acts in the forward
+direction (e.g., <b>kill−line</b>) makes that command
+act in a backward direction. Commands whose behavior with
+arguments deviates from this are noted below.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The <i>point</i>
+is the current cursor position, and <i>mark</i> refers to a
+saved cursor position. The text between the point and mark
+is referred to as the <i>region</i>. <b>Readline</b> has the
+concept of an <i>active region</i>: when the region is
+active, <b>readline</b> redisplay highlights the region
+using the value of the <b>active-region-start-color</b>
+variable. The <b>enable−active−region</b>
+variable turns this on and off. Several commands set the
+region to active; those are noted below.</p>
+
+<p style="margin-left:9%; margin-top: 1em">When a command
+is described as <i>killing</i> text, the text deleted is
+saved for possible future retrieval (<i>yanking</i>). The
+killed text is saved in a <i>kill ring</i>. Consecutive
+kills accumulate the deleted text into one unit, which can
+be yanked all at once. Commands which do not kill text
+separate the chunks of text on the kill ring.</p>
+
+<h3>Readline Initialization
+<a name="Readline Initialization"></a>
+</h3>
+
+
+<p style="margin-left:9%; margin-top: 1em"><b>Readline</b>
+is customized by putting commands in an initialization file
+(the <i>inputrc</i> file). The name of this file is taken
+from the value of the <b><small>INPUTRC</small></b> shell
+variable. If that variable is unset, the default is
+<A HREF="file:~/.inputrc"><i>~/.inputrc</i></A>. If that file does not exist or cannot be
+read, <b>readline</b> looks for <A HREF="file:/etc/inputrc"><i>/etc/inputrc</i></A>. When a
+program that uses the <b>readline</b> library starts up,
+<b>readline</b> reads the initialization file and sets the
+key bindings and variables found there, before reading any
+user input.</p>
+
+<p style="margin-left:9%; margin-top: 1em">There are only a
+few basic constructs allowed in the inputrc file. Blank
+lines are ignored. Lines beginning with a <b>#</b> are
+comments. Lines beginning with a <b>$</b> indicate
+conditional constructs. Other lines denote key bindings and
+variable settings.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The default
+key-bindings in this section may be changed using key
+binding commands in the <i>inputrc</i> file. Programs that
+use the <b>readline</b> library, including <b>bash</b>, may
+add their own commands and bindings.</p>
+
+<p style="margin-left:9%; margin-top: 1em">For example,
+placing</p>
+
+
+<p style="margin-left:18%; margin-top: 1em">M−Control−u:
+universal−argument</p>
+
+<p style="margin-left:9%;">or</p>
+
+<p style="margin-left:18%;">C−Meta−u:
+universal−argument</p>
+
+<p style="margin-left:9%; margin-top: 1em">into the
+<i>inputrc</i> would make M−C−u execute the
+<b>readline</b> command <i>universal−argument</i>.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Key bindings may
+contain the following symbolic character names: <i>DEL</i>,
+<i>ESC</i>, <i>ESCAPE</i>, <i>LFD</i>, <i>NEWLINE</i>,
+<i>RET</i>, <i>RETURN</i>, <i>RUBOUT</i> (a destructive
+backspace), <i>SPACE</i>, <i>SPC</i>, and <i>TAB</i>.</p>
+
+<p style="margin-left:9%; margin-top: 1em">In addition to
+command names, <b>readline</b> allows keys to be bound to a
+string that is inserted when the key is pressed (a
+<i>macro</i>). The difference between a macro and a command
+is that a macro is enclosed in single or double quotes.</p>
+
+<h3>Readline Key Bindings
+<a name="Readline Key Bindings"></a>
+</h3>
+
+
+<p style="margin-left:9%; margin-top: 1em">The syntax for
+controlling key bindings in the <i>inputrc</i> file is
+simple. All that is required is the name of the command or
+the text of a macro and a key sequence to which it should be
+bound. The key sequence may be specified in one of two ways:
+as a symbolic key name, possibly with <i>Meta−</i> or
+<i>Control−</i> prefixes, or as a key sequence
+composed of one or more characters enclosed in double
+quotes. The key sequence and name are separated by a colon.
+There can be no whitespace between the name and the
+colon.</p>
+
+<p style="margin-left:9%; margin-top: 1em">When using the
+form <b>keyname</b>:<i>function−name</i> or
+<i>macro</i>, <i>keyname</i> is the name of a key spelled
+out in English. For example:</p>
+
+<p style="margin-left:18%; margin-top: 1em">Control-u:
+universal−argument <br>
+Meta-Rubout: backward−kill−word <br>
+Control-o: "> output"</p>
+
+<p style="margin-left:9%; margin-top: 1em">In the above
+example, <i>C−u</i> is bound to the function
+<b>universal−argument</b>, <i>M−DEL</i> is bound
+to the function <b>backward−kill−word</b>, and
+<i>C−o</i> is bound to run the macro expressed on the
+right hand side (that is, to insert the text “>
+output” into the line).</p>
+
+<p style="margin-left:9%; margin-top: 1em">In the second
+form, <b>"keyseq"</b>:<i>function−name</i>
+or <i>macro</i>, <b>keyseq</b> differs from <b>keyname</b>
+above in that strings denoting an entire key sequence may be
+specified by placing the sequence within double quotes. Some
+GNU Emacs style key escapes can be used, as in the following
+example, but none of the symbolic character names are
+recognized.</p>
+
+
+<p style="margin-left:18%; margin-top: 1em">"\C−u":
+universal−argument <br>
+"\C−x\C−r":
+re−read−init−file <br>
+"\e[11~": "Function Key 1"</p>
+
+<p style="margin-left:9%; margin-top: 1em">In this example,
+<i>C−u</i> is again bound to the function
+<b>universal−argument</b>. <i>C−x C−r</i>
is bound to the function
-<B>re-read-init-file</B>,
+<b>re−read−init−file</b>, and <i>ESC [ 1 1
+~</i> is bound to insert the text “Function Key
+1”.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The full set of
+GNU Emacs style escape sequences available when specifying
+key sequences is</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="4%">
+
+
+<p style="margin-top: 1em"><b>\C−</b></p></td>
+<td width="5%"></td>
+<td width="73%">
+
+
+<p style="margin-top: 1em">A control prefix.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="4%">
+
+
+<p><b>\M−</b></p></td>
+<td width="5%"></td>
+<td width="73%">
+
+
+<p>Adding the meta prefix or converting the following
+character to a meta character, as described below under
+<b>force-meta-prefix</b>.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="4%">
+
+
+<p><b>\e</b></p></td>
+<td width="5%"></td>
+<td width="73%">
+
+
+<p>An escape character.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="4%">
-and
-<I>ESC [ 1 1 ~</I>
-is bound to insert the text
+<p><b>\\</b></p></td>
+<td width="5%"></td>
+<td width="73%">
-<P>
-The full set of GNU Emacs style escape sequences available when specifying
-key sequences is
-<DL COMPACT><DT><DD>
+<p>Backslash.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="4%">
-<DL COMPACT>
-<DT><B>\C-</B>
-<DD>
-A control prefix.
-<DT><B>\M-</B>
+<p><b>\"</b></p></td>
+<td width="5%"></td>
+<td width="73%">
-<DD>
-Adding the meta prefix or converting the following character to a meta
-character, as described below under <B>force-meta-prefix</B>.
-<DT><B>\e</B>
-<DD>
-An escape character.
-<DT><B>\\</B>
+<p>Literal ", a double quote.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="4%">
-<DD>
-Backslash.
-<DT><B>\</B>
-<DD>
-Literal "
-, a double quote.
-<DT><B>\'</B>
+<p><b>\'</b></p></td>
+<td width="5%"></td>
+<td width="73%">
-<DD>
-Literal ', a single quote.
-</DL></DL>
+<p>Literal ', a single quote.</p></td></tr>
+</table>
-<P>
+<p style="margin-left:9%; margin-top: 1em">In addition to
+the GNU Emacs style escape sequences, a second set of
+backslash escapes is available:</p>
-In addition to the GNU Emacs style escape sequences, a second
-set of backslash escapes is available:
-<DL COMPACT><DT><DD>
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="5%">
-<DL COMPACT>
-<DT><B>\a</B>
-<DD>
-alert (bell)
-<DT><B>\b</B>
+<p style="margin-top: 1em"><b>\a</b></p></td>
+<td width="4%"></td>
+<td width="73%">
-<DD>
-backspace
-<DT><B>\d</B>
-<DD>
-delete
-<DT><B>\f</B>
+<p style="margin-top: 1em">alert (bell)</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="5%">
-<DD>
-form feed
-<DT><B>\n</B>
-<DD>
-newline
-<DT><B>\r</B>
+<p><b>\b</b></p></td>
+<td width="4%"></td>
+<td width="73%">
-<DD>
-carriage return
-<DT><B>\t</B>
-<DD>
-horizontal tab
-<DT><B>\v</B>
+<p>backspace</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="5%">
-<DD>
-vertical tab
-<DT><B>\</B><I>nnn</I>
-<DD>
-The eight-bit character whose value is the octal value <I>nnn</I>
-(one to three digits).
-<DT><B>\x</B><I>HH</I>
+<p><b>\d</b></p></td>
+<td width="4%"></td>
+<td width="73%">
-<DD>
-The eight-bit character whose value is the hexadecimal value <I>HH</I>
-(one or two hex digits).
-</DL></DL>
+<p>delete</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="5%">
-<P>
-When entering the text of a macro, single or double quotes must
-be used to indicate a macro definition.
-Unquoted text is assumed to be a function name.
-The backslash escapes described above are expanded
-in the macro body.
-Backslash quotes any other character in the macro text,
-including "
- and '.
-<P>
+<p><b>\f</b></p></td>
+<td width="4%"></td>
+<td width="73%">
-<B>Bash</B>
-will display or modify the current <B>readline</B> key bindings with the
-<B>bind</B>
+<p>form feed</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="5%">
-builtin command.
-The
-<B>-o emacs</B>
-or
-<B>-o vi</B>
+<p><b>\n</b></p></td>
+<td width="4%"></td>
+<td width="73%">
-options to the
-<B>set</B>
-builtin
-(see
-<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
+<p>newline</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="5%">
-</FONT>
-below)
-change the editing mode during interactive use.
-<A NAME="lbCK"> </A>
-<H4>Readline Variables</H4>
-<B>Readline</B> has variables that can be used to further customize its
-behavior.
-A variable may be set in the
-<I>inputrc</I>
+<p><b>\r</b></p></td>
+<td width="4%"></td>
+<td width="73%">
-file with a statement of the form
-<DL COMPACT><DT><DD>
-<P>
-<B>set</B> <I>variable-name</I> <I>value</I>
-</DL>
-
-or using the <B>bind</B> builtin command (see
-<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
-
-</FONT>
-below).
-<P>
-
-Except where noted, <B>readline</B> variables can take the values
-<B>On</B>
-
-or
-<B>Off</B>
-
-(without regard to case).
-Unrecognized variable names are ignored.
-When <B>readline</B> reads a variable value, empty or null values,
-
-(case-insensitive), and
+<p>carriage return</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="5%">
-are equivalent to <B>On</B>.
-All other values are equivalent to
-<B>Off</B>.
-<P>
-The <B>bind -V</B> command lists the current <B>readline</B> variable names
-and values (see
-<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
+<p><b>\t</b></p></td>
+<td width="4%"></td>
+<td width="73%">
-</FONT>
-below).
-<P>
-The variables and their default values are:
-<P>
+<p>horizontal tab</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="5%">
-<DL COMPACT>
-<DT><B>active-region-start-color</B>
+<p><b>\v</b></p></td>
+<td width="4%"></td>
+<td width="73%">
-<DD>
-A string variable that controls the text color and background when displaying
-the text in the active region (see the description of
-<B>enable-active-region</B> 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
-<DT><B>active-region-end-color</B>
-
-<DD>
-A string variable that
-
-the effects of <B>active-region-start-color</B>
-and restores
-
-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
-
-<DT><B>bell-style (audible)</B>
-
-<DD>
-Controls what happens when <B>readline</B> wants to ring the terminal bell.
-If set to <B>none</B>, <B>readline</B> never rings the bell.
-If set to <B>visible</B>, <B>readline</B> uses a visible bell if one is available.
-If set to <B>audible</B>, <B>readline</B> attempts to ring the terminal's bell.
-<DT><B>bind-tty-special-chars (On)</B>
-
-<DD>
-If set to <B>On</B>, <B>readline</B> attempts to bind
-the control characters that are treated specially by the kernel's
-terminal driver to their <B>readline</B> equivalents.
-These override the default <B>readline</B> bindings described here.
-Type
-
-at a <B>bash</B> prompt to see your current terminal settings,
-including the special control characters (usually <B>cchars</B>).
-This binding takes place on each call to <B>readline</B>,
-so changes made by
-
-can take effect.
-<DT><B>blink-matching-paren (Off)</B>
-
-<DD>
-If set to <B>On</B>, <B>readline</B> attempts to briefly move the cursor to an
-opening parenthesis when a closing parenthesis is inserted.
-<DT><B>colored-completion-prefix (Off)</B>
-
-<DD>
-If set to <B>On</B>, when listing completions, <B>readline</B> displays the
-common prefix of the set of possible completions using a different color.
-The color definitions are taken from the value of the <B>LS_COLORS</B>
-environment variable.
-If there is a color definition in <B>$LS_COLORS</B> for the custom suffix
-
-<B>readline</B> uses this color for
-the common prefix instead of its default.
-<DT><B>colored-stats (Off)</B>
-
-<DD>
-If set to <B>On</B>, <B>readline</B> displays possible completions using different
-colors to indicate their file type.
-The color definitions are taken from the value of the <B>LS_COLORS</B>
-environment variable.
-
-
-
-<DT><B>comment-begin (</B>
-
-<DD>
-
-The string that the <B>readline</B>
-<B>insert-comment</B>
-
-command inserts.
-This command is bound to
-<B>M-#</B>
-
-in emacs mode and to
-<B>#</B>
-
-in vi command mode.
-<DT><B>completion-display-width (-1)</B>
-
-<DD>
-The number of screen columns used to display possible matches
-when performing completion.
-The value is ignored if it is less than 0 or greater than the terminal
-screen width.
-A value of 0 causes matches to be displayed one per line.
-The default value is -1.
-<DT><B>completion-ignore-case (Off)</B>
-
-<DD>
-If set to <B>On</B>, <B>readline</B> performs filename matching and completion
-in a case-insensitive fashion.
-<DT><B>completion-map-case (Off)</B>
-
-<DD>
-If set to <B>On</B>, and <B>completion-ignore-case</B> is enabled,
-<B>readline</B>
-
-treats hyphens (<I>-</I>) and underscores (<I>_</I>) as equivalent when
-performing case-insensitive filename matching and completion.
-<DT><B>completion-prefix-display-length (0)</B>
-
-<DD>
-The maximum
-length in characters of the common prefix of a list of possible
-completions that is displayed without modification.
-When set to a value greater than zero, <B>readline</B>
-replaces common prefixes longer than this value
-with an ellipsis when displaying possible completions.
-If a completion begins with a period,
-and <B>eadline</B> is completing filenames,
-it uses three underscores instead of an ellipsis.
-<DT><B>completion-query-items (100)</B>
-
-<DD>
-This determines when the user is queried about viewing
-the number of possible completions
-generated by the <B>possible-completions</B> command.
-It may be set to any integer value greater than or equal to zero.
-If the number of possible completions is greater than
-or equal to the value of this variable,
-<B>readline</B> asks whether or not the user wishes to view them;
-otherwise <B>readline</B> simply lists them on the terminal.
-A zero value means <B>readline</B> should never ask; negative values are
-treated as zero.
-<DT><B>convert-meta (On)</B>
-
-<DD>
-If set to <B>On</B>, <B>readline</B> converts characters it reads
-that have the eighth bit set to an ASCII key sequence by
-clearing the eighth bit and prefixing it with an escape character
-(converting the character to have the meta prefix).
-The default is <I>On</I>, but <B>readline</B> sets it to <I>Off</I>
-if the locale contains
-characters whose encodings may include bytes with the eighth bit set.
-This variable is dependent on the <B>LC_CTYPE</B> locale category, and
-may change if the locale changes.
-This variable also affects key bindings; see the description of
-<B>force-meta-prefix</B> below.
-<DT><B>disable-completion (Off)</B>
-
-<DD>
-If set to <B>On</B>, <B>readline</B> inhibits word completion.
-Completion characters are inserted into the line as if they
-had been mapped to <B>self-insert</B>.
-<DT><B>echo-control-characters (On)</B>
-
-<DD>
-When set to <B>On</B>, on operating systems that indicate they support it,
-<B>readline</B> echoes a character corresponding to a signal generated from the
-keyboard.
-<DT><B>editing-mode (emacs)</B>
-
-<DD>
-Controls whether <B>readline</B> uses a set of key bindings similar
-to <I>Emacs</I> or <I>vi</I>.
-<B>editing-mode</B>
-
-can be set to either
-<B>emacs</B>
-
-or
-<B>vi</B>.
-
-<DT><B>emacs-mode-string (@)</B>
-
-<DD>
-If the <I>show-mode-in-prompt</I> variable is enabled,
-this string is displayed immediately before the last line of the
-primary prompt when emacs editing mode is active.
-The value is expanded like a
-key binding, so the standard set of meta- and control- prefixes and
-backslash escape sequences is available.
-The \1 and \2 escapes begin and end sequences of
-non-printing characters, which can be used to embed a terminal control
-sequence into the mode string.
-<DT><B>enable-active-region (On)</B>
-
-<DD>
-When this variable is set to <I>On</I>, <B>readline</B> allows certain commands
-to designate the region as <I>active</I>.
-When the region is active, <B>readline</B>
-highlights the text in the region using the value of the
-<B>active-region-start-color</B>
-
-variable, 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.
-<DT><B>enable-bracketed-paste (On)</B>
-
-<DD>
-When set to <B>On</B>, <B>readline</B> 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 <I>bracketed-paste mode</I>;
-it prevents <B>readline</B> from executing any editing commands bound to key
-sequences appearing in the pasted text.
-<DT><B>enable-keypad (Off)</B>
-
-<DD>
-When set to <B>On</B>, <B>readline</B> tries to enable the application
-keypad when it is called.
-Some systems need this to enable the arrow keys.
-<DT><B>enable-meta-key (On)</B>
-
-<DD>
-When set to <B>On</B>, <B>readline</B> tries to enable any meta modifier
-key the terminal claims to support.
-On many terminals, the Meta key is used to send eight-bit characters;
-this variable checks for the terminal capability that indicates the
-terminal can enable and disable a mode that sets the eighth bit of a
-character (0200) if the Meta key is held down when the character is
-typed (a meta character).
-<DT><B>expand-tilde (Off)</B>
-
-<DD>
-If set to <B>On</B>, <B>readline</B> performs tilde expansion when it
-attempts word completion.
-<DT><B>force-meta-prefix (Off)</B>
-
-<DD>
-If set to <B>On</B>, <B>readline</B> modifies its behavior when binding key
-sequences containing \M- or Meta-
-(see <B>Key Bindings</B> above) by converting a key sequence of the form
-\M-<I>C</I> or Meta-<I>C</I> to the two-character sequence
-<B>ESC</B> <I>C</I> (adding the meta prefix).
-If
-<B>force-meta-prefix</B>
-
-is set to <B>Off</B> (the default),
-<B>readline</B> uses the value of the
-<B>convert-meta</B>
-
-variable to determine whether to perform this conversion:
-if <B>convert-meta</B> is <B>On</B>,
-<B>readline</B> performs the conversion described above;
-if it is <B>Off</B>, <B>readline</B> converts <I>C</I> to a meta character by
-setting the eighth bit (0200).
-<DT><B>history-preserve-point (Off)</B>
-
-<DD>
-If set to <B>On</B>, the history code attempts to place point at the
-same location on each history line retrieved with <B>previous-history</B>
-or <B>next-history</B>.
-<DT><B>history-size (unset)</B>
-
-<DD>
-Set the maximum number of history entries saved in the history list.
-If set to zero, any existing history entries are deleted and no new entries
-are saved.
-If set to a value less than zero, the number of history entries is not
-limited.
-By default, <B>bash</B> sets the maximum number of history entries to
-the value of the <B>HISTSIZE</B> shell variable.
-Setting <I>history-size</I> to a non-numeric value will set
-the maximum number of history entries to 500.
-<DT><B>horizontal-scroll-mode (Off)</B>
-
-<DD>
-Setting this variable to <B>On</B> makes <B>readline</B> use a single line
-for display, scrolling the input horizontally on a single screen line
-when it becomes longer than the screen width rather than wrapping to
-a new line.
-This setting is automatically enabled for terminals of height 1.
-<DT><B>input-meta (Off)</B>
-
-<DD>
-If set to <B>On</B>, <B>readline</B> enables eight-bit input (that is, it
-does not clear the eighth bit in the characters it reads),
-regardless of what the terminal claims it can support.
-The default is <I>Off</I>, but <B>readline</B> sets it to <I>On</I>
-if the locale contains characters whose encodings may include bytes
-with the eighth bit set.
-This variable is dependent on the <B>LC_CTYPE</B> locale category, and
-its value may change if the locale changes.
-The name <B>meta-flag</B> is a synonym for <B>input-meta</B>.
-<DT><B>isearch-terminators (</B>
-
-<DD>
-
-The string of characters that should terminate an incremental
-search without subsequently executing the character as a command.
-If this variable has not been given a value, the characters
-<I>ESC</I> and <B>C-j</B> terminate an incremental search.
-<DT><B>keymap (emacs)</B>
-
-<DD>
-Set the current <B>readline</B> keymap.
-The set of valid keymap names is
-<I>emacs, emacs-standard, emacs-meta, emacs-ctlx, vi,
-vi-command</I>, and
-<I>vi-insert</I>.
-
-<I>vi</I> is equivalent to <I>vi-command</I>;
-<I>emacs</I> is equivalent to <I>emacs-standard</I>.
-The default value is <I>emacs</I>;
-the value of
-<B>editing-mode</B>
-
-also affects the default keymap.
-<DT><B>keyseq-timeout (500)</B>
-
-<DD>
-Specifies the duration <B>readline</B> will wait for a character when
-reading an ambiguous key sequence
-(one that can form a complete key sequence using the input read so far,
-or can take additional input to complete a longer key sequence).
-If <B>readline</B> does not receive any input within the timeout,
-it uses the shorter but complete key sequence.
-The value is specified in milliseconds, so a value of 1000 means that
-<B>readline</B> will wait one second for additional input.
-If this variable is set to a value less than or equal to zero, or to a
-non-numeric value, <B>readline</B> waits until another key is pressed to
-decide which key sequence to complete.
-<DT><B>mark-directories (On)</B>
-
-<DD>
-If set to <B>On</B>, completed directory names have a slash appended.
-<DT><B>mark-modified-lines (Off)</B>
-
-<DD>
-If set to <B>On</B>, <B>readline</B> displays history lines
-that have been modified
-with a preceding asterisk (<B>*</B>).
-<DT><B>mark-symlinked-directories (Off)</B>
-
-<DD>
-If set to <B>On</B>, completed names which are symbolic links to directories
-have a slash appended, subject to the value of <B>mark-directories</B>.
-<DT><B>match-hidden-files (On)</B>
-
-<DD>
-This variable, when set to <B>On</B>, forces <B>readline</B> to match files whose
-names begin with a
-
-(hidden files) when performing filename completion.
-If set to <B>Off</B>, the user must include the leading
-
-in the filename to be completed.
-<DT><B>menu-complete-display-prefix (Off)</B>
-
-<DD>
-If set to <B>On</B>, menu completion displays the common prefix of the
-list of possible completions (which may be empty) before cycling through
-the list.
-<DT><B>output-meta (Off)</B>
-
-<DD>
-If set to <B>On</B>, <B>readline</B> displays characters with the
-eighth bit set directly rather than as a meta-prefixed escape
-sequence.
-The default is <I>Off</I>, but <B>readline</B> sets it to <I>On</I>
-if the locale contains characters whose encodings may include
-bytes with the eighth bit set.
-This variable is dependent on the <B>LC_CTYPE</B> locale category, and
-its value may change if the locale changes.
-<DT><B>page-completions (On)</B>
-
-<DD>
-If set to <B>On</B>, <B>readline</B> uses an internal pager resembling
-<I>more</I>(1)
-
-to display a screenful of possible completions at a time.
-<DT><B>prefer-visible-bell</B>
-
-<DD>
-See <B>bell-style</B>.
-<DT><B>print-completions-horizontally (Off)</B>
-
-<DD>
-If set to <B>On</B>, <B>readline</B> displays completions with matches
-sorted horizontally in alphabetical order, rather than down the screen.
-<DT><B>revert-all-at-newline (Off)</B>
-
-<DD>
-If set to <B>On</B>, <B>readline</B> will undo all changes to history lines
-before returning when executing <B>accept-line</B>.
-By default,
-history lines may be modified and retain individual undo lists across
-calls to <B>readline</B>.
-<DT><B>search-ignore-case (Off)</B>
-
-<DD>
-If set to <B>On</B>, <B>readline</B> performs incremental and non-incremental
-history list searches in a case-insensitive fashion.
-<DT><B>show-all-if-ambiguous (Off)</B>
-
-<DD>
-This alters the default behavior of the completion functions.
-If set to
-<B>On</B>,
+<p>vertical tab</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="5%">
+
+<p><b>\</b><i>nnn</i></p></td>
+<td width="4%"></td>
+<td width="73%">
+
+
+<p>The eight-bit character whose value is the octal value
+<i>nnn</i> (one to three digits).</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="5%">
+
+
+<p><b>\x</b><i>HH</i></p></td>
+<td width="4%"></td>
+<td width="73%">
+
+
+<p>The eight-bit character whose value is the hexadecimal
+value <i>HH</i> (one or two hex digits).</p></td></tr>
+</table>
+
+<p style="margin-left:9%; margin-top: 1em">When entering
+the text of a macro, single or double quotes must be used to
+indicate a macro definition. Unquoted text is assumed to be
+a function name. The backslash escapes described above are
+expanded in the macro body. Backslash quotes any other
+character in the macro text, including " and '.</p>
+
+<p style="margin-left:9%; margin-top: 1em"><b>Bash</b> will
+display or modify the current <b>readline</b> key bindings
+with the <b>bind</b> builtin command. The <b>−o
+emacs</b> or <b>−o vi</b> options to the <b>set</b>
+builtin (see <b><small>SHELL BUILTIN COMMANDS</small></b>
+below) change the editing mode during interactive use.</p>
+
+<h3>Readline Variables
+<a name="Readline Variables"></a>
+</h3>
+
+
+<p style="margin-left:9%; margin-top: 1em"><b>Readline</b>
+has variables that can be used to further customize its
+behavior. A variable may be set in the <i>inputrc</i> file
+with a statement of the form</p>
+
+<p style="margin-left:18%; margin-top: 1em"><b>set</b>
+<i>variable−name value</i></p>
+
+<p style="margin-left:9%;">or using the <b>bind</b> builtin
+command (see <b><small>SHELL BUILTIN COMMANDS</small></b>
+below).</p>
+
+<p style="margin-left:9%; margin-top: 1em">Except where
+noted, <b>readline</b> variables can take the values
+<b>On</b> or <b>Off</b> (without regard to case).
+Unrecognized variable names are ignored. When
+<b>readline</b> reads a variable value, empty or null
+values, “on” (case-insensitive), and
+“1” are equivalent to <b>On</b>. All other
+values are equivalent to <b>Off</b>.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The <b>bind
+−V</b> command lists the current <b>readline</b>
+variable names and values (see <b><small>SHELL BUILTIN
+COMMANDS</small></b> below).</p>
+
+<p style="margin-left:9%; margin-top: 1em">The variables
+and their default values are: <b><br>
+active−region−start−color</b></p>
+
+<p style="margin-left:18%;">A string variable that controls
+the text color and background when displaying the text in
+the active region (see the description of
+<b>enable−active−region</b> 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”.</p>
+
+
+<p style="margin-left:9%;"><b>active−region−end−color</b></p>
+
+<p style="margin-left:18%;">A string variable that
+“undoes” the effects of
+<b>active−region−start−color</b> 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”.</p>
+
+<p style="margin-left:9%;"><b>bell−style
+(audible)</b></p>
+
+<p style="margin-left:18%;">Controls what happens when
+<b>readline</b> wants to ring the terminal bell. If set to
+<b>none</b>, <b>readline</b> never rings the bell. If set to
+<b>visible</b>, <b>readline</b> uses a visible bell if one
+is available. If set to <b>audible</b>, <b>readline</b>
+attempts to ring the terminal’s bell.</p>
+
+
+<p style="margin-left:9%;"><b>bind−tty−special−chars
+(On)</b></p>
+
+<p style="margin-left:18%;">If set to <b>On</b>,
+<b>readline</b> attempts to bind the control characters that
+are treated specially by the kernel’s terminal driver
+to their <b>readline</b> equivalents. These override the
+default <b>readline</b> bindings described here. Type
+“stty −a” at a <b>bash</b> prompt to see
+your current terminal settings, including the special
+control characters (usually <b>cchars</b>). This binding
+takes place on each call to <b>readline</b>, so changes made
+by “stty” can take effect.</p>
+
+
+<p style="margin-left:9%;"><b>blink−matching−paren
+(Off)</b></p>
+
+<p style="margin-left:18%;">If set to <b>On</b>,
+<b>readline</b> attempts to briefly move the cursor to an
+opening parenthesis when a closing parenthesis is
+inserted.</p>
+
+
+<p style="margin-left:9%;"><b>colored−completion−prefix
+(Off)</b></p>
+
+<p style="margin-left:18%;">If set to <b>On</b>, when
+listing completions, <b>readline</b> displays the common
+prefix of the set of possible completions using a different
+color. The color definitions are taken from the value of the
+<b>LS_COLORS</b> environment variable. If there is a color
+definition in <b>$LS_COLORS</b> for the custom suffix
+“.readline-colored-completion-prefix”,
+<b>readline</b> uses this color for the common prefix
+instead of its default.</p>
+
+<p style="margin-left:9%;"><b>colored−stats
+(Off)</b></p>
+
+<p style="margin-left:18%;">If set to <b>On</b>,
+<b>readline</b> displays possible completions using
+different colors to indicate their file type. The color
+definitions are taken from the value of the <b>LS_COLORS</b>
+environment variable.</p>
+
+
+<p style="margin-left:9%;"><b>comment−begin (</b>“<b>#</b>”<b>)</b></p>
+
+<p style="margin-left:18%;">The string that the <b>readline
+insert−comment</b> command inserts. This command is
+bound to <b>M−#</b> in emacs mode and to <b>#</b> in
+vi command mode.</p>
+
+
+<p style="margin-left:9%;"><b>completion−display−width
+(−1)</b></p>
+
+<p style="margin-left:18%;">The number of screen columns
+used to display possible matches when performing completion.
+The value is ignored if it is less than 0 or greater than
+the terminal screen width. A value of 0 causes matches to be
+displayed one per line. The default value is −1.</p>
+
+
+<p style="margin-left:9%;"><b>completion−ignore−case
+(Off)</b></p>
+
+<p style="margin-left:18%;">If set to <b>On</b>,
+<b>readline</b> performs filename matching and completion in
+a case−insensitive fashion.</p>
+
+
+<p style="margin-left:9%;"><b>completion−map−case
+(Off)</b></p>
+
+<p style="margin-left:18%;">If set to <b>On</b>, and
+<b>completion−ignore−case</b> is enabled,
+<b>readline</b> treats hyphens (<i>−</i>) and
+underscores (<i>_</i>) as equivalent when performing
+case−insensitive filename matching and completion.</p>
+
+
+<p style="margin-left:9%;"><b>completion−prefix−display−length
+(0)</b></p>
+
+<p style="margin-left:18%;">The maximum length in
+characters of the common prefix of a list of possible
+completions that is displayed without modification. When set
+to a value greater than zero, <b>readline</b> replaces
+common prefixes longer than this value with an ellipsis when
+displaying possible completions. If a completion begins with
+a period, and <b>eadline</b> is completing filenames, it
+uses three underscores instead of an ellipsis.</p>
+
+
+<p style="margin-left:9%;"><b>completion−query−items
+(100)</b></p>
+
+<p style="margin-left:18%;">This determines when the user
+is queried about viewing the number of possible completions
+generated by the <b>possible−completions</b> command.
+It may be set to any integer value greater than or equal to
+zero. If the number of possible completions is greater than
+or equal to the value of this variable, <b>readline</b> asks
+whether or not the user wishes to view them; otherwise
+<b>readline</b> simply lists them on the terminal. A zero
+value means <b>readline</b> should never ask; negative
+values are treated as zero.</p>
+
+<p style="margin-left:9%;"><b>convert−meta
+(On)</b></p>
+
+<p style="margin-left:18%;">If set to <b>On</b>,
+<b>readline</b> converts characters it reads that have the
+eighth bit set to an ASCII key sequence by clearing the
+eighth bit and prefixing it with an escape character
+(converting the character to have the meta prefix). The
+default is <i>On</i>, but <b>readline</b> sets it to
+<i>Off</i> if the locale contains characters whose encodings
+may include bytes with the eighth bit set. This variable is
+dependent on the <b>LC_CTYPE</b> locale category, and may
+change if the locale changes. This variable also affects key
+bindings; see the description of
+<b>force−meta−prefix</b> below.</p>
+
+<p style="margin-left:9%;"><b>disable−completion
+(Off)</b></p>
+
+<p style="margin-left:18%;">If set to <b>On</b>,
+<b>readline</b> inhibits word completion. Completion
+characters are inserted into the line as if they had been
+mapped to <b>self-insert</b>.</p>
+
+
+<p style="margin-left:9%;"><b>echo−control−characters
+(On)</b></p>
+
+<p style="margin-left:18%;">When set to <b>On</b>, on
+operating systems that indicate they support it,
+<b>readline</b> echoes a character corresponding to a signal
+generated from the keyboard.</p>
+
+<p style="margin-left:9%;"><b>editing−mode
+(emacs)</b></p>
+
+<p style="margin-left:18%;">Controls whether
+<b>readline</b> uses a set of key bindings similar to
+<i>Emacs</i> or <i>vi</i>. <b>editing−mode</b> can be
+set to either <b>emacs</b> or <b>vi</b>.</p>
+
+
+<p style="margin-left:9%;"><b>emacs−mode−string
+(@)</b></p>
+
+<p style="margin-left:18%;">If the
+<i>show−mode−in−prompt</i> variable is
+enabled, this string is displayed immediately before the
+last line of the primary prompt when emacs editing mode is
+active. The value is expanded like a key binding, so the
+standard set of meta- and control- prefixes and backslash
+escape sequences is available. The \1 and \2 escapes begin
+and end sequences of non-printing characters, which can be
+used to embed a terminal control sequence into the mode
+string.</p>
+
+
+<p style="margin-left:9%;"><b>enable−active−region
+(On)</b></p>
+
+<p style="margin-left:18%;">When this variable is set to
+<i>On</i>, <b>readline</b> allows certain commands to
+designate the region as <i>active</i>. When the region is
+active, <b>readline</b> highlights the text in the region
+using the value of the
+<b>active−region−start−color</b> variable,
+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.</p>
+
+
+<p style="margin-left:9%;"><b>enable−bracketed−paste
+(On)</b></p>
+
+<p style="margin-left:18%;">When set to <b>On</b>,
+<b>readline</b> 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 <i>bracketed−paste
+mode</i>; it prevents <b>readline</b> from executing any
+editing commands bound to key sequences appearing in the
+pasted text.</p>
+
+<p style="margin-left:9%;"><b>enable−keypad
+(Off)</b></p>
+
+<p style="margin-left:18%;">When set to <b>On</b>,
+<b>readline</b> tries to enable the application keypad when
+it is called. Some systems need this to enable the arrow
+keys.</p>
+
+<p style="margin-left:9%;"><b>enable−meta−key
+(On)</b></p>
+
+<p style="margin-left:18%;">When set to <b>On</b>,
+<b>readline</b> tries to enable any meta modifier key the
+terminal claims to support. On many terminals, the Meta key
+is used to send eight-bit characters; this variable checks
+for the terminal capability that indicates the terminal can
+enable and disable a mode that sets the eighth bit of a
+character (0200) if the Meta key is held down when the
+character is typed (a meta character).</p>
+
+<p style="margin-left:9%;"><b>expand−tilde
+(Off)</b></p>
+
+<p style="margin-left:18%;">If set to <b>On</b>,
+<b>readline</b> performs tilde expansion when it attempts
+word completion.</p>
+
+
+<p style="margin-left:9%;"><b>force−meta−prefix
+(Off)</b></p>
+
+<p style="margin-left:18%;">If set to <b>On</b>,
+<b>readline</b> modifies its behavior when binding key
+sequences containing \M- or Meta- (see <b>Key Bindings</b>
+above) by converting a key sequence of the form
+\M−<i>C</i> or Meta−<i>C</i> to the
+two-character sequence <b>ESC</b> <i>C</i> (adding the meta
+prefix). If <b>force−meta−prefix</b> is set to
+<b>Off</b> (the default), <b>readline</b> uses the value of
+the <b>convert−meta</b> variable to determine whether
+to perform this conversion: if <b>convert−meta</b> is
+<b>On</b>, <b>readline</b> performs the conversion described
+above; if it is <b>Off</b>, <b>readline</b> converts
+<i>C</i> to a meta character by setting the eighth bit
+(0200).</p>
+
+
+<p style="margin-left:9%;"><b>history−preserve−point
+(Off)</b></p>
+
+<p style="margin-left:18%;">If set to <b>On</b>, the
+history code attempts to place point at the same location on
+each history line retrieved with <b>previous-history</b> or
+<b>next-history</b>.</p>
+
+<p style="margin-left:9%;"><b>history−size
+(unset)</b></p>
+
+<p style="margin-left:18%;">Set the maximum number of
+history entries saved in the history list. If set to zero,
+any existing history entries are deleted and no new entries
+are saved. If set to a value less than zero, the number of
+history entries is not limited. By default, <b>bash</b> sets
+the maximum number of history entries to the value of the
+<b>HISTSIZE</b> shell variable. Setting
+<i>history−size</i> to a non-numeric value will set
+the maximum number of history entries to 500.</p>
+
+
+<p style="margin-left:9%;"><b>horizontal−scroll−mode
+(Off)</b></p>
+
+<p style="margin-left:18%;">Setting this variable to
+<b>On</b> makes <b>readline</b> use a single line for
+display, scrolling the input horizontally on a single screen
+line when it becomes longer than the screen width rather
+than wrapping to a new line. This setting is automatically
+enabled for terminals of height 1.</p>
+
+<p style="margin-left:9%;"><b>input−meta
+(Off)</b></p>
+
+<p style="margin-left:18%;">If set to <b>On</b>,
+<b>readline</b> enables eight-bit input (that is, it does
+not clear the eighth bit in the characters it reads),
+regardless of what the terminal claims it can support. The
+default is <i>Off</i>, but <b>readline</b> sets it to
+<i>On</i> if the locale contains characters whose encodings
+may include bytes with the eighth bit set. This variable is
+dependent on the <b>LC_CTYPE</b> locale category, and its
+value may change if the locale changes. The name
+<b>meta−flag</b> is a synonym for
+<b>input−meta</b>.</p>
+
+
+<p style="margin-left:9%;"><b>isearch−terminators (</b>“<b>C−[C−j</b>”<b>)</b></p>
+
+<p style="margin-left:18%;">The string of characters that
+should terminate an incremental search without subsequently
+executing the character as a command. If this variable has
+not been given a value, the characters <i>ESC</i> and
+<b>C−j</b> terminate an incremental search.</p>
+
+<p style="margin-left:9%;"><b>keymap (emacs)</b></p>
+
+<p style="margin-left:18%;">Set the current <b>readline</b>
+keymap. The set of valid keymap names is <i>emacs,
+emacs−standard, emacs−meta, emacs−ctlx,
+vi, vi−command</i>, and <i>vi−insert</i>.
+<i>vi</i> is equivalent to <i>vi−command</i>;
+<i>emacs</i> is equivalent to <i>emacs−standard</i>.
+The default value is <i>emacs</i>; the value of
+<b>editing−mode</b> also affects the default
+keymap.</p>
+
+<p style="margin-left:9%;"><b>keyseq−timeout
+(500)</b></p>
+
+<p style="margin-left:18%;">Specifies the duration
+<b>readline</b> will wait for a character when reading an
+ambiguous key sequence (one that can form a complete key
+sequence using the input read so far, or can take additional
+input to complete a longer key sequence). If <b>readline</b>
+does not receive any input within the timeout, it uses the
+shorter but complete key sequence. The value is specified in
+milliseconds, so a value of 1000 means that <b>readline</b>
+will wait one second for additional input. If this variable
+is set to a value less than or equal to zero, or to a
+non-numeric value, <b>readline</b> waits until another key
+is pressed to decide which key sequence to complete.</p>
+
+<p style="margin-left:9%;"><b>mark−directories
+(On)</b></p>
+
+<p style="margin-left:18%;">If set to <b>On</b>, completed
+directory names have a slash appended.</p>
+
+
+<p style="margin-left:9%;"><b>mark−modified−lines
+(Off)</b></p>
+
+<p style="margin-left:18%;">If set to <b>On</b>,
+<b>readline</b> displays history lines that have been
+modified with a preceding asterisk (<b>*</b>).</p>
+
+
+<p style="margin-left:9%;"><b>mark−symlinked−directories
+(Off)</b></p>
+
+<p style="margin-left:18%;">If set to <b>On</b>, completed
+names which are symbolic links to directories have a slash
+appended, subject to the value of
+<b>mark−directories</b>.</p>
+
+
+<p style="margin-left:9%;"><b>match−hidden−files
+(On)</b></p>
+
+<p style="margin-left:18%;">This variable, when set to
+<b>On</b>, forces <b>readline</b> to match files whose names
+begin with a “.” (hidden files) when performing
+filename completion. If set to <b>Off</b>, the user must
+include the leading “.” in the filename to be
+completed.</p>
+
+
+<p style="margin-left:9%;"><b>menu−complete−display−prefix
+(Off)</b></p>
+
+<p style="margin-left:18%;">If set to <b>On</b>, menu
+completion displays the common prefix of the list of
+possible completions (which may be empty) before cycling
+through the list.</p>
+
+<p style="margin-left:9%;"><b>output−meta
+(Off)</b></p>
+
+<p style="margin-left:18%;">If set to <b>On</b>,
+<b>readline</b> displays characters with the eighth bit set
+directly rather than as a meta-prefixed escape sequence. The
+default is <i>Off</i>, but <b>readline</b> sets it to
+<i>On</i> if the locale contains characters whose encodings
+may include bytes with the eighth bit set. This variable is
+dependent on the <b>LC_CTYPE</b> locale category, and its
+value may change if the locale changes.</p>
+
+<p style="margin-left:9%;"><b>page−completions
+(On)</b></p>
+
+<p style="margin-left:18%;">If set to <b>On</b>,
+<b>readline</b> uses an internal pager resembling
+<i>more</i>(1) to display a screenful of possible
+completions at a time.</p>
+
+
+<p style="margin-left:9%;"><b>prefer−visible−bell</b></p>
+
+<p style="margin-left:18%;">See
+<b>bell−style</b>.</p>
+
+
+<p style="margin-left:9%;"><b>print−completions−horizontally
+(Off)</b></p>
+
+<p style="margin-left:18%;">If set to <b>On</b>,
+<b>readline</b> displays completions with matches sorted
+horizontally in alphabetical order, rather than down the
+screen.</p>
+
+
+<p style="margin-left:9%;"><b>revert−all−at−newline
+(Off)</b></p>
+
+<p style="margin-left:18%;">If set to <b>On</b>,
+<b>readline</b> will undo all changes to history lines
+before returning when executing <b>accept−line</b>. By
+default, history lines may be modified and retain individual
+undo lists across calls to <b>readline</b>.</p>
+
+
+<p style="margin-left:9%;"><b>search−ignore−case
+(Off)</b></p>
+
+<p style="margin-left:18%;">If set to <b>On</b>,
+<b>readline</b> performs incremental and non-incremental
+history list searches in a case−insensitive
+fashion.</p>
+
+
+<p style="margin-left:9%;"><b>show−all−if−ambiguous
+(Off)</b></p>
+
+<p style="margin-left:18%;">This alters the default
+behavior of the completion functions. If set to <b>On</b>,
words which have more than one possible completion cause the
-matches to be listed immediately instead of ringing the bell.
-<DT><B>show-all-if-unmodified (Off)</B>
-
-<DD>
-This alters the default behavior of the completion functions in
-a fashion similar to <B>show-all-if-ambiguous</B>.
-If set to
-<B>On</B>,
-
-words which have more than one possible completion without any
-possible partial completion (the possible completions don't share
-a common prefix) cause the matches to be listed immediately instead
-of ringing the bell.
-<DT><B>show-mode-in-prompt (Off)</B>
-
-<DD>
-If set to <B>On</B>, add a string to the beginning of the prompt
-indicating the editing mode: emacs, vi command, or vi insertion.
-The mode strings are user-settable (e.g., <I>emacs-mode-string</I>).
-<DT><B>skip-completed-text (Off)</B>
-
-<DD>
-If set to <B>On</B>, 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, <B>readline</B> 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.
-<DT><B>vi-cmd-mode-string ((cmd))</B>
-
-<DD>
-If the <I>show-mode-in-prompt</I> variable is enabled,
-this string is displayed immediately before the last line of the primary
-prompt when vi editing mode is active and in command mode.
-The value is expanded like a key binding, so the standard set of
-meta- and control- prefixes and backslash escape sequences is available.
-The \1 and \2 escapes begin and end sequences of
-non-printing characters, which can be used to embed a terminal control
-sequence into the mode string.
-<DT><B>vi-ins-mode-string ((ins))</B>
-
-<DD>
-If the <I>show-mode-in-prompt</I> variable is enabled,
-this string is displayed immediately before the last line of the primary
-prompt when vi editing mode is active and in insertion mode.
-The value is expanded like a key binding, so the standard set of
-meta- and control- prefixes and backslash escape sequences is available.
-The \1 and \2 escapes begin and end sequences of
-non-printing characters, which can be used to embed a terminal control
-sequence into the mode string.
-<DT><B>visible-stats (Off)</B>
-
-<DD>
-If set to <B>On</B>, a character denoting a file's type as reported
-by <I>stat</I>(2) is appended to the filename when listing possible
-completions.
-
-</DL>
-<A NAME="lbCL"> </A>
-<H4>Readline Conditional Constructs</H4>
-
-<B>Readline</B>
+matches to be listed immediately instead of ringing the
+bell.</p>
+
+
+<p style="margin-left:9%;"><b>show−all−if−unmodified
+(Off)</b></p>
+
+<p style="margin-left:18%;">This alters the default
+behavior of the completion functions in a fashion similar to
+<b>show−all−if−ambiguous</b>. If set to
+<b>On</b>, words which have more than one possible
+completion without any possible partial completion (the
+possible completions don’t share a common prefix)
+cause the matches to be listed immediately instead of
+ringing the bell.</p>
+
+
+<p style="margin-left:9%;"><b>show−mode−in−prompt
+(Off)</b></p>
+
+<p style="margin-left:18%;">If set to <b>On</b>, add a
+string to the beginning of the prompt indicating the editing
+mode: emacs, vi command, or vi insertion. The mode strings
+are user-settable (e.g.,
+<i>emacs−mode−string</i>).</p>
+
+
+<p style="margin-left:9%;"><b>skip−completed−text
+(Off)</b></p>
+
+<p style="margin-left:18%;">If set to <b>On</b>, 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,
+<b>readline</b> 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.</p>
+
+
+<p style="margin-left:9%;"><b>vi−cmd−mode−string
+((cmd))</b></p>
+<p style="margin-left:18%;">If the
+<i>show−mode−in−prompt</i> variable is
+enabled, this string is displayed immediately before the
+last line of the primary prompt when vi editing mode is
+active and in command mode. The value is expanded like a key
+binding, so the standard set of meta- and control- prefixes
+and backslash escape sequences is available. The \1 and \2
+escapes begin and end sequences of non-printing characters,
+which can be used to embed a terminal control sequence into
+the mode string.</p>
+
+
+<p style="margin-left:9%;"><b>vi−ins−mode−string
+((ins))</b></p>
+
+<p style="margin-left:18%;">If the
+<i>show−mode−in−prompt</i> variable is
+enabled, this string is displayed immediately before the
+last line of the primary prompt when vi editing mode is
+active and in insertion mode. The value is expanded like a
+key binding, so the standard set of meta- and control-
+prefixes and backslash escape sequences is available. The \1
+and \2 escapes begin and end sequences of non-printing
+characters, which can be used to embed a terminal control
+sequence into the mode string.</p>
+
+<p style="margin-left:9%;"><b>visible−stats
+(Off)</b></p>
+
+<p style="margin-left:18%;">If set to <b>On</b>, a
+character denoting a file’s type as reported by
+<i>stat</i>(2) is appended to the filename when listing
+possible completions.</p>
+
+<h3>Readline Conditional Constructs
+<a name="Readline Conditional Constructs"></a>
+</h3>
+
+
+<p style="margin-left:9%; margin-top: 1em"><b>Readline</b>
implements a facility similar in spirit to the conditional
compilation features of the C preprocessor which allows key
bindings and variable settings to be performed as the result
-of tests.
-There are four parser directives available.
-<DL COMPACT>
-<DT><B>$if</B>
-
-<DD>
-The
-<B>$if</B>
-
-construct allows bindings to be made based on the
-editing mode, the terminal being used, or the application using
-<B>readline</B>.
-The text of the test, after any comparison operator,
-extends to the end of the line;
-unless otherwise noted, no characters are required to isolate it.
-<DL COMPACT><DT><DD>
-<DL COMPACT>
-<DT><B>mode</B>
-
-<DD>
-The <B>mode=</B> form of the <B>$if</B> directive is used to test
-whether <B>readline</B> is in emacs or vi mode.
-This may be used in conjunction
-with the <B>set keymap</B> command, for instance, to set bindings in
-the <I>emacs-standard</I> and <I>emacs-ctlx</I> keymaps only if
-<B>readline</B> is starting out in emacs mode.
-<DT><B>term</B>
-
-<DD>
-The <B>term=</B> form may be used to include terminal-specific
-key bindings, perhaps to bind the key sequences output by the
-terminal's function keys.
-The word on the right side of the
-<B>=</B>
-
-is tested against both the full name of the terminal and the portion
-of the terminal name before the first <B>-</B>.
-This allows
-<I>xterm</I>
-
-to match both
-<I>xterm</I>
-
-and
-<I>xterm-256color</I>,
-
-for instance.
-<DT><B>version</B>
-
-<DD>
-The <B>version</B> test may be used to perform comparisons against
-specific <B>readline</B> versions.
-The <B>version</B> expands to the current <B>readline</B> version.
-The set of comparison operators includes
-<B>=</B>,
-
-(and
-<B>==</B>),
-
-<B>!=</B>,
-
-<B><=</B>,
-
-<B>>=</B>,
-
-<B><</B>,
-
-and
-<B>></B>.
-
-The version number supplied on the right side of the operator consists
-of a major version number, an optional decimal point, and an optional
-minor version (e.g., <B>7.1</B>).
-If the minor version is omitted, it
-defaults to <B>0</B>.
-The operator may be separated from the string <B>version</B>
-and from the version number argument by whitespace.
-<DT><I>application</I>
-
-<DD>
-The <I>application</I> construct is used to include
-application-specific settings.
-Each program using the <B>readline</B>
-library sets the <I>application name</I>, and an initialization
-file can test for a particular value.
-This could be used to bind key sequences to functions useful for
-a specific program.
-For instance, the following command adds a
-key sequence that quotes the current or previous word in <B>bash</B>:
-</DL>
-<P>
-
-<DL COMPACT><DT><DD>
-
-<PRE>
-<B>$if</B> Bash
-# Quote the current or previous word
-"
-\C-xq"
-: "
-\eb\"
-\ef\"
-"
-
-<B>$endif</B>
-</PRE>
-
-
-</DL>
-
-<DL COMPACT>
-<DT><I>variable</I>
-
-<DD>
-The <I>variable</I> construct provides simple equality tests for <B>readline</B>
-variables and values.
-The permitted comparison operators are <I>=</I>, <I>==</I>, and <I>!=</I>.
-The variable name must be separated from the comparison operator by
-whitespace; the operator may be separated from the value on the right hand
-side by whitespace.
-String and boolean variables may be tested.
-Boolean variables must be
-tested against the values <I>on</I> and <I>off</I>.
-</DL></DL>
-
-<DT><B>$else</B>
-
-<DD>
-Commands in this branch of the <B>$if</B> directive are executed if
-the test fails.
-<DT><B>$endif</B>
-
-<DD>
-This command, as seen in the previous example, terminates an
-<B>$if</B> command.
-<DT><B>$include</B>
-
-<DD>
-This directive takes a single filename as an argument and reads commands
-and key bindings from that file.
-For example, the following directive would read
-
-<A HREF="file:/etc/inputrc"><I>/etc/inputrc</I></A>:
-
-</DL>
-<P>
-
-<DL COMPACT><DT><DD>
-<PRE>
-<B>$include</B> <A HREF="file:/etc/inputrc"><I>/etc/inputrc</I></A>
-</PRE>
-
-</DL>
-
-<A NAME="lbCM"> </A>
-<H4>Searching</H4>
-
-<B>Readline</B>
-
-provides commands for searching through the command history (see
-<FONT SIZE=-1><B>HISTORY</B>
-
-</FONT>
-below)
-for lines containing a specified string.
-There are two search modes:
-<I>incremental</I>
-
-and
-<I>non-incremental</I>.
-
-<P>
-
-Incremental searches begin before the user has finished typing the
-search string.
-As each character of the search string is typed, <B>readline</B> displays
-the next entry from the history matching the string typed so far.
-An incremental search requires only as many characters as needed to
-find the desired history entry.
-When using emacs editing mode, type <B>C-r</B> to
-search backward in the history for a particular string.
-Typing <B>C-s</B> searches forward through the history.
-The characters present in the value of the <B>isearch-terminators</B>
-variable are used to terminate an incremental search.
-If that variable has not been assigned a value,
-<I>ESC</I> and <B>C-j</B> terminate an incremental search.
-<B>C-g</B> aborts an incremental search and restores the original line.
-When the search is terminated, the history entry containing the
-search string becomes the current line.
-<P>
-
-To find other matching entries in the history list, type <B>C-r</B> or
-<B>C-s</B> as appropriate.
-This searches backward or forward in the history for the next
-entry matching the search string typed so far.
-Any other key sequence bound to a <B>readline</B> command terminates
-the search and executes that command.
-For instance, a newline terminates the search and accepts
-the line, thereby executing the command from the history list.
-A movement command will terminate the search, make the last line found
-the current line, and begin editing.
-<P>
-
-<B>Readline</B>
-
-remembers the last incremental search string.
-If two <B>C-r</B>s are typed without any intervening characters defining
-a new search string, <B>readline</B> uses any remembered search string.
-<P>
-
-Non-incremental searches read the entire search string before starting
-to search for matching history entries.
-The search string may be
-typed by the user or be part of the contents of the current line.
-<A NAME="lbCN"> </A>
-<H4>Readline Command Names</H4>
-
-The following is a list of the names of the commands and the default
-key sequences to which they are bound.
-Command names without an accompanying key sequence are unbound by default.
-<P>
-
-In the following descriptions, <I>point</I> refers to the current cursor
-position, and <I>mark</I> refers to a cursor position saved by the
-<B>set-mark</B> command.
-The text between the point and mark is referred to as the <I>region</I>.
-<B>Readline</B>
-
-has the concept of an <I>active region</I>:
-when the region is active, <B>readline</B> redisplay
+of tests. There are four parser directives available.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="4%">
+
+
+<p><b>$if</b></p></td>
+<td width="5%"></td>
+<td width="82%">
+
+
+<p>The <b>$if</b> construct allows bindings to be made
+based on the editing mode, the terminal being used, or the
+application using <b>readline</b>. The text of the test,
+after any comparison operator, extends to the end of the
+line; unless otherwise noted, no characters are required to
+isolate it.</p></td></tr>
+</table>
+
+<p style="margin-left:18%;"><b>mode</b></p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="5%"></td>
+<td width="4%"></td>
+<td width="73%">
+
+
+<p style="margin-top: 1em">The <b>mode=</b> form of the
+<b>$if</b> directive is used to test whether <b>readline</b>
+is in emacs or vi mode. This may be used in conjunction with
+the <b>set keymap</b> command, for instance, to set bindings
+in the <i>emacs−standard</i> and
+<i>emacs−ctlx</i> keymaps only if <b>readline</b> is
+starting out in emacs mode.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="5%">
+
+
+<p><b>term</b></p></td>
+<td width="4%"></td>
+<td width="73%">
+
+
+<p>The <b>term=</b> form may be used to include
+terminal-specific key bindings, perhaps to bind the key
+sequences output by the terminal’s function keys. The
+word on the right side of the <b>=</b> is tested against
+both the full name of the terminal and the portion of the
+terminal name before the first <b>−</b>. This allows
+<i>xterm</i> to match both <i>xterm</i> and
+<i>xterm−256color</i>, for instance.</p></td></tr>
+</table>
+
+<p style="margin-left:18%;"><b>version</b></p>
+
+<p style="margin-left:27%;">The <b>version</b> test may be
+used to perform comparisons against specific <b>readline</b>
+versions. The <b>version</b> expands to the current
+<b>readline</b> version. The set of comparison operators
+includes <b>=</b>, (and <b>==</b>), <b>!=</b>, <b><=</b>,
+<b>>=</b>, <b><</b>, and <b>></b>. The version
+number supplied on the right side of the operator consists
+of a major version number, an optional decimal point, and an
+optional minor version (e.g., <b>7.1</b>). If the minor
+version is omitted, it defaults to <b>0</b>. The operator
+may be separated from the string <b>version</b> and from the
+version number argument by whitespace.</p>
+
+<p style="margin-left:18%;"><i>application</i></p>
+
+<p style="margin-left:27%;">The <i>application</i>
+construct is used to include application-specific settings.
+Each program using the <b>readline</b> library sets the
+<i>application name</i>, and an initialization file can test
+for a particular value. This could be used to bind key
+sequences to functions useful for a specific program. For
+instance, the following command adds a key sequence that
+quotes the current or previous word in <b>bash</b>:</p>
+
+<p style="margin-left:27%; margin-top: 1em"><b>$if</b> Bash
+<br>
+# Quote the current or previous word <br>
+"\C-xq": "\eb\"\ef\"" <b><br>
+$endif</b></p>
+
+<p style="margin-left:18%;"><i>variable</i></p>
+
+<p style="margin-left:27%;">The <i>variable</i> construct
+provides simple equality tests for <b>readline</b> variables
+and values. The permitted comparison operators are <i>=</i>,
+<i>==</i>, and <i>!=</i>. The variable name must be
+separated from the comparison operator by whitespace; the
+operator may be separated from the value on the right hand
+side by whitespace. String and boolean variables may be
+tested. Boolean variables must be tested against the values
+<i>on</i> and <i>off</i>.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="8%">
+
+
+<p><b>$else</b></p></td>
+<td width="1%"></td>
+<td width="82%">
+
+
+<p>Commands in this branch of the <b>$if</b> directive are
+executed if the test fails.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="8%">
+
+
+<p><b>$endif</b></p></td>
+<td width="1%"></td>
+<td width="82%">
+
+
+<p>This command, as seen in the previous example,
+terminates an <b>$if</b> command.</p></td></tr>
+</table>
+
+<p style="margin-left:9%;"><b>$include</b></p>
+
+<p style="margin-left:18%;">This directive takes a single
+filename as an argument and reads commands and key bindings
+from that file. For example, the following directive would
+read <A HREF="file:/etc/inputrc"><i>/etc/inputrc</i></A>:</p>
+
+
+<p style="margin-left:18%; margin-top: 1em"><b>$include</b>
+<A HREF="file:/etc/inputrc"><i>/etc/inputrc</i></A></p>
+
+<h3>Searching
+<a name="Searching"></a>
+</h3>
+
+
+
+<p style="margin-left:9%; margin-top: 1em"><i><b>Readline</b></i>
+provides commands for searching through the command history
+(see <b><small>HISTORY</small></b> below) for lines
+containing a specified string. There are two search modes:
+<i>incremental</i> and <i>non-incremental</i>.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Incremental
+searches begin before the user has finished typing the
+search string. As each character of the search string is
+typed, <b>readline</b> displays the next entry from the
+history matching the string typed so far. An incremental
+search requires only as many characters as needed to find
+the desired history entry. When using emacs editing mode,
+type <b>C−r</b> to search backward in the history for
+a particular string. Typing <b>C−s</b> searches
+forward through the history. The characters present in the
+value of the <b>isearch-terminators</b> variable are used to
+terminate an incremental search. If that variable has not
+been assigned a value, <i>ESC</i> and <b>C−j</b>
+terminate an incremental search. <b>C−g</b> aborts an
+incremental search and restores the original line. When the
+search is terminated, the history entry containing the
+search string becomes the current line.</p>
+
+<p style="margin-left:9%; margin-top: 1em">To find other
+matching entries in the history list, type <b>C−r</b>
+or <b>C−s</b> as appropriate. This searches backward
+or forward in the history for the next entry matching the
+search string typed so far. Any other key sequence bound to
+a <b>readline</b> command terminates the search and executes
+that command. For instance, a newline terminates the search
+and accepts the line, thereby executing the command from the
+history list. A movement command will terminate the search,
+make the last line found the current line, and begin
+editing.</p>
+
+<p style="margin-left:9%; margin-top: 1em"><b>Readline</b>
+remembers the last incremental search string. If two
+<b>C−r</b>s are typed without any intervening
+characters defining a new search string, <b>readline</b>
+uses any remembered search string.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Non-incremental
+searches read the entire search string before starting to
+search for matching history entries. The search string may
+be typed by the user or be part of the contents of the
+current line.</p>
+
+<h3>Readline Command Names
+<a name="Readline Command Names"></a>
+</h3>
+
+
+<p style="margin-left:9%; margin-top: 1em">The following is
+a list of the names of the commands and the default key
+sequences to which they are bound. Command names without an
+accompanying key sequence are unbound by default.</p>
+
+<p style="margin-left:9%; margin-top: 1em">In the following
+descriptions, <i>point</i> refers to the current cursor
+position, and <i>mark</i> refers to a cursor position saved
+by the <b>set−mark</b> command. The text between the
+point and mark is referred to as the <i>region</i>.
+<b>Readline</b> has the concept of an <i>active region</i>:
+when the region is active, <b>readline</b> redisplay
highlights the region using the value of the
-<B>active-region-start-color</B>
-
-variable.
-The <B>enable-active-region</B> <B>readline</B> variable turns this on and off.
-Several commands set the region to active; those are noted below.
-<A NAME="lbCO"> </A>
-<H4>Commands for Moving</H4>
-
-
-<DL COMPACT>
-<DT><B>beginning-of-line (C-a)</B>
-
-<DD>
-Move to the start of the current line.
-This may also be bound to the Home key on some keyboards.
-<DT><B>end-of-line (C-e)</B>
-
-<DD>
-Move to the end of the line.
-This may also be bound to the End key on some keyboards.
-<DT><B>forward-char (C-f)</B>
-
-<DD>
-Move forward a character.
-This may also be bound to the right arrow key on some keyboards.
-<DT><B>backward-char (C-b)</B>
-
-<DD>
-Move back a character.
-This may also be bound to the left arrow key on some keyboards.
-<DT><B>forward-word (M-f)</B>
-
-<DD>
-Move forward to the end of the next word.
-Words are composed of alphanumeric characters (letters and digits).
-<DT><B>backward-word (M-b)</B>
-
-<DD>
-Move back to the start of the current or previous word.
-Words are composed of alphanumeric characters (letters and digits).
-<DT><B>shell-forward-word (M-C-f)</B>
-
-<DD>
-Move forward to the end of the next word.
-Words are delimited by non-quoted shell metacharacters.
-<DT><B>shell-backward-word (M-C-b)</B>
-
-<DD>
-Move back to the start of the current or previous word.
-Words are delimited by non-quoted shell metacharacters.
-<DT><B>previous-screen-line</B>
-
-<DD>
-Attempt to move point to the same physical screen column on the previous
-physical screen line.
-This will not have the desired effect if the current
-<B>readline</B> line does not take up more than one physical line or if
-point is not greater than the length of the prompt plus the screen width.
-<DT><B>next-screen-line</B>
-
-<DD>
-Attempt to move point to the same physical screen column on the next
-physical screen line.
-This will not have the desired effect if the current
-<B>readline</B> line does not take up more than one physical line or if
-the length of the current <B>readline</B> line is
-not greater than the length of the prompt
-plus the screen width.
-<DT><B>clear-display (M-C-l)</B>
-
-<DD>
-Clear the screen and, if possible, the terminal's scrollback buffer,
-then redraw the current line,
-leaving the current line at the top of the screen.
-<DT><B>clear-screen (C-l)</B>
-
-<DD>
-Clear the screen,
-then redraw the current line,
-leaving the current line at the top of the screen.
-With a numeric argument, refresh the current line without clearing the
-screen.
-<DT><B>redraw-current-line</B>
-
-<DD>
-Refresh the current line.
-
-</DL>
-<A NAME="lbCP"> </A>
-<H4>Commands for Manipulating the History</H4>
-
-
-<DL COMPACT>
-<DT><B>accept-line (Newline, Return)</B>
-
-<DD>
-Accept the line regardless of where the cursor is.
-If this line is non-empty, add it to the history list according to the
-state of the
-<FONT SIZE=-1><B>HISTCONTROL</B>
-
-</FONT>
-and
-<B>HISTIGNORE</B>
-
-variables.
-If the line is a modified history line,
-restore the history line to its original state.
-<DT><B>previous-history (C-p)</B>
-
-<DD>
-Fetch the previous command from the history list, moving back in
-the list.
-This may also be bound to the up arrow key on some keyboards.
-<DT><B>next-history (C-n)</B>
-
-<DD>
-Fetch the next command from the history list, moving forward in the
-list.
-This may also be bound to the down arrow key on some keyboards.
-<DT><B>beginning-of-history (M-<)</B>
-
-<DD>
-Move to the first line in the history.
-<DT><B>end-of-history (M->)</B>
-
-<DD>
-Move to the end of the input history, i.e., the line currently being
-entered.
-<DT><B>operate-and-get-next (C-o)</B>
-
-<DD>
-Accept the current line for execution as if a
-newline had been entered,
-and fetch the next line relative to the current line from the history
-for editing.
-A numeric argument, if supplied, specifies the history entry to use instead
-of the current line.
-<DT><B>fetch-history</B>
-
-<DD>
-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.
-<DT><B>reverse-search-history (C-r)</B>
-
-<DD>
-Search backward starting at the current line and moving
-
-through the history as necessary.
-This is an incremental search.
-This command sets the region to the matched text and activates the region.
-<DT><B>forward-search-history (C-s)</B>
-
-<DD>
-Search forward starting at the current line and moving
-
-through the history as necessary.
-This is an incremental search.
-This command sets the region to the matched text and activates the region.
-<DT><B>non-incremental-reverse-search-history (M-p)</B>
-
-<DD>
-Search backward through the history starting at the current line
-using a non-incremental search for a string supplied by the user.
-The search string may match anywhere in a history line.
-<DT><B>non-incremental-forward-search-history (M-n)</B>
-
-<DD>
-Search forward through the history using a non-incremental search
-for a string supplied by the user.
-The search string may match anywhere in a history line.
-<DT><B>history-search-backward</B>
-
-<DD>
-Search backward through the history for the string of characters
-between the start of the current line and the point.
-The search string must match at the beginning of a history line.
-This is a non-incremental search.
-This may be bound to the Page Up key on some keyboards.
-<DT><B>history-search-forward</B>
-
-<DD>
-Search forward through the history for the string of characters
-between the start of the current line and the point.
-The search string must match at the beginning of a history line.
-This is a non-incremental search.
-This may be bound to the Page Down key on some keyboards.
-<DT><B>history-substring-search-backward</B>
-
-<DD>
-Search backward through the history for the string of characters
-between the start of the current line and the point.
-The search string may match anywhere in a history line.
-This is a non-incremental search.
-<DT><B>history-substring-search-forward</B>
-
-<DD>
-Search forward through the history for the string of characters
-between the start of the current line and the point.
-The search string may match anywhere in a history line.
-This is a non-incremental search.
-<DT><B>yank-nth-arg (M-C-y)</B>
-
-<DD>
-Insert the first argument to the previous command (usually
-the second word on the previous line) at point.
-With an argument
-<I>n</I>,
-
-insert the <I>n</I>th word from the previous command (the words
-in the previous command begin with word 0).
-A negative argument inserts the <I>n</I>th word from the end of
-the previous command.
-Once the argument <I>n</I> is computed,
-this uses the history expansion facilities to extract the
-<I>n</I>th word, as if the
-
-history expansion had been specified.
-<DT><B>yank-last-arg (M-., M-_)</B>
-
-<DD>
-Insert the last argument to the previous command (the last word of
-the previous history entry).
-With a numeric argument, behave exactly like <B>yank-nth-arg</B>.
-Successive calls to <B>yank-last-arg</B> move back through the history
-list, inserting the last word (or the word specified by the argument to
-the first call) of each line in turn.
-Any numeric argument supplied to these successive calls determines
-the direction to move through the history.
-A negative argument switches the direction through the history
-(back or forward).
-This uses the history expansion facilities to extract the
-last word, as if the
-
-history expansion had been specified.
-<DT><B>shell-expand-line (M-C-e)</B>
-
-<DD>
-Expand the line by performing shell word expansions.
-This performs alias and history expansion,
-<B>$</B>'<I>string</I>' and <B>$</B>"
-<I>string</I>"
- quoting,
-tilde expansion, parameter and variable expansion, arithmetic expansion,
-command and process substitution,
-word splitting, and quote removal.
-An explicit argument suppresses command and process substitution.
-See
-<FONT SIZE=-1><B>HISTORY EXPANSION</B>
-
-</FONT>
-below for a description of history expansion.
-<DT><B>history-expand-line (M-^)</B>
-
-<DD>
-Perform history expansion on the current line.
-See
-<FONT SIZE=-1><B>HISTORY EXPANSION</B>
-
-</FONT>
-below for a description of history expansion.
-<DT><B>magic-space</B>
-
-<DD>
-Perform history expansion on the current line and insert a space.
-See
-<FONT SIZE=-1><B>HISTORY EXPANSION</B>
-
-</FONT>
-below for a description of history expansion.
-<DT><B>alias-expand-line</B>
-
-<DD>
-Perform alias expansion on the current line.
-See
-<FONT SIZE=-1><B>ALIASES</B>
-
-</FONT>
-above for a description of alias expansion.
-<DT><B>history-and-alias-expand-line</B>
-
-<DD>
-Perform history and alias expansion on the current line.
-<DT><B>insert-last-argument (M-., M-_)</B>
-
-<DD>
-A synonym for <B>yank-last-arg</B>.
-<DT><B>edit-and-execute-command (C-x C-e)</B>
-
-<DD>
-Invoke an editor on the current command line, and execute the result as shell
-commands.
-<B>Bash</B> attempts to invoke
-<FONT SIZE=-1><B>$VISUAL</B>,
-
-</FONT>
-<FONT SIZE=-1><B>$EDITOR</B>,
-
-</FONT>
-and <I>emacs</I> as the editor, in that order.
-
-</DL>
-<A NAME="lbCQ"> </A>
-<H4>Commands for Changing Text</H4>
-
-
-<DL COMPACT>
-<DT><B></B><I>end-of-file</I> (usually C-d)
-
-<DD>
-The character indicating end-of-file as set, for example, by
-<I>stty</I>(1).
-
-If this character is read when there are no characters
-on the line, and point is at the beginning of the line, <B>readline</B>
-interprets it as the end of input and returns
-<FONT SIZE=-1><B>EOF</B>.
-
-</FONT>
-<DT><B>delete-char (C-d)</B>
-
-<DD>
-Delete the character at point.
-If this function is bound to the
-same character as the tty <B>EOF</B> character, as <B>C-d</B>
-commonly is, see above for the effects.
-This may also be bound to the Delete key on some keyboards.
-<DT><B>backward-delete-char (Rubout)</B>
-
-<DD>
-Delete the character behind the cursor.
-When given a numeric argument,
-save the deleted text on the kill ring.
-<DT><B>forward-backward-delete-char</B>
-
-<DD>
-Delete the character under the cursor, unless the cursor is at the
-end of the line, in which case the character behind the cursor is
-deleted.
-<DT><B>quoted-insert (C-q, C-v)</B>
-
-<DD>
-Add the next character typed to the line verbatim.
-This is how to insert characters like <B>C-q</B>, for example.
-<DT><B>tab-insert (C-v TAB)</B>
-
-<DD>
-Insert a tab character.
-<DT><B>self-insert (a, b, A, 1, !, </B>...)
-
-<DD>
-Insert the character typed.
-<DT><B>bracketed-paste-begin</B>
-
-<DD>
-This function is intended to be bound to the
-
-escape
-sequence sent by some terminals, and such a binding is assigned by default.
-It allows <B>readline</B> to insert the pasted text as a single unit
-without treating each character as if it had been read from the keyboard.
-The pasted characters
-are inserted as if each one was bound to <B>self-insert</B> instead of
-executing any editing commands.
-<DT><DD>
-Bracketed paste sets the region to the inserted text and activates the region.
-<DT><B>transpose-chars (C-t)</B>
-
-<DD>
-Drag the character before point forward over the character at point,
-moving point forward as well.
-If point is at the end of the line, then this transposes
-the two characters before point.
-Negative arguments have no effect.
-<DT><B>transpose-words (M-t)</B>
-
-<DD>
-Drag the word before point past the word after point,
-moving point past that word as well.
-If point is at the end of the line, this transposes
-the last two words on the line.
-<DT><B>shell-transpose-words (M-C-t)</B>
-
-<DD>
-Drag the word before point past the word after point,
-moving point past that word as well.
-If the insertion point is at the end of the line, this transposes
-the last two words on the line.
-Word boundaries are the same as <B>shell-forward-word</B> and
-<B>shell-backward-word</B>.
-<DT><B>upcase-word (M-u)</B>
-
-<DD>
-Uppercase the current (or following) word.
-With a negative argument,
-uppercase the previous word, but do not move point.
-<DT><B>downcase-word (M-l)</B>
-
-<DD>
-Lowercase the current (or following) word.
-With a negative argument,
-lowercase the previous word, but do not move point.
-<DT><B>capitalize-word (M-c)</B>
-
-<DD>
-Capitalize the current (or following) word.
-With a negative argument,
-capitalize the previous word, but do not move point.
-<DT><B>overwrite-mode</B>
-
-<DD>
-Toggle overwrite mode.
-With an explicit positive numeric argument, switches to overwrite mode.
-With an explicit non-positive numeric argument, switches to insert mode.
-This command affects only <B>emacs</B> mode;
-<B>vi</B> mode does overwrite differently.
-Each call to <I>readline()</I> starts in insert mode.
-<DT><DD>
-In overwrite mode, characters bound to <B>self-insert</B> replace
-the text at point rather than pushing the text to the right.
-Characters bound to <B>backward-delete-char</B> replace the character
-before point with a space.
-By default, this command is unbound,
-but may be bound to the Insert key on some keyboards.
-
-</DL>
-<A NAME="lbCR"> </A>
-<H4>Killing and Yanking</H4>
-
-
-<DL COMPACT>
-<DT><B>kill-line (C-k)</B>
-
-<DD>
-Kill the text from point to the end of the current line.
-With a negative numeric argument, kill backward from the cursor to the
-beginning of the line.
-<DT><B>backward-kill-line (C-x Rubout)</B>
-
-<DD>
-Kill backward to the beginning of the current line.
-With a negative numeric argument, kill forward from the cursor to the
-end of the line.
-<DT><B>unix-line-discard (C-u)</B>
-
-<DD>
-Kill backward from point to the beginning of the line,
-saving the killed text on the kill-ring.
-
-<DT><B>kill-whole-line</B>
-
-<DD>
-Kill all characters on the current line, no matter where point is.
-<DT><B>kill-word (M-d)</B>
-
-<DD>
-Kill from point to the end of the current word, or if between
-words, to the end of the next word.
-Word boundaries are the same as those used by <B>forward-word</B>.
-<DT><B>backward-kill-word (M-Rubout)</B>
-
-<DD>
-Kill the word behind point.
-Word boundaries are the same as those used by <B>backward-word</B>.
-<DT><B>shell-kill-word (M-C-d)</B>
-
-<DD>
-Kill from point to the end of the current word, or if between
-words, to the end of the next word.
-Word boundaries are the same as those used by <B>shell-forward-word</B>.
-<DT><B>shell-backward-kill-word</B>
-
-<DD>
-Kill the word behind point.
-Word boundaries are the same as those used by <B>shell-backward-word</B>.
-<DT><B>unix-word-rubout (C-w)</B>
-
-<DD>
-Kill the word behind point, using white space as a word boundary,
-saving the killed text on the kill-ring.
-<DT><B>unix-filename-rubout</B>
-
-<DD>
-Kill the word behind point, using white space and the slash character
-as the word boundaries,
-saving the killed text on the kill-ring.
-<DT><B>delete-horizontal-space (M-\)</B>
-
-<DD>
-Delete all spaces and tabs around point.
-<DT><B>kill-region</B>
-
-<DD>
-Kill the text in the current region.
-<DT><B>copy-region-as-kill</B>
-
-<DD>
-Copy the text in the region to the kill buffer,
-so it can be yanked immediately.
-<DT><B>copy-backward-word</B>
-
-<DD>
-Copy the word before point to the kill buffer.
-The word boundaries are the same as <B>backward-word</B>.
-<DT><B>copy-forward-word</B>
-
-<DD>
-Copy the word following point to the kill buffer.
-The word boundaries are the same as <B>forward-word</B>.
-<DT><B>yank (C-y)</B>
-
-<DD>
-Yank the top of the kill ring into the buffer at point.
-<DT><B>yank-pop (M-y)</B>
-
-<DD>
-Rotate the kill ring, and yank the new top.
-Only works following
-<B>yank</B>
-
-or
-<B>yank-pop</B>.
-
-
-</DL>
-<A NAME="lbCS"> </A>
-<H4>Numeric Arguments</H4>
-
-
-<DL COMPACT>
-<DT><B>digit-argument (M-0, M-1, </B>..., M--)
-
-<DD>
-Add this digit to the argument already accumulating, or start a new
-argument.
-M-- starts a negative argument.
-<DT><B>universal-argument</B>
-
-<DD>
-This is another way to specify an argument.
-If this command is followed by one or more digits, optionally with a
-leading minus sign, those digits define the argument.
-If the command is followed by digits, executing
-<B>universal-argument</B>
-
-again ends the numeric argument, but is otherwise ignored.
-As a special case, if this command is immediately followed by a
-character that is neither a digit nor minus sign,
-the argument count for the next command is multiplied by four.
-The argument count is initially one, so executing this function the
-first time makes the argument count four, a second time makes the
-argument count sixteen, and so on.
-
-</DL>
-<A NAME="lbCT"> </A>
-<H4>Completing</H4>
-
-
-<DL COMPACT>
-<DT><B>complete (TAB)</B>
-
-<DD>
-Attempt to perform completion on the text before point.
-<B>Bash</B>
-
-attempts completion by first checking for any programmable
-completions for the command word (see <B>Programmable Completion</B> below),
-otherwise treating the text as a
-variable (if the text begins with <B>$</B>),
-username (if the text begins with <B>~</B>),
-hostname (if the text begins with <B>@</B>), or
-command (including aliases, functions, and builtins) in turn.
-If none of these produces a match, it falls back to filename completion.
-<DT><B>possible-completions (M-?)</B>
-
-<DD>
-List the possible completions of the text before point.
-When displaying completions, <B>readline</B> sets the number of columns used
-for display to the value of <B>completion-display-width</B>, the value of
-the shell variable
-<FONT SIZE=-1><B>COLUMNS</B>,
+<b>active−region−start−color</b> variable.
+The <b>enable−active−region readline</b>
+variable turns this on and off. Several commands set the
+region to active; those are noted below.</p>
-</FONT>
-or the screen width, in that order.
-<DT><B>insert-completions (M-*)</B>
+<h3>Commands for Moving
+<a name="Commands for Moving"></a>
+</h3>
-<DD>
-Insert all completions of the text before point
-that would have been generated by
-<B>possible-completions</B>,
-separated by a space.
-<DT><B>menu-complete</B>
-
-<DD>
-Similar to <B>complete</B>, but replaces the word to be completed
-with a single match from the list of possible completions.
-Repeatedly executing <B>menu-complete</B> steps through the list
-of possible completions, inserting each match in turn.
-At the end of the list of completions,
-<B>menu-complete</B> rings the bell
-(subject to the setting of <B>bell-style</B>)
-and restores the original text.
-An argument of <I>n</I> moves <I>n</I> positions forward in the list
-of matches; a negative argument moves backward through the list.
-This command is intended to be bound to <B>TAB</B>, but is unbound
-by default.
-<DT><B>menu-complete-backward</B>
-
-<DD>
-Identical to <B>menu-complete</B>, but moves backward through the list
-of possible completions, as if <B>menu-complete</B> had been given a
-negative argument.
-This command is unbound by default.
-<DT><B>export-completions</B>
-
-<DD>
-Perform completion on the word before point as described above
-and write the list of possible completions to <B>readline</B>'s output
-stream using the following format, writing information on separate lines:
-<DL COMPACT><DT><DD>
-
-<DL COMPACT>
-<DT>*<DD>
-
-the number of matches <I>N</I>;
-<DT>*<DD>
-the word being completed;
-<DT>*<DD>
-<I>S</I>:<I>E</I>,
-where <I>S</I> and <I>E</I> are the start and end offsets of the word
-in the <B>readline</B> line buffer; then
-<DT>*<DD>
-each match, one per line
-</DL></DL>
-
-
-<DT><DD>
-If there are no matches, the first line will be
-
-and this command does not print any output after the <I>S</I>:<I>E</I>.
-If there is only a single match, this prints a single line containing it.
-If there is more than one match, this prints the common prefix of the
-matches, which may be empty, on the first line after the <I>S</I>:<I>E</I>,
-then the matches on subsequent lines.
-In this case, <I>N</I> will include the first line with the common prefix.
-<DT><DD>
-The user or application
-should be able to accommodate the possibility of a blank line.
-The intent is that the user or application reads <I>N</I> lines after
-the line containing <I>S</I>:<I>E</I> to obtain the match list.
-This command is unbound by default.
-<DT><B>delete-char-or-list</B>
-
-<DD>
-Deletes the character under the cursor if not at the beginning or
-end of the line (like <B>delete-char</B>).
-At the end of the line, it behaves identically to <B>possible-completions</B>.
-This command is unbound by default.
-<DT><B>complete-filename (M-/)</B>
-
-<DD>
-Attempt filename completion on the text before point.
-<DT><B>possible-filename-completions (C-x /)</B>
-
-<DD>
-List the possible completions of the text before point,
-treating it as a filename.
-<DT><B>complete-username (M-~)</B>
-
-<DD>
-Attempt completion on the text before point, treating
-it as a username.
-<DT><B>possible-username-completions (C-x ~)</B>
-
-<DD>
-List the possible completions of the text before point,
-treating it as a username.
-<DT><B>complete-variable (M-$)</B>
-
-<DD>
-Attempt completion on the text before point, treating
-it as a shell variable.
-<DT><B>possible-variable-completions (C-x $)</B>
-
-<DD>
-List the possible completions of the text before point,
-treating it as a shell variable.
-<DT><B>complete-hostname (M-@)</B>
-
-<DD>
-Attempt completion on the text before point, treating
-it as a hostname.
-<DT><B>possible-hostname-completions (C-x @)</B>
-
-<DD>
-List the possible completions of the text before point,
-treating it as a hostname.
-<DT><B>complete-command (M-!)</B>
-
-<DD>
-Attempt completion on the text before point, treating
-it as a command name.
-Command completion attempts to
-match the text against aliases, reserved words, shell
-functions, shell builtins, and finally executable filenames,
-in that order.
-<DT><B>possible-command-completions (C-x !)</B>
-
-<DD>
-List the possible completions of the text before point,
-treating it as a command name.
-<DT><B>dynamic-complete-history (M-TAB)</B>
-
-<DD>
-Attempt completion on the text before point, comparing
-the text against history list entries for possible
-completion matches.
-<DT><B>dabbrev-expand</B>
-
-<DD>
-Attempt menu completion on the text before point, comparing
-the text against lines from the history list for possible
-completion matches.
-<DT><B>complete-into-braces (M-{)</B>
-
-<DD>
-Perform filename completion and insert the list of possible completions
-enclosed within braces so the list is available to the shell (see
-<B>Brace Expansion</B>
-
-above).
-
-</DL>
-<A NAME="lbCU"> </A>
-<H4>Keyboard Macros</H4>
-
-
-<DL COMPACT>
-<DT><B>start-kbd-macro (C-x ()</B>
-
-<DD>
-Begin saving the characters typed into the current keyboard macro.
-<DT><B>end-kbd-macro (C-x ))</B>
-
-<DD>
-Stop saving the characters typed into the current keyboard macro
-and store the definition.
-<DT><B>call-last-kbd-macro (C-x e)</B>
-
-<DD>
-Re-execute the last keyboard macro defined, by making the characters
-in the macro appear as if typed at the keyboard.
-<DT><B>print-last-kbd-macro ()</B>
-
-<DD>
-Print the last keyboard macro defined in a format suitable for the
-<I>inputrc</I> file.
-
-</DL>
-<A NAME="lbCV"> </A>
-<H4>Miscellaneous</H4>
-
-
-<DL COMPACT>
-<DT><B>re-read-init-file (C-x C-r)</B>
-
-<DD>
-Read in the contents of the <I>inputrc</I> file, and incorporate
-any bindings or variable assignments found there.
-<DT><B>abort (C-g)</B>
-
-<DD>
-Abort the current editing command and
-ring the terminal's bell (subject to the setting of
-<B>bell-style</B>).
-
-<DT><B>do-lowercase-version (M-A, M-B, M-</B><I>x</I>, ...)
-
-<DD>
-If the metafied character <I>x</I> is uppercase, run the command
-that is bound to the corresponding metafied lowercase character.
-The behavior is undefined if <I>x</I> is already lowercase.
-<DT><B>prefix-meta (ESC)</B>
-
-<DD>
-Metafy the next character typed.
-<FONT SIZE=-1><B>ESC</B>
-
-</FONT>
-<B>f</B>
-
-is equivalent to
-<B>Meta-f</B>.
-
-<DT><B>undo (C-_, C-x C-u)</B>
-
-<DD>
-Incremental undo, separately remembered for each line.
-<DT><B>revert-line (M-r)</B>
-
-<DD>
-Undo all changes made to this line.
-This is like executing the
-<B>undo</B>
-
-command enough times to return the line to its initial state.
-<DT><B>tilde-expand (M-&)</B>
-
-<DD>
-Perform tilde expansion on the current word.
-<DT><B>set-mark (C-@, M-<space>)</B>
-
-<DD>
-Set the mark to the point.
-If a numeric argument is supplied, set the mark to that position.
-<DT><B>exchange-point-and-mark (C-x C-x)</B>
-
-<DD>
-Swap the point with the mark.
-Set the current cursor position to the saved position,
-then set the mark to the old cursor position.
-<DT><B>character-search (C-])</B>
-
-<DD>
-Read a character and move point to the next occurrence of that character.
-A negative argument searches for previous occurrences.
-<DT><B>character-search-backward (M-C-])</B>
-
-<DD>
-Read a character and move point to the previous occurrence of that character.
-A negative argument searches for subsequent occurrences.
-<DT><B>skip-csi-sequence</B>
-
-<DD>
-Read enough characters to consume a multi-key sequence such as those
-defined for keys like Home and End.
-CSI sequences begin with a Control Sequence Indicator (CSI), usually
-<I>ESC [</I>.
-
-If this sequence is bound to
-
-keys producing CSI sequences have no effect
-unless explicitly bound to a <B>readline</B> command,
-instead of inserting stray characters into the editing buffer.
-This is unbound by default, but usually bound to
-<I>ESC [</I>.
-
-<DT><B>insert-comment (M-#)</B>
-
-<DD>
-Without a numeric argument, insert the value of the <B>readline</B>
-<B>comment-begin</B>
-
-variable at the beginning of the current line.
-If a numeric argument is supplied, this command acts as a toggle: if
-the characters at the beginning of the line do not match the value
-of <B>comment-begin</B>, insert the value; otherwise delete
-the characters in <B>comment-begin</B> from the beginning of the line.
-In either case, the line is accepted as if a newline had been typed.
-The default value of
-<B>comment-begin</B> causes this command to make the current line
-a shell comment.
-If a numeric argument causes the comment character to be removed, the line
-will be executed by the shell.
-<DT><B>spell-correct-word (C-x s)</B>
-
-<DD>
-Perform spelling correction on the current word, treating it as a directory
-or filename, in the same way as the <B>cdspell</B> shell option.
-Word boundaries are the same as those used by <B>shell-forward-word</B>.
-<DT><B>glob-complete-word (M-g)</B>
-
-<DD>
-Treat the word before point as a pattern for pathname expansion,
-with an asterisk implicitly appended, then use the pattern to
-generate a list of matching file names for possible completions.
-<DT><B>glob-expand-word (C-x *)</B>
-
-<DD>
-Treat the word before point as a pattern for pathname expansion,
-and insert the list of matching file names, replacing the word.
-If a numeric argument is supplied, append a <B>*</B> before
-pathname expansion.
-<DT><B>glob-list-expansions (C-x g)</B>
-
-<DD>
-Display the list of expansions that would have been generated by
-<B>glob-expand-word</B>
-
-and redisplay the line.
-If a numeric argument is supplied, append a <B>*</B> before
-pathname expansion.
-<DT><B>dump-functions</B>
-
-<DD>
-Print all of the functions and their key bindings
-to the <B>readline</B> output stream.
-If a numeric argument is supplied,
-the output is formatted in such a way that it can be made part
-of an <I>inputrc</I> file.
-<DT><B>dump-variables</B>
-
-<DD>
-Print all of the settable <B>readline</B> variables and their values
-to the <B>readline</B> output stream.
-If a numeric argument is supplied,
-the output is formatted in such a way that it can be made part
-of an <I>inputrc</I> file.
-<DT><B>dump-macros</B>
-
-<DD>
-Print all of the <B>readline</B> key sequences bound to macros and the
-strings they output
-to the <B>readline</B> output stream.
-If a numeric argument is supplied,
-the output is formatted in such a way that it can be made part
-of an <I>inputrc</I> file.
-<DT><B>execute-named-command (M-x)</B>
-
-<DD>
-Read a bindable <B>readline</B> command name from the input and execute the
-function to which it's bound, as if the key sequence to which it was
-bound appeared in the input.
-If this function is supplied with a numeric argument, it passes that
-argument to the function it executes.
-<DT><B>display-shell-version (C-x C-v)</B>
-
-<DD>
-Display version information about the current instance of
-<B>bash</B>.
-
-
-</DL>
-<A NAME="lbCW"> </A>
-<H4>Programmable Completion</H4>
-
-When a user attempts word completion
-for a command or an argument to a command for
-which a completion specification (a <I>compspec</I>) has been defined
-using the <B>complete</B> builtin
-(see
-<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
-
-</FONT>
-below),
-<B>readline</B> invokes the programmable completion facilities.
-<P>
-
-First, <B>bash</B> identifies the command name.
-If a compspec has been defined for that command, the
-compspec is used to generate the list of possible completions for the word.
-If the command word is the empty string (completion attempted at the
-beginning of an empty line), <B>bash</B> uses any compspec defined with
-the <B>-E</B> option to <B>complete</B>.
-The <B>-I</B> option to <B>complete</B>
-indicates that the command word is the first non-assignment word
-on the line, or after a command delimiter such as
-<B>;</B> or <B>|</B>.
-This usually indicates command name completion.
-<P>
-
-If the command word is a full pathname, <B>bash</B>
-searches for a compspec for the full pathname first.
-If there is no compspec for the full pathname, <B>bash</B> attempts to
-find a compspec for the portion following the final slash.
-If those searches do not result in a compspec,
-or if there is no compspec for the command word,
-<B>bash</B> uses any compspec defined with
-the <B>-D</B> option to <B>complete</B> as the default.
-If there is no default compspec, <B>bash</B> performs alias expansion
-on the command word as a final resort,
-and attempts to find a compspec for the command word
-resulting from any successful expansion.
-<P>
-
-If a compspec is not found, <B>bash</B> performs its default completion as
-described above under <B>Completing</B>.
-Otherwise, once a compspec has been found, <B>bash</B> uses it to generate
-the list of matching words.
-<P>
-
-First, <B>bash</B> performs the <I>actions</I> specified by the compspec.
-This only returns matches which are prefixes
-of the word being completed.
-When the
-<B>-f</B>
-
-or
-<B>-d</B>
-
-option is used for filename or directory name completion,
-<B>bash</B> uses the shell variable
-<FONT SIZE=-1><B>FIGNORE</B>
-
-</FONT>
-to filter the matches.
-<P>
-
-Next, programmable completion generates matches
-specified by a pathname expansion pattern
-supplied as an argument to the
-<B>-G</B> option.
-The words generated by the pattern need not match the word
-being completed.
-<B>Bash</B>
-uses the
-<FONT SIZE=-1><B>FIGNORE</B>
-
-</FONT>
-variable to filter the matches, but does not use the
-<FONT SIZE=-1><B>GLOBIGNORE</B>
-
-</FONT>
-shell variable.
-<P>
-
-Next, completion considers
-the string specified as the argument to the <B>-W</B> option.
-The string is first split using the characters in the
-<FONT SIZE=-1><B>IFS</B>
-
-</FONT>
-special variable as delimiters.
-This honors shell quoting within the string, in order to provide a
-mechanism for the words to contain shell metacharacters or characters
-in the value of
-<FONT SIZE=-1><B>IFS</B>.
-
-</FONT>
-Each word is then expanded using
-brace expansion, tilde expansion, parameter and variable expansion,
-command substitution, and arithmetic expansion,
-as described above under
-<FONT SIZE=-1><B>EXPANSION</B>.
-
-</FONT>
-The results are split using the rules described above under
-<B>Word Splitting</B>.
-The results of the expansion are prefix-matched against the word being
-completed, and the matching words become possible completions.
-<P>
-
-After these matches have been generated,
-<B>bash</B> executes any shell function or command
-specified with the <B>-F</B> and <B>-C</B> options.
-When the command or function is invoked, <B>bash</B>
-assigns values to the
-<FONT SIZE=-1><B>COMP_LINE</B>,
-
-</FONT>
-<FONT SIZE=-1><B>COMP_POINT</B>,
-
-</FONT>
-<FONT SIZE=-1><B>COMP_KEY</B>,
-
-</FONT>
-and
-<FONT SIZE=-1><B>COMP_TYPE</B>
-
-</FONT>
-variables as described above
-under <B>Shell Variables</B>.
-If a shell function is being invoked, <B>bash</B>
-also sets the
-<FONT SIZE=-1><B>COMP_WORDS</B>
-
-</FONT>
-and
-<FONT SIZE=-1><B>COMP_CWORD</B>
-
-</FONT>
-variables.
-When the function or command is invoked,
-the first argument (<B>$1</B>) is the name of the command whose arguments
-are being completed,
-the second argument (<B>$2</B>) is the word being completed,
-and the third argument (<B>$3</B>) is the word preceding the word being
-completed on the current command line.
-There is no filtering of the generated completions against the
-word being completed;
-the function or command has complete freedom in generating the matches
-and they do not need to match a prefix of the word.
-<P>
-
-Any function specified with <B>-F</B> is invoked first.
-The function may use any of the shell facilities, including the
-<B>compgen</B> and <B>compopt</B>
-builtins described below, to generate the matches.
-It must put the possible completions in the
-<FONT SIZE=-1><B>COMPREPLY</B>
-
-</FONT>
-array variable, one per array element.
-<P>
-
-Next, any command specified with the <B>-C</B> option is invoked
-in an environment equivalent to command substitution.
-It should print a list of completions, one per line, to the
-standard output.
-Backslash will escape a newline, if necessary.
-These are added to the set of possible completions.
-<P>
-
-External commands that are invoked to generate completions (
-
-receive the word preceding the completion word as an argument,
-as described above.
-This provides context that is sometimes useful, but may include
-information that is considered sensitive or part of a word expansion
-that will not appear in the command line after expansion.
-That word may be visible in process listings or in audit logs.
-This may be a concern to users and completion specification authors
-if there is sensitive information on the command line before
-expansion, since completion takes place before words are expanded.
-If this is an issue, completion authors should use functions as
-wrappers around external commands and pass context information to the
-external command in a different way.
-External completers can infer context from the
-<FONT SIZE=-1><B>COMP_LINE</B>
-
-</FONT>
-and
-<FONT SIZE=-1><B>COMP_POINT</B>
-
-</FONT>
-environment variables, but they need to ensure
-they break words in the same way <B>readline</B> does, using the
-<FONT SIZE=-1><B>COMP_WORDBREAKS</B>
-
-</FONT>
-variable.
-<P>
-
-After generating all of the possible completions,
-<B>bash</B> applies any filter
-specified with the <B>-X</B> option to the completions in the list.
-The filter is a pattern as used for pathname expansion; a <B>&</B>
-in the pattern is replaced with the text of the word being completed.
-A literal <B>&</B> may be escaped with a backslash; the backslash
-is removed before attempting a match.
-Any completion that matches the pattern is removed from the list.
-A leading <B>!</B> negates the pattern;
-in this case <B>bash</B> removes
-any completion that does not match the pattern.
-If the
-<B>nocasematch</B>
-
-shell option is enabled,
-<B>bash</B> performs the match without regard to the case
-of alphabetic characters.
-<P>
-
-Finally, programmable completion adds
-any prefix and suffix specified with the
-<B>-P</B> and <B>-S</B>
-options, respectively, to each completion,
-and returns the result
-to <B>readline</B> as the list of possible completions.
-<P>
-
-If the previously-applied actions do not generate any matches, and the
-<B>-o dirnames</B> option was supplied to <B>complete</B> when the
-compspec was defined, <B>bash</B> attempts directory name completion.
-<P>
-
-If the <B>-o plusdirs</B> option was supplied to <B>complete</B> when the
-compspec was defined, <B>bash</B> attempts directory name completion and
-adds any matches to the set of possible completions.
-<P>
-
-By default, if a compspec is found, whatever it generates is returned
-to the completion code as the full set of possible completions.
-The default <B>bash</B> completions and the <B>readline</B>
-default of filename completion are disabled.
-If the <B>-o bashdefault</B> option was supplied to <B>complete</B> when
-the compspec was defined,
-and the compspec generates no matches,
-<B>bash</B> attempts its default completions.
-If the compspec and, if attempted, the default <B>bash</B> completions
-generate no matches,
-and the <B>-o default</B> option was supplied to
-<B>complete</B> when the compspec was defined,
-programmable completion performs <B>readline</B>'s default completion.
-<P>
-
-The options supplied to <B>complete</B> and <B>compopt</B>
-can control how <B>readline</B> treats the completions.
-For instance, the <I>-o fullquote</I> option tells <B>readline</B>
-to quote the matches as if they were filenames.
-See the description of <B>complete</B> below
-for details.
-<P>
-
-When a compspec indicates that it wants directory name completion,
-the programmable completion functions force <B>readline</B>
-to append a slash to completed names which are symbolic links
-to directories, subject to the value of the
-<B>mark-directories</B> <B>readline</B> variable,
-regardless of the setting of the
-<B>mark-symlinked-directories</B> <B>readline</B> variable.
-<P>
-
-There is some support for dynamically modifying completions.
-This is most useful when used in combination with a default completion
-specified with <B>complete -D</B>.
-It's possible for shell functions executed as completion functions
-to indicate that completion should be retried by returning an
-exit status of 124.
-If a shell function returns 124, and changes
-the compspec associated with the command on which completion is being
-attempted (supplied as the first argument when the function is executed),
-programmable completion restarts from the beginning, with an
-attempt to find a new compspec for that command.
-This can be used to build a set of completions dynamically
-as completion is attempted, rather than loading them all at once.
-<P>
-
-For instance, assuming that there is a library of compspecs, each kept in a
-file corresponding to the name of the command, the following default
-completion function would load completions dynamically:
-<DL COMPACT><DT><DD>
-
-<PRE>
-_completion_loader()
-{
- . "
-/etc/bash_completion.d/$1.sh"
-
-\
-<BR>
-
-<BR>
-
->/dev/null 2>&1 && return 124
-}
-complete -D -F _completion_loader
-\
-<BR>
-
-<BR>
-
--o bashdefault -o default
-</PRE>
-
-
-</DL>
-
-<A NAME="lbCX"> </A>
-<H3>HISTORY</H3>
-
-When the
-<B>-o history</B>
-
-option to the
-<B>set</B>
-
-builtin is enabled, the shell provides access to the
-<I>command history</I>,
-the list of commands previously typed.
-The value of the
-<FONT SIZE=-1><B>HISTSIZE</B>
-
-</FONT>
-variable is used as the
-number of commands to save in a history list:
-the shell saves the text of the last
-<FONT SIZE=-1><B>HISTSIZE</B>
-
-</FONT>
-commands (default 500).
-The shell stores each command in the history list prior to
-parameter and variable expansion (see
-<FONT SIZE=-1><B>EXPANSION</B>
-
-</FONT>
-above) but after history expansion is performed, subject to the
-values of the shell variables
-<FONT SIZE=-1><B>HISTIGNORE</B>
-
-</FONT>
-and
-<FONT SIZE=-1><B>HISTCONTROL</B>.
-
-</FONT>
-<P>
-
-On startup, <B>bash</B> initializes the history list
-by reading history entries from the
-file named by the
-<FONT SIZE=-1><B>HISTFILE</B>
-
-</FONT>
-variable (default
-
-<A HREF="file:~/.bash_history"><I>~/.bash_history</I></A>).
-
-That file is referred to as the <I>history file</I>.
-The history file is truncated, if necessary,
-to contain no more than the number of history entries
-specified by the value of the
-<FONT SIZE=-1><B>HISTFILESIZE</B>
-
-</FONT>
-variable.
-If
-<FONT SIZE=-1><B>HISTFILESIZE</B>
-
-</FONT>
-is unset, or set to null, a non-numeric value,
-or a numeric value less than zero, the history file is not truncated.
-<P>
-
-When the history file is read,
-lines beginning with the history comment character followed immediately
-by a digit are interpreted as timestamps for the following history line.
-These timestamps are optionally displayed depending on the value of the
-<FONT SIZE=-1><B>HISTTIMEFORMAT</B>
-
-</FONT>
-variable.
-When present, history timestamps delimit history entries, making
-multi-line entries possible.
-<P>
-
-When a shell with history enabled exits, <B>bash</B> copies the last
-<FONT SIZE=-1><B>$HISTSIZE</B>
-
-</FONT>
-entries from the history list to
-<FONT SIZE=-1><B>$HISTFILE</B>.
-
-</FONT>
-If the
-<B>histappend</B>
-
-shell option is enabled
-(see the description of
-<B>shopt</B>
-
-under
-<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
-
-</FONT>
-below), <B>bash</B> appends the entries to the history file,
-otherwise it overwrites the history file.
-If
-<FONT SIZE=-1><B>HISTFILE</B>
-
-</FONT>
-is unset or null,
-or if the history file is unwritable, the history is not saved.
-After saving the history, <B>bash</B> truncates the history file
-to contain no more than
-<FONT SIZE=-1><B>HISTFILESIZE</B>
-
-</FONT>
-lines as described above.
-<P>
-
-If the
-<FONT SIZE=-1><B>HISTTIMEFORMAT</B>
-
-</FONT>
-variable is set, the shell writes
-the timestamp information
-associated with each history entry to the history file,
-marked with the history comment character, so
-timestamps are preserved across shell sessions.
-This uses the history comment character to distinguish timestamps from
-other history lines.
-As above, when using
-<FONT SIZE=-1><B>HISTTIMEFORMAT</B>,
-
-</FONT>
-the timestamps delimit multi-line history entries.
-<P>
-
-The
-<B>fc</B>
-
-builtin command (see
-<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
-
-</FONT>
-below) will list or edit and re-execute a portion of the history list.
-The
-<B>history</B>
-
-builtin can display or modify the history list and
-manipulate the history file.
-When using command-line editing, search commands
-are available in each editing mode that provide access to the
-history list.
-<P>
-
-The shell allows control over which commands are saved on the history list.
-The
-<FONT SIZE=-1><B>HISTCONTROL</B>
-
-</FONT>
-and
-<FONT SIZE=-1><B>HISTIGNORE</B>
-
-</FONT>
-variables are used to save only a subset of the commands entered.
-If the
-<B>cmdhist</B>
-shell option is enabled, the shell attempts to save each
-line of a multi-line command in the same history entry, adding
-semicolons where necessary to preserve syntactic correctness.
-The
-<B>lithist</B>
-
-shell option modifies <B>cmdhist</B> by saving
-the command with embedded newlines instead of semicolons.
-See the description of the
-<B>shopt</B>
-
-builtin below under
-<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
-
-</FONT>
-for information on setting and unsetting shell options.
-<A NAME="lbCY"> </A>
-<H3>HISTORY EXPANSION</H3>
-
-The shell supports a history expansion feature that
-is similar to the history expansion in
-<B>csh</B>.
-
-This section describes what syntax features are available.
-<P>
-
-History expansion is enabled by default for interactive shells,
-and can be disabled using the
-<B>+H</B>
-
-option to the
-<B>set</B>
-
-builtin command (see
-<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
-
-</FONT>
-below).
-Non-interactive shells do not perform history expansion by default,
-but it can be enabled with
-
-<P>
-
-History expansions introduce words from the history list into
-the input stream, making it easy to repeat commands, insert the
-arguments to a previous command into the current input line, or
-fix errors in previous commands quickly.
-<P>
-
-History expansion is performed immediately after a complete line
-is read, before the shell breaks it into words, and is performed
-on each line individually.
-The shell attempts to inform the history
-expansion functions about quoting still in effect from previous lines.
-<P>
-
-It takes place in two parts.
-The first is to determine which history list entry
-to use during substitution.
-The second is to select portions of that entry to include into
-the current one.
-<P>
-
-The entry selected from the history is the <I>event</I>,
-and the portions of that entry that are acted upon are <I>words</I>.
-Various <I>modifiers</I> are available to manipulate the selected words.
-The entry is split into words in the same fashion as when reading input,
-so that several <I>metacharacter</I>-separated words surrounded by
-quotes are considered one word.
-The <I>event designator</I> selects the event, the optional
-<I>word designator</I> selects words from the event, and
-various optional <I>modifiers</I> are available to manipulate the
-selected words.
-<P>
-
-History expansions are introduced by the appearance of the
-history expansion character, which is <B>!</B> by default.
-History expansions may appear anywhere in the input, but do not nest.
-<P>
-
-Only backslash (<B>\</B>) and single quotes can quote
-the history expansion character, but the history expansion character is
-also treated as quoted if it immediately precedes the closing double quote
-in a double-quoted string.
-<P>
-
-Several characters inhibit history expansion if found immediately
-following the history expansion character, even if it is unquoted:
-space, tab, newline, carriage return, <B>=</B>,
-and the other shell metacharacters defined above.
-<P>
-
-There is a special abbreviation for substitution, active when the
-<I>quick substitution</I> character (described above under
-<B>histchars</B>)
-
-is the first character on the line.
-It selects the previous history list entry, using an event designator
-equivalent to <B>!!</B>,
-and substitutes one string for another in that entry.
-It is described below under <B>Event Designators</B>.
-This is the only history expansion that does not begin with the history
-expansion character.
-<P>
-
-Several shell options settable with the
-<B>shopt</B>
-
-builtin will modify history expansion behavior
-(see the description of the
-<B>shopt</B>
-
-builtin below).and
-If the
-<B>histverify</B>
-
-shell option is enabled, and
-<B>readline</B>
-
-is being used, history substitutions are not immediately passed to
-the shell parser.
-Instead, the expanded line is reloaded into the
-<B>readline</B>
-
-editing buffer for further modification.
-If
-<B>readline</B>
-
-is being used, and the
-<B>histreedit</B>
-
-shell option is enabled, a failed history substitution is reloaded
-into the
-<B>readline</B>
-
-editing buffer for correction.
-<P>
-
-The
-<B>-p</B>
-
-option to the
-<B>history</B>
-
-builtin command shows what a history expansion will
-do before using it.
-The
-<B>-s</B>
-
-option to the
-<B>history</B>
-
-builtin will add commands to the end of the history list
-without actually executing them, so that they are available for
-subsequent recall.
-<P>
-
-The shell allows control of the various characters used by the
-history expansion mechanism (see the description of
-<B>histchars</B>
-
-above under
-<B>Shell Variables</B>).
-
-The shell uses
-the history comment character to mark history timestamps when
-writing the history file.
-<A NAME="lbCZ"> </A>
-<H4>Event Designators</H4>
-
-An event designator is a reference to an entry in the history list.
-The event designator
-consists of the portion of the word beginning with the history
-expansion character and ending with the word designator if present,
-or the end of the word.
-Unless the reference is absolute, events are relative to the current
-position in the history list.
-<P>
+<p style="margin-left:9%; margin-top: 1em"><b>beginning−of−line
+(C−a)</b></p>
-<DL COMPACT>
-<DT><B>!</B>
+<p style="margin-left:18%;">Move to the start of the
+current line. This may also be bound to the Home key on some
+keyboards.</p>
-<DD>
-Start a history substitution, except when followed by a
-<B>blank</B>,
+<p style="margin-left:9%;"><b>end−of−line
+(C−e)</b></p>
-newline, carriage return, =,
-or, when the <B>extglob</B> shell option is enabled using
-the <B>shopt</B> builtin, (.
-<DT><B>!</B><I>n</I>
+<p style="margin-left:18%;">Move to the end of the line.
+This may also be bound to the End key on some keyboards.</p>
-<DD>
-Refer to history list entry
-<I>n</I>.
+<p style="margin-left:9%;"><b>forward−char
+(C−f)</b></p>
-<DT><B>!-</B><I>n</I>
+<p style="margin-left:18%;">Move forward a character. This
+may also be bound to the right arrow key on some
+keyboards.</p>
-<DD>
-Refer to the current entry minus
-<I>n</I>.
+<p style="margin-left:9%;"><b>backward−char
+(C−b)</b></p>
-<DT><B>!!</B>
+<p style="margin-left:18%;">Move back a character. This may
+also be bound to the left arrow key on some keyboards.</p>
-<DD>
-Refer to the previous entry.
-This is a synonym for
+<p style="margin-left:9%;"><b>forward−word
+(M−f)</b></p>
-<DT><B>!</B><I>string</I>
+<p style="margin-left:18%;">Move forward to the end of the
+next word. Words are composed of alphanumeric characters
+(letters and digits).</p>
-<DD>
-Refer to the most recent command preceding the current position in the
-history list starting with
-<I>string</I>.
+<p style="margin-left:9%;"><b>backward−word
+(M−b)</b></p>
-<DT><B>!?</B><I>string</I><B>[?]</B>
+<p style="margin-left:18%;">Move back to the start of the
+current or previous word. Words are composed of alphanumeric
+characters (letters and digits).</p>
-<DD>
-Refer to the most recent command preceding the current position in the
-history list containing
-<I>string</I>.
-The trailing <B>?</B> may be omitted if
-<I>string</I>
+<p style="margin-left:9%;"><b>shell−forward−word
+(M−C−f)</b></p>
-is followed immediately by a newline.
-If <I>string</I> is missing, this uses
-the string from the most recent search;
-it is an error if there is no previous search string.
-<DT><B></B><FONT SIZE=+2><B>^</B></FONT><B></B><I>string1</I><FONT SIZE=+2>^</FONT><I>string2</I><FONT SIZE=+2>^</FONT>
+<p style="margin-left:18%;">Move forward to the end of the
+next word. Words are delimited by non-quoted shell
+metacharacters.</p>
-<DD>
-Quick substitution.
-Repeat the previous command, replacing
-<I>string1</I>
-with
-<I>string2</I>.
+<p style="margin-left:9%;"><b>shell−backward−word
+(M−C−b)</b></p>
-Equivalent to
+<p style="margin-left:18%;">Move back to the start of the
+current or previous word. Words are delimited by non-quoted
+shell metacharacters.</p>
-(see <B>Modifiers</B> below).
-<DT><B>!#</B>
-<DD>
-The entire command line typed so far.
+<p style="margin-left:9%;"><b>previous−screen−line</b></p>
-</DL>
-<A NAME="lbDA"> </A>
-<H4>Word Designators</H4>
+<p style="margin-left:18%;">Attempt to move point to the
+same physical screen column on the previous physical screen
+line. This will not have the desired effect if the current
+<b>readline</b> line does not take up more than one physical
+line or if point is not greater than the length of the
+prompt plus the screen width.</p>
-Word designators are used to select desired words from the event.
-They are optional; if the word designator isn't supplied, the history
-expansion uses the entire event.
-A
-<B>:</B>
-separates the event specification from the word designator.
-It may be omitted if the word designator begins with a
-<B>^</B>,
+<p style="margin-left:9%;"><b>next−screen−line</b></p>
-<B>$</B>,
+<p style="margin-left:18%;">Attempt to move point to the
+same physical screen column on the next physical screen
+line. This will not have the desired effect if the current
+<b>readline</b> line does not take up more than one physical
+line or if the length of the current <b>readline</b> line is
+not greater than the length of the prompt plus the screen
+width.</p>
-<B>*</B>,
+<p style="margin-left:9%;"><b>clear−display
+(M−C−l)</b></p>
-<B>-</B>,
+<p style="margin-left:18%;">Clear the screen and, if
+possible, the terminal’s scrollback buffer, then
+redraw the current line, leaving the current line at the top
+of the screen.</p>
-or
-<B>%</B>.
+<p style="margin-left:9%;"><b>clear−screen
+(C−l)</b></p>
-Words are numbered from the beginning of the line,
-with the first word being denoted by 0 (zero).
-Words are inserted into the current line separated by single spaces.
-<P>
+<p style="margin-left:18%;">Clear the screen, then redraw
+the current line, leaving the current line at the top of the
+screen. With a numeric argument, refresh the current line
+without clearing the screen.</p>
-<DL COMPACT>
-<DT><B>0 (zero)</B>
+<p style="margin-left:9%;"><b>redraw−current−line</b></p>
-<DD>
-The zeroth word.
-For the shell, this is the command word.
-<DT><I>n</I>
+<p style="margin-left:18%;">Refresh the current line.</p>
-<DD>
-The <I>n</I>th word.
-<DT><B>^</B>
+<h3>Commands for Manipulating the History
+<a name="Commands for Manipulating the History"></a>
+</h3>
-<DD>
-The first argument: word 1.
-<DT><B>$</B>
-<DD>
-The last word.
-This is usually the last argument, but will expand to the
-zeroth word if there is only one word in the line.
-<DT><B>%</B>
-<DD>
-The first word matched by the most recent
+<p style="margin-left:9%; margin-top: 1em"><b>accept−line
+(Newline, Return)</b></p>
-search,
-if the search string begins with a character that is part of a word.
-By default, searches begin at the end of each line and proceed to the
-beginning, so the first word matched is the one closest to the end of
-the line.
-<DT><I>x</I><B>-</B>y
+<p style="margin-left:18%;">Accept the line regardless of
+where the cursor is. If this line is non-empty, add it to
+the history list according to the state of the
+<b><small>HISTCONTROL</small></b> and <b>HISTIGNORE</b>
+variables. If the line is a modified history line, restore
+the history line to its original state.</p>
-<DD>
-A range of words;
+<p style="margin-left:9%;"><b>previous−history
+(C−p)</b></p>
-abbreviates
+<p style="margin-left:18%;">Fetch the previous command from
+the history list, moving back in the list. This may also be
+bound to the up arrow key on some keyboards.</p>
-<DT><B>*</B>
+<p style="margin-left:9%;"><b>next−history
+(C−n)</b></p>
-<DD>
-All of the words but the zeroth.
-This is a synonym for
+<p style="margin-left:18%;">Fetch the next command from the
+history list, moving forward in the list. This may also be
+bound to the down arrow key on some keyboards.</p>
-It is not an error to use
-<B>*</B>
-if there is just one word in the event;
-it expands to the empty string in that case.
-<DT><B>x*</B>
+<p style="margin-left:9%;"><b>beginning−of−history
+(M−<)</b></p>
-<DD>
-Abbreviates <I>x-$</I>.
-<DT><B>x-</B>
+<p style="margin-left:18%;">Move to the first line in the
+history.</p>
-<DD>
-Abbreviates <I>x-$</I> like <B>x*</B>, but omits the last word.
-If <B>x</B> is missing, it defaults to 0.
+<p style="margin-left:9%;"><b>end−of−history
+(M−>)</b></p>
-</DL>
-<P>
+<p style="margin-left:18%;">Move to the end of the input
+history, i.e., the line currently being entered.</p>
-If a word designator is supplied without an event specification, the
-previous command is used as the event, equivalent to <B>!!</B>.
-<A NAME="lbDB"> </A>
-<H4>Modifiers</H4>
-After the optional word designator, the expansion may include a
-sequence of one or more of the following modifiers, each preceded by a
+<p style="margin-left:9%;"><b>operate−and−get−next
+(C−o)</b></p>
-These modify, or edit, the word or words selected from the history event.
-<P>
+<p style="margin-left:18%;">Accept the current line for
+execution as if a newline had been entered, and fetch the
+next line relative to the current line from the history for
+editing. A numeric argument, if supplied, specifies the
+history entry to use instead of the current line.</p>
+<p style="margin-left:9%;"><b>fetch−history</b></p>
-<DL COMPACT>
-<DT><B>h</B>
+<p style="margin-left:18%;">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.</p>
-<DD>
-Remove a trailing pathname component, leaving only the head.
-<DT><B>t</B>
-<DD>
-Remove all leading pathname components, leaving the tail.
-<DT><B>r</B>
+<p style="margin-left:9%;"><b>reverse−search−history
+(C−r)</b></p>
-<DD>
-Remove a trailing suffix of the form <I>.xxx</I>, leaving the
-basename.
-<DT><B>e</B>
+<p style="margin-left:18%;">Search backward starting at the
+current line and moving “up” through the history
+as necessary. This is an incremental search. This command
+sets the region to the matched text and activates the
+region.</p>
-<DD>
-Remove all but the trailing suffix.
-<DT><B>p</B>
-<DD>
-Print the new command but do not execute it.
-<DT><B>q</B>
+<p style="margin-left:9%;"><b>forward−search−history
+(C−s)</b></p>
-<DD>
-Quote the substituted words, escaping further substitutions.
-<DT><B>x</B>
+<p style="margin-left:18%;">Search forward starting at the
+current line and moving “down” through the
+history as necessary. This is an incremental search. This
+command sets the region to the matched text and activates
+the region.</p>
-<DD>
-Quote the substituted words as with
-<B>q</B>,
-but break into words at
-<B>blanks</B>
+<p style="margin-left:9%;"><b>non−incremental−reverse−search−history
+(M−p)</b></p>
-and newlines.
-The <B>q</B> and <B>x</B> modifiers are mutually exclusive;
-expansion uses the last one supplied.
-<DT><B>s/</B><I>old</I>/<I>new</I>/
+<p style="margin-left:18%;">Search backward through the
+history starting at the current line using a non-incremental
+search for a string supplied by the user. The search string
+may match anywhere in a history line.</p>
-<DD>
-Substitute
-<I>new</I>
-for the first occurrence of
-<I>old</I>
+<p style="margin-left:9%;"><b>non−incremental−forward−search−history
+(M−n)</b></p>
-in the event line.
-Any character may be used as the delimiter in place of /.
-The final delimiter is optional if it is the last character of the
-event line.
-A single backslash quotes the delimiter in
-<I>old</I>
+<p style="margin-left:18%;">Search forward through the
+history using a non-incremental search for a string supplied
+by the user. The search string may match anywhere in a
+history line.</p>
-and
-<I>new</I>.
-If & appears in
-<I>new</I>,
+<p style="margin-left:9%;"><b>history−search−backward</b></p>
-it is replaced with
-<I>old</I>.
+<p style="margin-left:18%;">Search backward through the
+history for the string of characters between the start of
+the current line and the point. The search string must match
+at the beginning of a history line. This is a
+non-incremental search. This may be bound to the Page Up key
+on some keyboards.</p>
-A single backslash quotes the &.
-If
-<I>old</I>
-is null, it is set to the last
-<I>old</I>
+<p style="margin-left:9%;"><b>history−search−forward</b></p>
-substituted, or, if no previous history substitutions took place,
-the last
-<I>string</I>
+<p style="margin-left:18%;">Search forward through the
+history for the string of characters between the start of
+the current line and the point. The search string must match
+at the beginning of a history line. This is a
+non-incremental search. This may be bound to the Page Down
+key on some keyboards.</p>
-in a
-<B>!?</B><I>string</I>[?]
-search.
-If
-<I>new</I>
+<p style="margin-left:9%;"><b>history−substring−search−backward</b></p>
-is null, each matching
-<I>old</I>
+<p style="margin-left:18%;">Search backward through the
+history for the string of characters between the start of
+the current line and the point. The search string may match
+anywhere in a history line. This is a non-incremental
+search.</p>
-is deleted.
-<DT><B>&</B>
-<DD>
-Repeat the previous substitution.
-<DT><B>g</B>
+<p style="margin-left:9%;"><b>history−substring−search−forward</b></p>
-<DD>
-Cause changes to be applied over the entire event line.
-This is used in conjunction with
+<p style="margin-left:18%;">Search forward through the
+history for the string of characters between the start of
+the current line and the point. The search string may match
+anywhere in a history line. This is a non-incremental
+search.</p>
-(e.g.,
+<p style="margin-left:9%;"><b>yank−nth−arg
+(M−C−y)</b></p>
-or
+<p style="margin-left:18%;">Insert the first argument to
+the previous command (usually the second word on the
+previous line) at point. With an argument <i>n</i>, insert
+the <i>n</i>th word from the previous command (the words in
+the previous command begin with word 0). A negative argument
+inserts the <i>n</i>th word from the end of the previous
+command. Once the argument <i>n</i> is computed, this uses
+the history expansion facilities to extract the <i>n</i>th
+word, as if the “!<i>n</i>” history expansion
+had been specified.</p>
-If used with
+<p style="margin-left:9%;"><b>yank−last−arg
+(M−., M−_)</b></p>
-any delimiter can be used in place of /,
-and the final delimiter is optional
-if it is the last character of the event line.
-An <B>a</B> may be used as a synonym for <B>g</B>.
-<DT><B>G</B>
+<p style="margin-left:18%;">Insert the last argument to the
+previous command (the last word of the previous history
+entry). With a numeric argument, behave exactly like
+<b>yank−nth−arg</b>. Successive calls to
+<b>yank−last−arg</b> move back through the
+history list, inserting the last word (or the word specified
+by the argument to the first call) of each line in turn. Any
+numeric argument supplied to these successive calls
+determines the direction to move through the history. A
+negative argument switches the direction through the history
+(back or forward). This uses the history expansion
+facilities to extract the last word, as if the
+“!$” history expansion had been specified.</p>
-<DD>
-Apply the following
-or
+<p style="margin-left:9%;"><b>shell−expand−line
+(M−C−e)</b></p>
-modifier once to each word in the event line.
+<p style="margin-left:18%;">Expand the line by performing
+shell word expansions. This performs alias and history
+expansion, <b>$</b>'<i>string</i>' and
+<b>$</b>"<i>string</i>" quoting, tilde expansion,
+parameter and variable expansion, arithmetic expansion,
+command and process substitution, word splitting, and quote
+removal. An explicit argument suppresses command and process
+substitution. See <b><small>HISTORY EXPANSION</small></b>
+below for a description of history expansion.</p>
-</DL>
-<A NAME="lbDC"> </A>
-<H3>SHELL BUILTIN COMMANDS</H3>
+<p style="margin-left:9%;"><b>history−expand−line
+(M−^)</b></p>
+<p style="margin-left:18%;">Perform history expansion on
+the current line. See <b><small>HISTORY
+EXPANSION</small></b> below for a description of history
+expansion.</p>
-<P>
+<p style="margin-left:9%;"><b>magic−space</b></p>
-Unless otherwise noted, each builtin command documented in this
-section as accepting options preceded by
-<B>-</B>
+<p style="margin-left:18%;">Perform history expansion on
+the current line and insert a space. See <b><small>HISTORY
+EXPANSION</small></b> below for a description of history
+expansion.</p>
-accepts
-<B>--</B>
-to signify the end of the options.
-The <B>:</B>, <B>true</B>, <B>false</B>, and <B>test</B>/<B>[</B> builtins
-do not accept options and do not treat <B>--</B> specially.
-The <B>exit</B>, <B>logout</B>, <B>return</B>,
-<B>break</B>, <B>continue</B>, <B>let</B>,
-and <B>shift</B> builtins accept and process arguments beginning with
-<B>-</B> without requiring <B>--</B>.
-Other builtins that accept arguments but are not specified as accepting
-options interpret arguments beginning with <B>-</B> as invalid options and
-require <B>--</B> to prevent this interpretation.
-<P>
+<p style="margin-left:9%;"><b>alias−expand−line</b></p>
+<p style="margin-left:18%;">Perform alias expansion on the
+current line. See <b><small>ALIASES</small></b> above for a
+description of alias expansion.</p>
-<DL COMPACT>
-<DT><B>:</B> [<I>arguments</I>]<DD>
-No effect; the command does nothing beyond expanding
-<I>arguments</I>
+<p style="margin-left:9%;"><b>history−and−alias−expand−line</b></p>
-and performing any specified
-redirections.
-The return status is zero.
-<DT><B>.</B> [<B>-p</B> <I>path</I>] <I>filename</I> [<I>arguments</I>]<DD>
+<p style="margin-left:18%;">Perform history and alias
+expansion on the current line.</p>
-<DT><B>source</B> [<B>-p</B> <I>path</I>] <I>filename</I> [<I>arguments</I>]<DD>
-The <B>.</B> command (<B>source</B>) reads and execute commands from
-<I>filename</I>
+<p style="margin-left:9%;"><b>insert−last−argument
+(M−., M−_)</b></p>
-in the current shell environment and returns the exit status of the
-last command executed from
-<I>filename</I>.
+<p style="margin-left:18%;">A synonym for
+<b>yank−last−arg</b>.</p>
-<DT><DD>
-If <I>filename</I> does not contain a slash, <B>.</B> searches for it.
-If the <B>-p</B> option is supplied, <B>.</B> treats <I>path</I>
-as a colon-separated list of directories in which to find <I>filename</I>;
-otherwise, <B>.</B> uses the entries in
-<FONT SIZE=-1><B>PATH</B>
-</FONT>
-to find the directory containing
-<I>filename</I>.
+<p style="margin-left:9%;"><b>edit−and−execute−command
+(C−x C−e)</b></p>
-<I>filename</I> does not need to be executable.
-When <B>bash</B> is not in posix mode, it searches
-the current directory if <I>filename</I> is not found in
-<FONT SIZE=-1><B>PATH</B>,
+<p style="margin-left:18%;">Invoke an editor on the current
+command line, and execute the result as shell commands.
+<b>Bash</b> attempts to invoke
+<b><small>$VISUAL</small></b><small>,
+<b>$EDITOR</b>,</small> and <i>emacs</i> as the editor, in
+that order.</p>
-</FONT>
-but does not search the current directory if <B>-p</B> is supplied.
-If the
-<B>sourcepath</B>
+<h3>Commands for Changing Text
+<a name="Commands for Changing Text"></a>
+</h3>
-option to the
-<B>shopt</B>
-builtin command is turned off, <B>.</B> does not search
-<FONT SIZE=-1><B>PATH</B>.
-</FONT>
-<DT><DD>
-If any <I>arguments</I> are supplied, they become the positional
-parameters when <I>filename</I> is executed.
-Otherwise the positional parameters are unchanged.
-<DT><DD>
-If the <B>-T</B> option is enabled, <B>.</B> inherits any trap on
-<B>DEBUG</B>; if it is not, any <B>DEBUG</B> trap string is saved and
-restored around the call to <B>.</B>, and <B>.</B> unsets the
-<B>DEBUG</B> trap while it executes.
-If <B>-T</B> is not set, and the sourced file changes
-the <B>DEBUG</B> trap, the new value persists after <B>.</B> completes.
-The return status is the status of the last command executed from
-<I>filename</I> (0 if no commands are executed), and non-zero if
-<I>filename</I>
-
-is not found or cannot be read.
-<DT><B>alias</B> [<B>-p</B>] [<I>name</I>[=<I>value</I>] ...]<DD>
-With no arguments or with the
-<B>-p</B>
-
-option, <B>alias</B> prints the list of aliases in the form
-<B>alias</B> <I>name</I>=<I>value</I> on standard output.
-When arguments are supplied, define an alias for
-each <I>name</I> whose <I>value</I> is given.
-A trailing space in <I>value</I> causes the next word to be
-checked for alias substitution when the alias is expanded
-during command parsing.
-For each <I>name</I> in the argument list for which no <I>value</I>
-is supplied, print the name and value of the alias <I>name</I>.
-<B>alias</B> returns true unless a <I>name</I> is given
-(without a corresponding =<I>value</I>)
-for which no alias has been defined.
-<DT><B>bg</B> [<I>jobspec</I> ...]<DD>
-Resume each suspended job <I>jobspec</I> in the background, as if it
-had been started with
-<B>&</B>.
-
-If
-<I>jobspec</I>
-
-is not present, the shell uses its notion of the <I>current job</I>.
-<B>bg</B>
-
-<I>jobspec</I>
-
-returns 0 unless run when job control is disabled or, when run with
-job control enabled, any specified <I>jobspec</I> was not found
-or was started without job control.
-<DT><B>bind</B> [<B>-m</B> <I>keymap</I>] [<B>-lsvSVX</B>]<DD>
-
-<DT><B>bind</B> [<B>-m</B> <I>keymap</I>] [<B>-q</B> <I>function</I>] [<B>-u</B> <I>function</I>] [<B>-r</B> <I>keyseq</I>]<DD>
-<DT><B>bind</B> [<B>-m</B> <I>keymap</I>] <B>-f</B> <I>filename</I><DD>
-<DT><B>bind</B> [<B>-m</B> <I>keymap</I>] <B>-x</B> <I>keyseq</I>[:] <I>shell-command</I><DD>
-<DT><B>bind</B> [<B>-m</B> <I>keymap</I>] <I>keyseq</I>:<I>function-name</I><DD>
-<DT><B>bind</B> [<B>-m</B> <I>keymap</I>] <B>-p</B>|<B>-P</B> [<I>readline-command</I>]<DD>
-<DT><B>bind</B> [<B>-m</B> <I>keymap</I>] <I>keyseq</I>:<I>readline-command</I><DD>
-<DT><B>bind</B> <I>readline-command-line</I><DD>
-
-Display current
-<B>readline</B>
+<p style="margin-left:9%; margin-top: 1em"><i>end−of−file</i>
+<b>(usually C−d)</b></p>
-key and function bindings, bind a key sequence to a
-<B>readline</B>
-
-function or macro
-or to a shell command, or set a
-<B>readline</B>
-
-variable.
-Each non-option argument is a key binding or command as it would appear in a
-<B>readline</B>
-
-initialization file such as
-<I>.inputrc</I>,
-
-but each binding or command must be passed as a separate argument;
-e.g., '"
-\C-x\C-r"
-: re-read-init-file'.
-In the following descriptions, output available to be re-read is formatted
-as commands that would appear in a
-<B>readline</B>
-
-initialization file or that would be supplied as individual arguments to a
-<B>bind</B>
-
-command.
-Options, if supplied, have the following meanings:
-<DL COMPACT><DT><DD>
-
-<DL COMPACT>
-<DT><B>-m </B><I>keymap</I>
-
-<DD>
-Use
-<I>keymap</I>
-
-as the keymap to be affected by the subsequent bindings.
-Acceptable
-<I>keymap</I>
-
-names are
-<I>emacs, emacs-standard, emacs-meta, emacs-ctlx, vi,
-vi-move, vi-command</I>, and
-<I>vi-insert</I>.
-
-<I>vi</I> is equivalent to <I>vi-command</I>
-(<I>vi-move</I> is also a synonym);
-<I>emacs</I> is equivalent to <I>emacs-standard</I>.
-<DT><B>-l</B>
-
-<DD>
-List the names of all <B>readline</B> functions.
-<DT><B>-p</B>
-
-<DD>
-Display <B>readline</B> function names and bindings in such a way
-that they can be
-used as an argument to a subsequent
-<B>bind</B> command or in a <B>readline</B> initialization file.
-If arguments remain after option processing, <B>bind</B> treats
-them as <B>readline</B> command names and restricts output to those names.
-<DT><B>-P</B>
-
-<DD>
-List current <B>readline</B> function names and bindings.
-If arguments remain after option processing, <B>bind</B> treats
-them as <B>readline</B> command names and restricts output to those names.
-<DT><B>-s</B>
-
-<DD>
-Display <B>readline</B> key sequences bound to macros and the strings
-they output in such a way that they can be used
-as an argument to a subsequent <B>bind</B> command
-or in a <B>readline</B> initialization file.
-<DT><B>-S</B>
-
-<DD>
-Display <B>readline</B> key sequences bound to macros and the strings
-they output.
-<DT><B>-v</B>
-
-<DD>
-Display <B>readline</B> variable names and values in such a way that they
-can be
-used as an argument to a subsequent
-<B>bind</B> command or in a <B>readline</B> initialization file.
-<DT><B>-V</B>
-
-<DD>
-List current <B>readline</B> variable names and values.
-<DT><B>-f </B><I>filename</I>
-
-<DD>
-Read key bindings from <I>filename</I>.
-<DT><B>-q </B><I>function</I>
-
-<DD>
-Display key sequences that invoke the named <B>readline</B> <I>function</I>.
-<DT><B>-u </B><I>function</I>
-
-<DD>
-Unbind all key sequences bound to the named <B>readline</B> <I>function</I>.
-<DT><B>-r </B><I>keyseq</I>
-
-<DD>
-Remove any current binding for <I>keyseq</I>.
-<DT><B>-x </B><I>keyseq</I>[: ]<I>shell-command</I>
-
-<DD>
-Cause <I>shell-command</I> to be executed whenever <I>keyseq</I> is
-entered.
-The separator between <I>keyseq</I> and <I>shell-command</I> is either
-whitespace or a colon optionally followed by whitespace.
-If the separator is whitespace, <I>shell-command</I>
-must be enclosed in double quotes and <B>readline</B> expands any of its
-special backslash-escapes in <I>shell-command</I> before saving it.
-If the separator is a colon, any enclosing double quotes are optional, and
-<B>readline</B> does not expand the command string before saving it.
-Since the entire key binding expression must be a single argument, it
-should be enclosed in single quotes.
-When <I>shell-command</I> is executed, the shell sets the
-<FONT SIZE=-1><B>READLINE_LINE</B>
-
-</FONT>
-variable to the contents of the <B>readline</B> line buffer and the
-<FONT SIZE=-1><B>READLINE_POINT</B>
-
-</FONT>
-and
-<FONT SIZE=-1><B>READLINE_MARK</B>
-
-</FONT>
-variables to the current location of the insertion point and the saved
-insertion point (the mark), respectively.
-The shell assigns any numeric argument the user supplied to the
-<FONT SIZE=-1><B>READLINE_ARGUMENT</B>
-
-</FONT>
-variable.
-If there was no argument, that variable is not set.
-If the executed command changes the value of any of
-<FONT SIZE=-1><B>READLINE_LINE</B>,
-
-</FONT>
-<FONT SIZE=-1><B>READLINE_POINT</B>,
-
-</FONT>
-or
-<FONT SIZE=-1><B>READLINE_MARK</B>,
-
-</FONT>
-those new values will be reflected in the editing state.
-<DT><B>-X</B>
-
-<DD>
-List all key sequences bound to shell commands and the associated commands
-in a format that can be reused as
-an argument to a subsequent <B>bind</B> command.
-
-</DL>
-<P>
-
-The return value is 0 unless an unrecognized option is supplied or an
-error occurred.
-</DL>
-
-<DT><B>break</B> [<I>n</I>]<DD>
-Exit from within a
-<B>for</B>,
-
-<B>while</B>,
-
-<B>until</B>,
-
-or
-<B>select</B>
-
-loop.
-If <I>n</I> is specified, <B>break</B> exits <I>n</I> enclosing loops.
-<I>n</I>
-
-must be >= 1. If
-<I>n</I>
-
-is greater than the number of enclosing loops, all enclosing loops
-are exited.
-The return value is 0 unless <I>n</I> is not greater than or equal to 1.
-<DT><B>builtin</B> <I>shell-builtin</I> [<I>arguments</I>]<DD>
-Execute the specified shell builtin <I>shell-builtin</I>, passing it
-<I>arguments</I>,
-
-and return its exit status.
-This is useful when defining a
-function whose name is the same as a shell builtin,
-retaining the functionality of the builtin within the function.
-The <B>cd</B> builtin is commonly redefined this way.
-The return status is false if
-<I>shell-builtin</I>
-
-is not a shell builtin command.
-<DT><B>caller</B> [<I>expr</I>]<DD>
-Returns the context of any active subroutine call (a shell function or
-a script executed with the <B>.</B> or <B>source</B> builtins).
-<DT><DD>
-Without <I>expr</I>, <B>caller</B> displays the line number and source
-filename of the current subroutine call.
-If a non-negative integer is supplied as <I>expr</I>, <B>caller</B>
-displays the line number, subroutine name, and source file corresponding
-to that position in the current execution call stack.
-This extra information may be used, for example, to print a stack trace.
-The current frame is frame 0.
-<DT><DD>
-The return value is 0 unless the shell is not executing a subroutine
-call or <I>expr</I> does not correspond to a valid position in the
-call stack.
-<DT>
-<DD>
-<B>cd</B> [<B>-L</B>] [<B>-@</B>] [<I>dir</I>]
-<DT><B>cd</B> <B>-P</B> [<B>-e</B>] [<B>-@</B>] [<I>dir</I>]<DD>
-
-Change the current directory to <I>dir</I>.
-if <I>dir</I> is not supplied, the value of the
-<FONT SIZE=-1><B>HOME</B>
-
-</FONT>
-shell variable is used as <I>dir</I>.
-If <I>dir</I> is the empty string, <B>cd</B> treats it as an error.
-The variable
-<FONT SIZE=-1><B>CDPATH</B>
-
-</FONT>
-exists,
-and <I>dir</I> does not begin with a slash (/),
-<B>cd</B> uses it as a search path:
-the shell searches each directory name in
-<FONT SIZE=-1><B>CDPATH</B>
-
-</FONT>
-for <I>dir</I>.
-Alternative directory names in
-<FONT SIZE=-1><B>CDPATH</B>
-
-</FONT>
-are separated by a colon (:).
-A null directory name in
-<FONT SIZE=-1><B>CDPATH</B>
-
-</FONT>
-is the same as the current directory, i.e.,
-
-<DT><DD>
-The
-<B>-P</B>
-
-option causes <B>cd</B> to use the physical directory structure
-by resolving symbolic links while traversing <I>dir</I> and
-before processing instances of
-
-<I>..</I>
-
-in <I>dir</I> (see also the
-<B>-P</B>
-
-option to the
-<B>set</B>
-
-builtin command).
-<DT><DD>
-The
-<B>-L</B>
-
-option forces <B>cd</B> to follow symbolic links by resolving the link
-after processing instances of
-
-<I>..</I>
-
-in <I>dir</I>.
-If
-
-<I>..</I>
-
-appears in <I>dir</I>, <B>cd</B> processes it by removing the
-immediately previous pathname component from <I>dir</I>, back to a slash
-or the beginning of <I>dir</I>,
-and verifying that the portion of <I>dir</I> it has processed to
-that point is still a valid directory name after removing the pathname
-component.
-If it is not a valid directory name, <B>cd</B> returns a non-zero status.
-If neither
-<B>-L</B>
-
-nor
-<B>-P</B>
-
-is supplied,
-<B>cd</B>
-
-behaves as if
-<B>-L</B>
-
-had been supplied.
-<DT><DD>
-If the
-<B>-e</B>
-
-option is supplied with
-<B>-P</B>,
-
-and <B>cd</B> cannot successfully determine the current working directory
-after a successful directory change, it returns a non-zero status.
-<DT><DD>
-On systems that support it, the <B>-@</B> option presents the extended
-attributes associated with a file as a directory.
-<DT><DD>
-An argument of
-<B>-</B>
+<p style="margin-left:18%;">The character indicating
+end-of-file as set, for example, by <i>stty</i>(1). If this
+character is read when there are no characters on the line,
+and point is at the beginning of the line, <b>readline</b>
+interprets it as the end of input and returns
+<b><small>EOF</small></b><small>.</small></p>
-is converted to
-<FONT SIZE=-1><B>$OLDPWD</B>
+<p style="margin-left:9%;"><b>delete−char
+(C−d)</b></p>
-</FONT>
-before attempting the directory change.
-<DT><DD>
-If <B>cd</B> uses a non-empty directory name from
-<FONT SIZE=-1><B>CDPATH</B>,
+<p style="margin-left:18%;">Delete the character at point.
+If this function is bound to the same character as the tty
+<b>EOF</b> character, as <b>C−d</b> commonly is, see
+above for the effects. This may also be bound to the Delete
+key on some keyboards.</p>
-</FONT>
-or if <B>-</B> is the first argument, and the directory change is
-successful, <B>cd</B> writes the absolute pathname of the new
-working directory to the standard output.
-<DT><DD>
-If the directory change is successful, <B>cd</B> sets the value of the
-<B>PWD</B> environment variable to the new directory name, and sets the
-<B>OLDPWD</B> environment variable to the value of the current working
-directory before the change.
-<DT><DD>
-The return value is true if the directory was successfully changed;
-false otherwise.
-<DT><B>command</B> [<B>-pVv</B>] <I>command</I> [<I>arg</I> ...]<DD>
-The <B>command</B> builtin runs
-<I>command</I>
-
-with
-<I>args</I>
-
-suppressing the normal shell function lookup for <I>command</I>.
-Only builtin commands or commands found in the
-<FONT SIZE=-1><B>PATH</B>
-
-</FONT>
-named <I>command</I> are executed.
-If the
-<B>-p</B>
-
-option is supplied, the search for
-<I>command</I>
-
-is performed using a default value for
-<FONT SIZE=-1><B>PATH</B>
-
-</FONT>
-that is guaranteed to find all of the standard utilities.
-<DT><DD>
-If either the
-<B>-V</B>
-
-or
-<B>-v</B>
-
-option is supplied, <B>command</B> prints a description of
-<I>command</I>.
-
-The
-<B>-v</B>
-
-option displays a single word indicating the command or filename
-used to invoke
-<I>command</I>;
-
-the
-<B>-V</B>
-
-option produces a more verbose description.
-<DT><DD>
-If the
-<B>-V</B>
-
-or
-<B>-v</B>
-
-option is supplied, the exit status is zero if
-<I>command</I>
-
-was found, and non-zero if not.
-If neither option is supplied and an error occurred or
-<I>command</I>
-
-cannot be found, the exit status is 127.
-Otherwise, the exit status of the
-<B>command</B>
-
-builtin is the exit status of
-<I>command</I>.
-
-<DT><B>compgen</B> [<B>-V</B> <I>varname</I>] [<I>option</I>] [<I>word</I>]<DD>
-Generate possible completion matches for <I>word</I> according to
-the <I>option</I>s, which may be any option accepted by the
-<B>complete</B>
-
-builtin with the exceptions of
-<B>-p</B>,
-
-<B>-r</B>,
-
-<B>-D</B>,
-
-<B>-E</B>,
-
-and
-<B>-I</B>,
-
-and write the matches to the standard output.
-<DT><DD>
-If the <B>-V</B> option is supplied, <B>compgen</B> stores the generated
-completions into the indexed array variable <I>varname</I> instead of writing
-them to the standard output.
-<DT><DD>
-When using the <B>-F</B> or <B>-C</B> options, the various shell variables
-set by the programmable completion facilities, while available, will not
-have useful values.
-<DT><DD>
-The matches will be generated in the same way as if the programmable
-completion code had generated them directly from a completion specification
-with the same flags.
-If <I>word</I> is specified, only those completions matching <I>word</I>
-will be displayed or stored.
-<DT><DD>
-The return value is true unless an invalid option is supplied, or no
-matches were generated.
-<DT><B>complete</B> [<B>-abcdefgjksuv</B>] [<B>-o</B> <I>comp-option</I>] [<B>-DEI</B>] [<B>-A</B> <I>action</I>]<DD>
-<BR>
-
-[<B>-G</B> <I>globpat</I>] [<B>-W</B> <I>wordlist</I>] [<B>-F</B> <I>function</I>] [<B>-C</B> <I>command</I>]
-<BR>
-
-[<B>-X</B> <I>filterpat</I>] [<B>-P</B> <I>prefix</I>] [<B>-S</B> <I>suffix</I>] <I>name</I> [<I>name</I> ...]
-
-<DT><B>complete</B> <B>-pr</B> [<B>-DEI</B>] [<I>name</I> ...]<DD>
-
-Specify how arguments to each <I>name</I> should be completed.
-<DT><DD>
-If the <B>-p</B> option is supplied, or if no options or <I>name</I>s
-are supplied, print existing completion specifications
-in a way that allows them to be reused as input.
-The <B>-r</B> option removes a completion specification for
-each <I>name</I>, or, if no <I>name</I>s are supplied, all
-completion specifications.
-<DT><DD>
-The <B>-D</B> option indicates that other supplied options and actions should
-apply to the
-
-command completion; that is, completion attempted
-on a command for which no completion has previously been defined.
-The <B>-E</B> option indicates that other supplied options and actions should
-apply to
-command completion; that is, completion attempted on a
-blank line.
-The <B>-I</B> option indicates that other supplied options and actions should
-apply to completion on the initial non-assignment word on the line, or after
-a command delimiter such as <B>;</B> or <B>|</B>, which is usually command
-name completion.
-If multiple options are supplied, the <B>-D</B> option takes precedence
-over <B>-E</B>, and both take precedence over <B>-I</B>.
-If any of <B>-D</B>, <B>-E</B>, or <B>-I</B> are supplied, any other
-<I>name</I> arguments are ignored; these completions only apply to the case
-specified by the option.
-<DT><DD>
-The process of applying these completion specifications when
-attempting word completion is described
-
-above under <B>Programmable Completion</B>.
-<DT><DD>
-Other options, if specified, have the following meanings.
-The arguments to the <B>-G</B>, <B>-W</B>, and <B>-X</B> options
-(and, if necessary, the <B>-P</B> and <B>-S</B> options)
-should be quoted to protect them from expansion before the
-<B>complete</B>
-
-builtin is invoked.
-<DT><DD>
-<DL COMPACT><DT><DD>
-
-<DL COMPACT>
-<DT><B>-o</B> <I>comp-option</I><DD>
-The <I>comp-option</I> controls several aspects of the compspec's behavior
-beyond the simple generation of completions.
-<I>comp-option</I> may be one of:
-<DL COMPACT><DT><DD>
-<DL COMPACT>
-<DT><B>bashdefault</B>
-
-<DD>
-Perform the rest of the default <B>bash</B> completions if the compspec
-generates no matches.
-<DT><B>default</B>
-
-<DD>
-Use <B>readline</B>'s default filename completion if the compspec generates
-no matches.
-<DT><B>dirnames</B>
-
-<DD>
-Perform directory name completion if the compspec generates no matches.
-<DT><B>filenames</B>
-
-<DD>
-Tell <B>readline</B> that the compspec generates filenames, so it can perform
-any filename-specific processing (such as adding a slash to directory names,
-quoting special characters, or suppressing trailing spaces).
-This is intended to be used with shell functions.
-<DT><B>fullquote</B>
-
-<DD>
-Tell <B>readline</B> to quote all the completed words even if they are not
-filenames.
-<DT><B>noquote</B>
-
-<DD>
-Tell <B>readline</B> not to quote the completed words if they are filenames
-(quoting filenames is the default).
-<DT><B>nosort</B>
-
-<DD>
-Tell <B>readline</B> not to sort the list of possible completions
-alphabetically.
-<DT><B>nospace</B>
-
-<DD>
-Tell <B>readline</B> not to append a space (the default) to words completed
-at the end of the line.
-<DT><B>plusdirs</B>
-
-<DD>
-After generating any matches defined by the compspec,
-attempt directory name completion and add any
-matches to the results of the other actions.
-</DL></DL>
-
-<DT><B>-A</B> <I>action</I><DD>
-The <I>action</I> may be one of the following to generate a list of possible
-completions:
-<DL COMPACT><DT><DD>
-<DL COMPACT>
-<DT><B>alias</B>
-
-<DD>
-Alias names.
-May also be specified as <B>-a</B>.
-<DT><B>arrayvar</B>
-
-<DD>
-Array variable names.
-<DT><B>binding</B>
-
-<DD>
-<B>Readline</B> key binding names.
-<DT><B>builtin</B>
-
-<DD>
-Names of shell builtin commands.
-May also be specified as <B>-b</B>.
-<DT><B>command</B>
-
-<DD>
-Command names.
-May also be specified as <B>-c</B>.
-<DT><B>directory</B>
-
-<DD>
-Directory names.
-May also be specified as <B>-d</B>.
-<DT><B>disabled</B>
-
-<DD>
-Names of disabled shell builtins.
-<DT><B>enabled</B>
-
-<DD>
-Names of enabled shell builtins.
-<DT><B>export</B>
-
-<DD>
-Names of exported shell variables.
-May also be specified as <B>-e</B>.
-<DT><B>file</B>
-
-<DD>
-File and directory names, similar to <B>readline</B>'s filename completion.
-May also be specified as <B>-f</B>.
-<DT><B>function</B>
-
-<DD>
-Names of shell functions.
-<DT><B>group</B>
-
-<DD>
-Group names.
-May also be specified as <B>-g</B>.
-<DT><B>helptopic</B>
-
-<DD>
-Help topics as accepted by the <B>help</B> builtin.
-<DT><B>hostname</B>
-
-<DD>
-Hostnames, as taken from the file specified by the
-<FONT SIZE=-1><B>HOSTFILE</B>
-
-</FONT>
-shell variable.
-<DT><B>job</B>
-
-<DD>
-Job names, if job control is active.
-May also be specified as <B>-j</B>.
-<DT><B>keyword</B>
-
-<DD>
-Shell reserved words.
-May also be specified as <B>-k</B>.
-<DT><B>running</B>
-
-<DD>
-Names of running jobs, if job control is active.
-<DT><B>service</B>
-
-<DD>
-Service names.
-May also be specified as <B>-s</B>.
-<DT><B>setopt</B>
-
-<DD>
-Valid arguments for the <B>-o</B> option to the <B>set</B> builtin.
-<DT><B>shopt</B>
-
-<DD>
-Shell option names as accepted by the <B>shopt</B> builtin.
-<DT><B>signal</B>
-
-<DD>
-Signal names.
-<DT><B>stopped</B>
-
-<DD>
-Names of stopped jobs, if job control is active.
-<DT><B>user</B>
-
-<DD>
-User names.
-May also be specified as <B>-u</B>.
-<DT><B>variable</B>
-
-<DD>
-Names of all shell variables.
-May also be specified as <B>-v</B>.
-</DL></DL>
-
-<DT><B>-C</B> <I>command</I><DD>
-<I>command</I> is executed in a subshell environment, and its output is
-used as the possible completions.
-Arguments are passed as with the <B>-F</B> option.
-<DT><B>-F</B> <I>function</I><DD>
-The shell function <I>function</I> is executed in the current shell
-environment.
-When the function is executed,
-the first argument (<B>$1</B>) is the name of the command whose arguments are
-being completed,
-the second argument (<B>$2</B>) is the word being completed, and
-the third argument (<B>$3</B>) is the word preceding the word being
-completed on the current command line.
-When <I>function</I> finishes,
-programmable completion retrieves
-the possible completions from the value of the
-<FONT SIZE=-1><B>COMPREPLY</B>
-
-</FONT>
-array variable.
-<DT><B>-G</B> <I>globpat</I><DD>
-Expand the pathname expansion pattern <I>globpat</I> to generate
-the possible completions.
-<DT><B>-P</B> <I>prefix</I><DD>
-Add <I>prefix</I> to the beginning of each possible completion
-after all other options have been applied.
-<DT><B>-S</B> <I>suffix</I><DD>
-Append <I>suffix</I> to each possible completion
-after all other options have been applied.
-<DT><B>-W</B> <I>wordlist</I><DD>
-Split the <I>wordlist</I> using the characters in the
-<FONT SIZE=-1><B>IFS</B>
-
-</FONT>
-special variable as delimiters, and expand each resulting word.
-Shell quoting is honored within <I>wordlist</I>,
-in order to provide a
-mechanism for the words to contain shell metacharacters or characters
-in the value of
-<FONT SIZE=-1><B>IFS</B>.
-
-</FONT>
-The possible completions are the members of the resultant list which
-match a prefix of the word being completed.
-<DT><B>-X</B> <I>filterpat</I><DD>
-<I>filterpat</I> is a pattern as used for pathname expansion.
-It is applied to the list of possible completions generated by the
-preceding options and arguments, and each completion matching
-<I>filterpat</I> is removed from the list.
-A leading <B>!</B> in <I>filterpat</I> negates the pattern; in this
-case, any completion not matching <I>filterpat</I> is removed.
-
-</DL>
-<P>
-
-The return value is true unless an invalid option is supplied, an option
-other than
-<B>-p</B>,
-
-<B>-r</B>,
-
-<B>-D</B>,
-
-<B>-E</B>,
-
-or
-<B>-I</B>
-
-is supplied without a <I>name</I>
-argument, an attempt is made to remove a completion specification for
-a <I>name</I> for which no specification exists, or
-an error occurs adding a completion specification.
-</DL>
-
-<DT><B>compopt</B> [<B>-o</B> <I>option</I>] [<B>-DEI</B>] [<B>+o</B> <I>option</I>] [<I>name</I>]<DD>
-Modify completion options for each <I>name</I> according to the
-<I>option</I>s, or for the
-currently-executing completion if no <I>name</I>s are supplied.
-If no <I>option</I>s are supplied, display the completion options for each
-<I>name</I> or the current completion.
-The possible values of <I>option</I> are those valid for the <B>complete</B>
-builtin described above.
-<DT><DD>
-The <B>-D</B> option indicates that other supplied options should
-apply to the
-
-command completion;
-the <B>-E</B> option indicates that other supplied options should
-apply to
-
-command completion; and
-the <B>-I</B> option indicates that other supplied options should
-apply to completion on the initial word on the line.
-These are determined in the same way as the <B>complete</B> builtin.
-<DT><DD>
-If multiple options are supplied, the <B>-D</B> option takes precedence
-over <B>-E</B>, and both take precedence over <B>-I</B>.
-<DT><DD>
-The return value is true unless an invalid option is supplied, an attempt
-is made to modify the options for a <I>name</I> for which no completion
-specification exists, or an output error occurs.
-<DT><B>continue</B> [<I>n</I>]<DD>
-<B>continue</B> resumes the next iteration of the enclosing
-<B>for</B>,
-
-<B>while</B>,
-
-<B>until</B>,
-
-or
-<B>select</B>
-
-loop.
-If
-<I>n</I>
-
-is specified, <B>bash</B> resumes the <I>n</I>th enclosing loop.
-<I>n</I>
-
-must be >= 1.
-If
-<I>n</I>
-
-is greater than the number of enclosing loops, the shell resumes
-the last enclosing loop
-(the
-
-loop).
-The return value is 0 unless <I>n</I> is not greater than or equal to 1.
-<DT><B>declare</B> [<B>-aAfFgiIlnrtux</B>] [<B>-p</B>] [<I>name</I>[=<I>value</I>] ...]<DD>
-
-<DT><B>typeset</B> [<B>-aAfFgiIlnrtux</B>] [<B>-p</B>] [<I>name</I>[=<I>value</I>] ...]<DD>
-
-Declare variables and/or give them attributes.
-If no <I>name</I>s are given then display the values of variables
-or functions.
-The
-<B>-p</B>
+<p style="margin-left:9%;"><b>backward−delete−char
+(Rubout)</b></p>
-option will display the attributes and values of each
-<I>name</I>.
-
-When
-<B>-p</B>
-
-is used with <I>name</I> arguments, additional options,
-other than <B>-f</B> and <B>-F</B>, are ignored.
-<DT><DD>
-When
-<B>-p</B>
-
-is supplied without <I>name</I> arguments,
-<B>declare</B> will display the attributes and values
-of all variables having the attributes specified by the additional options.
-If no other options are supplied with <B>-p</B>, <B>declare</B> will
-display the attributes and values of all shell variables.
-The <B>-f</B> option restricts the display to shell functions.
-<DT><DD>
-The
-<B>-F</B>
-
-option inhibits the display of function definitions; only the
-function name and attributes are printed.
-If the <B>extdebug</B> shell option is enabled using <B>shopt</B>,
-the source file name and line number where each <I>name</I>
-is defined are displayed as well.
-The
-<B>-F</B>
-
-option implies
-<B>-f</B>.
-
-<DT><DD>
-The
-<B>-g</B>
-
-option forces variables to be created or modified at the global scope,
-even when <B>declare</B> is executed in a shell function.
-It is ignored when <B>declare</B> is not executed in a shell function.
-<DT><DD>
-The
-<B>-I</B>
-
-option causes local variables to inherit the attributes
-(except the <I>nameref</I> attribute)
-and value of any existing variable with the same
-<I>name</I> at a surrounding scope.
-If there is no existing variable, the local variable is initially unset.
-<DT><DD>
-The following options can
-be used to restrict output to variables with the specified attribute or
-to give variables attributes:
-<DL COMPACT><DT><DD>
-
-<DL COMPACT>
-<DT><B>-a</B>
-
-<DD>
-Each <I>name</I> is an indexed array variable (see
-<B>Arrays</B>
-
-
-above).
-<DT><B>-A</B>
-
-<DD>
-Each <I>name</I> is an associative array variable (see
-<B>Arrays</B>
-
-
-above).
-<DT><B>-f</B>
-
-<DD>
-Each <I>name</I> refers to a shell function.
-<DT><B>-i</B>
-
-<DD>
-The variable is treated as an integer;
-arithmetic evaluation (see
-<FONT SIZE=-1><B>ARITHMETIC EVALUATION</B>
-
-</FONT>
-
-above)
-is performed when the variable is assigned a value.
-<DT><B>-l</B>
-
-<DD>
-When the variable is assigned a value, all upper-case characters are
-converted to lower-case.
-The upper-case attribute is disabled.
-<DT><B>-n</B>
-
-<DD>
-Give each <I>name</I> the <I>nameref</I> attribute, making
-it a name reference to another variable.
-That other variable is defined by the value of <I>name</I>.
-All references, assignments, and attribute modifications
-to <I>name</I>, except those using or changing the
-<B>-n</B> attribute itself, are performed on the variable referenced by
-<I>name</I>'s value.
-The nameref attribute cannot be applied to array variables.
-<DT><B>-r</B>
-
-<DD>
-Make <I>name</I>s readonly.
-These names cannot then be assigned values
-by subsequent assignment statements or unset.
-<DT><B>-t</B>
-
-<DD>
-Give each <I>name</I> the <I>trace</I> attribute.
-Traced functions inherit the <B>DEBUG</B> and <B>RETURN</B> traps from
-the calling shell.
-The trace attribute has no special meaning for variables.
-<DT><B>-u</B>
-
-<DD>
-When the variable is assigned a value, all lower-case characters are
-converted to upper-case.
-The lower-case attribute is disabled.
-<DT><B>-x</B>
-
-<DD>
-Mark each <I>name</I> for export to subsequent commands via the environment.
-
-</DL>
-<P>
-
-Using
-
-instead of
-
-turns off the specified
-attribute instead, with the exceptions that <B>+a</B> and <B>+A</B>
-may not be used to destroy array variables and <B>+r</B> will not
-remove the readonly attribute.
-<P>
-
-When used in a function,
-<B>declare</B>
-
-and
-<B>typeset</B>
-
-make each
-<I>name</I> local, as with the
-<B>local</B>
-
-command,
-unless the <B>-g</B> option is supplied.
-If a variable name is followed by =<I>value</I>, the value of
-the variable is set to <I>value</I>.
-When using <B>-a</B> or <B>-A</B> and the compound assignment syntax to
-create array variables, additional attributes do not take effect until
-subsequent assignments.
-<P>
-
-The return value is 0 unless an invalid option is encountered,
-an attempt is made to define a function using
-
-an 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 (see
-<B>Arrays</B>
-
-
-above),
-one of the <I>names</I> 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 <B>-f</B>.
-</DL>
-
-<DT><B>dirs [-clpv</B>] [+<I>n</I>] [-<I>n</I>]
-
-<DD>
-Without options, display the list of currently remembered directories.
-The default display is on a single line with directory names separated
-by spaces.
-Directories are added to the list with the
-<B>pushd</B>
-
-command; the
-<B>popd</B>
-
-command removes entries from the list.
-The current directory is always the first directory in the stack.
-<DT><DD>
-Options, if supplied, have the following meanings:
-<DL COMPACT><DT><DD>
-
-<DL COMPACT>
-<DT><B>-c</B>
-
-<DD>
-Clears the directory stack by deleting all of the entries.
-<DT><B>-l</B>
-
-<DD>
-Produces a listing using full pathnames;
-the default listing format uses a tilde to denote the home directory.
-<DT><B>-p</B>
-
-<DD>
-Print the directory stack with one entry per line.
-<DT><B>-v</B>
-
-<DD>
-Print the directory stack with one entry per line,
-prefixing each entry with its index in the stack.
-<DT><B>+</B><I>n</I><DD>
-Displays the <I>n</I>th entry counting from the left of the list
-shown by
-<B>dirs</B>
-
-when invoked without options, starting with zero.
-<DT><B>-</B><I>n</I><DD>
-Displays the <I>n</I>th entry counting from the right of the list
-shown by
-<B>dirs</B>
-
-when invoked without options, starting with zero.
-
-</DL>
-<P>
-
-The return value is 0 unless an
-invalid option is supplied or <I>n</I> indexes beyond the end
-of the directory stack.
-</DL>
-
-<DT><B>disown</B> [<B>-ar</B>] [<B>-h</B>] [<I>id</I> ...]<DD>
-Without options, remove each
-<I>id</I>
-
-from the table of active jobs.
-Each <I>id</I> may be a job specification <I>jobspec</I>
-or a process ID <I>pid</I>;
-if <I>id</I> is a <I>pid</I>,
-<B>disown</B> uses the job containing <I>pid</I> as <I>jobspec</I>.
-<DT><DD>
-If the <B>-h</B> option is supplied,
-<B>disown</B> does not remove the jobs corresponding to each
-<I>id</I>
-
-from the jobs table,
-but rather marks them so the shell does not send
-<FONT SIZE=-1><B>SIGHUP</B>
-
-</FONT>
-to the job if the shell receives a
-<FONT SIZE=-1><B>SIGHUP</B>.
-
-</FONT>
-<DT><DD>
-If no
-<I>id</I>
-
-is supplied, the
-<B>-a</B>
-
-option means to remove or mark all jobs; the
-<B>-r</B>
-
-option without an
-<I>id</I>
-
-argument removes or marks running jobs.
-If no
-<I>id</I>
-
-is supplied, and neither the <B>-a</B> nor the <B>-r</B> option
-is supplied, <B>disown</B> removes or marks the current job.
-<DT><DD>
-The return value is 0 unless an
-<I>id</I>
-
-does not specify a valid job.
-<DT><B>echo</B> [<B>-neE</B>] [<I>arg</I> ...]<DD>
-Output the <I>arg</I>s, separated by spaces, followed by a newline.
-The return status is 0 unless a write error occurs.
-If <B>-n</B> is specified, the trailing newline is not printed.
-<DT><DD>
-If the <B>-e</B> option is given, <B>echo</B> interprets
-the following backslash-escaped characters.
-The
-<B>-E</B>
+<p style="margin-left:18%;">Delete the character behind the
+cursor. When given a numeric argument, save the deleted text
+on the kill ring.</p>
-option disables interpretation of these escape characters,
-even on systems where they are interpreted by default.
-The <B>xpg_echo</B> shell option determines
-whether or not <B>echo</B> interprets any options
-and expands these escape characters.
-<B>echo</B>
-does not interpret <B>--</B> to mean the end of options.
-<DT><DD>
-<B>echo</B>
+<p style="margin-left:9%;"><b>forward−backward−delete−char</b></p>
-interprets the following escape sequences:
-<DL COMPACT><DT><DD>
+<p style="margin-left:18%;">Delete the character under the
+cursor, unless the cursor is at the end of the line, in
+which case the character behind the cursor is deleted.</p>
-<DL COMPACT>
-<DT><B>\a</B>
+<p style="margin-left:9%;"><b>quoted−insert
+(C−q, C−v)</b></p>
-<DD>
-alert (bell)
-<DT><B>\b</B>
+<p style="margin-left:18%;">Add the next character typed to
+the line verbatim. This is how to insert characters like
+<b>C−q</b>, for example.</p>
-<DD>
-backspace
-<DT><B>\c</B>
+<p style="margin-left:9%;"><b>tab−insert (C−v
+TAB)</b></p>
-<DD>
-suppress further output
-<DT><B>\e</B>
+<p style="margin-left:18%;">Insert a tab character.</p>
-<DD>
-<DT><B>\E</B>
+<p style="margin-left:9%;"><b>self−insert (a, b, A,
+1, !,</b> ...<b>)</b></p>
-<DD>
-an escape character
-<DT><B>\f</B>
+<p style="margin-left:18%;">Insert the character typed.</p>
-<DD>
-form feed
-<DT><B>\n</B>
-<DD>
-new line
-<DT><B>\r</B>
+<p style="margin-left:9%;"><b>bracketed−paste−begin</b></p>
-<DD>
-carriage return
-<DT><B>\t</B>
+<p style="margin-left:18%;">This function is intended to be
+bound to the “bracketed paste” escape sequence
+sent by some terminals, and such a binding is assigned by
+default. It allows <b>readline</b> to insert the pasted text
+as a single unit without treating each character as if it
+had been read from the keyboard. The pasted characters are
+inserted as if each one was bound to
+<b>self−insert</b> instead of executing any editing
+commands. <br>
+Bracketed paste sets the region to the inserted text and
+activates the region.</p>
-<DD>
-horizontal tab
-<DT><B>\v</B>
+<p style="margin-left:9%;"><b>transpose−chars
+(C−t)</b></p>
-<DD>
-vertical tab
-<DT><B>\\</B>
+<p style="margin-left:18%;">Drag the character before point
+forward over the character at point, moving point forward as
+well. If point is at the end of the line, then this
+transposes the two characters before point. Negative
+arguments have no effect.</p>
-<DD>
-backslash
-<DT><B>\0</B><I>nnn</I>
+<p style="margin-left:9%;"><b>transpose−words
+(M−t)</b></p>
-<DD>
-The eight-bit character whose value is the octal value <I>nnn</I>
-(zero to three octal digits).
-<DT><B>\x</B><I>HH</I>
+<p style="margin-left:18%;">Drag the word before point past
+the word after point, moving point past that word as well.
+If point is at the end of the line, this transposes the last
+two words on the line.</p>
-<DD>
-The eight-bit character whose value is the hexadecimal value <I>HH</I>
-(one or two hex digits).
-<DT><B>\u</B><I>HHHH</I>
-<DD>
-The Unicode (ISO/IEC 10646) character whose value is the hexadecimal value
-<I>HHHH</I> (one to four hex digits).
-<DT><B>\U</B><I>HHHHHHHH</I>
+<p style="margin-left:9%;"><b>shell−transpose−words
+(M-C-t)</b></p>
-<DD>
-The Unicode (ISO/IEC 10646) character whose value is the hexadecimal value
-<I>HHHHHHHH</I> (one to eight hex digits).
+<p style="margin-left:18%;">Drag the word before point past
+the word after point, moving point past that word as well.
+If the insertion point is at the end of the line, this
+transposes the last two words on the line. Word boundaries
+are the same as <b>shell−forward−word</b> and
+<b>shell−backward−word</b>.</p>
-</DL>
-<P>
+<p style="margin-left:9%;"><b>upcase−word
+(M−u)</b></p>
-<B>echo</B> writes any unrecognized backslash-escaped characters unchanged.
-</DL>
+<p style="margin-left:18%;">Uppercase the current (or
+following) word. With a negative argument, uppercase the
+previous word, but do not move point.</p>
-<DT><B>enable</B> [<B>-a</B>] [<B>-dnps</B>] [<B>-f</B> <I>filename</I>] [<I>name</I> ...]<DD>
-Enable and disable builtin shell commands.
-Disabling a builtin allows an executable file which has the same name
-as a shell builtin to be executed without specifying a full pathname,
-even though the shell normally searches for builtins before files.
-<DT><DD>
-If <B>-n</B> is supplied, each <I>name</I> is disabled; otherwise,
-<I>name</I>s are enabled.
-For example, to use the
-<B>test</B>
+<p style="margin-left:9%;"><b>downcase−word
+(M−l)</b></p>
-binary found using
-<FONT SIZE=-1><B>PATH</B>
+<p style="margin-left:18%;">Lowercase the current (or
+following) word. With a negative argument, lowercase the
+previous word, but do not move point.</p>
-</FONT>
-instead of the shell builtin version, run
+<p style="margin-left:9%;"><b>capitalize−word
+(M−c)</b></p>
+<p style="margin-left:18%;">Capitalize the current (or
+following) word. With a negative argument, capitalize the
+previous word, but do not move point.</p>
-``enable -n test''.
+<p style="margin-left:9%;"><b>overwrite−mode</b></p>
+<p style="margin-left:18%;">Toggle overwrite mode. With an
+explicit positive numeric argument, switches to overwrite
+mode. With an explicit non-positive numeric argument,
+switches to insert mode. This command affects only
+<b>emacs</b> mode; <b>vi</b> mode does overwrite
+differently. Each call to <i>readline()</i> starts in insert
+mode. <br>
+In overwrite mode, characters bound to
+<b>self−insert</b> replace the text at point rather
+than pushing the text to the right. Characters bound to
+<b>backward−delete−char</b> replace the
+character before point with a space. By default, this
+command is unbound, but may be bound to the Insert key on
+some keyboards.</p>
+<h3>Killing and Yanking
+<a name="Killing and Yanking"></a>
+</h3>
+<p style="margin-left:9%; margin-top: 1em"><b>kill−line
+(C−k)</b></p>
-<DT><DD>
-If no <I>name</I> arguments are supplied, or if the
-<B>-p</B>
+<p style="margin-left:18%;">Kill the text from point to the
+end of the current line. With a negative numeric argument,
+kill backward from the cursor to the beginning of the
+line.</p>
-option is supplied, print a list of shell builtins.
-With no other option arguments, the list consists of all enabled
-shell builtins.
-If <B>-n</B> is supplied, print only disabled builtins.
-If <B>-a</B> is supplied, the list printed includes all builtins, with an
-indication of whether or not each is enabled.
-The <B>-s</B> option means to restrict the output to the
-<FONT SIZE=-1>POSIX</FONT>
-<I>special</I> builtins.
-<DT><DD>
-The
-<B>-f</B>
-option means to load the new builtin command
-<I>name</I>
+<p style="margin-left:9%;"><b>backward−kill−line
+(C−x Rubout)</b></p>
-from shared object
-<I>filename</I>,
+<p style="margin-left:18%;">Kill backward to the beginning
+of the current line. With a negative numeric argument, kill
+forward from the cursor to the end of the line.</p>
-on systems that support dynamic loading.
-If <I>filename</I> does not contain a slash,
-<B>Bash</B> will use the value of the <B>BASH_LOADABLES_PATH</B> variable as a
-colon-separated list of directories in which to search for <I>filename</I>.
-The default for <B>BASH_LOADABLES_PATH</B> is system-dependent,
-and may include
-to force a search of the current directory.
-The
-<B>-d</B>
+<p style="margin-left:9%;"><b>unix−line−discard
+(C−u)</b></p>
-option will delete a builtin previously loaded with <B>-f</B>.
-If <I>-s</I> is used with <I>-f</I>, the new builtin becomes a
-<FONT SIZE=-1>POSIX</FONT>
-special builtin.
-<DT><DD>
-If no options are supplied and a <I>name</I> is not a shell builtin,
-<B>enable</B> will attempt to load <I>name</I> from a shared
-object named <I>name</I>, as if the command were
+<p style="margin-left:18%;">Kill backward from point to the
+beginning of the line, saving the killed text on the
+kill-ring.</p>
-``enable -f <I>name name</I>''.
+<p style="margin-left:9%;"><b>kill−whole−line</b></p>
+<p style="margin-left:18%;">Kill all characters on the
+current line, no matter where point is.</p>
+<p style="margin-left:9%;"><b>kill−word
+(M−d)</b></p>
+<p style="margin-left:18%;">Kill from point to the end of
+the current word, or if between words, to the end of the
+next word. Word boundaries are the same as those used by
+<b>forward−word</b>.</p>
+<p style="margin-left:9%;"><b>backward−kill−word
+(M−Rubout)</b></p>
-<DT><DD>
-The return value is 0 unless a
-<I>name</I>
+<p style="margin-left:18%;">Kill the word behind point.
+Word boundaries are the same as those used by
+<b>backward−word</b>.</p>
-is not a shell builtin or there is an error loading a new builtin
-from a shared object.
-<DT><B>eval</B> [<I>arg</I> ...]<DD>
-Concatenate the <I>arg</I>s together into a single command, separating
-them with spaces.
-<B>Bash</B> then reads and execute this command, and returns its exit status
-as the return status of <B>eval</B>.
-If there are no
-<I>args</I>,
+<p style="margin-left:9%;"><b>shell−kill−word
+(M−C−d)</b></p>
-or only null arguments,
-<B>eval</B>
+<p style="margin-left:18%;">Kill from point to the end of
+the current word, or if between words, to the end of the
+next word. Word boundaries are the same as those used by
+<b>shell−forward−word</b>.</p>
-returns 0.
-<DT><B>exec</B> [<B>-cl</B>] [<B>-a</B> <I>name</I>] [<I>command</I> [<I>arguments</I>]]<DD>
-If
-<I>command</I>
-is specified, it replaces the shell without creating a new process.
-<I>command</I> cannot be a shell builtin or function.
-The
-<I>arguments</I>
+<p style="margin-left:9%;"><b>shell−backward−kill−word</b></p>
-become the arguments to <I>command</I>.
-If the
-<B>-l</B>
+<p style="margin-left:18%;">Kill the word behind point.
+Word boundaries are the same as those used by
+<b>shell−backward−word</b>.</p>
-option is supplied,
-the shell places a dash at the beginning of the zeroth argument passed to
-<I>command</I>.
+<p style="margin-left:9%;"><b>unix−word−rubout
+(C−w)</b></p>
-This is what
-<I>login</I>(1)
+<p style="margin-left:18%;">Kill the word behind point,
+using white space as a word boundary, saving the killed text
+on the kill-ring.</p>
-does. The
-<B>-c</B>
-option causes
-<I>command</I>
+<p style="margin-left:9%;"><b>unix−filename−rubout</b></p>
-to be executed with an empty environment.
-If
-<B>-a</B>
+<p style="margin-left:18%;">Kill the word behind point,
+using white space and the slash character as the word
+boundaries, saving the killed text on the kill-ring.</p>
-is supplied, the shell passes
-<I>name</I>
-
-as the zeroth argument to the executed command.
-<DT><DD>
-If
-<I>command</I>
-
-cannot be executed for some reason, a non-interactive shell exits,
-unless the
-<B>execfail</B>
-
-shell option is enabled.
-In that case, it returns a non-zero status.
-An interactive shell returns a non-zero status if the file cannot be executed.
-A subshell exits unconditionally if <B>exec</B> fails.
-<DT><DD>
-If
-<I>command</I>
-is not specified, any redirections take effect in the current shell,
-and the return status is 0. If there is a redirection error, the
-return status is 1.
-<DT><B>exit</B> [<I>n</I>]<DD>
-Cause the shell to exit with a status of <I>n</I>.
-If
-<I>n</I>
+<p style="margin-left:9%;"><b>delete−horizontal−space
+(M−\)</b></p>
-is omitted, the exit status is that of the last command executed.
-Any trap on
-<FONT SIZE=-1><B>EXIT</B>
+<p style="margin-left:18%;">Delete all spaces and tabs
+around point.</p>
-</FONT>
-is executed before the shell terminates.
-<DT><B>export</B> [<B>-fn</B>] [<I>name</I>[=<I>value</I>]] ...<DD>
+<p style="margin-left:9%;"><b>kill−region</b></p>
-<DT><B>export -p [-f</B>]
+<p style="margin-left:18%;">Kill the text in the current
+region.</p>
-<DD>
-The supplied
-<I>names</I>
+<p style="margin-left:9%;"><b>copy−region−as−kill</b></p>
-are marked for automatic export to the environment of
-subsequently executed commands.
-If the
-<B>-f</B>
+<p style="margin-left:18%;">Copy the text in the region to
+the kill buffer, so it can be yanked immediately.</p>
-option is given, the
-<I>names</I>
-refer to functions.
-<DT><DD>
-The
-<B>-n</B>
+<p style="margin-left:9%;"><b>copy−backward−word</b></p>
-option unexports, or removes the export attribute, from each <I>name</I>.
-If no
-<I>names</I>
+<p style="margin-left:18%;">Copy the word before point to
+the kill buffer. The word boundaries are the same as
+<b>backward−word</b>.</p>
-are given, or if only the
-<B>-p</B>
-option is supplied,
-<B>export</B> displays a list of names of all exported
-variables on the standard output.
-Using <B>-p</B> and <B>-f</B> together displays exported functions.
-The <B>-p</B> option displays output in a form that may be reused as input.
-<DT><DD>
-<B>export</B> allows the value of a variable to be set when it is exported
-or unexported by following the variable name with =<I>value</I>.
-This sets the value of the variable to <I>value</I> while modifying the
-export attribute.
-<B>export</B>
+<p style="margin-left:9%;"><b>copy−forward−word</b></p>
-returns an exit status of 0 unless an invalid option is
-encountered,
-one of the <I>names</I> is not a valid shell variable name, or
-<B>-f</B>
+<p style="margin-left:18%;">Copy the word following point
+to the kill buffer. The word boundaries are the same as
+<b>forward−word</b>.</p>
-is supplied with a
-<I>name</I>
+<p style="margin-left:9%;"><b>yank (C−y)</b></p>
-that is not a function.
-<DT><B>false</B><DD>
-Does nothing; returns a non-zero status.
-<DT><B>fc</B> [<B>-e</B> <I>ename</I>] [<B>-lnr</B>] [<I>first</I>] [<I>last</I>]<DD>
+<p style="margin-left:18%;">Yank the top of the kill ring
+into the buffer at point.</p>
-<DT><B>fc</B> <B>-s</B> [<I>pat</I>=<I>rep</I>] [<I>cmd</I>]<DD>
+<p style="margin-left:9%;"><b>yank−pop
+(M−y)</b></p>
-The first form selects a range of commands from
-<I>first</I>
+<p style="margin-left:18%;">Rotate the kill ring, and yank
+the new top. Only works following <b>yank</b> or
+<b>yank−pop</b>.</p>
-to
-<I>last</I>
+<h3>Numeric Arguments
+<a name="Numeric Arguments"></a>
+</h3>
-from the history list and displays or edits and re-executes them.
-<I>First</I>
-and
-<I>last</I>
-may be specified as a string (to locate the last command beginning
-with that string) or as a number (an index into the history list,
-where a negative number is used as an offset from the current
-command number).
-<DT><DD>
-When listing, a <I>first</I> or <I>last</I> of 0 is equivalent to -1
-and -0 is equivalent to the current command
-(usually the <B>fc</B> command);
-otherwise 0 is equivalent to -1 and -0 is invalid.
-If
-<I>last</I>
+<p style="margin-left:9%; margin-top: 1em"><b>digit−argument
+(M−0, M−1,</b> ...<b>, M−−)</b></p>
-is not specified, it is set to
-the current command for listing (so that
+<p style="margin-left:18%;">Add this digit to the argument
+already accumulating, or start a new argument.
+M−− starts a negative argument.</p>
-``fc -l -10''
+<p style="margin-left:9%;"><b>universal−argument</b></p>
+<p style="margin-left:18%;">This is another way to specify
+an argument. If this command is followed by one or more
+digits, optionally with a leading minus sign, those digits
+define the argument. If the command is followed by digits,
+executing <b>universal−argument</b> again ends the
+numeric argument, but is otherwise ignored. As a special
+case, if this command is immediately followed by a character
+that is neither a digit nor minus sign, the argument count
+for the next command is multiplied by four. The argument
+count is initially one, so executing this function the first
+time makes the argument count four, a second time makes the
+argument count sixteen, and so on.</p>
+<h3>Completing
+<a name="Completing"></a>
+</h3>
+<p style="margin-left:9%; margin-top: 1em"><b>complete
+(TAB)</b></p>
+<p style="margin-left:18%;">Attempt to perform completion
+on the text before point. <b>Bash</b> attempts completion by
+first checking for any programmable completions for the
+command word (see <b>Programmable Completion</b> below),
+otherwise treating the text as a variable (if the text
+begins with <b>$</b>), username (if the text begins with
+<b>~</b>), hostname (if the text begins with <b>@</b>), or
+command (including aliases, functions, and builtins) in
+turn. If none of these produces a match, it falls back to
+filename completion.</p>
-prints the last 10 commands) and to
-<I>first</I>
+<p style="margin-left:9%;"><b>possible−completions
+(M−?)</b></p>
-otherwise.
-If
-<I>first</I>
+<p style="margin-left:18%;">List the possible completions
+of the text before point. When displaying completions,
+<b>readline</b> sets the number of columns used for display
+to the value of <b>completion-display-width</b>, the value
+of the shell variable
+<b><small>COLUMNS</small></b><small>,</small> or the screen
+width, in that order.</p>
-is not specified, it is set to the previous
-command for editing and -16 for listing.
-<DT><DD>
-If the
-<B>-l</B>
+<p style="margin-left:9%;"><b>insert−completions
+(M−*)</b></p>
-option is supplied, the commands are listed on the standard output.
-The
-<B>-n</B>
+<p style="margin-left:18%;">Insert all completions of the
+text before point that would have been generated by
+<b>possible−completions</b>, separated by a space.</p>
-option suppresses
-the command numbers when listing.
-The
-<B>-r</B>
+<p style="margin-left:9%;"><b>menu−complete</b></p>
-option reverses the order of
-the commands.
-<DT><DD>
-Otherwise, <B>fc</B> invokes the editor named by
-<I>ename</I>
+<p style="margin-left:18%;">Similar to <b>complete</b>, but
+replaces the word to be completed with a single match from
+the list of possible completions. Repeatedly executing
+<b>menu−complete</b> steps through the list of
+possible completions, inserting each match in turn. At the
+end of the list of completions, <b>menu−complete</b>
+rings the bell (subject to the setting of
+<b>bell−style</b>) and restores the original text. An
+argument of <i>n</i> moves <i>n</i> positions forward in the
+list of matches; a negative argument moves backward through
+the list. This command is intended to be bound to
+<b>TAB</b>, but is unbound by default.</p>
-on a file containing those commands.
-If
-<I>ename</I>
-is not supplied, <B>fc</B> uses the value of the
-<FONT SIZE=-1><B>FCEDIT</B>
+<p style="margin-left:9%;"><b>menu−complete−backward</b></p>
-</FONT>
-variable, and
-the value of
-<FONT SIZE=-1><B>EDITOR</B>
+<p style="margin-left:18%;">Identical to
+<b>menu−complete</b>, but moves backward through the
+list of possible completions, as if
+<b>menu−complete</b> had been given a negative
+argument. This command is unbound by default.</p>
-</FONT>
-if
-<FONT SIZE=-1><B>FCEDIT</B>
-</FONT>
-is not set.
-If neither variable is set, <B>fc</B> uses
+<p style="margin-left:9%;"><b>export−completions</b></p>
-<I>vi.</I>
+<p style="margin-left:18%;">Perform completion on the word
+before point as described above and write the list of
+possible completions to <b>readline</b>’s output
+stream using the following format, writing information on
+separate lines:</p>
-When editing is complete, <B>fc</B> reads the file containing
-the edited commands and echoes and executes them.
-<DT><DD>
-In the second form, <B>fc</B> re-executes <I>command</I>
-after replacing each instance of <I>pat</I> with <I>rep</I>.
-<I>Command</I> is interpreted the same as <I>first</I> above.
-<DT><DD>
-A useful alias to use with <B>fc</B> is
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="1%">
-so that typing
-runs the last command beginning with
+<p>•</p></td>
+<td width="8%"></td>
+<td width="73%">
-and typing
-re-executes the last command.
-<DT><DD>
-If the first form is used, the return value is zero unless an invalid
-option is encountered or
-<I>first</I>
+<p>the number of matches <i>N</i>;</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="1%">
-or
-<I>last</I>
-specify history lines out of range.
-When editing and re-executing a file of commands,
-the return value is the value of the last command executed
-or failure if an error occurs with the temporary file.
-If the second form is used, the return status
-is that of the re-executed command, unless
-<I>cmd</I>
+<p>•</p></td>
+<td width="8%"></td>
+<td width="73%">
-does not specify a valid history entry, in which case
-<B>fc</B>
-
-returns a non-zero status.
-<DT><B>fg</B> [<I>jobspec</I>]<DD>
-Resume
-<I>jobspec</I>
-
-in the foreground, and make it the current job.
-If
-<I>jobspec</I>
-
-is not present, <B>fg</B> uses the shell's notion of the <I>current job</I>.
-The return value is that of the command placed into the foreground,
-or failure if run when job control is disabled or, when run with
-job control enabled, if
-<I>jobspec</I>
-
-does not specify a valid job or
-<I>jobspec</I>
-
-specifies a job that was started without job control.
-<DT><B>getopts</B> <I>optstring</I> <I>name</I> [<I>arg</I> ...]<DD>
-<B>getopts</B>
-
-is used by shell scripts and functions to parse positional parameters
-and obtain options and their arguments.
-<I>optstring</I>
-
-contains the option characters to be recognized; if a character
-is followed by a colon, the option is expected to have an
-argument, which should be separated from it by white space.
-The colon and question mark characters may not be used as
-option characters.
-<DT><DD>
-Each time it is invoked,
-<B>getopts</B>
-
-places the next option in the shell variable
-<I>name</I>,
-
-initializing
-<I>name</I>
-
-if it does not exist,
-and the index of the next argument to be processed into the
-variable
-<FONT SIZE=-1><B>OPTIND</B>.
-
-</FONT>
-<FONT SIZE=-1><B>OPTIND</B>
-
-</FONT>
-is initialized to 1 each time the shell or a shell script
-is invoked.
-When an option requires an argument,
-<B>getopts</B>
-places that argument into the variable
-<FONT SIZE=-1><B>OPTARG</B>.
-
-</FONT>
-<DT><DD>
-The shell does not reset
-<FONT SIZE=-1><B>OPTIND</B>
-
-</FONT>
-automatically; it must be manually reset between multiple
-calls to
-<B>getopts</B>
-
-within the same shell invocation to use a new set of parameters.
-<DT><DD>
-When it reaches the end of options, <B>getopts</B> exits with a
-return value greater than zero.
-<FONT SIZE=-1><B>OPTIND</B>
-
-</FONT>
-is set to the index of the first non-option argument,
-and <I>name</I> is set to ?.
-<DT><DD>
-<B>getopts</B>
-
-normally parses the positional parameters, but if more arguments are
-supplied as
-<I>arg</I>
-
-values,
-<B>getopts</B>
-
-parses those instead.
-<DT><DD>
-<B>getopts</B>
-
-can report errors in two ways.
-If the first character of
-<I>optstring</I>
-
-is a colon, <B>getopts</B> uses
-<I>silent</I>
-
-error reporting.
-In normal operation, <B>getopts</B> prints diagnostic messages
-when it encounters invalid options or missing option arguments.
-If the variable
-<FONT SIZE=-1><B>OPTERR</B>
-
-</FONT>
-is set to 0,
-<B>getopts</B>
-
-does not display any error messages,
-even if the first character of
-<I>optstring</I>
-
-is not a colon.
-<DT><DD>
-If
-<B>getopts</B>
-
-detects an invalid option, it places ? into
-<I>name</I>
-
-and, if not silent,
-prints an error message and unsets
-<FONT SIZE=-1><B>OPTARG</B>.
-
-</FONT>
-If
-<B>getopts</B>
-
-is silent, it assigns the option character found to
-<FONT SIZE=-1><B>OPTARG</B>
-
-</FONT>
-and does not print a diagnostic message.
-<DT><DD>
-If a required argument is not found, and
-<B>getopts</B>
-
-is not silent, it sets the value of <I>name</I> to
-a question mark (<B>?</B>), unsets
-<FONT SIZE=-1><B>OPTARG</B>,
-
-</FONT>
-and prints a diagnostic message.
-If
-<B>getopts</B>
-
-is silent, it sets the value of <I>name</I> to a colon (<B>:</B>)
-and sets
-<FONT SIZE=-1><B>OPTARG</B>
-
-</FONT>
-to the option character found.
-<DT><DD>
-<B>getopts</B>
-
-returns true if an option, specified or unspecified, is found.
-It returns false if the end of options is encountered or an
-error occurs.
-<DT><B>hash</B> [<B>-lr</B>] [<B>-p</B> <I>filename</I>] [<B>-dt</B>] [<I>name</I>]<DD>
-Each time <B>hash</B> is invoked, it remembers
-the full pathname of the command
-<I>name</I>
-
-as determined by searching
-the directories in
-<B>$PATH</B>.
-
-Any previously-remembered pathname associated with <I>name</I> is discarded.
-If the
-<B>-p</B>
-
-option is supplied, <B>hash</B> uses
-<I>filename</I>
-
-as the full pathname of the command.
-<DT><DD>
-The
-<B>-r</B>
-
-option causes the shell to forget all
-remembered locations.
-Assigning to the <B>PATH</B> variable also clears all hashed filenames.
-The
-<B>-d</B>
-
-option causes the shell to forget the remembered location of each <I>name</I>.
-<DT><DD>
-If the
-<B>-t</B>
-
-option is supplied, <B>hash</B> prints the full pathname corresponding to
-each <I>name</I>.
-If multiple <I>name</I> arguments are supplied with <B>-t</B>,
-<B>hash</B> prints the <I>name</I> before the corresponding hashed
-full pathname.
-The
-<B>-l</B>
-
-option displays output in a format that may be reused as input.
-<DT><DD>
-If no arguments are given, or if only <B>-l</B> is supplied,
-<B>hash</B> prints information about remembered commands.
-The <B>-t</B>, <B>-d</B>, and <B>-p</B> options (the options that
-act on the <I>name</I> arguments) are mutually exclusive.
-Only one will be active.
-If more than one is supplied, <B>-t</B> has higher priority than
-<B>-p</B>, and both have higher priority than <B>-d</B>.
-<DT><DD>
-The return status is zero unless a
-<I>name</I>
-
-is not found or an invalid option is supplied.
-<DT><B>help</B> [<B>-dms</B>] [<I>pattern</I>]<DD>
-Display helpful information about builtin commands.
-If
-<I>pattern</I>
-
-is specified,
-<B>help</B>
-
-gives detailed help on all commands matching
-<I>pattern</I>
-
-as described below;
-otherwise it displays a list of
-all the builtins and shell compound commands.
-<DT><DD>
-Options, if supplied, have the follow meanings:
-<DL COMPACT><DT><DD>
-<DL COMPACT>
-<DT>
-<DD>
-<B>-d</B>
-
-Display a short description of each <I>pattern</I>
-<DT><B>-m</B>
-
-<DD>
-Display the description of each <I>pattern</I> in a manpage-like format
-<DT><B>-s</B>
-
-<DD>
-Display only a short usage synopsis for each <I>pattern</I>
-
-</DL></DL>
-
-<DT><DD>
-If <I>pattern</I> contains pattern matching characters
-(see
-<FONT SIZE=-1><B>Pattern Matching</B>
-
-</FONT>
-above)
-it's treated as a shell pattern and
-<B>help</B> prints the description of each
-help topic matching <I>pattern</I>.
-<DT><DD>
-If not, and <I>pattern</I> exactly matches the name of a help topic,
-<B>help</B> prints the description
-associated with that topic.
-Otherwise, <B>help</B> performs prefix matching and
-prints the descriptions of all matching help topics.
-<DT><DD>
-The return status is 0 unless no command matches
-<I>pattern</I>.
-
-<DT><B>history [</B><I>n</I>]<DD>
-
-<DT><B>history</B> <B>-c</B><DD>
-<DT><B>history -d</B> <I>offset</I><DD>
-<DT><B>history -d</B> <I>start</I>-<I>end</I><DD>
-<DT><B>history</B> <B>-anrw</B> [<I>filename</I>]<DD>
-<DT><B>history</B> <B>-p</B> <I>arg</I> [<I>arg</I> ...]<DD>
-<DT><B>history</B> <B>-s</B> <I>arg</I> [<I>arg</I> ...]<DD>
-
-With no options, display the command history list with numbers.
-Entries prefixed with a
-<B>*</B>
-
-have been modified.
-An argument of
-<I>n</I>
-
-lists only the last
-<I>n</I>
-
-entries.
-If the shell variable
-<FONT SIZE=-1><B>HISTTIMEFORMAT</B>
-
-</FONT>
-is set and not null,
-it is used as a format string for
-<I>strftime</I>(3)
-
-to display the time stamp associated with each displayed history entry.
-If
-<B>history</B>
-
-uses
-<FONT SIZE=-1><B>HISTTIMEFORMAT</B>,
-
-</FONT>
-it does not print an intervening space between the formatted time stamp
-and the history entry.
-<DT><DD>
-If <I>filename</I> is supplied, <B>history</B> uses it as the
-name of the history file; if not, it uses the value of
-<FONT SIZE=-1><B>HISTFILE</B>.
-
-</FONT>
-If <I>filename</I> is not supplied and
-<FONT SIZE=-1><B>HISTFILE</B>
-
-</FONT>
-is unset or null, the <B>-a, -n, -r,</B> and <B>-w</B> options
-have no effect.
-<DT><DD>
-Options, if supplied, have the following meanings:
-<DL COMPACT><DT><DD>
-
-<DL COMPACT>
-<DT><B>-c</B>
-
-<DD>
-Clear the history list by deleting all the entries.
-This can be used with the other options to replace the history list.
-<DT><B>-d</B> <I>offset</I><DD>
-Delete the history entry at position <I>offset</I>.
-If <I>offset</I> is negative, it is interpreted as relative to one greater
-than the last history position, so negative indices count back from the
-end of the history, and an index of -1 refers to the current
-<B>history -d</B> command.
-<DT><B>-d</B> <I>start</I>-<I>end</I><DD>
-Delete the range of history entries between positions <I>start</I> and
-<I>end</I>, inclusive.
-Positive and negative values for <I>start</I> and <I>end</I>
-are interpreted as described above.
-<DT><B>-a</B>
-
-<DD>
-Append the
-
-history lines to the history file.
-These are history lines entered since the beginning of the current
-<B>bash</B> session, but not already appended to the history file.
-<DT><B>-n</B>
-
-<DD>
-Read the history lines not already read from the history file
-and add them to the current history list.
-These are lines appended to the history file since the beginning of the
-current <B>bash</B> session.
-<DT><B>-r</B>
-
-<DD>
-Read the history file and append its contents to the current history list.
-<DT><B>-w</B>
-
-<DD>
-Write the current history list to the history file, overwriting
-the history file.
-<DT><B>-p</B>
-
-<DD>
-Perform history substitution on the following <I>args</I> and display
-the result on the standard output,
-without storing the results in the history list.
-Each <I>arg</I> must be quoted to disable normal history expansion.
-<DT><B>-s</B>
-
-<DD>
-Store the
-<I>args</I>
-
-in the history list as a single entry.
-The last command in the
-history list is removed before adding the
-<I>args</I>.
-
-
-</DL></DL>
-
-<DT><DD>
-If the
-<FONT SIZE=-1><B>HISTTIMEFORMAT</B>
-
-</FONT>
-variable is set, <B>history</B> writes the time stamp information
-associated with each history entry to the history file,
-marked with the history comment character as described above.
-When the history file is read, lines beginning with the history
-comment character followed immediately by a digit are interpreted
-as timestamps for the following history entry.
-<DT><DD>
-The return value is 0 unless an invalid option is encountered, an
-error occurs while reading or writing the history file, an invalid
-<I>offset</I> or range is supplied as an argument to <B>-d</B>, or the
-history expansion supplied as an argument to <B>-p</B> fails.
-<DT><B>jobs</B> [<B>-lnprs</B>] [ <I>jobspec</I> ... ]<DD>
-
-<DT><B>jobs</B> <B>-x</B> <I>command</I> [ <I>args</I> ... ]<DD>
-
-The first form lists the active jobs.
-The options have the following meanings:
-<DL COMPACT><DT><DD>
-
-<DL COMPACT>
-<DT><B>-l</B>
-
-<DD>
-List process IDs in addition to the normal information.
-<DT><B>-n</B>
-
-<DD>
-Display information only about jobs that have changed status since
-the user was last notified of their status.
-<DT><B>-p</B>
-
-<DD>
-List only the process ID of the job's process group leader.
-<DT><B>-r</B>
-
-<DD>
-Display only running jobs.
-<DT><B>-s</B>
-
-<DD>
-Display only stopped jobs.
-
-</DL></DL>
-
-<DT><DD>
-If
-<I>jobspec</I>
+<p>the word being completed;</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="1%">
-is supplied, <B>jobs</B> restricts output to information about that job.
-The return status is 0 unless an invalid option is encountered
-or an invalid
-<I>jobspec</I>
-
-is supplied.
-<DT><DD>
-If the
-<B>-x</B>
-option is supplied,
-<B>jobs</B>
+<p>•</p></td>
+<td width="8%"></td>
+<td width="73%">
-replaces any
-<I>jobspec</I>
-found in
-<I>command</I>
+<p><i>S</i>:<i>E</i>, where <i>S</i> and <i>E</i> are the
+start and end offsets of the word in the <b>readline</b>
+line buffer; then</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="1%">
-or
-<I>args</I>
-with the corresponding process group ID, and executes
-<I>command</I>,
+<p>•</p></td>
+<td width="8%"></td>
+<td width="73%">
-passing it
-<I>args</I>,
-returning its exit status.
-<DT><B>kill</B> [<B>-s</B> <I>sigspec</I> | <B>-n</B> <I>signum</I> | <B>-</B><I>sigspec</I>] <I>id</I> [ ... ]<DD>
+<p>each match, one per line</p></td></tr>
+</table>
-<DT><B>kill</B> <B>-l</B>|<B>-L</B> [<I>sigspec</I> | <I>exit_status</I>]<DD>
+<p style="margin-left:18%; margin-top: 1em">If there are no
+matches, the first line will be “0”, and this
+command does not print any output after the
+<i>S</i>:<i>E</i>. If there is only a single match, this
+prints a single line containing it. If there is more than
+one match, this prints the common prefix of the matches,
+which may be empty, on the first line after the
+<i>S</i>:<i>E</i>, then the matches on subsequent lines. In
+this case, <i>N</i> will include the first line with the
+common prefix.</p>
-Send the signal specified by
-<I>sigspec</I>
+<p style="margin-left:18%; margin-top: 1em">The user or
+application should be able to accommodate the possibility of
+a blank line. The intent is that the user or application
+reads <i>N</i> lines after the line containing
+<i>S</i>:<i>E</i> to obtain the match list. This command is
+unbound by default.</p>
-or
-<I>signum</I>
-to the processes named by each
-<I>id</I>.
+<p style="margin-left:9%;"><b>delete−char−or−list</b></p>
-Each
-<I>id</I>
+<p style="margin-left:18%;">Deletes the character under the
+cursor if not at the beginning or end of the line (like
+<b>delete−char</b>). At the end of the line, it
+behaves identically to <b>possible−completions</b>.
+This command is unbound by default.</p>
-may be a job specification <I>jobspec</I>
-or a process ID <I>pid</I>.
-<I>sigspec</I>
+<p style="margin-left:9%;"><b>complete−filename
+(M−/)</b></p>
-is either a case-insensitive signal name such as
-<FONT SIZE=-1><B>SIGKILL</B>
-
-</FONT>
-(with or without the
-<FONT SIZE=-1><B>SIG</B>
+<p style="margin-left:18%;">Attempt filename completion on
+the text before point.</p>
-</FONT>
-prefix) or a signal number;
-<I>signum</I>
-is a signal number.
-If
-<I>sigspec</I>
+<p style="margin-left:9%;"><b>possible−filename−completions
+(C−x /)</b></p>
-is not supplied, then
-<B>kill</B>
+<p style="margin-left:18%;">List the possible completions
+of the text before point, treating it as a filename.</p>
-sends
-<FONT SIZE=-1><B>SIGTERM</B>.
+<p style="margin-left:9%;"><b>complete−username
+(M−~)</b></p>
-</FONT>
-<DT><DD>
-The
-<B>-l</B>
+<p style="margin-left:18%;">Attempt completion on the text
+before point, treating it as a username.</p>
-option lists the signal names.
-If any arguments are supplied when
-<B>-l</B>
-is given,
-<B>kill</B>
+<p style="margin-left:9%;"><b>possible−username−completions
+(C−x ~)</b></p>
-lists the names of the signals corresponding to the arguments,
-and the return status is 0.
-The <I>exit_status</I> argument to
-<B>-l</B>
+<p style="margin-left:18%;">List the possible completions
+of the text before point, treating it as a username.</p>
-is a number specifying either a signal number or the exit status of
-a process terminated by a signal;
-if it is supplied, <B>kill</B> prints the name of the signal that caused
-the process to terminate.
-<B>kill</B> assumes that process exit statuses are greater than 128;
-anything less than that is a signal number.
-The
-<B>-L</B>
+<p style="margin-left:9%;"><b>complete−variable
+(M−$)</b></p>
-option is equivalent to <B>-l</B>.
-<DT><DD>
-<B>kill</B>
+<p style="margin-left:18%;">Attempt completion on the text
+before point, treating it as a shell variable.</p>
-returns true if at least one signal was successfully sent, or false
-if an error occurs or an invalid option is encountered.
-<DT><B>let</B> <I>arg</I> [<I>arg</I> ...]<DD>
-Each
-<I>arg</I>
-is evaluated as an arithmetic expression (see
-<FONT SIZE=-1><B>ARITHMETIC EVALUATION</B>
+<p style="margin-left:9%;"><b>possible−variable−completions
+(C−x $)</b></p>
-</FONT>
+<p style="margin-left:18%;">List the possible completions
+of the text before point, treating it as a shell
+variable.</p>
-above).
-If the last
-<I>arg</I>
+<p style="margin-left:9%;"><b>complete−hostname
+(M−@)</b></p>
-evaluates to 0,
-<B>let</B>
+<p style="margin-left:18%;">Attempt completion on the text
+before point, treating it as a hostname.</p>
-returns 1; otherwise
-<B>let</B>
-returns 0.
-<DT><B>local</B> [<I>option</I>] [<I>name</I>[=<I>value</I>] ... | - ]<DD>
-For each argument, create a local variable named
-<I>name</I>
+<p style="margin-left:9%;"><b>possible−hostname−completions
+(C−x @)</b></p>
-and assign it
-<I>value</I>.
+<p style="margin-left:18%;">List the possible completions
+of the text before point, treating it as a hostname.</p>
-The <I>option</I> can be any of the options accepted by <B>declare</B>.
-When
-<B>local</B>
+<p style="margin-left:9%;"><b>complete−command
+(M−!)</b></p>
-is used within a function, it causes the variable
-<I>name</I>
+<p style="margin-left:18%;">Attempt completion on the text
+before point, treating it as a command name. Command
+completion attempts to match the text against aliases,
+reserved words, shell functions, shell builtins, and finally
+executable filenames, in that order.</p>
-to have a visible scope restricted to that function and its children.
-It is an error to use
-<B>local</B>
-
-when not within a function.
-<DT><DD>
-If <I>name</I> is -, it makes the set of shell options
-local to the function in which <B>local</B> is invoked:
-any shell options changed using the <B>set</B> builtin inside
-the function after the call to <B>local</B> are restored to their
-original values when the function returns.
-The restore is performed as if a series of <B>set</B> commands were
-executed to restore the values that were in place before the function.
-<DT><DD>
-With no operands,
-<B>local</B>
-writes a list of local variables to the standard output.
-<DT><DD>
-The return status is 0 unless
-<B>local</B>
+<p style="margin-left:9%;"><b>possible−command−completions
+(C−x !)</b></p>
-is used outside a function, an invalid
-<I>name</I>
-
-is supplied, or
-<I>name</I> is a readonly variable.
-<DT><B>logout [</B><I>n</I>]
-
-<DD>
-Exit a login shell,
-returning a status of <I>n</I> to the shell's parent.
-<DT><B>mapfile</B> [<B>-d</B> <I>delim</I>] [<B>-n</B> <I>count</I>] [<B>-O</B> <I>origin</I>] [<B>-s</B> <I>count</I>] [<B>-t</B>] [<B>-u</B> <I>fd</I>] [<B>-C</B> <I>callback</I>] [<B>-c</B> <I>quantum</I>] [<I>array</I>]<DD>
-
-<DT><B>readarray</B> [<B>-d</B> <I>delim</I>] [<B>-n</B> <I>count</I>] [<B>-O</B> <I>origin</I>] [<B>-s</B> <I>count</I>] [<B>-t</B>] [<B>-u</B> <I>fd</I>] [<B>-C</B> <I>callback</I>] [<B>-c</B> <I>quantum</I>] [<I>array</I>]<DD>
-
-Read lines from the standard input,
-or from file descriptor
-<I>fd</I>
-
-if the
-<B>-u</B>
-
-option is supplied,
-into the indexed array variable
-<I>array</I>.
-
-The variable
-<FONT SIZE=-1><B>MAPFILE</B>
-
-</FONT>
-is the default <I>array</I>.
-Options, if supplied, have the following meanings:
-<DL COMPACT><DT><DD>
-
-<DL COMPACT>
-<DT><B>-d</B>
-
-<DD>
-Use the first character of <I>delim</I> to terminate each input line,
-rather than newline.
-If <I>delim</I> is the empty string, <B>mapfile</B> will terminate a line
-when it reads a NUL character.
-<DT><B>-n</B>
-
-<DD>
-Copy at most
-<I>count</I>
-
-lines.
-If <I>count</I> is 0, copy all lines.
-<DT><B>-O</B>
+<p style="margin-left:18%;">List the possible completions
+of the text before point, treating it as a command name.</p>
-<DD>
-Begin assigning to
-<I>array</I>
-
-at index
-<I>origin</I>.
-
-The default index is 0.
-<DT><B>-s</B>
-
-<DD>
-Discard the first <I>count</I> lines read.
-<DT><B>-t</B>
-
-<DD>
-Remove a trailing <I>delim</I> (default newline) from each line read.
-<DT><B>-u</B>
-
-<DD>
-Read lines from file descriptor <I>fd</I> instead of the standard input.
-<DT><B>-C</B>
-
-<DD>
-Evaluate
-<I>callback</I>
-
-each time <I>quantum</I> lines are read.
-The <B>-c</B> option specifies
-<I>quantum</I>.
-
-<DT><B>-c</B>
-
-<DD>
-Specify the number of lines read between each call to
-<I>callback</I>.
-
-
-</DL></DL>
-
-<DT><DD>
-If
-<B>-C</B>
-
-is specified without
-<B>-c</B>,
-
-the default quantum is 5000.
-When <I>callback</I> is evaluated, it is supplied the index of the next
-array element to be assigned and the line to be assigned to that element
-as additional arguments.
-<I>callback</I> is evaluated after the line is read but before the
-array element is assigned.
-<DT><DD>
-If not supplied with an explicit origin, <B>mapfile</B> will clear <I>array</I>
-before assigning to it.
-<DT><DD>
-<B>mapfile</B> returns zero unless an invalid option or option
-argument is supplied, <I>array</I> is invalid or unassignable, or if
-<I>array</I> is not an indexed array.
-<DT><B>popd</B> [-<B>n</B>] [+<I>n</I>] [-<I>n</I>]<DD>
-Remove entries from the directory stack.
-The elements are numbered from 0 starting at the first directory
-listed by <B>dirs</B>, so <B>popd</B> is equivalent to
-
-With no arguments, <B>popd</B> removes the top directory from the stack,
-and changes to the new top directory.
-Arguments, if supplied, have the following meanings:
-<DL COMPACT><DT><DD>
-
-<DL COMPACT>
-<DT><B>-n</B>
-
-<DD>
-Suppress the normal change of directory when removing directories
-from the stack, only manipulate the stack.
-<DT><B>+</B><I>n</I><DD>
-Remove the <I>n</I>th entry counting from the left of the list
-shown by
-<B>dirs</B>,
-
-starting with zero, from the stack.
-For example:
-
-removes the first directory,
-
-the second.
-<DT><B>-</B><I>n</I><DD>
-Remove the <I>n</I>th entry counting from the right of the list
-shown by
-<B>dirs</B>,
-
-starting with zero. For example:
-
-removes the last directory,
-
-the next to last.
-
-</DL></DL>
-
-<DT><DD>
-If the top element of the directory stack is modified, and
-the <I>-n</I> option was not supplied, <B>popd</B> uses the <B>cd</B>
-builtin to change to the directory at the top of the stack.
-If the <B>cd</B> fails, <B>popd</B> returns a non-zero value.
-<DT><DD>
-Otherwise,
-<B>popd</B>
-
-returns false if an invalid option is supplied, the directory stack
-is empty, or <I>n</I> specifies a non-existent directory stack entry.
-<DT><DD>
-If the
-<B>popd</B>
-
-command is successful,
-<B>bash</B> runs
-<B>dirs</B>
-
-to show the final contents of the directory stack,
-and the return status is 0.
-<DT><B>printf</B> [<B>-v</B> <I>var</I>] <I>format</I> [<I>arguments</I>]<DD>
-Write the formatted <I>arguments</I> to the standard output under the
-control of the <I>format</I>.
-The <B>-v</B> option assigns the output to the variable
-<I>var</I> rather than printing it to the standard output.
-<DT><DD>
-The <I>format</I> is a character string which contains three types of objects:
-plain characters, which are simply copied to standard output, character
-escape sequences, which are converted and copied to the standard output, and
-format specifications, each of which causes printing of the next successive
-<I>argument</I>.
-In addition to the standard
-<I>printf</I>(3)
-
-format characters
-<B>cCsSndiouxXeEfFgGaA</B>,
-
-<B>printf</B> interprets the following additional format specifiers:
-<DL COMPACT><DT><DD>
-
-<DL COMPACT>
-<DT><B>%b</B>
-
-<DD>
-causes
-<B>printf</B> to expand backslash escape sequences in the corresponding
-<I>argument</I>
-in the same way as <B>echo -e</B>.
-<DT><B>%q</B>
-
-<DD>
-causes <B>printf</B> to output the corresponding
-<I>argument</I> in a format that can be reused as shell input.
-<B>%q</B> and <B>%Q</B> use the <B>$''</B> quoting style if any characters
-in the argument string require it, and backslash quoting otherwise.
-If the format string uses the <I>printf</I> alternate form, these two
-formats quote the argument string using single quotes.
-<DT><B>%Q</B>
-
-<DD>
-like <B>%q</B>, but applies any supplied precision to the <I>argument</I>
-before quoting it.
-<DT><B>%(</B><I>datefmt</I>)T
-
-<DD>
-causes <B>printf</B> to output the date-time string resulting from using
-<I>datefmt</I> as a format string for
-<I>strftime</I>(3).
-
-The corresponding <I>argument</I> is an integer representing the number of
-seconds since the epoch.
-This format specifier recognizes two special argument values:
--1 represents the current time,
-and -2 represents the time the shell was invoked.
-If no argument is specified, conversion behaves as if -1 had been supplied.
-This is an exception to the usual <B>printf</B> behavior.
-
-</DL></DL>
-
-<DT><DD>
-The %b, %q, and %T format specifiers all use the field width and precision
-arguments from the format specification and write that many bytes from
-(or use that wide a field for) the expanded argument, which usually
-contains more characters than the original.
-<DT><DD>
-The %n format specifier accepts a corresponding argument that is treated
-as a shell variable name.
-<DT><DD>
-The %s and %c format specifiers accept an l (long) modifier, which forces
-them to convert the argument string to a wide-character string and apply
-any supplied field width and precision in terms of characters, not bytes.
-The %S and %C format specifiers are equivalent to %ls and %lc, respectively.
-
-
-
-<DT><DD>
-Arguments to non-string format specifiers are treated as C constants,
-except that a leading plus or minus sign is allowed, and if the leading
-character is a single or double quote, the value is the numeric value of
-the following character, using the current locale.
-<DT><DD>
-The <I>format</I> is reused as necessary to consume all of the <I>arguments</I>.
-If the <I>format</I> requires more <I>arguments</I> than are supplied, the
-extra format specifications behave as if a zero value or null string, as
-appropriate, had been supplied.
-The return value is zero on success,
-non-zero if an invalid option is supplied or a write or assignment error
-occurs.
-<DT><B>pushd</B> [<B>-n</B>] [+<I>n</I>] [-<I>n</I>]<DD>
-
-<DT><B>pushd</B> [<B>-n</B>] [<I>dir</I>]<DD>
-
-Add a directory to the top of the directory stack, or rotate
-the stack, making the new top of the stack the current working
-directory.
-With no arguments, <B>pushd</B> exchanges the top two elements of
-the directory stack.
-Arguments, if supplied, have the following meanings:
-<DL COMPACT><DT><DD>
-
-<DL COMPACT>
-<DT><B>-n</B>
-
-<DD>
-Suppress the normal change of directory when rotating or
-adding directories to the stack, only manipulate the stack.
-<DT><B>+</B><I>n</I><DD>
-Rotate the stack so that the <I>n</I>th directory
-(counting from the left of the list shown by
-<B>dirs</B>,
-
-starting with zero)
-is at the top.
-<DT><B>-</B><I>n</I><DD>
-Rotates the stack so that the <I>n</I>th directory
-(counting from the right of the list shown by
-<B>dirs</B>,
-
-starting with zero) is at the top.
-<DT><I>dir</I>
-
-<DD>
-Adds
-<I>dir</I>
-
-to the directory stack at the top.
-
-</DL></DL>
-
-<DT><DD>
-After the stack has been modified, if the <B>-n</B> option was not
-supplied, <B>pushd</B> uses the <B>cd</B> builtin to change to the
-directory at the top of the stack.
-If the <B>cd</B> fails, <B>pushd</B> returns a non-zero value.
-<DT><DD>
-Otherwise, if no arguments are supplied,
-<B>pushd</B>
-
-returns zero unless the directory stack is empty.
-When rotating the directory stack,
-<B>pushd</B>
-
-returns zero unless the directory stack is empty or
-<I>n</I> specifies a non-existent directory stack element.
-<DT><DD>
-If the
-<B>pushd</B>
-
-command is successful,
-<B>bash</B> runs
-<B>dirs</B>
-
-to show the final contents of the directory stack.
-<DT><B>pwd</B> [<B>-LP</B>]<DD>
-Print the absolute pathname of the current working directory.
-The pathname printed contains no symbolic links if the
-<B>-P</B>
-
-option is supplied or the
-<B>-o physical</B>
-
-option to the
-<B>set</B>
-
-builtin command is enabled.
-If the
-<B>-L</B>
-
-option is used, the pathname printed may contain symbolic links.
-The return status is 0 unless an error occurs while
-reading the name of the current directory or an
-invalid option is supplied.
-<DT><B>read</B> [<B>-Eers</B>] [<B>-a</B> <I>aname</I>] [<B>-d</B> <I>delim</I>] [<B>-i</B> <I>text</I>] [<B>-n</B> <I>nchars</I>] [<B>-N</B> <I>nchars</I>] [<B>-p</B> <I>prompt</I>] [<B>-t</B> <I>timeout</I>] [<B>-u</B> <I>fd</I>] [<I>name</I> ...]<DD>
-Read one line from the standard input, or from the file descriptor
-<I>fd</I> supplied as an argument to the <B>-u</B> option,
-split it into words as described
-
-above
-under <B>Word Splitting</B>,
-and assign the first word to the first
-<I>name</I>,
-
-the second word to the second
-<I>name</I>,
-
-and so on.
-If there are more words than names, the remaining words and their
-intervening delimiters are assigned to the last
-<I>name</I>.
-
-If there are fewer words read from the input stream than names,
-the remaining names are assigned empty values.
-The characters in the value of the
-<FONT SIZE=-1><B>IFS</B>
-
-</FONT>
-variable
-are used to split the line into words using the same rules the shell
-uses for expansion (described
-
-above
-under <B>Word Splitting</B>).
-The backslash character (<B>\</B>) removes any special
-meaning for the next character read and is used for line continuation.
-<DT><DD>
-Options, if supplied, have the following meanings:
-<DL COMPACT><DT><DD>
-
-<DL COMPACT>
-<DT><B>-a </B><I>aname</I>
-
-<DD>
-The words are assigned to sequential indices of the array variable
-<I>aname</I>,
-
-starting at 0.
-<I>aname</I>
-
-is unset before any new values are assigned.
-Other <I>name</I> arguments are ignored.
-<DT><B>-d </B><I>delim</I>
-
-<DD>
-The first character of <I>delim</I> terminates the input line,
-rather than newline.
-If <I>delim</I> is the empty string, <B>read</B> will terminate a line
-when it reads a NUL character.
-<DT><B>-e</B>
-
-<DD>
-If the standard input is coming from a terminal,
-<B>read</B> uses
-<B>readline</B>
-
-(see
-<FONT SIZE=-1><B>READLINE</B>
-
-</FONT>
-
-above)
-to obtain the line.
-<B>Readline</B> uses the current
-(or default, if line editing was not previously active)
-editing settings, but uses <B>readline</B>'s default filename completion.
-<DT><B>-E</B>
-
-<DD>
-If the standard input is coming from a terminal,
-<B>read</B> uses
-<B>readline</B>
-
-(see
-<FONT SIZE=-1><B>READLINE</B>
-
-</FONT>
-
-above)
-to obtain the line.
-<B>Readline</B>
-
-uses the current (or default, if line editing was not previously
-active) editing settings, but uses bash's default completion, including
-programmable completion.
-<DT><B>-i </B><I>text</I>
-
-<DD>
-If
-<B>readline</B>
-
-is being used to read the line, <B>read</B> places <I>text</I> into
-the editing buffer before editing begins.
-<DT><B>-n </B><I>nchars</I>
-
-<DD>
-<B>read</B> returns after reading <I>nchars</I> characters rather than
-waiting for a complete line of input,
-unless it encounters EOF or <B>read</B> times out,
-but honors a delimiter if it reads fewer
-than <I>nchars</I> characters before the delimiter.
-<DT><B>-N </B><I>nchars</I>
-
-<DD>
-<B>read</B> returns after reading exactly <I>nchars</I> characters rather
-than waiting for a complete line of input,
-unless it encounters EOF or <B>read</B> times out.
-Any delimiter characters in the input are
-not treated specially and do not cause <B>read</B> to return until
-it has read <I>nchars</I> characters.
-The result is not split on the characters in <B>IFS</B>; the intent is
-that the variable is assigned exactly the characters read
-(with the exception of backslash; see the <B>-r</B> option below).
-<DT><B>-p </B><I>prompt</I>
-
-<DD>
-Display <I>prompt</I> on standard error, without a
-trailing newline, before attempting to read any input, but
-only if input is coming from a terminal.
-<DT><B>-r</B>
-
-<DD>
-Backslash does not act as an escape character.
-The backslash is considered to be part of the line.
-In particular, a backslash-newline pair may not then be used as a line
-continuation.
-<DT><B>-s</B>
-
-<DD>
-Silent mode.
-If input is coming from a terminal, characters are not echoed.
-<DT><B>-t </B><I>timeout</I>
-
-<DD>
-Cause <B>read</B> to time out and return failure if it does not read
-a complete line of input (or a specified number of characters)
-within <I>timeout</I> seconds.
-<I>timeout</I> may be a decimal number with a fractional portion following
-the decimal point.
-This option is only effective if <B>read</B> is reading input from a
-terminal, pipe, or other special file; it has no effect when reading
-from regular files.
-If <B>read</B> times out, it saves any partial input read into
-the specified variable <I>name</I>, and the exit status is greater than 128.
-If <I>timeout</I> is 0, <B>read</B> returns immediately, without trying to
-read any data.
-In this case, the exit status is 0 if input is available on the specified
-file descriptor, or the read will return EOF, non-zero otherwise.
-<DT><B>-u </B><I>fd</I>
-
-<DD>
-Read input from file descriptor <I>fd</I> instead of the standard input.
-
-</DL></DL>
-
-<DT><DD>
-Other than the case where <I>delim</I> is the empty string, <B>read</B>
-ignores any NUL characters in the input.
-<DT><DD>
-If no
-<I>names</I>
-
-are supplied, <B>read</B> assigns the line read,
-without the ending delimiter but otherwise unmodified,
-to the variable
-<FONT SIZE=-1><B>REPLY</B>.
-
-</FONT>
-<DT><DD>
-The exit status is zero, unless end-of-file is encountered, <B>read</B>
-times out (in which case the status is greater than 128),
-a variable assignment error (such as assigning to a readonly variable) occurs,
-or an invalid file descriptor is supplied as the argument to <B>-u</B>.
-<DT><B>readonly</B> [<B>-aAf</B>] [<B>-p</B>] [<I>name</I>[=<I>word</I>] ...]<DD>
-
-The given
-<I>names</I> are marked readonly; the values of these
-<I>names</I>
-
-may not be changed by subsequent assignment or unset.
-If the
-<B>-f</B>
-
-option is supplied, each <I>name</I> refers to a shell function.
-The
-<B>-a</B>
-
-option restricts the variables to indexed arrays; the
-<B>-A</B>
-
-option restricts the variables to associative arrays.
-If both options are supplied,
-<B>-A</B>
-
-takes precedence.
-If no
-<I>name</I>
-
-arguments are supplied, or if the
-<B>-p</B>
-
-option is supplied, print a list of all readonly names.
-The other options may be used to restrict the output to a subset of
-the set of readonly names.
-The
-<B>-p</B>
-
-option displays output in a format that may be reused as input.
-<DT><DD>
-<B>readonly</B> allows the value of a variable to be set at the same time
-the readonly attribute is changed by following the variable name with
-=<I>value</I>.
-This sets the value of the variable is to <I>value</I> while modifying
-the readonly attribute.
-<DT><DD>
-The return status is 0 unless an invalid option is encountered,
-one of the
-<I>names</I>
-
-is not a valid shell variable name, or
-<B>-f</B>
-
-is supplied with a
-<I>name</I>
-
-that is not a function.
-<DT><B>return</B> [<I>n</I>]<DD>
-Stop executing a shell function or sourced file and return the value
-specified by
-<I>n</I>
-
-to its caller.
-If
-<I>n</I>
-
-is omitted, the return status is that of the last command
-executed.
-If <B>return</B> is executed by a trap handler, the last command used to
-determine the status is the last command executed before the trap handler.
-If <B>return</B> is executed during a <B>DEBUG</B> trap, the last command
-used to determine the status is the last command executed by the trap
-handler before <B>return</B> was invoked.
-<DT><DD>
-When
-<B>return</B>
-
-is used to terminate execution of a script being executed by the
-<B>.</B>
-
-(<B>source</B>) command, it causes the shell to stop executing
-that script and return either
-<I>n</I>
-
-or the exit status of the last command executed within the
-script as the exit status of the script.
-If <I>n</I> is supplied, the return value is its least significant
-8 bits.
-<DT><DD>
-Any command associated with the <B>RETURN</B> trap is executed
-before execution resumes after the function or script.
-<DT><DD>
-The return status is non-zero if
-<B>return</B>
-
-is supplied a non-numeric argument, or is used outside a
-function and not during execution of a script by <B>.</B> or <B>source</B>.
-<DT><B>set</B> [<B>-abefhkmnptuvxBCEHPT</B>] [<B>-o</B> <I>option-name</I>] [<B>--</B>] [<B>-</B>] [<I>arg</I> ...]<DD>
-
-<DT><B>set</B> [<B>+abefhkmnptuvxBCEHPT</B>] [<B>+o</B> <I>option-name</I>] [<B>--</B>] [<B>-</B>] [<I>arg</I> ...]<DD>
-<DT><B>set -o</B><DD>
-<DT><B>set +o</B><DD>
-
-Without options, display the name and value of each shell variable
-in a format that can be reused as input
-for setting or resetting the currently-set variables.
-Read-only variables cannot be reset.
-In posix mode, only shell variables are listed.
-The output is sorted according to the current locale.
-When options are specified, they set or unset shell attributes.
-Any arguments remaining after option processing are treated
-as values for the positional parameters and are assigned, in order, to
-<B>$1</B>,
-
-<B>$2</B>,
-
-...,
-<B>$</B><I>n</I>.
-
-Options, if specified, have the following meanings:
-<DL COMPACT><DT><DD>
-
-<DL COMPACT>
-<DT><B>-a</B>
-
-<DD>
-Each variable or function that is created or modified is given the
-export attribute and marked for export to the environment of
-subsequent commands.
-<DT><B>-b</B>
-
-<DD>
-Report the status of terminated background jobs
-immediately, rather than before the next primary prompt or after a
-foreground command terminates.
-This is effective only when job control is enabled.
-<DT><B>-e</B>
-
-<DD>
-
-Exit immediately if a
-<I>pipeline</I> (which may consist of a single <I>simple command</I>),
-a <I>list</I>,
-or a <I>compound command</I>
-(see
-<FONT SIZE=-1><B>SHELL GRAMMAR</B>
-
-</FONT>
-
-above),
-exits with a non-zero status.
-The shell does not exit if the
-command that fails is part of the command list immediately following a
-<B>while</B>
-
-or
-<B>until</B>
-
-reserved word,
-part of the test following the
-<B>if</B>
-
-or
-<B>elif</B>
-
-reserved words, part of any command executed in a
-<B>&&</B>
-
-or
-<B>||</B>
-
-list except the command following the final <B>&&</B> or <B>||</B>,
-any command in a pipeline but the last
-(subject to the state of the <B>pipefail</B> shell option),
-or if the command's return value is
-being inverted with
-<B>!</B>.
-
-If a compound command other than a subshell
-returns a non-zero status because a command failed
-while <B>-e</B> was being ignored, the shell does not exit.
-A trap on <B>ERR</B>, if set, is executed before the shell exits.
-This option applies to the shell environment and each subshell environment
-separately (see
-<FONT SIZE=-1><B>COMMAND EXECUTION ENVIRONMENT</B>
-
-</FONT>
-
-above),
-and may cause
-subshells to exit before executing all the commands in the subshell.
-<DT><DD>
-If a compound command or shell function executes in a context
-where <B>-e</B> is being ignored,
-none of the commands executed within the compound command or function body
-will be affected by the <B>-e</B> setting, even if <B>-e</B> is set
-and a command returns a failure status.
-If a compound command or shell function sets <B>-e</B> while executing in
-a context where <B>-e</B> is ignored, that setting will not have any
-effect until the compound command or the command containing the function
-call completes.
-
-<DT><B>-f</B>
-
-<DD>
-Disable pathname expansion.
-<DT><B>-h</B>
-
-<DD>
-Remember the location of commands as they are looked up for execution.
-This is enabled by default.
-<DT><B>-k</B>
-<DD>
-All arguments in the form of assignment statements
-are placed in the environment for a command, not just
-those that precede the command name.
-<DT><B>-m</B>
+<p style="margin-left:9%;"><b>dynamic−complete−history
+(M−TAB)</b></p>
-<DD>
-Monitor mode.
-Job control is enabled.
-This option is on by default for interactive shells on systems
-that support it (see
-<FONT SIZE=-1><B>JOB CONTROL</B>
+<p style="margin-left:18%;">Attempt completion on the text
+before point, comparing the text against history list
+entries for possible completion matches.</p>
-</FONT>
+<p style="margin-left:9%;"><b>dabbrev−expand</b></p>
-above).
-All processes run in a separate process group.
-When a background job completes, the shell prints a line
-containing its exit status.
-<DT><B>-n</B>
+<p style="margin-left:18%;">Attempt menu completion on the
+text before point, comparing the text against lines from the
+history list for possible completion matches.</p>
-<DD>
-Read commands but do not execute them.
-This may be used to check a shell script for syntax errors.
-This is ignored by interactive shells.
-<DT><B>-o </B><I>option-name</I>
-<DD>
-The <I>option-name</I> can be one of the following:
-<DL COMPACT><DT><DD>
-<DL COMPACT>
-<DT><B>allexport</B>
+<p style="margin-left:9%;"><b>complete−into−braces
+(M−{)</b></p>
-<DD>
-Same as
-<B>-a</B>.
+<p style="margin-left:18%;">Perform filename completion and
+insert the list of possible completions enclosed within
+braces so the list is available to the shell (see <b>Brace
+Expansion</b> above).</p>
-<DT><B>braceexpand</B>
+<h3>Keyboard Macros
+<a name="Keyboard Macros"></a>
+</h3>
-<DD>
-Same as
-<B>-B</B>.
-<DT><B>emacs</B>
-<DD>
-Use an emacs-style command line editing interface. This is enabled
-by default when the shell is interactive, unless the shell is started
-with the
-<B>--noediting</B>
+<p style="margin-left:9%; margin-top: 1em"><b>start−kbd−macro
+(C−x ()</b></p>
-option.
-This also affects the editing interface used for <B>read -e</B>.
-<DT><B>errexit</B>
+<p style="margin-left:18%;">Begin saving the characters
+typed into the current keyboard macro.</p>
-<DD>
-Same as
-<B>-e</B>.
+<p style="margin-left:9%;"><b>end−kbd−macro
+(C−x ))</b></p>
-<DT><B>errtrace</B>
+<p style="margin-left:18%;">Stop saving the characters
+typed into the current keyboard macro and store the
+definition.</p>
-<DD>
-Same as
-<B>-E</B>.
-<DT><B>functrace</B>
+<p style="margin-left:9%;"><b>call−last−kbd−macro
+(C−x e)</b></p>
-<DD>
-Same as
-<B>-T</B>.
+<p style="margin-left:18%;">Re-execute the last keyboard
+macro defined, by making the characters in the macro appear
+as if typed at the keyboard.</p>
-<DT><B>hashall</B>
-<DD>
-Same as
-<B>-h</B>.
+<p style="margin-left:9%;"><b>print−last−kbd−macro
+()</b></p>
-<DT><B>histexpand</B>
+<p style="margin-left:18%;">Print the last keyboard macro
+defined in a format suitable for the <i>inputrc</i>
+file.</p>
-<DD>
-Same as
-<B>-H</B>.
+<h3>Miscellaneous
+<a name="Miscellaneous"></a>
+</h3>
-<DT><B>history</B>
-<DD>
-Enable command history, as described
-above
-under
-<FONT SIZE=-1><B>HISTORY</B>.
+<p style="margin-left:9%; margin-top: 1em"><b>re−read−init−file
+(C−x C−r)</b></p>
-</FONT>
-This option is on by default in interactive shells.
-<DT><B>ignoreeof</B>
+<p style="margin-left:18%;">Read in the contents of the
+<i>inputrc</i> file, and incorporate any bindings or
+variable assignments found there.</p>
-<DD>
-The effect is as if the shell command
+<p style="margin-left:9%;"><b>abort (C−g)</b></p>
+<p style="margin-left:18%;">Abort the current editing
+command and ring the terminal’s bell (subject to the
+setting of <b>bell−style</b>).</p>
-``IGNOREEOF=10''
+<p style="margin-left:9%;"><b>do−lowercase−version
+(M−A, M−B, M−</b><i>x</i><b>,</b>
+...<b>)</b></p>
+<p style="margin-left:18%;">If the metafied character
+<i>x</i> is uppercase, run the command that is bound to the
+corresponding metafied lowercase character. The behavior is
+undefined if <i>x</i> is already lowercase.</p>
+<p style="margin-left:9%;"><b>prefix−meta
+(ESC)</b></p>
+<p style="margin-left:18%;">Metafy the next character
+typed. <b><small>ESC</small> f</b> is equivalent to
+<b>Meta−f</b>.</p>
+<p style="margin-left:9%;"><b>undo (C−_, C−x
+C−u)</b></p>
-had been executed
-(see
-<B>Shell Variables</B>
+<p style="margin-left:18%;">Incremental undo, separately
+remembered for each line.</p>
+<p style="margin-left:9%;"><b>revert−line
+(M−r)</b></p>
-above).
-<DT><B>keyword</B>
+<p style="margin-left:18%;">Undo all changes made to this
+line. This is like executing the <b>undo</b> command enough
+times to return the line to its initial state.</p>
-<DD>
-Same as
-<B>-k</B>.
+<p style="margin-left:9%;"><b>tilde−expand
+(M−&)</b></p>
-<DT><B>monitor</B>
+<p style="margin-left:18%;">Perform tilde expansion on the
+current word.</p>
-<DD>
-Same as
-<B>-m</B>.
+<p style="margin-left:9%;"><b>set−mark (C−@,
+M−<space>)</b></p>
-<DT><B>noclobber</B>
+<p style="margin-left:18%;">Set the mark to the point. If a
+numeric argument is supplied, set the mark to that
+position.</p>
-<DD>
-Same as
-<B>-C</B>.
-<DT><B>noexec</B>
+<p style="margin-left:9%;"><b>exchange−point−and−mark
+(C−x C−x)</b></p>
-<DD>
-Same as
-<B>-n</B>.
+<p style="margin-left:18%;">Swap the point with the mark.
+Set the current cursor position to the saved position, then
+set the mark to the old cursor position.</p>
-<DT><B>noglob</B>
+<p style="margin-left:9%;"><b>character−search
+(C−])</b></p>
-<DD>
-Same as
-<B>-f</B>.
+<p style="margin-left:18%;">Read a character and move point
+to the next occurrence of that character. A negative
+argument searches for previous occurrences.</p>
-<DT><B>nolog</B>
-<DD>
-Currently ignored.
-<DT><B>notify</B>
+<p style="margin-left:9%;"><b>character−search−backward
+(M−C−])</b></p>
-<DD>
-Same as
-<B>-b</B>.
+<p style="margin-left:18%;">Read a character and move point
+to the previous occurrence of that character. A negative
+argument searches for subsequent occurrences.</p>
-<DT><B>nounset</B>
-<DD>
-Same as
-<B>-u</B>.
+<p style="margin-left:9%;"><b>skip−csi−sequence</b></p>
-<DT><B>onecmd</B>
+<p style="margin-left:18%;">Read enough characters to
+consume a multi-key sequence such as those defined for keys
+like Home and End. CSI sequences begin with a Control
+Sequence Indicator (CSI), usually <i>ESC [</i>. If this
+sequence is bound to “\e[”, keys producing CSI
+sequences have no effect unless explicitly bound to a
+<b>readline</b> command, instead of inserting stray
+characters into the editing buffer. This is unbound by
+default, but usually bound to <i>ESC [</i>.</p>
-<DD>
-Same as
-<B>-t</B>.
+<p style="margin-left:9%;"><b>insert−comment
+(M−#)</b></p>
-<DT><B>physical</B>
+<p style="margin-left:18%;">Without a numeric argument,
+insert the value of the <b>readline comment−begin</b>
+variable at the beginning of the current line. If a numeric
+argument is supplied, this command acts as a toggle: if the
+characters at the beginning of the line do not match the
+value of <b>comment−begin</b>, insert the value;
+otherwise delete the characters in <b>comment-begin</b> from
+the beginning of the line. In either case, the line is
+accepted as if a newline had been typed. The default value
+of <b>comment−begin</b> causes this command to make
+the current line a shell comment. If a numeric argument
+causes the comment character to be removed, the line will be
+executed by the shell.</p>
-<DD>
-Same as
-<B>-P</B>.
-<DT><B>pipefail</B>
+<p style="margin-left:9%;"><b>spell−correct−word
+(C−x s)</b></p>
-<DD>
-If set, the return value of a pipeline is the value of the last
-(rightmost) command to exit with a non-zero status, or zero if all
-commands in the pipeline exit successfully.
-This option is disabled by default.
-<DT><B>posix</B>
+<p style="margin-left:18%;">Perform spelling correction on
+the current word, treating it as a directory or filename, in
+the same way as the <b>cdspell</b> shell option. Word
+boundaries are the same as those used by
+<b>shell−forward−word</b>.</p>
-<DD>
-Enable posix mode;
-change the behavior of
-<B>bash</B>
-where the default operation differs
-from the
-<FONT SIZE=-1>POSIX</FONT>
-standard to match the standard.
-See
-<FONT SIZE=-1><B>SEE ALSO</B>
+<p style="margin-left:9%;"><b>glob−complete−word
+(M−g)</b></p>
-</FONT>
+<p style="margin-left:18%;">Treat the word before point as
+a pattern for pathname expansion, with an asterisk
+implicitly appended, then use the pattern to generate a list
+of matching file names for possible completions.</p>
-below
-for a reference to a document that details how posix mode affects
-bash's behavior.
-<DT><B>privileged</B>
+<p style="margin-left:9%;"><b>glob−expand−word
+(C−x *)</b></p>
-<DD>
-Same as
-<B>-p</B>.
+<p style="margin-left:18%;">Treat the word before point as
+a pattern for pathname expansion, and insert the list of
+matching file names, replacing the word. If a numeric
+argument is supplied, append a <b>*</b> before pathname
+expansion.</p>
-<DT><B>verbose</B>
-<DD>
-Same as
-<B>-v</B>.
+<p style="margin-left:9%;"><b>glob−list−expansions
+(C−x g)</b></p>
-<DT><B>vi</B>
+<p style="margin-left:18%;">Display the list of expansions
+that would have been generated by
+<b>glob−expand−word</b> and redisplay the line.
+If a numeric argument is supplied, append a <b>*</b> before
+pathname expansion.</p>
+
+<p style="margin-left:9%;"><b>dump−functions</b></p>
+
+<p style="margin-left:18%;">Print all of the functions and
+their key bindings to the <b>readline</b> output stream. If
+a numeric argument is supplied, the output is formatted in
+such a way that it can be made part of an <i>inputrc</i>
+file.</p>
+
+<p style="margin-left:9%;"><b>dump−variables</b></p>
+
+<p style="margin-left:18%;">Print all of the settable
+<b>readline</b> variables and their values to the
+<b>readline</b> output stream. If a numeric argument is
+supplied, the output is formatted in such a way that it can
+be made part of an <i>inputrc</i> file.</p>
+
+<p style="margin-left:9%;"><b>dump−macros</b></p>
+
+<p style="margin-left:18%;">Print all of the
+<b>readline</b> key sequences bound to macros and the
+strings they output to the <b>readline</b> output stream. If
+a numeric argument is supplied, the output is formatted in
+such a way that it can be made part of an <i>inputrc</i>
+file.</p>
+
+
+<p style="margin-left:9%;"><b>execute−named−command
+(M-x)</b></p>
+
+<p style="margin-left:18%;">Read a bindable <b>readline</b>
+command name from the input and execute the function to
+which it’s bound, as if the key sequence to which it
+was bound appeared in the input. If this function is
+supplied with a numeric argument, it passes that argument to
+the function it executes.</p>
+
+
+<p style="margin-left:9%;"><b>display−shell−version
+(C−x C−v)</b></p>
+
+<p style="margin-left:18%;">Display version information
+about the current instance of <b>bash</b>.</p>
+
+<h3>Programmable Completion
+<a name="Programmable Completion"></a>
+</h3>
+
+
+<p style="margin-left:9%; margin-top: 1em">When a user
+attempts word completion for a command or an argument to a
+command for which a completion specification (a
+<i>compspec</i>) has been defined using the <b>complete</b>
+builtin (see <b><small>SHELL BUILTIN COMMANDS</small></b>
+below), <b>readline</b> invokes the programmable completion
+facilities.</p>
+
+<p style="margin-left:9%; margin-top: 1em">First,
+<b>bash</b> identifies the command name. If a compspec has
+been defined for that command, the compspec is used to
+generate the list of possible completions for the word. If
+the command word is the empty string (completion attempted
+at the beginning of an empty line), <b>bash</b> uses any
+compspec defined with the <b>−E</b> option to
+<b>complete</b>. The <b>−I</b> option to
+<b>complete</b> indicates that the command word is the first
+non-assignment word on the line, or after a command
+delimiter such as <b>;</b> or <b>|</b>. This usually
+indicates command name completion.</p>
+
+<p style="margin-left:9%; margin-top: 1em">If the command
+word is a full pathname, <b>bash</b> searches for a compspec
+for the full pathname first. If there is no compspec for the
+full pathname, <b>bash</b> attempts to find a compspec for
+the portion following the final slash. If those searches do
+not result in a compspec, or if there is no compspec for the
+command word, <b>bash</b> uses any compspec defined with the
+<b>−D</b> option to <b>complete</b> as the default. If
+there is no default compspec, <b>bash</b> performs alias
+expansion on the command word as a final resort, and
+attempts to find a compspec for the command word resulting
+from any successful expansion.</p>
+
+<p style="margin-left:9%; margin-top: 1em">If a compspec is
+not found, <b>bash</b> performs its default completion as
+described above under <b>Completing</b>. Otherwise, once a
+compspec has been found, <b>bash</b> uses it to generate the
+list of matching words.</p>
+
+<p style="margin-left:9%; margin-top: 1em">First,
+<b>bash</b> performs the <i>actions</i> specified by the
+compspec. This only returns matches which are prefixes of
+the word being completed. When the <b>−f</b> or
+<b>−d</b> option is used for filename or directory
+name completion, <b>bash</b> uses the shell variable
+<b><small>FIGNORE</small></b> to filter the matches.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Next,
+programmable completion generates matches specified by a
+pathname expansion pattern supplied as an argument to the
+<b>−G</b> option. The words generated by the pattern
+need not match the word being completed. <b>Bash</b> uses
+the <b><small>FIGNORE</small></b> variable to filter the
+matches, but does not use the
+<b><small>GLOBIGNORE</small></b> shell variable.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Next, completion
+considers the string specified as the argument to the
+<b>−W</b> option. The string is first split using the
+characters in the <b><small>IFS</small></b> special variable
+as delimiters. This honors shell quoting within the string,
+in order to provide a mechanism for the words to contain
+shell metacharacters or characters in the value of
+<b><small>IFS</small></b><small>.</small> Each word is then
+expanded using brace expansion, tilde expansion, parameter
+and variable expansion, command substitution, and arithmetic
+expansion, as described above under
+<b><small>EXPANSION</small></b><small>.</small> The results
+are split using the rules described above under <b>Word
+Splitting</b>. The results of the expansion are
+prefix-matched against the word being completed, and the
+matching words become possible completions.</p>
+
+<p style="margin-left:9%; margin-top: 1em">After these
+matches have been generated, <b>bash</b> executes any shell
+function or command specified with the <b>−F</b> and
+<b>−C</b> options. When the command or function is
+invoked, <b>bash</b> assigns values to the
+<b><small>COMP_LINE</small></b><small>, <b>COMP_POINT</b>,
+<b>COMP_KEY</b>,</small> and <b><small>COMP_TYPE</small></b>
+variables as described above under <b>Shell Variables</b>.
+If a shell function is being invoked, <b>bash</b> also sets
+the <b><small>COMP_WORDS</small></b> and
+<b><small>COMP_CWORD</small></b> variables. When the
+function or command is invoked, the first argument
+(<b>$1</b>) is the name of the command whose arguments are
+being completed, the second argument (<b>$2</b>) is the word
+being completed, and the third argument (<b>$3</b>) is the
+word preceding the word being completed on the current
+command line. There is no filtering of the generated
+completions against the word being completed; the function
+or command has complete freedom in generating the matches
+and they do not need to match a prefix of the word.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Any function
+specified with <b>−F</b> is invoked first. The
+function may use any of the shell facilities, including the
+<b>compgen</b> and <b>compopt</b> builtins described below,
+to generate the matches. It must put the possible
+completions in the <b><small>COMPREPLY</small></b> array
+variable, one per array element.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Next, any
+command specified with the <b>−C</b> option is invoked
+in an environment equivalent to command substitution. It
+should print a list of completions, one per line, to the
+standard output. Backslash will escape a newline, if
+necessary. These are added to the set of possible
+completions.</p>
+
+<p style="margin-left:9%; margin-top: 1em">External
+commands that are invoked to generate completions (
+“external completers”) receive the word
+preceding the completion word as an argument, as described
+above. This provides context that is sometimes useful, but
+may include information that is considered sensitive or part
+of a word expansion that will not appear in the command line
+after expansion. That word may be visible in process
+listings or in audit logs. This may be a concern to users
+and completion specification authors if there is sensitive
+information on the command line before expansion, since
+completion takes place before words are expanded. If this is
+an issue, completion authors should use functions as
+wrappers around external commands and pass context
+information to the external command in a different way.
+External completers can infer context from the
+<b><small>COMP_LINE</small></b> and
+<b><small>COMP_POINT</small></b> environment variables, but
+they need to ensure they break words in the same way
+<b>readline</b> does, using the
+<b><small>COMP_WORDBREAKS</small></b> variable.</p>
+
+<p style="margin-left:9%; margin-top: 1em">After generating
+all of the possible completions, <b>bash</b> applies any
+filter specified with the <b>−X</b> option to the
+completions in the list. The filter is a pattern as used for
+pathname expansion; a <b>&</b> in the pattern is
+replaced with the text of the word being completed. A
+literal <b>&</b> may be escaped with a backslash; the
+backslash is removed before attempting a match. Any
+completion that matches the pattern is removed from the
+list. A leading <b>!</b> negates the pattern; in this case
+<b>bash</b> removes any completion that does not match the
+pattern. If the <b>nocasematch</b> shell option is enabled,
+<b>bash</b> performs the match without regard to the case of
+alphabetic characters.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Finally,
+programmable completion adds any prefix and suffix specified
+with the <b>−P</b> and <b>−S</b> options,
+respectively, to each completion, and returns the result to
+<b>readline</b> as the list of possible completions.</p>
+
+<p style="margin-left:9%; margin-top: 1em">If the
+previously-applied actions do not generate any matches, and
+the <b>−o dirnames</b> option was supplied to
+<b>complete</b> when the compspec was defined, <b>bash</b>
+attempts directory name completion.</p>
+
+<p style="margin-left:9%; margin-top: 1em">If the
+<b>−o plusdirs</b> option was supplied to
+<b>complete</b> when the compspec was defined, <b>bash</b>
+attempts directory name completion and adds any matches to
+the set of possible completions.</p>
+
+<p style="margin-left:9%; margin-top: 1em">By default, if a
+compspec is found, whatever it generates is returned to the
+completion code as the full set of possible completions. The
+default <b>bash</b> completions and the <b>readline</b>
+default of filename completion are disabled. If the
+<b>−o bashdefault</b> option was supplied to
+<b>complete</b> when the compspec was defined, and the
+compspec generates no matches, <b>bash</b> attempts its
+default completions. If the compspec and, if attempted, the
+default <b>bash</b> completions generate no matches, and the
+<b>−o default</b> option was supplied to
+<b>complete</b> when the compspec was defined, programmable
+completion performs <b>readline</b>’s default
+completion.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The options
+supplied to <b>complete</b> and <b>compopt</b> can control
+how <b>readline</b> treats the completions. For instance,
+the <i>−o fullquote</i> option tells <b>readline</b>
+to quote the matches as if they were filenames. See the
+description of <b>complete</b> below for details.</p>
+
+<p style="margin-left:9%; margin-top: 1em">When a compspec
+indicates that it wants directory name completion, the
+programmable completion functions force <b>readline</b> to
+append a slash to completed names which are symbolic links
+to directories, subject to the value of the
+<b>mark−directories readline</b> variable, regardless
+of the setting of the <b>mark-symlinked−directories
+readline</b> variable.</p>
+
+<p style="margin-left:9%; margin-top: 1em">There is some
+support for dynamically modifying completions. This is most
+useful when used in combination with a default completion
+specified with <b>complete −D</b>. It’s possible
+for shell functions executed as completion functions to
+indicate that completion should be retried by returning an
+exit status of 124. If a shell function returns 124, and
+changes the compspec associated with the command on which
+completion is being attempted (supplied as the first
+argument when the function is executed), programmable
+completion restarts from the beginning, with an attempt to
+find a new compspec for that command. This can be used to
+build a set of completions dynamically as completion is
+attempted, rather than loading them all at once.</p>
+
+<p style="margin-left:9%; margin-top: 1em">For instance,
+assuming that there is a library of compspecs, each kept in
+a file corresponding to the name of the command, the
+following default completion function would load completions
+dynamically:</p>
+
+<p style="margin-left:18%;">_completion_loader() <br>
+{ <br>
+. "/etc/bash_completion.d/$1.sh" \ <br>
+>/dev/null 2>&1 && return 124 <br>
+} <br>
+complete −D −F _completion_loader \ <br>
+−o bashdefault −o default</p>
+
+<h2>HISTORY
+<a name="HISTORY"></a>
+</h2>
+
+
+<p style="margin-left:9%; margin-top: 1em">When the
+<b>−o history</b> option to the <b>set</b> builtin is
+enabled, the shell provides access to the <i>command
+history</i>, the list of commands previously typed. The
+value of the <b><small>HISTSIZE</small></b> variable is used
+as the number of commands to save in a history list: the
+shell saves the text of the last
+<b><small>HISTSIZE</small></b> commands (default 500). The
+shell stores each command in the history list prior to
+parameter and variable expansion (see
+<b><small>EXPANSION</small></b> above) but after history
+expansion is performed, subject to the values of the shell
+variables <b><small>HISTIGNORE</small></b> and
+<b><small>HISTCONTROL</small></b><small>.</small></p>
+
+<p style="margin-left:9%; margin-top: 1em">On startup,
+<b>bash</b> initializes the history list by reading history
+entries from the file named by the
+<b><small>HISTFILE</small></b> variable (default
+<A HREF="file:~/.bash_history"><i>~/.bash_history</i></A>). That file is referred to as the
+<i>history file</i>. The history file is truncated, if
+necessary, to contain no more than the number of history
+entries specified by the value of the
+<b><small>HISTFILESIZE</small></b> variable. If
+<b><small>HISTFILESIZE</small></b> is unset, or set to null,
+a non-numeric value, or a numeric value less than zero, the
+history file is not truncated.</p>
+
+<p style="margin-left:9%; margin-top: 1em">When the history
+file is read, lines beginning with the history comment
+character followed immediately by a digit are interpreted as
+timestamps for the following history line. These timestamps
+are optionally displayed depending on the value of the
+<b><small>HISTTIMEFORMAT</small></b> variable. When present,
+history timestamps delimit history entries, making
+multi-line entries possible.</p>
+
+<p style="margin-left:9%; margin-top: 1em">When a shell
+with history enabled exits, <b>bash</b> copies the last
+<b><small>$HISTSIZE</small></b> entries from the history
+list to <b><small>$HISTFILE</small></b><small>.</small> If
+the <b>histappend</b> shell option is enabled (see the
+description of <b>shopt</b> under <b><small>SHELL BUILTIN
+COMMANDS</small></b> below), <b>bash</b> appends the entries
+to the history file, otherwise it overwrites the history
+file. If <b><small>HISTFILE</small></b> is unset or null, or
+if the history file is unwritable, the history is not saved.
+After saving the history, <b>bash</b> truncates the history
+file to contain no more than
+<b><small>HISTFILESIZE</small></b> lines as described
+above.</p>
+
+<p style="margin-left:9%; margin-top: 1em">If the
+<b><small>HISTTIMEFORMAT</small></b> variable is set, the
+shell writes the timestamp information associated with each
+history entry to the history file, marked with the history
+comment character, so timestamps are preserved across shell
+sessions. This uses the history comment character to
+distinguish timestamps from other history lines. As above,
+when using
+<b><small>HISTTIMEFORMAT</small></b><small>,</small> the
+timestamps delimit multi-line history entries.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The <b>fc</b>
+builtin command (see <b><small>SHELL BUILTIN
+COMMANDS</small></b> below) will list or edit and re-execute
+a portion of the history list. The <b>history</b> builtin
+can display or modify the history list and manipulate the
+history file. When using command-line editing, search
+commands are available in each editing mode that provide
+access to the history list.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The shell allows
+control over which commands are saved on the history list.
+The <b><small>HISTCONTROL</small></b> and
+<b><small>HISTIGNORE</small></b> variables are used to save
+only a subset of the commands entered. If the <b>cmdhist</b>
+shell option is enabled, the shell attempts to save each
+line of a multi-line command in the same history entry,
+adding semicolons where necessary to preserve syntactic
+correctness. The <b>lithist</b> shell option modifies
+<b>cmdhist</b> by saving the command with embedded newlines
+instead of semicolons. See the description of the
+<b>shopt</b> builtin below under <b><small>SHELL BUILTIN
+COMMANDS</small></b> for information on setting and
+unsetting shell options.</p>
+
+<h2>HISTORY EXPANSION
+<a name="HISTORY EXPANSION"></a>
+</h2>
+
+
+<p style="margin-left:9%; margin-top: 1em">The shell
+supports a history expansion feature that is similar to the
+history expansion in <b>csh</b>. This section describes what
+syntax features are available.</p>
+
+<p style="margin-left:9%; margin-top: 1em">History
+expansion is enabled by default for interactive shells, and
+can be disabled using the <b>+H</b> option to the <b>set</b>
+builtin command (see <b><small>SHELL BUILTIN
+COMMANDS</small></b> below). Non-interactive shells do not
+perform history expansion by default, but it can be enabled
+with “set -H”.</p>
+
+<p style="margin-left:9%; margin-top: 1em">History
+expansions introduce words from the history list into the
+input stream, making it easy to repeat commands, insert the
+arguments to a previous command into the current input line,
+or fix errors in previous commands quickly.</p>
+
+<p style="margin-left:9%; margin-top: 1em">History
+expansion is performed immediately after a complete line is
+read, before the shell breaks it into words, and is
+performed on each line individually. The shell attempts to
+inform the history expansion functions about quoting still
+in effect from previous lines.</p>
+
+<p style="margin-left:9%; margin-top: 1em">It takes place
+in two parts. The first is to determine which history list
+entry to use during substitution. The second is to select
+portions of that entry to include into the current one.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The entry
+selected from the history is the <i>event</i>, and the
+portions of that entry that are acted upon are <i>words</i>.
+Various <i>modifiers</i> are available to manipulate the
+selected words. The entry is split into words in the same
+fashion as when reading input, so that several
+<i>metacharacter</i>-separated words surrounded by quotes
+are considered one word. The <i>event designator</i> selects
+the event, the optional <i>word designator</i> selects words
+from the event, and various optional <i>modifiers</i> are
+available to manipulate the selected words.</p>
+
+<p style="margin-left:9%; margin-top: 1em">History
+expansions are introduced by the appearance of the history
+expansion character, which is <b>!</b> by default. History
+expansions may appear anywhere in the input, but do not
+nest.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Only backslash
+(<b>\</b>) and single quotes can quote the history expansion
+character, but the history expansion character is also
+treated as quoted if it immediately precedes the closing
+double quote in a double-quoted string.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Several
+characters inhibit history expansion if found immediately
+following the history expansion character, even if it is
+unquoted: space, tab, newline, carriage return, <b>=</b>,
+and the other shell metacharacters defined above.</p>
+
+<p style="margin-left:9%; margin-top: 1em">There is a
+special abbreviation for substitution, active when the
+<i>quick substitution</i> character (described above under
+<b>histchars</b>) is the first character on the line. It
+selects the previous history list entry, using an event
+designator equivalent to <b>!!</b>, and substitutes one
+string for another in that entry. It is described below
+under <b>Event Designators</b>. This is the only history
+expansion that does not begin with the history expansion
+character.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Several shell
+options settable with the <b>shopt</b> builtin will modify
+history expansion behavior (see the description of the
+<b>shopt</b> builtin below).and If the <b>histverify</b>
+shell option is enabled, and <b>readline</b> is being used,
+history substitutions are not immediately passed to the
+shell parser. Instead, the expanded line is reloaded into
+the <b>readline</b> editing buffer for further modification.
+If <b>readline</b> is being used, and the <b>histreedit</b>
+shell option is enabled, a failed history substitution is
+reloaded into the <b>readline</b> editing buffer for
+correction.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The
+<b>−p</b> option to the <b>history</b> builtin command
+shows what a history expansion will do before using it. The
+<b>−s</b> option to the <b>history</b> builtin will
+add commands to the end of the history list without actually
+executing them, so that they are available for subsequent
+recall.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The shell allows
+control of the various characters used by the history
+expansion mechanism (see the description of <b>histchars</b>
+above under <b>Shell Variables</b>). The shell uses the
+history comment character to mark history timestamps when
+writing the history file.</p>
+
+<h3>Event Designators
+<a name="Event Designators"></a>
+</h3>
+
+
+<p style="margin-left:9%; margin-top: 1em">An event
+designator is a reference to an entry in the history list.
+The event designator consists of the portion of the word
+beginning with the history expansion character and ending
+with the word designator if present, or the end of the word.
+Unless the reference is absolute, events are relative to the
+current position in the history list.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="4%">
+
+
+<p><b>!</b></p></td>
+<td width="5%"></td>
+<td width="82%">
+
+
+<p>Start a history substitution, except when followed by a
+<b>blank</b>, newline, carriage return, =, or, when the
+<b>extglob</b> shell option is enabled using the
+<b>shopt</b> builtin, (.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="4%">
+
+
+<p><b>!</b><i>n</i></p></td>
+<td width="5%"></td>
+<td width="82%">
+
+
+<p>Refer to history list entry <i>n</i>.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="4%">
+
+
+<p><b>!−</b><i>n</i></p></td>
+<td width="5%"></td>
+<td width="82%">
+
+
+<p>Refer to the current entry minus <i>n</i>.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="4%">
+
+
+<p><b>!!</b></p></td>
+<td width="5%"></td>
+<td width="82%">
-<DD>
-Use a vi-style command line editing interface.
-This also affects the editing interface used for <B>read -e</B>.
-<DT><B>xtrace</B>
-<DD>
-Same as
-<B>-x</B>.
+<p>Refer to the previous entry. This is a synonym for
+“!−1”.</p> </td></tr>
+</table>
-</DL>
-<P>
+<p style="margin-left:9%;"><b>!</b><i>string</i></p>
-If
-<B>-o</B>
+<p style="margin-left:18%;">Refer to the most recent
+command preceding the current position in the history list
+starting with <i>string</i>.</p>
-is supplied with no <I>option-name</I>,
-<B>set</B> prints the current shell option settings.
-If
-<B>+o</B>
-is supplied with no <I>option-name</I>,
-<B>set</B> prints a series of
-<B>set</B>
+<p style="margin-left:9%;"><b>!?</b><i>string</i><b>[?]</b></p>
-commands to recreate the current option settings
-on the standard output.
-</DL>
+<p style="margin-left:18%;">Refer to the most recent
+command preceding the current position in the history list
+containing <i>string</i>. The trailing <b>?</b> may be
+omitted if <i>string</i> is followed immediately by a
+newline. If <i>string</i> is missing, this uses the string
+from the most recent search; it is an error if there is no
+previous search string.</p>
-<DT><B>-p</B>
+<p style="margin-left:9%;"><b><big>^</big></b>
+<i>string1</i> <b><big>^</big></b> <i>string2</i>
+<b><big>^</big></b></p>
-<DD>
-Turn on
-<I>privileged</I>
+<p style="margin-left:18%;">Quick substitution. Repeat the
+previous command, replacing <i>string1</i> with
+<i>string2</i>. Equivalent to “!!:s <big>^</big>
+<i>string1</i> <big>^</big> <i>string2</i> <big>^</big>
+” (see <b>Modifiers</b> below).</p>
-mode. In this mode, the shell does not read the
-<FONT SIZE=-1><B>$ENV</B>
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="3%">
-</FONT>
-and
-<FONT SIZE=-1><B>$BASH_ENV</B>
-</FONT>
-files, shell functions are not inherited from the
-environment, and the
-<FONT SIZE=-1><B>SHELLOPTS</B>,
+<p><b>!#</b></p></td>
+<td width="6%"></td>
+<td width="47%">
-</FONT>
-<FONT SIZE=-1><B>BASHOPTS</B>,
-</FONT>
-<FONT SIZE=-1><B>CDPATH</B>,
+<p>The entire command line typed so far.</p></td>
+<td width="35%">
+</td></tr>
+</table>
-</FONT>
-and
-<FONT SIZE=-1><B>GLOBIGNORE</B>
+<h3>Word Designators
+<a name="Word Designators"></a>
+</h3>
-</FONT>
-variables, if they appear in the environment, are ignored.
-If the shell is started with the effective user (group) id not equal to the
-real user (group) id, and the <B>-p</B> option is not supplied, these actions
-are taken and the effective user id is set to the real user id.
-If the <B>-p</B> option is supplied at startup, the effective user id is
-not reset.
-Turning this option off causes the effective user
-and group ids to be set to the real user and group ids.
-<DT><B>-r</B>
-<DD>
-Enable restricted shell mode.
-This option cannot be unset once it has been set.
-<DT><B>-t</B>
+<p style="margin-left:9%; margin-top: 1em">Word designators
+are used to select desired words from the event. They are
+optional; if the word designator isn’t supplied, the
+history expansion uses the entire event. A <b>:</b>
+separates the event specification from the word designator.
+It may be omitted if the word designator begins with a
+<b>^</b>, <b>$</b>, <b>*</b>, <b>−</b>, or <b>%</b>.
+Words are numbered from the beginning of the line, with the
+first word being denoted by 0 (zero). Words are inserted
+into the current line separated by single spaces. <b><br>
+0 (zero)</b></p>
-<DD>
-Exit after reading and executing one command.
-<DT><B>-u</B>
+<p style="margin-left:18%;">The zeroth word. For the shell,
+this is the command word.</p>
-<DD>
-Treat unset variables and parameters other than the special
-parameters
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="4%">
-and
-or array variables subscripted with
+<p><i>n</i></p></td>
+<td width="5%"></td>
+<td width="82%">
-or
-as an error when performing parameter expansion.
-If expansion is attempted on an unset variable or parameter,
-the shell prints an error message, and,
-if not interactive, exits with a non-zero status.
-<DT><B>-v</B>
+<p>The <i>n</i>th word.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="4%">
-<DD>
-Print shell input lines as they are read.
-<DT><B>-x</B>
-<DD>
-After expanding each <I>simple command</I>,
-<B>for</B> command, <B>case</B> command, <B>select</B> command, or
-arithmetic <B>for</B> command, display the expanded value of
-<FONT SIZE=-1><B>PS4</B>,
+<p><b>^</b></p></td>
+<td width="5%"></td>
+<td width="82%">
-</FONT>
-followed by the command and its expanded arguments
-or associated word list, to the standard error.
-<DT><B>-B</B>
-<DD>
-The shell performs brace expansion (see
-<B>Brace Expansion</B>
+<p>The first argument: word 1.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="4%">
-above).
-This is on by default.
-<DT><B>-C</B>
+<p><b>$</b></p></td>
+<td width="5%"></td>
+<td width="82%">
-<DD>
-If set,
-<B>bash</B>
-does not overwrite an existing file with the
-<B>></B>,
+<p>The last word. This is usually the last argument, but
+will expand to the zeroth word if there is only one word in
+the line.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="4%">
-<B>>&</B>,
-and
-<B><></B>
+<p><b>%</b></p></td>
+<td width="5%"></td>
+<td width="82%">
-redirection operators.
-Using the redirection operator
-<B>>|</B>
-instead of
-<B>></B>
+<p>The first word matched by the most recent
+“?<i>string</i>?” search, if the search string
+begins with a character that is part of a word. By default,
+searches begin at the end of each line and proceed to the
+beginning, so the first word matched is the one closest to
+the end of the line.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="4%">
-will override this and force the creation of an output file.
-<DT><B>-E</B>
-<DD>
-If set, any trap on <B>ERR</B> is inherited by shell functions, command
-substitutions, and commands executed in a subshell environment.
-The <B>ERR</B> trap is normally not inherited in such cases.
-<DT><B>-H</B>
+<p><i>x</i><b>−</b><i>y</i></p></td>
+<td width="5%"></td>
+<td width="82%">
-<DD>
-Enable
-<B>!</B>
-style history substitution.
-This option is on by default when the shell is interactive.
-<DT><B>-P</B>
+<p>A range of words; “−<i>y</i>”
+abbreviates “0−<i>y</i>”.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="4%">
-<DD>
-If set, the shell does not resolve symbolic links when executing
-commands such as
-<B>cd</B>
-that change the current working directory.
-It uses the physical directory structure instead.
-By default,
-<B>bash</B>
+<p><b>*</b></p></td>
+<td width="5%"></td>
+<td width="82%">
-follows the logical chain of directories when performing commands
-which change the current directory.
-<DT><B>-T</B>
-<DD>
-If set, any traps on <B>DEBUG</B> and <B>RETURN</B> are inherited by shell
-functions, command substitutions, and commands executed in a
-subshell environment.
-The <B>DEBUG</B> and <B>RETURN</B> traps are normally not inherited
-in such cases.
-<DT><B>--</B>
-
-<DD>
-If no arguments follow this option, unset the positional parameters.
-Otherwise, set the positional parameters to the
-<I>arg</I>s, even if some of them begin with a
-<B>-</B>.
-
-<DT><B>-</B>
-
-<DD>
-Signal the end of options, and assign all remaining <I>arg</I>s to
-the positional parameters.
-The
-<B>-x</B>
-
-and
-<B>-v</B>
-
-options are turned off.
-If there are no <I>arg</I>s, the positional parameters remain unchanged.
-
-</DL>
-<P>
-
-The options are off by default unless otherwise noted.
-Using + rather than - causes these options to be turned off.
-The options can also be specified as arguments to an invocation of
-the shell.
-The current set of options may be found in
-<B>$-</B>.
+<p>All of the words but the zeroth. This is a synonym for
+“<i>1−$</i>”. It is not an error to use
+<b>*</b> if there is just one word in the event; it expands
+to the empty string in that case.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="4%">
-The return status is always zero unless an invalid option is encountered.
-</DL>
-<DT><B>shift</B> [<I>n</I>]<DD>
-Rename positional parameters from <I>n</I>+1 ... to
-<B>$1</B>
-
-<B>....</B>
-
-Parameters represented by the numbers <B>$#</B>
-down to <B>$#</B>-<I>n</I>+1 are unset.
-<I>n</I>
+<p><b>x*</b></p></td>
+<td width="5%"></td>
+<td width="82%">
-must be a non-negative number less than or equal to <B>$#</B>.
-If
-<I>n</I>
-is 0, no parameters are changed.
-If
-<I>n</I>
-
-is not given, it is assumed to be 1.
-If
-<I>n</I>
-
-is greater than <B>$#</B>, the positional parameters are not changed.
-The return status is greater than zero if
-<I>n</I>
-
-is greater than
-<B>$#</B>
-
-or less than zero; otherwise 0.
-<DT><B>shopt</B> [<B>-pqsu</B>] [<B>-o</B>] [<I>optname</I> ...]<DD>
-Toggle the values of settings controlling optional shell behavior.
-The settings can be either those listed below, or, if the
-<B>-o</B>
-
-option is used, those available with the
-<B>-o</B>
-
-option to the <B>set</B> builtin command.
-<DT><DD>
-With no options, or with the
-<B>-p</B>
-
-option, display a list of all settable options, with
-an indication of whether or not each is set;
-if any <I>optnames</I> are supplied, the output is restricted to those options.
-The <B>-p</B> option displays output in a form that
-may be reused as input.
-<DT><DD>
-Other options have the following meanings:
-<DL COMPACT><DT><DD>
-
-<DL COMPACT>
-<DT><B>-s</B>
-
-<DD>
-Enable (set) each <I>optname</I>.
-<DT><B>-u</B>
-
-<DD>
-Disable (unset) each <I>optname</I>.
-<DT><B>-q</B>
-
-<DD>
-Suppresses normal output (quiet mode); the return status indicates
-whether the <I>optname</I> is set or unset.
-If multiple <I>optname</I> arguments are supplied with
-<B>-q</B>,
-
-the return status is zero if all <I>optnames</I> are enabled; non-zero
-otherwise.
-<DT><B>-o</B>
-
-<DD>
-Restricts the values of <I>optname</I> to be those defined for the
-<B>-o</B>
-
-option to the
-<B>set</B>
-
-builtin.
-
-</DL>
-<P>
-
-If either
-<B>-s</B>
-
-or
-<B>-u</B>
-
-is used with no <I>optname</I> arguments,
-<B>shopt</B>
-
-shows only those options which are set or unset, respectively.
-Unless otherwise noted, the <B>shopt</B> options are disabled (unset)
-by default.
-<P>
-
-The return status when listing options is zero if all <I>optnames</I>
-are enabled, non-zero otherwise. When setting or unsetting options,
-the return status is zero unless an <I>optname</I> is not a valid shell
-option.
-<P>
-
-The list of <B>shopt</B> options is:
-<P>
-
-
-<DL COMPACT>
-<DT><B>array_expand_once</B>
-
-<DD>
-If set, the shell suppresses multiple evaluation of
-associative and indexed array subscripts
-during arithmetic expression evaluation, while executing
-builtins that can perform variable assignments,
-and while executing builtins that perform array dereferencing.
-<DT><B>assoc_expand_once</B>
-
-<DD>
-Deprecated; a synonym for <B>array_expand_once</B>.
-<DT><B>autocd</B>
-
-<DD>
-If set, a command name that is the name of a directory is executed as if
-it were the argument to the <B>cd</B> command.
-This option is only used by interactive shells.
-<DT><B>bash_source_fullpath</B>
-
-<DD>
-If set, filenames added to the <B>BASH_SOURCE</B> array variable are
-converted to full pathnames (see <B>Shell Variables</B> above).
-<DT><B>cdable_vars</B>
-
-<DD>
-If set, an argument to the
-<B>cd</B>
-
-builtin command that
-is not a directory is assumed to be the name of a variable whose
-value is the directory to change to.
-<DT><B>cdspell</B>
+<p>Abbreviates <i>x−$</i>.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="4%">
-<DD>
-If set, the
-<B>cd</B>
-command attempts to correct
-minor errors in the spelling of a directory component.
-Minor errors include transposed characters,
-a missing character, and one extra character.
-If <B>cd</B> corrects the directory name, it prints the corrected filename,
-and the command proceeds.
-This option is only used by interactive shells.
-<DT><B>checkhash</B>
-
-<DD>
-If set, <B>bash</B> checks that a command found in the hash
-table exists before trying to execute it.
-If a hashed command no longer exists, <B>bash</B> performs a normal path search.
-<DT><B>checkjobs</B>
-
-<DD>
-If set, <B>bash</B> lists the status of any stopped and running jobs before
-exiting an interactive shell.
-If any jobs are running, <B>bash</B> defers the exit until a second
-exit is attempted without an intervening command (see
-<FONT SIZE=-1><B>JOB CONTROL</B>
-
-</FONT>
-
-above).
-The shell always postpones exiting if any jobs are stopped.
-<DT><B>checkwinsize</B>
-
-<DD>
-If set, <B>bash</B> checks the window size after each external (non-builtin)
-command
-and, if necessary, updates the values of
-<FONT SIZE=-1><B>LINES</B>
-
-</FONT>
-and
-<FONT SIZE=-1><B>COLUMNS</B>,
-
-</FONT>
-using the file descriptor associated with the standard error
-if it is a terminal.
-This option is enabled by default.
-<DT><B>cmdhist</B>
-
-<DD>
-If set,
-<B>bash</B>
-
-attempts to save all lines of a multiple-line
-command in the same history entry.
-This allows easy re-editing of multi-line commands.
-This option is enabled by default, but only has an effect if command
-history is enabled, as described
+<p><b>x−</b></p></td>
+<td width="5%"></td>
+<td width="82%">
-above
-under
-<FONT SIZE=-1><B>HISTORY</B>.
-</FONT>
+<p>Abbreviates <i>x−$</i> like <b>x*</b>, but omits
+the last word. If <b>x</b> is missing, it defaults to 0.</p></td></tr>
+</table>
-<DT><B>compat31</B>
-
-<DD>
-<DT><B>compat32</B>
-
-<DD>
-<DT><B>compat40</B>
+<p style="margin-left:9%; margin-top: 1em">If a word
+designator is supplied without an event specification, the
+previous command is used as the event, equivalent to
+<b>!!</b>.</p>
-<DD>
-<DT><B>compat41</B>
+<h3>Modifiers
+<a name="Modifiers"></a>
+</h3>
-<DD>
-<DT><B>compat42</B>
-<DD>
-<DT><B>compat43</B>
+<p style="margin-left:9%; margin-top: 1em">After the
+optional word designator, the expansion may include a
+sequence of one or more of the following modifiers, each
+preceded by a “:”. These modify, or edit, the
+word or words selected from the history event.</p>
-<DD>
-<DT><B>compat44</B>
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-<DD>
-These control aspects of the shell's compatibility mode
-(see
-<FONT SIZE=-1><B>SHELL COMPATIBILITY MODE</B>
+<p style="margin-top: 1em"><b>h</b></p></td>
+<td width="8%"></td>
+<td width="82%">
-</FONT>
-below).
+<p style="margin-top: 1em">Remove a trailing pathname
+component, leaving only the head.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-<DT><B>complete_fullquote</B>
-
-<DD>
-If set,
-<B>bash</B>
-quotes all shell metacharacters in filenames and directory names when
-performing completion.
-If not set,
-<B>bash</B>
-
-removes metacharacters such as the dollar sign from the set of
-characters that will be quoted in completed filenames
-when these metacharacters appear in shell variable references in words to be
-completed.
-This means that dollar signs in variable names that expand to directories
-will not be quoted;
-however, any dollar signs appearing in filenames will not be quoted, either.
-This is active only when bash is using backslashes to quote completed
-filenames.
-This variable is set by default, which is the default bash behavior in
-versions through 4.2.
-<DT><B>direxpand</B>
+<p><b>t</b></p></td>
+<td width="8%"></td>
+<td width="82%">
-<DD>
-If set,
-<B>bash</B>
-replaces directory names with the results of word expansion when performing
-filename completion.
-This changes the contents of the <B>readline</B> editing buffer.
-If not set,
-<B>bash</B>
+<p>Remove all leading pathname components, leaving the
+tail.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-attempts to preserve what the user typed.
-<DT><B>dirspell</B>
-<DD>
-If set,
-<B>bash</B>
+<p><b>r</b></p></td>
+<td width="8%"></td>
+<td width="82%">
-attempts spelling correction on directory names during word completion
-if the directory name initially supplied does not exist.
-<DT><B>dotglob</B>
-<DD>
-If set,
-<B>bash</B>
+<p>Remove a trailing suffix of the form <i>.xxx</i>,
+leaving the basename.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-includes filenames beginning with a
-in the results of pathname expansion.
-The filenames
+<p><b>e</b></p></td>
+<td width="8%"></td>
+<td width="82%">
-<I>.</I>
-and
+<p>Remove all but the trailing suffix.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-<I>..</I>
-must always be matched explicitly, even if
-<B>dotglob</B>
+<p><b>p</b></p></td>
+<td width="8%"></td>
+<td width="82%">
-is set.
-<DT><B>execfail</B>
-<DD>
-If set, a non-interactive shell will not exit if
-it cannot execute the file specified as an argument to the
-<B>exec</B>
+<p>Print the new command but do not execute it.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-builtin.
-An interactive shell does not exit if
-<B>exec</B>
-
-fails.
-<DT><B>expand_aliases</B>
-<DD>
-If set, aliases are expanded as described
+<p><b>q</b></p></td>
+<td width="8%"></td>
+<td width="82%">
-above
-under
-<FONT SIZE=-1><B>ALIASES</B>.
-
-</FONT>
-This option is enabled by default for interactive shells.
-<DT><B>extdebug</B>
-
-<DD>
-If set at shell invocation, or in a shell startup file,
-arrange to execute the debugger profile
-before the shell starts, identical to the <B>--debugger</B> option.
-If set after invocation, behavior intended for use by debuggers is enabled:
-<DL COMPACT><DT><DD>
-<DL COMPACT>
-<DT><B>1.</B>
-
-<DD>
-The <B>-F</B> option to the <B>declare</B> builtin displays the source
-file name and line number corresponding to each function name supplied
-as an argument.
-<DT><B>2.</B>
-
-<DD>
-If the command run by the <B>DEBUG</B> trap returns a non-zero value, the
-next command is skipped and not executed.
-<DT><B>3.</B>
-
-<DD>
-If the command run by the <B>DEBUG</B> trap returns a value of 2, and the
-shell is executing in a subroutine (a shell function or a shell script
-executed by the <B>.</B> or <B>source</B> builtins), the shell simulates
-a call to <B>return</B>.
-<DT><B>4.</B>
-<DD>
-<FONT SIZE=-1><B>BASH_ARGC</B>
+<p>Quote the substituted words, escaping further
+substitutions.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-</FONT>
-and
-<FONT SIZE=-1><B>BASH_ARGV</B>
-</FONT>
-are updated as described in their descriptions
+<p><b>x</b></p></td>
+<td width="8%"></td>
+<td width="82%">
-above).
-<DT><B>5.</B>
-<DD>
-Function tracing is enabled: command substitution, shell functions, and
-subshells invoked with <B>(</B> <I>command</I> <B>)</B> inherit the
-<B>DEBUG</B> and <B>RETURN</B> traps.
-<DT><B>6.</B>
+<p>Quote the substituted words as with <b>q</b>, but break
+into words at <b>blanks</b> and newlines. The <b>q</b> and
+<b>x</b> modifiers are mutually exclusive; expansion uses
+the last one supplied.</p></td></tr>
+</table>
-<DD>
-Error tracing is enabled: command substitution, shell functions, and
-subshells invoked with <B>(</B> <I>command</I> <B>)</B> inherit the
-<B>ERR</B> trap.
-</DL></DL>
-<DT><B>extglob</B>
+<p style="margin-left:9%;"><b>s/</b><i>old</i><b>/</b><i>new</i><b>/</b></p>
-<DD>
-If set, enable the extended pattern matching features described
+<p style="margin-left:18%;">Substitute <i>new</i> for the
+first occurrence of <i>old</i> in the event line. Any
+character may be used as the delimiter in place of /. The
+final delimiter is optional if it is the last character of
+the event line. A single backslash quotes the delimiter in
+<i>old</i> and <i>new</i>. If & appears in <i>new</i>,
+it is replaced with <i>old</i>. A single backslash quotes
+the &. If <i>old</i> is null, it is set to the last
+<i>old</i> substituted, or, if no previous history
+substitutions took place, the last <i>string</i> in a
+<b>!?</b><i>string</i><b>[?]</b> search. If <i>new</i> is
+null, each matching <i>old</i> is deleted.</p>
-above
-under
-<B>Pathname Expansion</B>.
-<DT><B>extquote</B>
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-<DD>
-If set, <B>$</B>'<I>string</I>' and <B>$</B>"
-<I>string</I>"
- quoting is
-performed within <B>${</B><I>parameter</I><B>}</B> expansions
-enclosed in double quotes.
-This option is enabled by default.
-<DT><B>failglob</B>
-
-<DD>
-If set, patterns which fail to match filenames during pathname expansion
-result in an expansion error.
-<DT><B>force_fignore</B>
-
-<DD>
-If set, the suffixes specified by the
-<FONT SIZE=-1><B>FIGNORE</B>
-
-</FONT>
-shell variable
-cause words to be ignored when performing word completion even if
-the ignored words are the only possible completions.
-See
-<B>Shell Variables</B>
-
-
-above
-for a description of
-<FONT SIZE=-1><B>FIGNORE</B>.
-
-</FONT>
-This option is enabled by default.
-<DT><B>globasciiranges</B>
-
-<DD>
-If set, range expressions used in pattern matching bracket expressions (see
-<FONT SIZE=-1><B>Pattern Matching</B>
-
-</FONT>
-
-above)
-behave as if in the traditional C locale when performing comparisons.
-That is, pattern matching does not take
-the current locale's collating sequence into account, so
-<B>b</B>
-
-will not collate between
-<B>A</B>
-
-and
-<B>B</B>,
-and upper-case and lower-case ASCII characters will collate together.
-<DT><B>globskipdots</B>
-
-<DD>
-If set, pathname expansion will never match the filenames
+<p><b>&</b></p></td>
+<td width="8%"></td>
+<td width="82%">
-<I>.</I>
-
-and
-<I>..</I>,
+<p>Repeat the previous substitution.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-even if the pattern begins with a
-This option is enabled by default.
-<DT><B>globstar</B>
-
-<DD>
-If set, the pattern <B>**</B> used in a pathname expansion context will
-match all files and zero or more directories and subdirectories.
-If the pattern is followed by a <B>/</B>, only directories and
-subdirectories match.
-<DT><B>gnu_errfmt</B>
-
-<DD>
-If set, shell error messages are written in the standard GNU error
-message format.
-<DT><B>histappend</B>
-
-<DD>
-If set, the history list is appended to the file named by the value
-of the
-<FONT SIZE=-1><B>HISTFILE</B>
-
-</FONT>
-variable when the shell exits, rather than overwriting the file.
-<DT><B>histreedit</B>
+<p><b>g</b></p></td>
+<td width="8%"></td>
+<td width="82%">
-<DD>
-If set, and
-<B>readline</B>
-
-is being used, the user is given the opportunity to re-edit a
-failed history substitution.
-<DT><B>histverify</B>
-
-<DD>
-If set, and
-<B>readline</B>
-
-is being used, the results of history substitution are not immediately
-passed to the shell parser.
-Instead, the resulting line is loaded into the <B>readline</B> editing buffer,
-allowing further modification.
-<DT><B>hostcomplete</B>
-<DD>
-If set, and
-<B>readline</B>
+<p>Cause changes to be applied over the entire event line.
+This is used in conjunction with “<b>:s</b>”
+(e.g.,
+“<b>:gs/</b><i>old</i><b>/</b><i>new</i><b>/</b>”)
+or “<b>:&</b>”. If used with
+“<b>:s</b>”, any delimiter can be used in place
+of /, and the final delimiter is optional if it is the last
+character of the event line. An <b>a</b> may be used as a
+synonym for <b>g</b>.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
+
+
+<p><b>G</b></p></td>
+<td width="8%"></td>
+<td width="82%">
+
+
+<p>Apply the following “<b>s</b>” or
+“<b>&</b>” modifier once to each word in the
+event line.</p></td></tr>
+</table>
+
+<h2>SHELL BUILTIN COMMANDS
+<a name="SHELL BUILTIN COMMANDS"></a>
+</h2>
+
+
+<p style="margin-left:9%; margin-top: 1em">Unless otherwise
+noted, each builtin command documented in this section as
+accepting options preceded by <b>−</b> accepts
+<b>−−</b> to signify the end of the options. The
+<b>:</b>, <b>true</b>, <b>false</b>, and
+<b>test</b>/<b>[</b> builtins do not accept options and do
+not treat <b>−−</b> specially. The <b>exit</b>,
+<b>logout</b>, <b>return</b>, <b>break</b>, <b>continue</b>,
+<b>let</b>, and <b>shift</b> builtins accept and process
+arguments beginning with <b>−</b> without requiring
+<b>−−</b>. Other builtins that accept arguments
+but are not specified as accepting options interpret
+arguments beginning with <b>−</b> as invalid options
+and require <b>−−</b> to prevent this
+interpretation. <b><br>
+:</b> [<i>arguments</i>]</p>
+
+<p style="margin-left:18%;">No effect; the command does
+nothing beyond expanding <i>arguments</i> and performing any
+specified redirections. The return status is zero.</p>
+
+<p style="margin-left:9%;"><b>.</b> [<b>−p</b>
+<i>path</i>] <i>filename</i> [<i>arguments</i>] <b><br>
+source</b> [<b>−p</b> <i>path</i>] <i>filename</i>
+[<i>arguments</i>]</p>
+
+<p style="margin-left:18%;">The <b>.</b> command
+(<b>source</b>) reads and execute commands from
+<i>filename</i> in the current shell environment and returns
+the exit status of the last command executed from
+<i>filename</i>.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If
+<i>filename</i> does not contain a slash, <b>.</b> searches
+for it. If the <b>−p</b> option is supplied, <b>.</b>
+treats <i>path</i> as a colon-separated list of directories
+in which to find <i>filename</i>; otherwise, <b>.</b> uses
+the entries in <b><small>PATH</small></b> to find the
+directory containing <i>filename</i>. <i>filename</i> does
+not need to be executable. When <b>bash</b> is not in posix
+mode, it searches the current directory if <i>filename</i>
+is not found in <b><small>PATH</small></b><small>,</small>
+but does not search the current directory if <b>−p</b>
+is supplied. If the <b>sourcepath</b> option to the
+<b>shopt</b> builtin command is turned off, <b>.</b> does
+not search <b><small>PATH</small></b><small>.</small></p>
+
+<p style="margin-left:18%; margin-top: 1em">If any
+<i>arguments</i> are supplied, they become the positional
+parameters when <i>filename</i> is executed. Otherwise the
+positional parameters are unchanged.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If the
+<b>−T</b> option is enabled, <b>.</b> inherits any
+trap on <b>DEBUG</b>; if it is not, any <b>DEBUG</b> trap
+string is saved and restored around the call to <b>.</b>,
+and <b>.</b> unsets the <b>DEBUG</b> trap while it executes.
+If <b>−T</b> is not set, and the sourced file changes
+the <b>DEBUG</b> trap, the new value persists after <b>.</b>
+completes. The return status is the status of the last
+command executed from <i>filename</i> (0 if no commands are
+executed), and non-zero if <i>filename</i> is not found or
+cannot be read.</p>
+
+<p style="margin-left:9%;"><b>alias</b> [<b>−p</b>]
+[<i>name</i>[=<i>value</i>] ...]</p>
+
+<p style="margin-left:18%;">With no arguments or with the
+<b>−p</b> option, <b>alias</b> prints the list of
+aliases in the form <b>alias</b> <i>name</i>=<i>value</i> on
+standard output. When arguments are supplied, define an
+alias for each <i>name</i> whose <i>value</i> is given. A
+trailing space in <i>value</i> causes the next word to be
+checked for alias substitution when the alias is expanded
+during command parsing. For each <i>name</i> in the argument
+list for which no <i>value</i> is supplied, print the name
+and value of the alias <i>name</i>. <b>alias</b> returns
+true unless a <i>name</i> is given (without a corresponding
+=<i>value</i>) for which no alias has been defined.</p>
+
+<p style="margin-left:9%;"><b>bg</b> [<i>jobspec</i>
+...]</p>
+
+<p style="margin-left:18%;">Resume each suspended job
+<i>jobspec</i> in the background, as if it had been started
+with <b>&</b>. If <i>jobspec</i> is not present, the
+shell uses its notion of the <i>current job</i>. <b>bg</b>
+<i>jobspec</i> returns 0 unless run when job control is
+disabled or, when run with job control enabled, any
+specified <i>jobspec</i> was not found or was started
+without job control.</p>
+
+<p style="margin-left:9%;"><b>bind</b> [<b>−m</b>
+<i>keymap</i>] [<b>−lsvSVX</b>] <b><br>
+bind</b> [<b>−m</b> <i>keymap</i>] [<b>−q</b>
+<i>function</i>] [<b>−u</b> <i>function</i>]
+[<b>−r</b> <i>keyseq</i>] <b><br>
+bind</b> [<b>−m</b> <i>keymap</i>] <b>−f</b>
+<i>filename</i> <b><br>
+bind</b> [<b>−m</b> <i>keymap</i>] <b>−x</b>
+<i>keyseq</i>[:] <i>shell−command</i> <b><br>
+bind</b> [<b>−m</b> <i>keymap</i>]
+<i>keyseq</i>:<i>function−name</i> <b><br>
+bind</b> [<b>−m</b> <i>keymap</i>]
+<b>−p</b>|<b>−P</b>
+[<i>readline−command</i>] <b><br>
+bind</b> [<b>−m</b> <i>keymap</i>]
+<i>keyseq</i>:<i>readline−command</i> <b><br>
+bind</b> <i>readline-command-line</i></p>
+
+<p style="margin-left:18%;">Display current <b>readline</b>
+key and function bindings, bind a key sequence to a
+<b>readline</b> function or macro or to a shell command, or
+set a <b>readline</b> variable. Each non-option argument is
+a key binding or command as it would appear in a
+<b>readline</b> initialization file such as <i>.inputrc</i>,
+but each binding or command must be passed as a separate
+argument; e.g., '"\C−x\C−r":
+re−read−init−file'. In the following
+descriptions, output available to be re-read is formatted as
+commands that would appear in a <b>readline</b>
+initialization file or that would be supplied as individual
+arguments to a <b>bind</b> command. Options, if supplied,
+have the following meanings: <b><br>
+−m</b> <i>keymap</i></p>
-is being used, <B>bash</B> will attempt to perform hostname completion when a
-word containing a <B>@</B> is being completed (see
-<B>Completing</B>
+<p style="margin-left:27%;">Use <i>keymap</i> as the keymap
+to be affected by the subsequent bindings. Acceptable
+<i>keymap</i> names are <i>emacs, emacs−standard,
+emacs−meta, emacs−ctlx, vi, vi−move,
+vi−command</i>, and <i>vi−insert</i>. <i>vi</i>
+is equivalent to <i>vi−command</i>
+(<i>vi−move</i> is also a synonym); <i>emacs</i> is
+equivalent to <i>emacs−standard</i>.</p>
-under
-<FONT SIZE=-1><B>READLINE</B>
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
-</FONT>
-above).
-This is enabled by default.
-<DT><B>huponexit</B>
+<p><b>−l</b></p></td>
+<td width="6%"></td>
+<td width="73%">
-<DD>
-If set, <B>bash</B> will send
-<FONT SIZE=-1><B>SIGHUP</B>
-</FONT>
-to all jobs when an interactive login shell exits.
-<DT><B>inherit_errexit</B>
+<p>List the names of all <b>readline</b> functions.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
-<DD>
-If set, command substitution inherits the value of the <B>errexit</B> option,
-instead of unsetting it in the subshell environment.
-This option is enabled when posix mode is enabled.
-<DT><B>interactive_comments</B>
-<DD>
-In an interactive shell, a word beginning with <B>#</B>
-causes that word and all remaining characters on that
-line to be ignored, as in a non-interactive shell
-(see
-<FONT SIZE=-1><B>COMMENTS</B>
+<p><b>−p</b></p></td>
+<td width="6%"></td>
+<td width="73%">
-</FONT>
-above).
-This option is enabled by default.
-<DT><B>lastpipe</B>
+<p>Display <b>readline</b> function names and bindings in
+such a way that they can be used as an argument to a
+subsequent <b>bind</b> command or in a <b>readline</b>
+initialization file. If arguments remain after option
+processing, <b>bind</b> treats them as <b>readline</b>
+command names and restricts output to those names.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
-<DD>
-If set, and job control is not active, the shell runs the last command of
-a pipeline not executed in the background in the current shell environment.
-<DT><B>lithist</B>
-<DD>
-If set, and the
-<B>cmdhist</B>
+<p><b>−P</b></p></td>
+<td width="6%"></td>
+<td width="73%">
-option is enabled, multi-line commands are saved to the history with
-embedded newlines rather than using semicolon separators where possible.
-<DT><B>localvar_inherit</B>
-
-<DD>
-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 not inherited.
-<DT><B>localvar_unset</B>
-
-<DD>
-If set, calling <B>unset</B> on local variables in previous function scopes
-marks them so subsequent lookups find them unset until that function
-returns.
-This is identical to the behavior of unsetting local variables at the
-current function scope.
-<DT><B>login_shell</B>
-
-<DD>
-The shell sets this option if it is started as a login shell (see
-<FONT SIZE=-1><B>INVOCATION</B>
-
-</FONT>
-
-above).
-The value may not be changed.
-<DT><B>mailwarn</B>
-
-<DD>
-If set, and a file that <B>bash</B> is checking for mail has been
-accessed since the last time it was checked,
-<B>bash</B> displays the message
-
-<DT><B>no_empty_cmd_completion</B>
-
-<DD>
-If set, and
-<B>readline</B>
-
-is being used,
-<B>bash</B>
-
-does not search
-<FONT SIZE=-1><B>PATH</B>
-
-</FONT>
-for possible completions when completion is attempted on an empty line.
-<DT><B>nocaseglob</B>
-
-<DD>
-If set,
-<B>bash</B>
-
-matches filenames in a case-insensitive fashion when performing pathname
-expansion (see
-<B>Pathname Expansion</B>
-
-
-above).
-<DT><B>nocasematch</B>
-
-<DD>
-If set,
-<B>bash</B>
-
-matches patterns in a case-insensitive fashion when performing matching
-while executing <B>case</B> or <B>[[</B> conditional commands,
-when performing pattern substitution word expansions,
-or when filtering possible completions as part of programmable completion.
-<DT><B>noexpand_translation</B>
-
-<DD>
-If set,
-<B>bash</B>
-
-encloses the translated results of
-<B>$ ... </B>
-
-quoting in single quotes instead of double quotes.
-If the string is not translated, this has no effect.
-<DT><B>nullglob</B>
-<DD>
-If set, pathname expansion patterns which match no files
-(see
-<B>Pathname Expansion</B>
-
-
-above)
-expand to nothing and are removed, rather than expanding to themselves.
-<DT><B>patsub_replacement</B>
-
-<DD>
-If set, <B>bash</B>
-expands occurrences of <B>&</B> in the replacement string of pattern
-substitution to the text matched by the pattern, as described
-under <B>Parameter Expansion</B>
+<p>List current <b>readline</b> function names and
+bindings. If arguments remain after option processing,
+<b>bind</b> treats them as <b>readline</b> command names and
+restricts output to those names.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−s</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Display <b>readline</b> key sequences bound to macros
+and the strings they output in such a way that they can be
+used as an argument to a subsequent <b>bind</b> command or
+in a <b>readline</b> initialization file.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−S</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Display <b>readline</b> key sequences bound to macros
+and the strings they output.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−v</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Display <b>readline</b> variable names and values in
+such a way that they can be used as an argument to a
+subsequent <b>bind</b> command or in a <b>readline</b>
+initialization file.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
-above.
-This option is enabled by default.
-<DT><B>progcomp</B>
+<p><b>−V</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>List current <b>readline</b> variable names and
+values.</p> </td></tr>
+</table>
+
+<p style="margin-left:18%;"><b>−f</b>
+<i>filename</i></p>
-<DD>
-If set, enable the programmable completion facilities (see
-<B>Programmable Completion</B>
+<p style="margin-left:27%;">Read key bindings from
+<i>filename</i>.</p>
-above).
-This option is enabled by default.
-<DT><B>progcomp_alias</B>
+<p style="margin-left:18%;"><b>−q</b>
+<i>function</i></p>
-<DD>
-If set, and programmable completion is enabled, <B>bash</B> treats a command
-name that doesn't have any completions as a possible alias and attempts
-alias expansion.
-If it has an alias, <B>bash</B> attempts programmable
-completion using the command word resulting from the expanded alias.
-<DT><B>promptvars</B>
+<p style="margin-left:27%;">Display key sequences that
+invoke the named <b>readline</b> <i>function</i>.</p>
+
+<p style="margin-left:18%;"><b>−u</b>
+<i>function</i></p>
+
+<p style="margin-left:27%;">Unbind all key sequences bound
+to the named <b>readline</b> <i>function</i>.</p>
+
+<p style="margin-left:18%;"><b>−r</b>
+<i>keyseq</i></p>
+
+<p style="margin-left:27%;">Remove any current binding for
+<i>keyseq</i>.</p>
+
+<p style="margin-left:18%;"><b>−x</b>
+<i>keyseq</i><b>[: ]</b><i>shell−command</i></p>
+
+<p style="margin-left:27%;">Cause
+<i>shell−command</i> to be executed whenever
+<i>keyseq</i> is entered. The separator between
+<i>keyseq</i> and <i>shell−command</i> is either
+whitespace or a colon optionally followed by whitespace. If
+the separator is whitespace, <i>shell−command</i> must
+be enclosed in double quotes and <b>readline</b> expands any
+of its special backslash-escapes in
+<i>shell−command</i> before saving it. If the
+separator is a colon, any enclosing double quotes are
+optional, and <b>readline</b> does not expand the command
+string before saving it. Since the entire key binding
+expression must be a single argument, it should be enclosed
+in single quotes. When <i>shell−command</i> is
+executed, the shell sets the
+<b><small>READLINE_LINE</small></b> variable to the contents
+of the <b>readline</b> line buffer and the
+<b><small>READLINE_POINT</small></b> and
+<b><small>READLINE_MARK</small></b> variables to the current
+location of the insertion point and the saved insertion
+point (the mark), respectively. The shell assigns any
+numeric argument the user supplied to the
+<b><small>READLINE_ARGUMENT</small></b> variable. If there
+was no argument, that variable is not set. If the executed
+command changes the value of any of
+<b><small>READLINE_LINE</small></b><small>,
+<b>READLINE_POINT</b>,</small> or
+<b><small>READLINE_MARK</small></b><small>,</small> those
+new values will be reflected in the editing state.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−X</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>List all key sequences bound to shell commands and the
+associated commands in a format that can be reused as an
+argument to a subsequent <b>bind</b> command.</p></td></tr>
+</table>
+
+<p style="margin-left:18%; margin-top: 1em">The return
+value is 0 unless an unrecognized option is supplied or an
+error occurred.</p>
+
+<p style="margin-left:9%;"><b>break</b> [<i>n</i>]</p>
+
+<p style="margin-left:18%;">Exit from within a <b>for</b>,
+<b>while</b>, <b>until</b>, or <b>select</b> loop. If
+<i>n</i> is specified, <b>break</b> exits <i>n</i> enclosing
+loops. <i>n</i> must be ≥ 1. If <i>n</i> is greater than
+the number of enclosing loops, all enclosing loops are
+exited. The return value is 0 unless <i>n</i> is not greater
+than or equal to 1.</p>
+
+<p style="margin-left:9%;"><b>builtin</b>
+<i>shell−builtin</i> [<i>arguments</i>]</p>
+
+<p style="margin-left:18%;">Execute the specified shell
+builtin <i>shell−builtin</i>, passing it
+<i>arguments</i>, and return its exit status. This is useful
+when defining a function whose name is the same as a shell
+builtin, retaining the functionality of the builtin within
+the function. The <b>cd</b> builtin is commonly redefined
+this way. The return status is false if
+<i>shell−builtin</i> is not a shell builtin
+command.</p>
+
+<p style="margin-left:9%;"><b>caller</b> [<i>expr</i>]</p>
+
+<p style="margin-left:18%;">Returns the context of any
+active subroutine call (a shell function or a script
+executed with the <b>.</b> or <b>source</b> builtins).</p>
+
+<p style="margin-left:18%; margin-top: 1em">Without
+<i>expr</i>, <b>caller</b> displays the line number and
+source filename of the current subroutine call. If a
+non-negative integer is supplied as <i>expr</i>,
+<b>caller</b> displays the line number, subroutine name, and
+source file corresponding to that position in the current
+execution call stack. This extra information may be used,
+for example, to print a stack trace. The current frame is
+frame 0.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The return
+value is 0 unless the shell is not executing a subroutine
+call or <i>expr</i> does not correspond to a valid position
+in the call stack.</p>
+
+<p style="margin-left:9%;"><b>cd</b> [<b>−L</b>]
+[<b>−@</b>] [<i>dir</i>] <b><br>
+cd −P</b> [<b>−e</b>] [<b>−@</b>]
+[<i>dir</i>]</p>
+
+<p style="margin-left:18%;">Change the current directory to
+<i>dir</i>. if <i>dir</i> is not supplied, the value of the
+<b><small>HOME</small></b> shell variable is used as
+<i>dir</i>. If <i>dir</i> is the empty string, <b>cd</b>
+treats it as an error. The variable
+<b><small>CDPATH</small></b> exists, and <i>dir</i> does not
+begin with a slash (/), <b>cd</b> uses it as a search path:
+the shell searches each directory name in
+<b><small>CDPATH</small></b> for <i>dir</i>. Alternative
+directory names in <b><small>CDPATH</small></b> are
+separated by a colon (:). A null directory name in
+<b><small>CDPATH</small></b> is the same as the current
+directory, i.e., “.”.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The
+<b>−P</b> option causes <b>cd</b> to use the physical
+directory structure by resolving symbolic links while
+traversing <i>dir</i> and before processing instances of
+<i>..</i> in <i>dir</i> (see also the <b>−P</b> option
+to the <b>set</b> builtin command).</p>
+
+<p style="margin-left:18%; margin-top: 1em">The
+<b>−L</b> option forces <b>cd</b> to follow symbolic
+links by resolving the link after processing instances of
+<i>..</i> in <i>dir</i>. If <i>..</i> appears in <i>dir</i>,
+<b>cd</b> processes it by removing the immediately previous
+pathname component from <i>dir</i>, back to a slash or the
+beginning of <i>dir</i>, and verifying that the portion of
+<i>dir</i> it has processed to that point is still a valid
+directory name after removing the pathname component. If it
+is not a valid directory name, <b>cd</b> returns a non-zero
+status. If neither <b>−L</b> nor <b>−P</b> is
+supplied, <b>cd</b> behaves as if <b>−L</b> had been
+supplied.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If the
+<b>−e</b> option is supplied with <b>−P</b>, and
+<b>cd</b> cannot successfully determine the current working
+directory after a successful directory change, it returns a
+non-zero status.</p>
+
+<p style="margin-left:18%; margin-top: 1em">On systems that
+support it, the <b>−@</b> option presents the extended
+attributes associated with a file as a directory.</p>
+
+<p style="margin-left:18%; margin-top: 1em">An argument of
+<b>−</b> is converted to <b><small>$OLDPWD</small></b>
+before attempting the directory change.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If <b>cd</b>
+uses a non-empty directory name from
+<b><small>CDPATH</small></b><small>,</small> or if
+<b>−</b> is the first argument, and the directory
+change is successful, <b>cd</b> writes the absolute pathname
+of the new working directory to the standard output.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If the
+directory change is successful, <b>cd</b> sets the value of
+the <b>PWD</b> environment variable to the new directory
+name, and sets the <b>OLDPWD</b> environment variable to the
+value of the current working directory before the
+change.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The return
+value is true if the directory was successfully changed;
+false otherwise.</p>
+
+<p style="margin-left:9%;"><b>command</b>
+[<b>−pVv</b>] <i>command</i> [<i>arg</i> ...]</p>
+
+<p style="margin-left:18%;">The <b>command</b> builtin runs
+<i>command</i> with <i>args</i> suppressing the normal shell
+function lookup for <i>command</i>. Only builtin commands or
+commands found in the <b><small>PATH</small></b> named
+<i>command</i> are executed. If the <b>−p</b> option
+is supplied, the search for <i>command</i> is performed
+using a default value for <b><small>PATH</small></b> that is
+guaranteed to find all of the standard utilities.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If either the
+<b>−V</b> or <b>−v</b> option is supplied,
+<b>command</b> prints a description of <i>command</i>. The
+<b>−v</b> option displays a single word indicating the
+command or filename used to invoke <i>command</i>; the
+<b>−V</b> option produces a more verbose
+description.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If the
+<b>−V</b> or <b>−v</b> option is supplied, the
+exit status is zero if <i>command</i> was found, and
+non-zero if not. If neither option is supplied and an error
+occurred or <i>command</i> cannot be found, the exit status
+is 127. Otherwise, the exit status of the <b>command</b>
+builtin is the exit status of <i>command</i>.</p>
+
+<p style="margin-left:9%;"><b>compgen</b> [<b>−V</b>
+<i>varname</i>] [<i>option</i>] [<i>word</i>]</p>
+
+<p style="margin-left:18%;">Generate possible completion
+matches for <i>word</i> according to the <i>option</i>s,
+which may be any option accepted by the <b>complete</b>
+builtin with the exceptions of <b>−p</b>,
+<b>−r</b>, <b>−D</b>, <b>−E</b>, and
+<b>−I</b>, and write the matches to the standard
+output.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If the
+<b>−V</b> option is supplied, <b>compgen</b> stores
+the generated completions into the indexed array variable
+<i>varname</i> instead of writing them to the standard
+output.</p>
+
+<p style="margin-left:18%; margin-top: 1em">When using the
+<b>−F</b> or <b>−C</b> options, the various
+shell variables set by the programmable completion
+facilities, while available, will not have useful
+values.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The matches
+will be generated in the same way as if the programmable
+completion code had generated them directly from a
+completion specification with the same flags. If <i>word</i>
+is specified, only those completions matching <i>word</i>
+will be displayed or stored.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The return
+value is true unless an invalid option is supplied, or no
+matches were generated.</p>
+
+<p style="margin-left:9%;"><b>complete</b>
+[<b>−abcdefgjksuv</b>] [<b>−o</b>
+<i>comp-option</i>] [<b>−DEI</b>] [<b>−A</b>
+<i>action</i>]</p>
+
+<p style="margin-left:18%;">[<b>−G</b>
+<i>globpat</i>] [<b>−W</b> <i>wordlist</i>]
+[<b>−F</b> <i>function</i>] [<b>−C</b>
+<i>command</i>] <br>
+[<b>−X</b> <i>filterpat</i>] [<b>−P</b>
+<i>prefix</i>] [<b>−S</b> <i>suffix</i>] <i>name</i>
+[<i>name</i> ...]</p>
+
+<p style="margin-left:9%;"><b>complete −pr</b>
+[<b>−DEI</b>] [<i>name</i> ...]</p>
+
+<p style="margin-left:18%;">Specify how arguments to each
+<i>name</i> should be completed.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If the
+<b>−p</b> option is supplied, or if no options or
+<i>name</i>s are supplied, print existing completion
+specifications in a way that allows them to be reused as
+input. The <b>−r</b> option removes a completion
+specification for each <i>name</i>, or, if no <i>name</i>s
+are supplied, all completion specifications.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The
+<b>−D</b> option indicates that other supplied options
+and actions should apply to the “default”
+command completion; that is, completion attempted on a
+command for which no completion has previously been defined.
+The <b>−E</b> option indicates that other supplied
+options and actions should apply to “empty”
+command completion; that is, completion attempted on a blank
+line. The <b>−I</b> option indicates that other
+supplied options and actions should apply to completion on
+the initial non-assignment word on the line, or after a
+command delimiter such as <b>;</b> or <b>|</b>, which is
+usually command name completion. If multiple options are
+supplied, the <b>−D</b> option takes precedence over
+<b>−E</b>, and both take precedence over
+<b>−I</b>. If any of <b>−D</b>, <b>−E</b>,
+or <b>−I</b> are supplied, any other <i>name</i>
+arguments are ignored; these completions only apply to the
+case specified by the option.</p>
-<DD>
-If set, prompt strings undergo
-parameter expansion, command substitution, arithmetic
-expansion, and quote removal after being expanded as described in
-<FONT SIZE=-1><B>PROMPTING</B>
-
-</FONT>
-
-above.
-This option is enabled by default.
-<DT><B>restricted_shell</B>
-
-<DD>
-The shell sets this option if it is started in restricted mode
-(see
-<FONT SIZE=-1><B>RESTRICTED SHELL</B>
-
-</FONT>
-
-below).
-The value may not be changed.
-This is not reset when the startup files are executed, allowing
-the startup files to discover whether or not a shell is restricted.
-<DT><B>shift_verbose</B>
-
-<DD>
-If set, the
-<B>shift</B>
-
-builtin prints an error message when the shift count exceeds the
-number of positional parameters.
-<DT><B>sourcepath</B>
-
-<DD>
-If set, the
-<B>.</B> (<B>source</B>) builtin uses the value of
-<FONT SIZE=-1><B>PATH</B>
+<p style="margin-left:18%; margin-top: 1em">The process of
+applying these completion specifications when attempting
+word completion is described above under <b>Programmable
+Completion</b>.</p>
-</FONT>
-to find the directory containing the file supplied as an argument when
-the <B>-p</B> option is not supplied.
-This option is enabled by default.
-<DT><B>varredir_close</B>
+<p style="margin-left:18%; margin-top: 1em">Other options,
+if specified, have the following meanings. The arguments to
+the <b>−G</b>, <b>−W</b>, and <b>−X</b>
+options (and, if necessary, the <b>−P</b> and
+<b>−S</b> options) should be quoted to protect them
+from expansion before the <b>complete</b> builtin is
+invoked. <b><br>
+−o</b> <i>comp-option</i></p>
-<DD>
-If set, the shell automatically closes file descriptors assigned using the
-<I>{varname}</I> redirection syntax (see
-<FONT SIZE=-1><B>REDIRECTION</B>
-
-</FONT>
-
-above)
-instead of leaving them open when the command completes.
-<DT><B>xpg_echo</B>
-
-<DD>
-If set, the <B>echo</B> builtin expands backslash-escape sequences
-by default.
-If the <B>posix</B> shell option is also enabled, <B>echo</B> does not
-interpret any options.
-</DL></DL>
-
-
-<DT><B>suspend</B> [<B>-f</B>]<DD>
-Suspend the execution of this shell until it receives a
-<FONT SIZE=-1><B>SIGCONT</B>
-
-</FONT>
-signal.
-A login shell, or a shell without job control enabled,
-cannot be suspended; the
-<B>-f</B>
-
-option will 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
-<B>-f</B>
-
-is not supplied.
-<DT><B>test</B> <I>expr</I><DD>
-
-<DT><B>[</B> <I>expr</I> <B>]</B><DD>
-
-Return a status of 0 (true) or 1 (false) depending on
-the evaluation of the conditional expression
-<I>expr</I>.
-
-Each operator and operand must be a separate argument.
-Expressions are composed of the primaries described
-
-above
-under
-<FONT SIZE=-1><B>CONDITIONAL EXPRESSIONS</B>.
-
-</FONT>
-<B>test</B> does not accept any options, nor does it accept and ignore
-an argument of <B>--</B> as signifying the end of options.
-<DT><DD>
-Expressions may be combined using the following operators, listed
-in decreasing order of precedence.
-The evaluation depends on the number of arguments; see below.
-<B>test</B> uses operator precedence when there are five or more arguments.
-<DL COMPACT><DT><DD>
-
-<DL COMPACT>
-<DT><B>! </B><I>expr</I>
-
-<DD>
-True if
-<I>expr</I>
-
-is false.
-<DT><B>( </B><I>expr</I> )
-
-<DD>
-Returns the value of <I>expr</I>.
-This may be used to override normal operator precedence.
-<DT><I>expr1</I> -<B>a</B> <I>expr2</I><DD>
-True if both
-<I>expr1</I>
-
-and
-<I>expr2</I>
-
-are true.
-<DT><I>expr1</I> -<B>o</B> <I>expr2</I><DD>
-True if either
-<I>expr1</I>
-
-or
-<I>expr2</I>
-
-is true.
-
-</DL>
-<P>
-
-<B>test</B> and <B>[</B> evaluate conditional
-expressions using a set of rules based on the number of arguments.
-<P>
-
-
-<DL COMPACT>
-<DT>0 arguments<DD>
-The expression is false.
-<DT>1 argument<DD>
-The expression is true if and only if the argument is not null.
-<DT>2 arguments<DD>
-If the first argument is <B>!</B>, the expression is true if and
-only if the second argument is null.
-If the first argument is one of the unary conditional operators listed
-
-above
-under
-<FONT SIZE=-1><B>CONDITIONAL EXPRESSIONS</B>,
-
-</FONT>
-the expression is true if the unary test is true.
-If the first argument is not a valid unary conditional operator, the expression
-is false.
-<DT>3 arguments<DD>
-The following conditions are applied in the order listed.
-If the second argument is one of the binary conditional operators listed
-
-above
-under
-<FONT SIZE=-1><B>CONDITIONAL EXPRESSIONS</B>,
-
-</FONT>
-the result of the expression is the result of the binary test using
-the first and third arguments as operands.
-The <B>-a</B> and <B>-o</B> operators are considered binary operators
-when there are three arguments.
-If the first argument is <B>!</B>, the value is the negation of
-the two-argument test using the second and third arguments.
-If the first argument is exactly <B>(</B> and the third argument is
-exactly <B>)</B>, the result is the one-argument test of the second
-argument.
-Otherwise, the expression is false.
-<DT>4 arguments<DD>
-The following conditions are applied in the order listed.
-If the first argument is <B>!</B>, the result is the negation of
-the three-argument expression composed of the remaining arguments.
-If the first argument is exactly <B>(</B> and the fourth argument is
-exactly <B>)</B>, the result is the two-argument test of the second
-and third arguments.
-Otherwise, the expression is parsed and evaluated according to
-precedence using the rules listed above.
-<DT>5 or more arguments<DD>
-The expression is parsed and evaluated according to precedence
-using the rules listed above.
-
-</DL>
-<P>
-
-When the shell is in posix mode, or if the expression is part
-of the <B>[[</B> command,
-the <B><</B> and <B>></B> operators sort using the
-current locale.
-If the shell is not in posix mode, the <B>test</B> and <B>[</B>
-commands sort lexicographically using ASCII ordering.
-<P>
-
-The historical operator-precedence parsing with 4 or more arguments can
-lead to ambiguities when it encounters strings that look like primaries.
-The
-<FONT SIZE=-1>POSIX</FONT>
-standard has deprecated the <B>-a</B> and <B>-o</B>
-primaries and enclosing expressions within parentheses.
-Scripts should no longer use them.
-It's much more reliable to restrict test invocations to a single primary,
-and to replace uses of <B>-a</B> and <B>-o</B> with the shell's
-<B>&&</B> and <B>||</B> list operators.
-</DL>
-
-<DT><B>times</B>
-
-<DD>
-Print the accumulated user and system times for the shell and
-for processes run from the shell.
-The return status is 0.
-<DT><B>trap</B> [<B>-lpP</B>] [[<I>action</I>] <I>sigspec</I> ...]<DD>
-The
-<I>action</I>
-
-is a command that is read and executed when the shell receives
-any of the signals
-<I>sigspec</I>.
-
-If
-<I>action</I>
-
-is absent (and there is a single <I>sigspec</I>) or
-<B>-</B>,
-
-each specified <I>sigspec</I> is
-reset to the value it had when the shell was started.
-If
-<I>action</I>
-
-is the null string the signal specified by each
-<I>sigspec</I>
-
-is ignored by the shell and by the commands it invokes.
-<DT><DD>
-If no arguments are supplied,
-<B>trap</B>
-
-displays the actions associated with each trapped signal
-as a set of <B>trap</B> commands
-that can be reused as shell input to
-restore the current signal dispositions.
-If
-<B>-p</B>
-
-is given,
-and
-<I>action</I>
-
-is not present,
-then <B>trap</B> displays the actions associated with each
-<I>sigspec</I>
-
-or, if none are supplied, for all trapped signals,
-as a set of <B>trap</B> commands
-that can be reused as shell input to
-restore the current signal dispositions.
-The
-<B>-P</B>
-
-option behaves similarly, but displays only the actions
-associated with each <I>sigspec</I> argument.
-<B>-P</B>
-
-requires at least one <I>sigspec</I> argument.
-The <B>-P</B> or <B>-p</B> options may be used
-in a subshell environment (e.g., command substitution) and, as
-long as they are used before <B>trap</B> is used to change a signal's
-handling, will display the state of its parent's traps.
-<DT><DD>
-The
-<B>-l</B>
-
-option prints a list of signal names and
-their corresponding numbers.
-Each
-<I>sigspec</I>
-
-is either
-a signal name defined in <<I>signal.h</I>>, or a signal number.
-Signal names are case insensitive and the
-<FONT SIZE=-1><B>SIG</B>
-
-</FONT>
-prefix is optional.
-If <B>-l</B> is supplied with no <I>sigspec</I> arguments, it prints a
-list of valid signal names.
-<DT><DD>
-If a
-<I>sigspec</I>
-
-is
-<FONT SIZE=-1><B>EXIT</B>
-
-</FONT>
-(0),
-<I>action</I>
-
-is executed on exit from the shell.
-If a
-<I>sigspec</I>
-
-is
-<FONT SIZE=-1><B>DEBUG</B>,
-
-</FONT>
-<I>action</I>
-
-is executed before every <I>simple command</I>, <I>for</I> command,
-<I>case</I> command, <I>select</I> command, (( arithmetic command,
-[[ conditional command,
-arithmetic <I>for</I> command, and before the first command executes
-in a shell function (see
-<FONT SIZE=-1><B>SHELL GRAMMAR</B>
-
-</FONT>
-
-above).
-Refer to the description of the <B>extdebug</B> shell option
-(see
-<B>shopt</B>
-
-
-above)
-for details of its effect on the <B>DEBUG</B> trap.
-If a
-<I>sigspec</I>
-
-is
-<FONT SIZE=-1><B>RETURN</B>,
-
-</FONT>
-<I>action</I>
-
-is executed each time a shell function or a script executed with
-the <B>.</B> or <B>source</B> builtins finishes executing.
-<DT><DD>
-If a
-<I>sigspec</I>
-
-is
-<FONT SIZE=-1><B>ERR</B>,
-
-</FONT>
-<I>action</I>
-
-is executed whenever
-a pipeline (which may consist of a single simple
-command), a list, or a compound command returns a
-non-zero exit status,
-subject to the following conditions.
-The
-<FONT SIZE=-1><B>ERR</B>
-
-</FONT>
-trap is not executed if the failed
-command is part of the command list immediately following a
-<B>while</B>
+<p style="margin-left:28%;">The <i>comp-option</i> controls
+several aspects of the compspec’s behavior beyond the
+simple generation of completions. <i>comp-option</i> may be
+one of: <b><br>
+bashdefault</b></p>
-or
-<B>until</B>
+<p style="margin-left:38%;">Perform the rest of the default
+<b>bash</b> completions if the compspec generates no
+matches.</p>
-reserved word,
-part of the test in an
-<I>if</I>
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="28%"></td>
+<td width="9%">
-statement, part of a command executed in a
-<B>&&</B>
-or
-<B>||</B>
+<p><b>default</b></p></td>
+<td width="1%"></td>
+<td width="62%">
-list except the command following the final <B>&&</B> or <B>||</B>,
-any command in a pipeline but the last
-(subject to the state of the <B>pipefail</B> shell option),
-or if the command's return value is
-being inverted using
-<B>!</B>.
-These are the same conditions obeyed by the <B>errexit</B> (<B>-e</B>) option.
-<DT><DD>
-When the shell is not interactive,
-signals ignored upon entry to the shell cannot be trapped or reset.
-Interactive shells permit trapping signals ignored on entry.
-Trapped signals that are not being ignored are reset to their original
-values in a subshell or subshell environment when one is created.
-The return status is false if any
-<I>sigspec</I>
+<p>Use <b>readline</b>’s default filename completion
+if the compspec generates no matches.</p></td></tr>
+</table>
-is invalid; otherwise
-<B>trap</B>
+<p style="margin-left:28%;"><b>dirnames</b></p>
-returns true.
-<DT><B>true</B><DD>
-Does nothing, returns a 0 status.
-<DT><B>type</B> [<B>-aftpP</B>] <I>name</I> [<I>name</I> ...]<DD>
-Indicate how each
-<I>name</I>
+<p style="margin-left:38%;">Perform directory name
+completion if the compspec generates no matches.</p>
-would be interpreted if used as a command name.
-<DT><DD>
-If the
-<B>-t</B>
+<p style="margin-left:28%;"><b>filenames</b></p>
-option is used,
-<B>type</B>
+<p style="margin-left:38%;">Tell <b>readline</b> that the
+compspec generates filenames, so it can perform any
+filename−specific processing (such as adding a slash
+to directory names, quoting special characters, or
+suppressing trailing spaces). This is intended to be used
+with shell functions.</p>
-prints a string which is one of
-<I>alias</I>,
+<p style="margin-left:28%;"><b>fullquote</b></p>
-<I>keyword</I>,
+<p style="margin-left:38%;">Tell <b>readline</b> to quote
+all the completed words even if they are not filenames.</p>
-<I>function</I>,
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="28%"></td>
+<td width="9%">
-<I>builtin</I>,
-or
-<I>file</I>
+<p><b>noquote</b></p></td>
+<td width="1%"></td>
+<td width="62%">
-if
-<I>name</I>
-is an alias, shell reserved word, function, builtin, or executable file,
-respectively.
-If the
-<I>name</I>
+<p>Tell <b>readline</b> not to quote the completed words if
+they are filenames (quoting filenames is the default).</p></td></tr>
+<tr valign="top" align="left">
+<td width="28%"></td>
+<td width="9%">
-is not found, <B>type</B> prints nothing and returns a non-zero exit status.
-<DT><DD>
-If the
-<B>-p</B>
-option is used,
-<B>type</B>
+<p><b>nosort</b></p></td>
+<td width="1%"></td>
+<td width="62%">
-either returns the pathname of the executable file
-that would be found by searching
-<B>$PATH</B>
-for
-<I>name</I>
+<p>Tell <b>readline</b> not to sort the list of possible
+completions alphabetically.</p></td></tr>
+<tr valign="top" align="left">
+<td width="28%"></td>
+<td width="9%">
-or nothing if
-would not return
-<I>file</I>.
+<p><b>nospace</b></p></td>
+<td width="1%"></td>
+<td width="62%">
-The
-<B>-P</B>
-option forces a
-<FONT SIZE=-1><B>PATH</B>
+<p>Tell <b>readline</b> not to append a space (the default)
+to words completed at the end of the line.</p></td></tr>
+</table>
-</FONT>
-search for each <I>name</I>, even if
+<p style="margin-left:28%;"><b>plusdirs</b></p>
-would not return
-<I>file</I>.
+<p style="margin-left:38%;">After generating any matches
+defined by the compspec, attempt directory name completion
+and add any matches to the results of the other actions.</p>
-If <I>name</I> is present in the table of hashed commands,
-<B>-p</B>
+<p style="margin-left:18%;"><b>−A</b>
+<i>action</i></p>
-and
-<B>-P</B>
+<p style="margin-left:28%;">The <i>action</i> may be one of
+the following to generate a list of possible
+completions:</p>
-print the hashed value, which is not necessarily the file that appears
-first in
-<FONT SIZE=-1><B>PATH</B>.
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="28%"></td>
+<td width="7%">
-</FONT>
-<DT><DD>
-If the
-<B>-a</B>
-option is used,
-<B>type</B>
+<p><b>alias</b></p></td>
+<td width="3%"></td>
+<td width="54%">
-prints all of the places that contain a command named
-<I>name</I>.
-This includes aliases, reserved words, functions, and builtins,
-but the path search options (<B>-p</B> and <B>-P</B>)
-can be supplied to restrict the output to executable files.
-<B>type</B> does not consult the table of hashed commands
-when using
-<B>-a</B>
+<p>Alias names. May also be specified as
+<b>−a</b>.</p> </td>
+<td width="8%">
+</td></tr>
+</table>
+
+<p style="margin-left:28%;"><b>arrayvar</b></p>
+
+<p style="margin-left:38%;">Array variable names.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="28%"></td>
+<td width="9%">
+
+
+<p><b>binding</b></p></td>
+<td width="1%"></td>
+<td width="62%">
+
+
+<p><b>Readline</b> key binding names.</p></td></tr>
+<tr valign="top" align="left">
+<td width="28%"></td>
+<td width="9%">
+
+
+<p><b>builtin</b></p></td>
+<td width="1%"></td>
+<td width="62%">
+
+
+<p>Names of shell builtin commands. May also be specified
+as <b>−b</b>.</p></td></tr>
+<tr valign="top" align="left">
+<td width="28%"></td>
+<td width="9%">
+
+
+<p><b>command</b></p></td>
+<td width="1%"></td>
+<td width="62%">
+
+
+<p>Command names. May also be specified as
+<b>−c</b>.</p> </td></tr>
+</table>
+
+<p style="margin-left:28%;"><b>directory</b></p>
+
+<p style="margin-left:38%;">Directory names. May also be
+specified as <b>−d</b>.</p>
+
+<p style="margin-left:28%;"><b>disabled</b></p>
+
+<p style="margin-left:38%;">Names of disabled shell
+builtins.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="28%"></td>
+<td width="9%">
+
+
+<p><b>enabled</b></p></td>
+<td width="1%"></td>
+<td width="62%">
+
+
+<p>Names of enabled shell builtins.</p></td></tr>
+<tr valign="top" align="left">
+<td width="28%"></td>
+<td width="9%">
+
+
+<p><b>export</b></p></td>
+<td width="1%"></td>
+<td width="62%">
+
+
+<p>Names of exported shell variables. May also be specified
+as <b>−e</b>.</p></td></tr>
+<tr valign="top" align="left">
+<td width="28%"></td>
+<td width="9%">
+
+
+<p><b>file</b></p></td>
+<td width="1%"></td>
+<td width="62%">
+
+
+<p>File and directory names, similar to
+<b>readline</b>’s filename completion. May also be
+specified as <b>−f</b>.</p></td></tr>
+</table>
+
+<p style="margin-left:28%;"><b>function</b></p>
+
+<p style="margin-left:38%;">Names of shell functions.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="28%"></td>
+<td width="7%">
+
+
+<p><b>group</b></p></td>
+<td width="3%"></td>
+<td width="54%">
+
+
+<p>Group names. May also be specified as
+<b>−g</b>.</p> </td>
+<td width="8%">
+</td></tr>
+</table>
+
+<p style="margin-left:28%;"><b>helptopic</b></p>
+
+<p style="margin-left:38%;">Help topics as accepted by the
+<b>help</b> builtin.</p>
+
+<p style="margin-left:28%;"><b>hostname</b></p>
+
+<p style="margin-left:38%;">Hostnames, as taken from the
+file specified by the <b><small>HOSTFILE</small></b> shell
+variable.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="28%"></td>
+<td width="9%">
+
+
+<p><b>job</b></p></td>
+<td width="1%"></td>
+<td width="62%">
+
+
+<p>Job names, if job control is active. May also be
+specified as <b>−j</b>.</p></td></tr>
+<tr valign="top" align="left">
+<td width="28%"></td>
+<td width="9%">
+
+
+<p><b>keyword</b></p></td>
+<td width="1%"></td>
+<td width="62%">
+
+
+<p>Shell reserved words. May also be specified as
+<b>−k</b>.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="28%"></td>
+<td width="9%">
+
+
+<p><b>running</b></p></td>
+<td width="1%"></td>
+<td width="62%">
+
+
+<p>Names of running jobs, if job control is active.</p></td></tr>
+<tr valign="top" align="left">
+<td width="28%"></td>
+<td width="9%">
+
+
+<p><b>service</b></p></td>
+<td width="1%"></td>
+<td width="62%">
+
+
+<p>Service names. May also be specified as
+<b>−s</b>.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="28%"></td>
+<td width="9%">
+
+
+<p><b>setopt</b></p></td>
+<td width="1%"></td>
+<td width="62%">
+
+
+<p>Valid arguments for the <b>−o</b> option to the
+<b>set</b> builtin.</p></td></tr>
+<tr valign="top" align="left">
+<td width="28%"></td>
+<td width="9%">
+
+
+<p><b>shopt</b></p></td>
+<td width="1%"></td>
+<td width="62%">
+
+
+<p>Shell option names as accepted by the <b>shopt</b>
+builtin.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="28%"></td>
+<td width="9%">
+
+
+<p><b>signal</b></p></td>
+<td width="1%"></td>
+<td width="62%">
+
+
+<p>Signal names.</p></td></tr>
+<tr valign="top" align="left">
+<td width="28%"></td>
+<td width="9%">
+
+
+<p><b>stopped</b></p></td>
+<td width="1%"></td>
+<td width="62%">
+
+
+<p>Names of stopped jobs, if job control is active.</p></td></tr>
+<tr valign="top" align="left">
+<td width="28%"></td>
+<td width="9%">
+
+
+<p><b>user</b></p></td>
+<td width="1%"></td>
+<td width="62%">
+
+
+<p>User names. May also be specified as
+<b>−u</b>.</p> </td></tr>
+</table>
+
+<p style="margin-left:28%;"><b>variable</b></p>
+
+<p style="margin-left:38%;">Names of all shell variables.
+May also be specified as <b>−v</b>.</p>
+
+<p style="margin-left:18%;"><b>−C</b>
+<i>command</i></p>
+
+<p style="margin-left:28%;"><i>command</i> is executed in a
+subshell environment, and its output is used as the possible
+completions. Arguments are passed as with the
+<b>−F</b> option.</p>
+
+<p style="margin-left:18%;"><b>−F</b>
+<i>function</i></p>
+
+<p style="margin-left:28%;">The shell function
+<i>function</i> is executed in the current shell
+environment. When the function is executed, the first
+argument (<b>$1</b>) is the name of the command whose
+arguments are being completed, the second argument
+(<b>$2</b>) is the word being completed, and the third
+argument (<b>$3</b>) is the word preceding the word being
+completed on the current command line. When <i>function</i>
+finishes, programmable completion retrieves the possible
+completions from the value of the
+<b><small>COMPREPLY</small></b> array variable.</p>
+
+<p style="margin-left:18%;"><b>−G</b>
+<i>globpat</i></p>
+
+<p style="margin-left:28%;">Expand the pathname expansion
+pattern <i>globpat</i> to generate the possible
+completions.</p>
+
+<p style="margin-left:18%;"><b>−P</b>
+<i>prefix</i></p>
+
+<p style="margin-left:28%;">Add <i>prefix</i> to the
+beginning of each possible completion after all other
+options have been applied.</p>
+
+<p style="margin-left:18%;"><b>−S</b>
+<i>suffix</i></p>
+
+<p style="margin-left:28%;">Append <i>suffix</i> to each
+possible completion after all other options have been
+applied.</p>
+
+<p style="margin-left:18%;"><b>−W</b>
+<i>wordlist</i></p>
+
+<p style="margin-left:28%;">Split the <i>wordlist</i> using
+the characters in the <b><small>IFS</small></b> special
+variable as delimiters, and expand each resulting word.
+Shell quoting is honored within <i>wordlist</i>, in order to
+provide a mechanism for the words to contain shell
+metacharacters or characters in the value of
+<b><small>IFS</small></b><small>.</small> The possible
+completions are the members of the resultant list which
+match a prefix of the word being completed.</p>
+
+<p style="margin-left:18%;"><b>−X</b>
+<i>filterpat</i></p>
+
+<p style="margin-left:28%;"><i>filterpat</i> is a pattern
+as used for pathname expansion. It is applied to the list of
+possible completions generated by the preceding options and
+arguments, and each completion matching <i>filterpat</i> is
+removed from the list. A leading <b>!</b> in
+<i>filterpat</i> negates the pattern; in this case, any
+completion not matching <i>filterpat</i> is removed.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The return
+value is true unless an invalid option is supplied, an
+option other than <b>−p</b>, <b>−r</b>,
+<b>−D</b>, <b>−E</b>, or <b>−I</b> is
+supplied without a <i>name</i> argument, an attempt is made
+to remove a completion specification for a <i>name</i> for
+which no specification exists, or an error occurs adding a
+completion specification.</p>
+
+<p style="margin-left:9%;"><b>compopt</b> [<b>−o</b>
+<i>option</i>] [<b>−DEI</b>] [<b>+o</b> <i>option</i>]
+[<i>name</i>]</p>
+
+<p style="margin-left:18%;">Modify completion options for
+each <i>name</i> according to the <i>option</i>s, or for the
+currently-executing completion if no <i>name</i>s are
+supplied. If no <i>option</i>s are supplied, display the
+completion options for each <i>name</i> or the current
+completion. The possible values of <i>option</i> are those
+valid for the <b>complete</b> builtin described above.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The
+<b>−D</b> option indicates that other supplied options
+should apply to the “default” command
+completion; the <b>−E</b> option indicates that other
+supplied options should apply to “empty” command
+completion; and the <b>−I</b> option indicates that
+other supplied options should apply to completion on the
+initial word on the line. These are determined in the same
+way as the <b>complete</b> builtin.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If multiple
+options are supplied, the <b>−D</b> option takes
+precedence over <b>−E</b>, and both take precedence
+over <b>−I</b>.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The return
+value is true unless an invalid option is supplied, an
+attempt is made to modify the options for a <i>name</i> for
+which no completion specification exists, or an output error
+occurs.</p>
+
+<p style="margin-left:9%;"><b>continue</b> [<i>n</i>]</p>
+
+<p style="margin-left:18%;"><b>continue</b> resumes the
+next iteration of the enclosing <b>for</b>, <b>while</b>,
+<b>until</b>, or <b>select</b> loop. If <i>n</i> is
+specified, <b>bash</b> resumes the <i>n</i>th enclosing
+loop. <i>n</i> must be ≥ 1. If <i>n</i> is greater than
+the number of enclosing loops, the shell resumes the last
+enclosing loop (the “top-level” loop). The
+return value is 0 unless <i>n</i> is not greater than or
+equal to 1.</p>
+
+<p style="margin-left:9%;"><b>declare</b>
+[<b>−aAfFgiIlnrtux</b>] [<b>−p</b>]
+[<i>name</i>[=<i>value</i>] ...] <b><br>
+typeset</b> [<b>−aAfFgiIlnrtux</b>] [<b>−p</b>]
+[<i>name</i>[=<i>value</i>] ...]</p>
+
+<p style="margin-left:18%;">Declare variables and/or give
+them attributes. If no <i>name</i>s are given then display
+the values of variables or functions. The <b>−p</b>
+option will display the attributes and values of each
+<i>name</i>. When <b>−p</b> is used with <i>name</i>
+arguments, additional options, other than <b>−f</b>
+and <b>−F</b>, are ignored.</p>
+
+<p style="margin-left:18%; margin-top: 1em">When
+<b>−p</b> is supplied without <i>name</i> arguments,
+<b>declare</b> will display the attributes and values of all
+variables having the attributes specified by the additional
+options. If no other options are supplied with
+<b>−p</b>, <b>declare</b> will display the attributes
+and values of all shell variables. The <b>−f</b>
+option restricts the display to shell functions.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The
+<b>−F</b> option inhibits the display of function
+definitions; only the function name and attributes are
+printed. If the <b>extdebug</b> shell option is enabled
+using <b>shopt</b>, the source file name and line number
+where each <i>name</i> is defined are displayed as well. The
+<b>−F</b> option implies <b>−f</b>.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The
+<b>−g</b> option forces variables to be created or
+modified at the global scope, even when <b>declare</b> is
+executed in a shell function. It is ignored when
+<b>declare</b> is not executed in a shell function.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The
+<b>−I</b> option causes local variables to inherit the
+attributes (except the <i>nameref</i> attribute) and value
+of any existing variable with the same <i>name</i> at a
+surrounding scope. If there is no existing variable, the
+local variable is initially unset.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The following
+options can be used to restrict output to variables with the
+specified attribute or to give variables attributes:</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−a</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Each <i>name</i> is an indexed array variable (see
+<b>Arrays</b> above).</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−A</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Each <i>name</i> is an associative array variable (see
+<b>Arrays</b> above).</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−f</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Each <i>name</i> refers to a shell function.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−i</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>The variable is treated as an integer; arithmetic
+evaluation (see <b><small>ARITHMETIC EVALUATION</small></b>
+above) is performed when the variable is assigned a
+value.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−l</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>When the variable is assigned a value, all upper-case
+characters are converted to lower-case. The upper-case
+attribute is disabled.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−n</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Give each <i>name</i> the <i>nameref</i> attribute,
+making it a name reference to another variable. That other
+variable is defined by the value of <i>name</i>. All
+references, assignments, and attribute modifications to
+<i>name</i>, except those using or changing the
+<b>−n</b> attribute itself, are performed on the
+variable referenced by <i>name</i>’s value. The
+nameref attribute cannot be applied to array variables.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−r</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Make <i>name</i>s readonly. These names cannot then be
+assigned values by subsequent assignment statements or
+unset.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−t</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Give each <i>name</i> the <i>trace</i> attribute. Traced
+functions inherit the <b>DEBUG</b> and <b>RETURN</b> traps
+from the calling shell. The trace attribute has no special
+meaning for variables.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−u</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>When the variable is assigned a value, all lower-case
+characters are converted to upper-case. The lower-case
+attribute is disabled.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−x</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Mark each <i>name</i> for export to subsequent commands
+via the environment.</p></td></tr>
+</table>
+
+<p style="margin-left:18%; margin-top: 1em">Using
+“+” instead of “−” turns off
+the specified attribute instead, with the exceptions that
+<b>+a</b> and <b>+A</b> may not be used to destroy array
+variables and <b>+r</b> will not remove the readonly
+attribute.</p>
+
+<p style="margin-left:18%; margin-top: 1em">When used in a
+function, <b>declare</b> and <b>typeset</b> make each
+<i>name</i> local, as with the <b>local</b> command, unless
+the <b>−g</b> option is supplied. If a variable name
+is followed by =<i>value</i>, the value of the variable is
+set to <i>value</i>. When using <b>−a</b> or
+<b>−A</b> and the compound assignment syntax to create
+array variables, additional attributes do not take effect
+until subsequent assignments.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The return
+value is 0 unless an invalid option is encountered, an
+attempt is made to define a function using “−f
+foo=bar”, an 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 (see <b>Arrays</b> above), one of the <i>names</i> 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
+<b>−f</b>.</p>
+
+<p style="margin-left:9%;"><b>dirs [−clpv]
+[+</b><i>n</i><b>] [−</b><i>n</i><b>]</b></p>
+
+<p style="margin-left:18%;">Without options, display the
+list of currently remembered directories. The default
+display is on a single line with directory names separated
+by spaces. Directories are added to the list with the
+<b>pushd</b> command; the <b>popd</b> command removes
+entries from the list. The current directory is always the
+first directory in the stack.</p>
+
+<p style="margin-left:18%; margin-top: 1em">Options, if
+supplied, have the following meanings:</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−c</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Clears the directory stack by deleting all of the
+entries.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−l</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Produces a listing using full pathnames; the default
+listing format uses a tilde to denote the home
+directory.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−p</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Print the directory stack with one entry per line.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−v</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Print the directory stack with one entry per line,
+prefixing each entry with its index in the stack.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>+</b><i>n</i></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Displays the <i>n</i>th entry counting from the left of
+the list shown by <b>dirs</b> when invoked without options,
+starting with zero.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−</b><i>n</i></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Displays the <i>n</i>th entry counting from the right of
+the list shown by <b>dirs</b> when invoked without options,
+starting with zero.</p></td></tr>
+</table>
+
+<p style="margin-left:18%; margin-top: 1em">The return
+value is 0 unless an invalid option is supplied or <i>n</i>
+indexes beyond the end of the directory stack.</p>
+
+<p style="margin-left:9%;"><b>disown</b> [<b>−ar</b>]
+[<b>−h</b>] [<i>id</i> ...]</p>
+
+<p style="margin-left:18%;">Without options, remove each
+<i>id</i> from the table of active jobs. Each <i>id</i> may
+be a job specification <i>jobspec</i> or a process ID
+<i>pid</i>; if <i>id</i> is a <i>pid</i>, <b>disown</b> uses
+the job containing <i>pid</i> as <i>jobspec</i>.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If the
+<b>−h</b> option is supplied, <b>disown</b> does not
+remove the jobs corresponding to each <i>id</i> from the
+jobs table, but rather marks them so the shell does not send
+<b><small>SIGHUP</small></b> to the job if the shell
+receives a <b><small>SIGHUP</small></b><small>.</small></p>
+
+<p style="margin-left:18%; margin-top: 1em">If no <i>id</i>
+is supplied, the <b>−a</b> option means to remove or
+mark all jobs; the <b>−r</b> option without an
+<i>id</i> argument removes or marks running jobs. If no
+<i>id</i> is supplied, and neither the <b>−a</b> nor
+the <b>−r</b> option is supplied, <b>disown</b>
+removes or marks the current job.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The return
+value is 0 unless an <i>id</i> does not specify a valid
+job.</p>
+
+<p style="margin-left:9%;"><b>echo</b> [<b>−neE</b>]
+[<i>arg</i> ...]</p>
+
+<p style="margin-left:18%;">Output the <i>arg</i>s,
+separated by spaces, followed by a newline. The return
+status is 0 unless a write error occurs. If <b>−n</b>
+is specified, the trailing newline is not printed.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If the
+<b>−e</b> option is given, <b>echo</b> interprets the
+following backslash-escaped characters. The <b>−E</b>
+option disables interpretation of these escape characters,
+even on systems where they are interpreted by default. The
+<b>xpg_echo</b> shell option determines whether or not
+<b>echo</b> interprets any options and expands these escape
+characters. <b>echo</b> does not interpret
+<b>−−</b> to mean the end of options.</p>
+
+<p style="margin-left:18%; margin-top: 1em"><b>echo</b>
+interprets the following escape sequences:</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="8%">
+
+
+<p><b>\a</b></p></td>
+<td width="1%"></td>
+<td width="73%">
+
+
+<p>alert (bell)</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="8%">
+
+
+<p><b>\b</b></p></td>
+<td width="1%"></td>
+<td width="73%">
+
+
+<p>backspace</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="8%">
+
+
+<p><b>\c</b></p></td>
+<td width="1%"></td>
+<td width="73%">
+
+
+<p>suppress further output</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="8%">
+
+
+<p><b>\e</b></p></td>
+<td width="1%"></td>
+<td width="73%">
+</td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="8%">
+
+
+<p><b>\E</b></p></td>
+<td width="1%"></td>
+<td width="73%">
+
+
+<p>an escape character</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="8%">
+
+
+<p><b>\f</b></p></td>
+<td width="1%"></td>
+<td width="73%">
+
+
+<p>form feed</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="8%">
+
+
+<p><b>\n</b></p></td>
+<td width="1%"></td>
+<td width="73%">
+
+
+<p>new line</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="8%">
+
+
+<p><b>\r</b></p></td>
+<td width="1%"></td>
+<td width="73%">
+
+
+<p>carriage return</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="8%">
+
+
+<p><b>\t</b></p></td>
+<td width="1%"></td>
+<td width="73%">
+
+
+<p>horizontal tab</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="8%">
+
+
+<p><b>\v</b></p></td>
+<td width="1%"></td>
+<td width="73%">
+
+
+<p>vertical tab</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="8%">
+
+
+<p><b>\\</b></p></td>
+<td width="1%"></td>
+<td width="73%">
+
+
+<p>backslash</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="8%">
+
+
+<p><b>\0</b><i>nnn</i></p></td>
+<td width="1%"></td>
+<td width="73%">
+
+
+<p>The eight-bit character whose value is the octal value
+<i>nnn</i> (zero to three octal digits).</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="8%">
+
+
+<p><b>\x</b><i>HH</i></p></td>
+<td width="1%"></td>
+<td width="73%">
+
+
+<p>The eight-bit character whose value is the hexadecimal
+value <i>HH</i> (one or two hex digits).</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="8%">
+
+
+<p><b>\u</b><i>HHHH</i></p></td>
+<td width="1%"></td>
+<td width="73%">
+
+
+<p>The Unicode (ISO/IEC 10646) character whose value is the
+hexadecimal value <i>HHHH</i> (one to four hex digits).</p></td></tr>
+</table>
+
+<p style="margin-left:18%;"><b>\U</b><i>HHHHHHHH</i></p>
+
+<p style="margin-left:27%;">The Unicode (ISO/IEC 10646)
+character whose value is the hexadecimal value
+<i>HHHHHHHH</i> (one to eight hex digits).</p>
+
+<p style="margin-left:18%; margin-top: 1em"><b>echo</b>
+writes any unrecognized backslash-escaped characters
+unchanged.</p>
+
+<p style="margin-left:9%;"><b>enable</b> [<b>−a</b>]
+[<b>−dnps</b>] [<b>−f</b> <i>filename</i>]
+[<i>name</i> ...]</p>
+
+<p style="margin-left:18%;">Enable and disable builtin
+shell commands. Disabling a builtin allows an executable
+file which has the same name as a shell builtin to be
+executed without specifying a full pathname, even though the
+shell normally searches for builtins before files.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If
+<b>−n</b> is supplied, each <i>name</i> is disabled;
+otherwise, <i>name</i>s are enabled. For example, to use the
+<b>test</b> binary found using <b><small>PATH</small></b>
+instead of the shell builtin version, run “enable
+−n test”.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If no
+<i>name</i> arguments are supplied, or if the
+<b>−p</b> option is supplied, print a list of shell
+builtins. With no other option arguments, the list consists
+of all enabled shell builtins. If <b>−n</b> is
+supplied, print only disabled builtins. If <b>−a</b>
+is supplied, the list printed includes all builtins, with an
+indication of whether or not each is enabled. The
+<b>−s</b> option means to restrict the output to the
+<small>POSIX</small> <i>special</i> builtins.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The
+<b>−f</b> option means to load the new builtin command
+<i>name</i> from shared object <i>filename</i>, on systems
+that support dynamic loading. If <i>filename</i> does not
+contain a slash, <b>Bash</b> will use the value of the
+<b>BASH_LOADABLES_PATH</b> variable as a colon-separated
+list of directories in which to search for <i>filename</i>.
+The default for <b>BASH_LOADABLES_PATH</b> is
+system-dependent, and may include “.” to force a
+search of the current directory. The <b>−d</b> option
+will delete a builtin previously loaded with
+<b>−f</b>. If <i>−s</i> is used with
+<i>−f</i>, the new builtin becomes a
+<small>POSIX</small> special builtin.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If no options
+are supplied and a <i>name</i> is not a shell builtin,
+<b>enable</b> will attempt to load <i>name</i> from a shared
+object named <i>name</i>, as if the command were
+“enable −f <i>name name</i>”.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The return
+value is 0 unless a <i>name</i> is not a shell builtin or
+there is an error loading a new builtin from a shared
+object.</p>
+
+<p style="margin-left:9%;"><b>eval</b> [<i>arg</i> ...]</p>
+
+<p style="margin-left:18%;">Concatenate the <i>arg</i>s
+together into a single command, separating them with spaces.
+<b>Bash</b> then reads and execute this command, and returns
+its exit status as the return status of <b>eval</b>. If
+there are no <i>args</i>, or only null arguments,
+<b>eval</b> returns 0.</p>
+
+<p style="margin-left:9%;"><b>exec</b> [<b>−cl</b>]
+[<b>−a</b> <i>name</i>] [<i>command</i>
+[<i>arguments</i>]]</p>
+
+<p style="margin-left:18%;">If <i>command</i> is specified,
+it replaces the shell without creating a new process.
+<i>command</i> cannot be a shell builtin or function. The
+<i>arguments</i> become the arguments to <i>command</i>. If
+the <b>−l</b> option is supplied, the shell places a
+dash at the beginning of the zeroth argument passed to
+<i>command</i>. This is what <i>login</i>(1) does. The
+<b>−c</b> option causes <i>command</i> to be executed
+with an empty environment. If <b>−a</b> is supplied,
+the shell passes <i>name</i> as the zeroth argument to the
+executed command.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If
+<i>command</i> cannot be executed for some reason, a
+non-interactive shell exits, unless the <b>execfail</b>
+shell option is enabled. In that case, it returns a non-zero
+status. An interactive shell returns a non-zero status if
+the file cannot be executed. A subshell exits
+unconditionally if <b>exec</b> fails.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If
+<i>command</i> is not specified, any redirections take
+effect in the current shell, and the return status is 0. If
+there is a redirection error, the return status is 1.</p>
+
+<p style="margin-left:9%;"><b>exit</b> [<i>n</i>]</p>
+
+<p style="margin-left:18%;">Cause the shell to exit with a
+status of <i>n</i>. If <i>n</i> is omitted, the exit status
+is that of the last command executed. Any trap on
+<b><small>EXIT</small></b> is executed before the shell
+terminates.</p>
+
+<p style="margin-left:9%;"><b>export</b> [<b>−fn</b>]
+[<i>name</i>[=<i>value</i>]] ... <b><br>
+export −p [−f]</b></p>
+
+<p style="margin-left:18%;">The supplied <i>names</i> are
+marked for automatic export to the environment of
+subsequently executed commands. If the <b>−f</b>
+option is given, the <i>names</i> refer to functions.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The
+<b>−n</b> option unexports, or removes the export
+attribute, from each <i>name</i>. If no <i>names</i> are
+given, or if only the <b>−p</b> option is supplied,
+<b>export</b> displays a list of names of all exported
+variables on the standard output. Using <b>−p</b> and
+<b>−f</b> together displays exported functions. The
+<b>−p</b> option displays output in a form that may be
+reused as input.</p>
+
+<p style="margin-left:18%; margin-top: 1em"><b>export</b>
+allows the value of a variable to be set when it is exported
+or unexported by following the variable name with
+=<i>value</i>. This sets the value of the variable to
+<i>value</i> while modifying the export attribute.
+<b>export</b> returns an exit status of 0 unless an invalid
+option is encountered, one of the <i>names</i> is not a
+valid shell variable name, or <b>−f</b> is supplied
+with a <i>name</i> that is not a function.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="6%">
+
+
+<p><b>false</b></p></td>
+<td width="3%"></td>
+<td width="51%">
+
+
+<p>Does nothing; returns a non-zero status.</p></td>
+<td width="31%">
+</td></tr>
+</table>
+
+<p style="margin-left:9%;"><b>fc</b> [<b>−e</b>
+<i>ename</i>] [<b>−lnr</b>] [<i>first</i>]
+[<i>last</i>] <b><br>
+fc −s</b> [<i>pat</i>=<i>rep</i>] [<i>cmd</i>]</p>
+
+<p style="margin-left:18%;">The first form selects a range
+of commands from <i>first</i> to <i>last</i> from the
+history list and displays or edits and re-executes them.
+<i>First</i> and <i>last</i> may be specified as a string
+(to locate the last command beginning with that string) or
+as a number (an index into the history list, where a
+negative number is used as an offset from the current
+command number).</p>
+
+<p style="margin-left:18%; margin-top: 1em">When listing, a
+<i>first</i> or <i>last</i> of 0 is equivalent to −1
+and −0 is equivalent to the current command (usually
+the <b>fc</b> command); otherwise 0 is equivalent to
+−1 and −0 is invalid. If <i>last</i> is not
+specified, it is set to the current command for listing (so
+that “fc −l −10” prints the last 10
+commands) and to <i>first</i> otherwise. If <i>first</i> is
+not specified, it is set to the previous command for editing
+and −16 for listing.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If the
+<b>−l</b> option is supplied, the commands are listed
+on the standard output. The <b>−n</b> option
+suppresses the command numbers when listing. The
+<b>−r</b> option reverses the order of the
+commands.</p>
+
+<p style="margin-left:18%; margin-top: 1em">Otherwise,
+<b>fc</b> invokes the editor named by <i>ename</i> on a file
+containing those commands. If <i>ename</i> is not supplied,
+<b>fc</b> uses the value of the <b><small>FCEDIT</small></b>
+variable, and the value of <b><small>EDITOR</small></b> if
+<b><small>FCEDIT</small></b> is not set. If neither variable
+is set, <b>fc</b> uses <i>vi.</i> When editing is complete,
+<b>fc</b> reads the file containing the edited commands and
+echoes and executes them.</p>
+
+<p style="margin-left:18%; margin-top: 1em">In the second
+form, <b>fc</b> re-executes <i>command</i> after replacing
+each instance of <i>pat</i> with <i>rep</i>. <i>Command</i>
+is interpreted the same as <i>first</i> above.</p>
+
+<p style="margin-left:18%; margin-top: 1em">A useful alias
+to use with <b>fc</b> is “r="fc
+−s"”, so that typing “r cc”
+runs the last command beginning with “cc” and
+typing “r” re-executes the last command.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If the first
+form is used, the return value is zero unless an invalid
+option is encountered or <i>first</i> or <i>last</i> specify
+history lines out of range. When editing and re-executing a
+file of commands, the return value is the value of the last
+command executed or failure if an error occurs with the
+temporary file. If the second form is used, the return
+status is that of the re-executed command, unless <i>cmd</i>
+does not specify a valid history entry, in which case
+<b>fc</b> returns a non-zero status.</p>
+
+<p style="margin-left:9%;"><b>fg</b> [<i>jobspec</i>]</p>
+
+<p style="margin-left:18%;">Resume <i>jobspec</i> in the
+foreground, and make it the current job. If <i>jobspec</i>
+is not present, <b>fg</b> uses the shell’s notion of
+the <i>current job</i>. The return value is that of the
+command placed into the foreground, or failure if run when
+job control is disabled or, when run with job control
+enabled, if <i>jobspec</i> does not specify a valid job or
+<i>jobspec</i> specifies a job that was started without job
+control.</p>
+
+<p style="margin-left:9%;"><b>getopts</b> <i>optstring
+name</i> [<i>arg</i> ...]</p>
+
+<p style="margin-left:18%;"><b>getopts</b> is used by shell
+scripts and functions to parse positional parameters and
+obtain options and their arguments. <i>optstring</i>
+contains the option characters to be recognized; if a
+character is followed by a colon, the option is expected to
+have an argument, which should be separated from it by white
+space. The colon and question mark characters may not be
+used as option characters.</p>
+
+<p style="margin-left:18%; margin-top: 1em">Each time it is
+invoked, <b>getopts</b> places the next option in the shell
+variable <i>name</i>, initializing <i>name</i> if it does
+not exist, and the index of the next argument to be
+processed into the variable
+<b><small>OPTIND</small></b><small>. <b>OPTIND</b></small>
+is initialized to 1 each time the shell or a shell script is
+invoked. When an option requires an argument, <b>getopts</b>
+places that argument into the variable
+<b><small>OPTARG</small></b><small>.</small></p>
+
+<p style="margin-left:18%; margin-top: 1em">The shell does
+not reset <b><small>OPTIND</small></b> automatically; it
+must be manually reset between multiple calls to
+<b>getopts</b> within the same shell invocation to use a new
+set of parameters.</p>
+
+<p style="margin-left:18%; margin-top: 1em">When it reaches
+the end of options, <b>getopts</b> exits with a return value
+greater than zero. <b><small>OPTIND</small></b> is set to
+the index of the first non-option argument, and <i>name</i>
+is set to ?.</p>
+
+<p style="margin-left:18%; margin-top: 1em"><b>getopts</b>
+normally parses the positional parameters, but if more
+arguments are supplied as <i>arg</i> values, <b>getopts</b>
+parses those instead.</p>
+
+<p style="margin-left:18%; margin-top: 1em"><b>getopts</b>
+can report errors in two ways. If the first character of
+<i>optstring</i> is a colon, <b>getopts</b> uses
+<i>silent</i> error reporting. In normal operation,
+<b>getopts</b> prints diagnostic messages when it encounters
+invalid options or missing option arguments. If the variable
+<b><small>OPTERR</small></b> is set to 0, <b>getopts</b>
+does not display any error messages, even if the first
+character of <i>optstring</i> is not a colon.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If
+<b>getopts</b> detects an invalid option, it places ? into
+<i>name</i> and, if not silent, prints an error message and
+unsets <b><small>OPTARG</small></b><small>.</small> If
+<b>getopts</b> is silent, it assigns the option character
+found to <b><small>OPTARG</small></b> and does not print a
+diagnostic message.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If a required
+argument is not found, and <b>getopts</b> is not silent, it
+sets the value of <i>name</i> to a question mark (<b>?</b>),
+unsets <b><small>OPTARG</small></b><small>,</small> and
+prints a diagnostic message. If <b>getopts</b> is silent, it
+sets the value of <i>name</i> to a colon (<b>:</b>) and sets
+<b><small>OPTARG</small></b> to the option character
+found.</p>
+
+<p style="margin-left:18%; margin-top: 1em"><b>getopts</b>
+returns true if an option, specified or unspecified, is
+found. It returns false if the end of options is encountered
+or an error occurs.</p>
+
+<p style="margin-left:9%;"><b>hash</b> [<b>−lr</b>]
+[<b>−p</b> <i>filename</i>] [<b>−dt</b>]
+[<i>name</i>]</p>
+
+<p style="margin-left:18%;">Each time <b>hash</b> is
+invoked, it remembers the full pathname of the command
+<i>name</i> as determined by searching the directories in
+<b>$PATH</b>. Any previously-remembered pathname associated
+with <i>name</i> is discarded. If the <b>−p</b> option
+is supplied, <b>hash</b> uses <i>filename</i> as the full
+pathname of the command.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The
+<b>−r</b> option causes the shell to forget all
+remembered locations. Assigning to the <b>PATH</b> variable
+also clears all hashed filenames. The <b>−d</b> option
+causes the shell to forget the remembered location of each
+<i>name</i>.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If the
+<b>−t</b> option is supplied, <b>hash</b> prints the
+full pathname corresponding to each <i>name</i>. If multiple
+<i>name</i> arguments are supplied with <b>−t</b>,
+<b>hash</b> prints the <i>name</i> before the corresponding
+hashed full pathname. The <b>−l</b> option displays
+output in a format that may be reused as input.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If no arguments
+are given, or if only <b>−l</b> is supplied,
+<b>hash</b> prints information about remembered commands.
+The <b>−t</b>, <b>−d</b>, and <b>−p</b>
+options (the options that act on the <i>name</i> arguments)
+are mutually exclusive. Only one will be active. If more
+than one is supplied, <b>−t</b> has higher priority
+than <b>−p</b>, and both have higher priority than
+<b>−d</b>.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The return
+status is zero unless a <i>name</i> is not found or an
+invalid option is supplied.</p>
+
+<p style="margin-left:9%;"><b>help</b> [<b>−dms</b>]
+[<i>pattern</i>]</p>
+
+<p style="margin-left:18%;">Display helpful information
+about builtin commands. If <i>pattern</i> is specified,
+<b>help</b> gives detailed help on all commands matching
+<i>pattern</i> as described below; otherwise it displays a
+list of all the builtins and shell compound commands.</p>
+
+<p style="margin-left:18%; margin-top: 1em">Options, if
+supplied, have the follow meanings:</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−d</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Display a short description of each <i>pattern</i></p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−m</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Display the description of each <i>pattern</i> in a
+manpage-like format</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−s</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Display only a short usage synopsis for each
+<i>pattern</i></p> </td></tr>
+</table>
+
+<p style="margin-left:18%; margin-top: 1em">If
+<i>pattern</i> contains pattern matching characters (see
+<b><small>Pattern Matching</small></b> above) it’s
+treated as a shell pattern and <b>help</b> prints the
+description of each help topic matching <i>pattern</i>.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If not, and
+<i>pattern</i> exactly matches the name of a help topic,
+<b>help</b> prints the description associated with that
+topic. Otherwise, <b>help</b> performs prefix matching and
+prints the descriptions of all matching help topics.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The return
+status is 0 unless no command matches <i>pattern</i>.</p>
+
+<p style="margin-left:9%;"><b>history [</b><i>n</i><b>]
+<br>
+history −c <br>
+history −d</b> <i>offset</i> <b><br>
+history −d</b> <i>start</i>-<i>end</i> <b><br>
+history −anrw</b> [<i>filename</i>] <b><br>
+history −p</b> <i>arg</i> [<i>arg</i> ...] <b><br>
+history −s</b> <i>arg</i> [<i>arg</i> ...]</p>
+
+<p style="margin-left:18%;">With no options, display the
+command history list with numbers. Entries prefixed with a
+<b>*</b> have been modified. An argument of <i>n</i> lists
+only the last <i>n</i> entries. If the shell variable
+<b><small>HISTTIMEFORMAT</small></b> is set and not null, it
+is used as a format string for <i>strftime</i>(3) to display
+the time stamp associated with each displayed history entry.
+If <b>history</b> uses
+<b><small>HISTTIMEFORMAT</small></b><small>,</small> it does
+not print an intervening space between the formatted time
+stamp and the history entry.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If
+<i>filename</i> is supplied, <b>history</b> uses it as the
+name of the history file; if not, it uses the value of
+<b><small>HISTFILE</small></b><small>.</small> If
+<i>filename</i> is not supplied and
+<b><small>HISTFILE</small></b> is unset or null, the
+<b>−a, −n, −r,</b> and <b>−w</b>
+options have no effect.</p>
+
+<p style="margin-left:18%; margin-top: 1em">Options, if
+supplied, have the following meanings:</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−c</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Clear the history list by deleting all the entries. This
+can be used with the other options to replace the history
+list.</p> </td></tr>
+</table>
+
+<p style="margin-left:18%;"><b>−d</b>
+<i>offset</i></p>
+
+<p style="margin-left:27%;">Delete the history entry at
+position <i>offset</i>. If <i>offset</i> is negative, it is
+interpreted as relative to one greater than the last history
+position, so negative indices count back from the end of the
+history, and an index of −1 refers to the current
+<b>history −d</b> command.</p>
+
+<p style="margin-left:18%;"><b>−d</b>
+<i>start</i>−<i>end</i></p>
+
+<p style="margin-left:27%;">Delete the range of history
+entries between positions <i>start</i> and <i>end</i>,
+inclusive. Positive and negative values for <i>start</i> and
+<i>end</i> are interpreted as described above.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−a</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Append the “new” history lines to the
+history file. These are history lines entered since the
+beginning of the current <b>bash</b> session, but not
+already appended to the history file.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−n</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Read the history lines not already read from the history
+file and add them to the current history list. These are
+lines appended to the history file since the beginning of
+the current <b>bash</b> session.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−r</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Read the history file and append its contents to the
+current history list.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−w</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Write the current history list to the history file,
+overwriting the history file.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−p</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Perform history substitution on the following
+<i>args</i> and display the result on the standard output,
+without storing the results in the history list. Each
+<i>arg</i> must be quoted to disable normal history
+expansion.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−s</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Store the <i>args</i> in the history list as a single
+entry. The last command in the history list is removed
+before adding the <i>args</i>.</p></td></tr>
+</table>
+
+<p style="margin-left:18%; margin-top: 1em">If the
+<b><small>HISTTIMEFORMAT</small></b> variable is set,
+<b>history</b> writes the time stamp information associated
+with each history entry to the history file, marked with the
+history comment character as described above. When the
+history file is read, lines beginning with the history
+comment character followed immediately by a digit are
+interpreted as timestamps for the following history
+entry.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The return
+value is 0 unless an invalid option is encountered, an error
+occurs while reading or writing the history file, an invalid
+<i>offset</i> or range is supplied as an argument to
+<b>−d</b>, or the history expansion supplied as an
+argument to <b>−p</b> fails.</p>
+
+<p style="margin-left:9%;"><b>jobs</b>
+[<b>−lnprs</b>] [ <i>jobspec</i> ... ] <b><br>
+jobs −x</b> <i>command</i> [ <i>args</i> ... ]</p>
+
+<p style="margin-left:18%;">The first form lists the active
+jobs. The options have the following meanings:</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−l</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>List process IDs in addition to the normal
+information.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−n</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Display information only about jobs that have changed
+status since the user was last notified of their status.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−p</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>List only the process ID of the job’s process
+group leader.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−r</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Display only running jobs.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−s</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Display only stopped jobs.</p></td></tr>
+</table>
+
+<p style="margin-left:18%; margin-top: 1em">If
+<i>jobspec</i> is supplied, <b>jobs</b> restricts output to
+information about that job. The return status is 0 unless an
+invalid option is encountered or an invalid <i>jobspec</i>
+is supplied.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If the
+<b>−x</b> option is supplied, <b>jobs</b> replaces any
+<i>jobspec</i> found in <i>command</i> or <i>args</i> with
+the corresponding process group ID, and executes
+<i>command</i>, passing it <i>args</i>, returning its exit
+status.</p>
+
+<p style="margin-left:9%;"><b>kill</b> [<b>−s</b>
+<i>sigspec</i> | <b>−n</b> <i>signum</i> |
+<b>−</b><i>sigspec</i>] <i>id</i> [ ... ] <b><br>
+kill −l</b>|<b>−L</b> [<i>sigspec</i> |
+<i>exit_status</i>]</p>
+
+<p style="margin-left:18%;">Send the signal specified by
+<i>sigspec</i> or <i>signum</i> to the processes named by
+each <i>id</i>. Each <i>id</i> may be a job specification
+<i>jobspec</i> or a process ID <i>pid</i>. <i>sigspec</i> is
+either a case-insensitive signal name such as
+<b><small>SIGKILL</small></b> (with or without the
+<b><small>SIG</small></b> prefix) or a signal number;
+<i>signum</i> is a signal number. If <i>sigspec</i> is not
+supplied, then <b>kill</b> sends
+<b><small>SIGTERM</small></b><small>.</small></p>
+
+<p style="margin-left:18%; margin-top: 1em">The
+<b>−l</b> option lists the signal names. If any
+arguments are supplied when <b>−l</b> is given,
+<b>kill</b> lists the names of the signals corresponding to
+the arguments, and the return status is 0. The
+<i>exit_status</i> argument to <b>−l</b> is a number
+specifying either a signal number or the exit status of a
+process terminated by a signal; if it is supplied,
+<b>kill</b> prints the name of the signal that caused the
+process to terminate. <b>kill</b> assumes that process exit
+statuses are greater than 128; anything less than that is a
+signal number. The <b>−L</b> option is equivalent to
+<b>−l</b>.</p>
+
+<p style="margin-left:18%; margin-top: 1em"><b>kill</b>
+returns true if at least one signal was successfully sent,
+or false if an error occurs or an invalid option is
+encountered.</p>
+
+<p style="margin-left:9%;"><b>let</b> <i>arg</i>
+[<i>arg</i> ...]</p>
+
+<p style="margin-left:18%;">Each <i>arg</i> is evaluated as
+an arithmetic expression (see <b><small>ARITHMETIC
+EVALUATION</small></b> above). If the last <i>arg</i>
+evaluates to 0, <b>let</b> returns 1; otherwise <b>let</b>
+returns 0.</p>
+
+<p style="margin-left:9%;"><b>local</b> [<i>option</i>]
+[<i>name</i>[=<i>value</i>] ... | − ]</p>
+
+<p style="margin-left:18%;">For each argument, create a
+local variable named <i>name</i> and assign it <i>value</i>.
+The <i>option</i> can be any of the options accepted by
+<b>declare</b>. When <b>local</b> is used within a function,
+it causes the variable <i>name</i> to have a visible scope
+restricted to that function and its children. It is an error
+to use <b>local</b> when not within a function.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If <i>name</i>
+is −, it makes the set of shell options local to the
+function in which <b>local</b> is invoked: any shell options
+changed using the <b>set</b> builtin inside the function
+after the call to <b>local</b> are restored to their
+original values when the function returns. The restore is
+performed as if a series of <b>set</b> commands were
+executed to restore the values that were in place before the
+function.</p>
+
+<p style="margin-left:18%; margin-top: 1em">With no
+operands, <b>local</b> writes a list of local variables to
+the standard output.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The return
+status is 0 unless <b>local</b> is used outside a function,
+an invalid <i>name</i> is supplied, or <i>name</i> is a
+readonly variable.</p>
+
+<p style="margin-left:9%;"><b>logout
+[</b><i>n</i><b>]</b></p>
+
+<p style="margin-left:18%;">Exit a login shell, returning a
+status of <i>n</i> to the shell’s parent.</p>
+
+<p style="margin-left:9%;"><b>mapfile</b> [<b>−d</b>
+<i>delim</i>] [<b>−n</b> <i>count</i>]
+[<b>−O</b> <i>origin</i>] [<b>−s</b>
+<i>count</i>] [<b>−t</b>] [<b>−u</b> <i>fd</i>]
+[<b>−C</b> <i><br>
+callback</i>] [<b>−c</b> <i>quantum</i>]
+[<i>array</i>] <b><br>
+readarray</b> [<b>−d</b> <i>delim</i>]
+[<b>−n</b> <i>count</i>] [<b>−O</b>
+<i>origin</i>] [<b>−s</b> <i>count</i>]
+[<b>−t</b>] [<b>−u</b> <i>fd</i>]
+[<b>−C</b> <i><br>
+callback</i>] [<b>−c</b> <i>quantum</i>]
+[<i>array</i>]</p>
+
+<p style="margin-left:18%;">Read lines from the standard
+input, or from file descriptor <i>fd</i> if the
+<b>−u</b> option is supplied, into the indexed array
+variable <i>array</i>. The variable
+<b><small>MAPFILE</small></b> is the default <i>array</i>.
+Options, if supplied, have the following meanings:</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−d</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Use the first character of <i>delim</i> to terminate
+each input line, rather than newline. If <i>delim</i> is the
+empty string, <b>mapfile</b> will terminate a line when it
+reads a NUL character.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−n</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Copy at most <i>count</i> lines. If <i>count</i> is 0,
+copy all lines.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−O</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Begin assigning to <i>array</i> at index <i>origin</i>.
+The default index is 0.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−s</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Discard the first <i>count</i> lines read.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−t</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Remove a trailing <i>delim</i> (default newline) from
+each line read.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−u</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Read lines from file descriptor <i>fd</i> instead of the
+standard input.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−C</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Evaluate <i>callback</i> each time <i>quantum</i> lines
+are read. The <b>−c</b> option specifies
+<i>quantum</i>.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−c</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Specify the number of lines read between each call to
+<i>callback</i>.</p> </td></tr>
+</table>
+
+<p style="margin-left:18%; margin-top: 1em">If
+<b>−C</b> is specified without <b>−c</b>, the
+default quantum is 5000. When <i>callback</i> is evaluated,
+it is supplied the index of the next array element to be
+assigned and the line to be assigned to that element as
+additional arguments. <i>callback</i> is evaluated after the
+line is read but before the array element is assigned.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If not supplied
+with an explicit origin, <b>mapfile</b> will clear
+<i>array</i> before assigning to it.</p>
+
+<p style="margin-left:18%; margin-top: 1em"><b>mapfile</b>
+returns zero unless an invalid option or option argument is
+supplied, <i>array</i> is invalid or unassignable, or if
+<i>array</i> is not an indexed array.</p>
+
+<p style="margin-left:9%;"><b>popd</b> [−<b>n</b>]
+[+<i>n</i>] [−<i>n</i>]</p>
+
+<p style="margin-left:18%;">Remove entries from the
+directory stack. The elements are numbered from 0 starting
+at the first directory listed by <b>dirs</b>, so <b>popd</b>
+is equivalent to “popd +0.” With no arguments,
+<b>popd</b> removes the top directory from the stack, and
+changes to the new top directory. Arguments, if supplied,
+have the following meanings:</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−n</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Suppress the normal change of directory when removing
+directories from the stack, only manipulate the stack.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>+</b><i>n</i></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Remove the <i>n</i>th entry counting from the left of
+the list shown by <b>dirs</b>, starting with zero, from the
+stack. For example: “popd +0” removes the first
+directory, “popd +1” the second.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−</b><i>n</i></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Remove the <i>n</i>th entry counting from the right of
+the list shown by <b>dirs</b>, starting with zero. For
+example: “popd −0” removes the last
+directory, “popd −1” the next to last.</p></td></tr>
+</table>
+
+<p style="margin-left:18%; margin-top: 1em">If the top
+element of the directory stack is modified, and the
+<i>−n</i> option was not supplied, <b>popd</b> uses
+the <b>cd</b> builtin to change to the directory at the top
+of the stack. If the <b>cd</b> fails, <b>popd</b> returns a
+non-zero value.</p>
+
+<p style="margin-left:18%; margin-top: 1em">Otherwise,
+<b>popd</b> returns false if an invalid option is supplied,
+the directory stack is empty, or <i>n</i> specifies a
+non-existent directory stack entry.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If the
+<b>popd</b> command is successful, <b>bash</b> runs
+<b>dirs</b> to show the final contents of the directory
+stack, and the return status is 0.</p>
+
+<p style="margin-left:9%;"><b>printf</b> [<b>−v</b>
+<i>var</i>] <i>format</i> [<i>arguments</i>]</p>
+
+<p style="margin-left:18%;">Write the formatted
+<i>arguments</i> to the standard output under the control of
+the <i>format</i>. The <b>−v</b> option assigns the
+output to the variable <i>var</i> rather than printing it to
+the standard output.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The
+<i>format</i> is a character string which contains three
+types of objects: plain characters, which are simply copied
+to standard output, character escape sequences, which are
+converted and copied to the standard output, and format
+specifications, each of which causes printing of the next
+successive <i>argument</i>. In addition to the standard
+<i>printf</i>(3) format characters
+<b>cCsSndiouxXeEfFgGaA</b>, <b>printf</b> interprets the
+following additional format specifiers:</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>%b</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>causes <b>printf</b> to expand backslash escape
+sequences in the corresponding <i>argument</i> in the same
+way as <b>echo −e</b>.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>%q</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>causes <b>printf</b> to output the corresponding
+<i>argument</i> in a format that can be reused as shell
+input. <b>%q</b> and <b>%Q</b> use the <b>$''</b> quoting
+style if any characters in the argument string require it,
+and backslash quoting otherwise. If the format string uses
+the <i>printf</i> alternate form, these two formats quote
+the argument string using single quotes.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>%Q</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>like <b>%q</b>, but applies any supplied precision to
+the <i>argument</i> before quoting it.</p></td></tr>
+</table>
+
+
+<p style="margin-left:18%;"><b>%(</b><i>datefmt</i><b>)T</b></p>
+
+<p style="margin-left:27%;">causes <b>printf</b> to output
+the date-time string resulting from using <i>datefmt</i> as
+a format string for <i>strftime</i>(3). The corresponding
+<i>argument</i> is an integer representing the number of
+seconds since the epoch. This format specifier recognizes
+two special argument values: −1 represents the current
+time, and −2 represents the time the shell was
+invoked. If no argument is specified, conversion behaves as
+if −1 had been supplied. This is an exception to the
+usual <b>printf</b> behavior.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The %b, %q, and
+%T format specifiers all use the field width and precision
+arguments from the format specification and write that many
+bytes from (or use that wide a field for) the expanded
+argument, which usually contains more characters than the
+original.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The %n format
+specifier accepts a corresponding argument that is treated
+as a shell variable name.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The %s and %c
+format specifiers accept an l (long) modifier, which forces
+them to convert the argument string to a wide-character
+string and apply any supplied field width and precision in
+terms of characters, not bytes. The %S and %C format
+specifiers are equivalent to %ls and %lc, respectively.</p>
+
+<p style="margin-left:18%; margin-top: 1em">Arguments to
+non-string format specifiers are treated as C constants,
+except that a leading plus or minus sign is allowed, and if
+the leading character is a single or double quote, the value
+is the numeric value of the following character, using the
+current locale.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The
+<i>format</i> is reused as necessary to consume all of the
+<i>arguments</i>. If the <i>format</i> requires more
+<i>arguments</i> than are supplied, the extra format
+specifications behave as if a zero value or null string, as
+appropriate, had been supplied. The return value is zero on
+success, non-zero if an invalid option is supplied or a
+write or assignment error occurs.</p>
+
+<p style="margin-left:9%;"><b>pushd</b> [<b>−n</b>]
+[+<i>n</i>] [−<i>n</i>] <b><br>
+pushd</b> [<b>−n</b>] [<i>dir</i>]</p>
+
+<p style="margin-left:18%;">Add a directory to the top of
+the directory stack, or rotate the stack, making the new top
+of the stack the current working directory. With no
+arguments, <b>pushd</b> exchanges the top two elements of
+the directory stack. Arguments, if supplied, have the
+following meanings:</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="4%">
+
+
+<p><b>−n</b></p></td>
+<td width="5%"></td>
+<td width="73%">
+
+
+<p>Suppress the normal change of directory when rotating or
+adding directories to the stack, only manipulate the
+stack.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="4%">
+
+
+<p><b>+</b><i>n</i></p></td>
+<td width="5%"></td>
+<td width="73%">
+
+
+<p>Rotate the stack so that the <i>n</i>th directory
+(counting from the left of the list shown by <b>dirs</b>,
+starting with zero) is at the top.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="4%">
+
+
+<p><b>−</b><i>n</i></p></td>
+<td width="5%"></td>
+<td width="73%">
+
+
+<p>Rotates the stack so that the <i>n</i>th directory
+(counting from the right of the list shown by <b>dirs</b>,
+starting with zero) is at the top.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="4%">
+
+
+<p><i>dir</i></p></td>
+<td width="5%"></td>
+<td width="73%">
+
+
+<p>Adds <i>dir</i> to the directory stack at the top.</p></td></tr>
+</table>
+
+<p style="margin-left:18%; margin-top: 1em">After the stack
+has been modified, if the <b>−n</b> option was not
+supplied, <b>pushd</b> uses the <b>cd</b> builtin to change
+to the directory at the top of the stack. If the <b>cd</b>
+fails, <b>pushd</b> returns a non-zero value.</p>
+
+<p style="margin-left:18%; margin-top: 1em">Otherwise, if
+no arguments are supplied, <b>pushd</b> returns zero unless
+the directory stack is empty. When rotating the directory
+stack, <b>pushd</b> returns zero unless the directory stack
+is empty or <i>n</i> specifies a non-existent directory
+stack element.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If the
+<b>pushd</b> command is successful, <b>bash</b> runs
+<b>dirs</b> to show the final contents of the directory
+stack.</p>
+
+<p style="margin-left:9%;"><b>pwd</b>
+[<b>−LP</b>]</p>
+
+<p style="margin-left:18%;">Print the absolute pathname of
+the current working directory. The pathname printed contains
+no symbolic links if the <b>−P</b> option is supplied
+or the <b>−o physical</b> option to the <b>set</b>
+builtin command is enabled. If the <b>−L</b> option is
+used, the pathname printed may contain symbolic links. The
+return status is 0 unless an error occurs while reading the
+name of the current directory or an invalid option is
+supplied.</p>
+
+<p style="margin-left:9%;"><b>read</b> [<b>−Eers</b>]
+[<b>−a</b> <i>aname</i>] [<b>−d</b>
+<i>delim</i>] [<b>−i</b> <i>text</i>] [<b>−n</b>
+<i>nchars</i>] [<b>−N</b> <i>nchars</i>] <br>
+[<b>−p</b> <i>prompt</i>] [<b>−t</b>
+<i>timeout</i>] [<b>−u</b> <i>fd</i>] [<i>name</i>
+...]</p>
+
+<p style="margin-left:18%;">Read one line from the standard
+input, or from the file descriptor <i>fd</i> supplied as an
+argument to the <b>−u</b> option, split it into words
+as described above under <b>Word Splitting</b>, and assign
+the first word to the first <i>name</i>, the second word to
+the second <i>name</i>, and so on. If there are more words
+than names, the remaining words and their intervening
+delimiters are assigned to the last <i>name</i>. If there
+are fewer words read from the input stream than names, the
+remaining names are assigned empty values. The characters in
+the value of the <b><small>IFS</small></b> variable are used
+to split the line into words using the same rules the shell
+uses for expansion (described above under <b>Word
+Splitting</b>). The backslash character (<b>\</b>) removes
+any special meaning for the next character read and is used
+for line continuation.</p>
+
+<p style="margin-left:18%; margin-top: 1em">Options, if
+supplied, have the following meanings: <b><br>
+−a</b> <i>aname</i></p>
+
+<p style="margin-left:27%;">The words are assigned to
+sequential indices of the array variable <i>aname</i>,
+starting at 0. <i>aname</i> is unset before any new values
+are assigned. Other <i>name</i> arguments are ignored.</p>
+
+<p style="margin-left:18%;"><b>−d</b>
+<i>delim</i></p>
+
+<p style="margin-left:27%;">The first character of
+<i>delim</i> terminates the input line, rather than newline.
+If <i>delim</i> is the empty string, <b>read</b> will
+terminate a line when it reads a NUL character.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−e</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>If the standard input is coming from a terminal,
+<b>read</b> uses <b>readline</b> (see
+<b><small>READLINE</small></b> above) to obtain the line.
+<b>Readline</b> uses the current (or default, if line
+editing was not previously active) editing settings, but
+uses <b>readline</b>’s default filename
+completion.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−E</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>If the standard input is coming from a terminal,
+<b>read</b> uses <b>readline</b> (see
+<b><small>READLINE</small></b> above) to obtain the line.
+<b>Readline</b> uses the current (or default, if line
+editing was not previously active) editing settings, but
+uses bash’s default completion, including programmable
+completion.</p> </td></tr>
+</table>
+
+<p style="margin-left:18%;"><b>−i</b> <i>text</i></p>
+
+<p style="margin-left:27%;">If <b>readline</b> is being
+used to read the line, <b>read</b> places <i>text</i> into
+the editing buffer before editing begins.</p>
+
+<p style="margin-left:18%;"><b>−n</b>
+<i>nchars</i></p>
+
+<p style="margin-left:27%;"><b>read</b> returns after
+reading <i>nchars</i> characters rather than waiting for a
+complete line of input, unless it encounters EOF or
+<b>read</b> times out, but honors a delimiter if it reads
+fewer than <i>nchars</i> characters before the
+delimiter.</p>
+
+<p style="margin-left:18%;"><b>−N</b>
+<i>nchars</i></p>
+
+<p style="margin-left:27%;"><b>read</b> returns after
+reading exactly <i>nchars</i> characters rather than waiting
+for a complete line of input, unless it encounters EOF or
+<b>read</b> times out. Any delimiter characters in the input
+are not treated specially and do not cause <b>read</b> to
+return until it has read <i>nchars</i> characters. The
+result is not split on the characters in <b>IFS</b>; the
+intent is that the variable is assigned exactly the
+characters read (with the exception of backslash; see the
+<b>−r</b> option below).</p>
+
+<p style="margin-left:18%;"><b>−p</b>
+<i>prompt</i></p>
+
+<p style="margin-left:27%;">Display <i>prompt</i> on
+standard error, without a trailing newline, before
+attempting to read any input, but only if input is coming
+from a terminal.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−r</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Backslash does not act as an escape character. The
+backslash is considered to be part of the line. In
+particular, a backslash-newline pair may not then be used as
+a line continuation.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−s</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Silent mode. If input is coming from a terminal,
+characters are not echoed.</p></td></tr>
+</table>
+
+<p style="margin-left:18%;"><b>−t</b>
+<i>timeout</i></p>
+
+<p style="margin-left:27%;">Cause <b>read</b> to time out
+and return failure if it does not read a complete line of
+input (or a specified number of characters) within
+<i>timeout</i> seconds. <i>timeout</i> may be a decimal
+number with a fractional portion following the decimal
+point. This option is only effective if <b>read</b> is
+reading input from a terminal, pipe, or other special file;
+it has no effect when reading from regular files. If
+<b>read</b> times out, it saves any partial input read into
+the specified variable <i>name</i>, and the exit status is
+greater than 128. If <i>timeout</i> is 0, <b>read</b>
+returns immediately, without trying to read any data. In
+this case, the exit status is 0 if input is available on the
+specified file descriptor, or the read will return EOF,
+non-zero otherwise.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="6%">
+
+
+<p><b>−u</b> <i>fd</i></p></td>
+<td width="3%"></td>
+<td width="73%">
+
+
+<p>Read input from file descriptor <i>fd</i> instead of the
+standard input.</p></td></tr>
+</table>
+
+<p style="margin-left:18%; margin-top: 1em">Other than the
+case where <i>delim</i> is the empty string, <b>read</b>
+ignores any NUL characters in the input.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If no
+<i>names</i> are supplied, <b>read</b> assigns the line
+read, without the ending delimiter but otherwise unmodified,
+to the variable
+<b><small>REPLY</small></b><small>.</small></p>
+
+<p style="margin-left:18%; margin-top: 1em">The exit status
+is zero, unless end-of-file is encountered, <b>read</b>
+times out (in which case the status is greater than 128), a
+variable assignment error (such as assigning to a readonly
+variable) occurs, or an invalid file descriptor is supplied
+as the argument to <b>−u</b>.</p>
+
+<p style="margin-left:9%;"><b>readonly</b>
+[<b>−aAf</b>] [<b>−p</b>]
+[<i>name</i>[=<i>word</i>] ...]</p>
+
+<p style="margin-left:18%;">The given <i>names</i> are
+marked readonly; the values of these <i>names</i> may not be
+changed by subsequent assignment or unset. If the
+<b>−f</b> option is supplied, each <i>name</i> refers
+to a shell function. The <b>−a</b> option restricts
+the variables to indexed arrays; the <b>−A</b> option
+restricts the variables to associative arrays. If both
+options are supplied, <b>−A</b> takes precedence. If
+no <i>name</i> arguments are supplied, or if the
+<b>−p</b> option is supplied, print a list of all
+readonly names. The other options may be used to restrict
+the output to a subset of the set of readonly names. The
+<b>−p</b> option displays output in a format that may
+be reused as input.</p>
+
+
+<p style="margin-left:18%; margin-top: 1em"><b>readonly</b>
+allows the value of a variable to be set at the same time
+the readonly attribute is changed by following the variable
+name with =<i>value</i>. This sets the value of the variable
+is to <i>value</i> while modifying the readonly
+attribute.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The return
+status is 0 unless an invalid option is encountered, one of
+the <i>names</i> is not a valid shell variable name, or
+<b>−f</b> is supplied with a <i>name</i> that is not a
+function.</p>
+
+<p style="margin-left:9%;"><b>return</b> [<i>n</i>]</p>
+
+<p style="margin-left:18%;">Stop executing a shell function
+or sourced file and return the value specified by <i>n</i>
+to its caller. If <i>n</i> is omitted, the return status is
+that of the last command executed. If <b>return</b> is
+executed by a trap handler, the last command used to
+determine the status is the last command executed before the
+trap handler. If <b>return</b> is executed during a
+<b>DEBUG</b> trap, the last command used to determine the
+status is the last command executed by the trap handler
+before <b>return</b> was invoked.</p>
+
+<p style="margin-left:18%; margin-top: 1em">When
+<b>return</b> is used to terminate execution of a script
+being executed by the <b>.</b> (<b>source</b>) command, it
+causes the shell to stop executing that script and return
+either <i>n</i> or the exit status of the last command
+executed within the script as the exit status of the script.
+If <i>n</i> is supplied, the return value is its least
+significant 8 bits.</p>
+
+<p style="margin-left:18%; margin-top: 1em">Any command
+associated with the <b>RETURN</b> trap is executed before
+execution resumes after the function or script.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The return
+status is non-zero if <b>return</b> is supplied a
+non-numeric argument, or is used outside a function and not
+during execution of a script by <b>.</b> or
+<b>source</b>.</p>
+
+<p style="margin-left:9%;"><b>set</b>
+[<b>−abefhkmnptuvxBCEHPT</b>] [<b>−o</b>
+<i>option−name</i>] [<b>−−</b>]
+[<b>−</b>] [<i>arg</i> ...] <b><br>
+set</b> [<b>+abefhkmnptuvxBCEHPT</b>] [<b>+o</b>
+<i>option−name</i>] [<b>−−</b>]
+[<b>−</b>] [<i>arg</i> ...]</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="8%">
+
+
+<p><b>set −o</b></p></td>
+<td width="1%"></td>
+<td width="82%">
+</td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="8%">
+
+
+<p><b>set +o</b></p></td>
+<td width="1%"></td>
+<td width="82%">
+
+
+<p>Without options, display the name and value of each
+shell variable in a format that can be reused as input for
+setting or resetting the currently-set variables. Read-only
+variables cannot be reset. In posix mode, only shell
+variables are listed. The output is sorted according to the
+current locale. When options are specified, they set or
+unset shell attributes. Any arguments remaining after option
+processing are treated as values for the positional
+parameters and are assigned, in order, to <b>$1</b>,
+<b>$2</b>, ..., <b>$</b><i>n</i>. Options, if specified,
+have the following meanings:</p></td></tr>
+</table>
+
+<p style="margin-left:18%;"><b>−a</b></p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%"></td>
+<td width="7%"></td>
+<td width="72%">
+
+
+<p style="margin-top: 1em">Each variable or function that
+is created or modified is given the export attribute and
+marked for export to the environment of subsequent
+commands.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−b</b></p></td>
+<td width="7%"></td>
+<td width="72%">
+
+
+<p>Report the status of terminated background jobs
+immediately, rather than before the next primary prompt or
+after a foreground command terminates. This is effective
+only when job control is enabled.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−e</b></p></td>
+<td width="7%"></td>
+<td width="72%">
+
+
+<p>Exit immediately if a <i>pipeline</i> (which may consist
+of a single <i>simple command</i>), a <i>list</i>, or a
+<i>compound command</i> (see <b><small>SHELL
+GRAMMAR</small></b> above), exits with a non-zero status.
+The shell does not exit if the command that fails is part of
+the command list immediately following a <b>while</b> or
+<b>until</b> reserved word, part of the test following the
+<b>if</b> or <b>elif</b> reserved words, part of any command
+executed in a <b>&&</b> or <b>||</b> list except the
+command following the final <b>&&</b> or <b>||</b>,
+any command in a pipeline but the last (subject to the state
+of the <b>pipefail</b> shell option), or if the
+command’s return value is being inverted with
+<b>!</b>. If a compound command other than a subshell
+returns a non-zero status because a command failed while
+<b>−e</b> was being ignored, the shell does not exit.
+A trap on <b>ERR</b>, if set, is executed before the shell
+exits. This option applies to the shell environment and each
+subshell environment separately (see <b><small>COMMAND
+EXECUTION ENVIRONMENT</small></b> above), and may cause
+subshells to exit before executing all the commands in the
+subshell.</p> </td></tr>
+</table>
+
+<p style="margin-left:28%; margin-top: 1em">If a compound
+command or shell function executes in a context where
+<b>−e</b> is being ignored, none of the commands
+executed within the compound command or function body will
+be affected by the <b>−e</b> setting, even if
+<b>−e</b> is set and a command returns a failure
+status. If a compound command or shell function sets
+<b>−e</b> while executing in a context where
+<b>−e</b> is ignored, that setting will not have any
+effect until the compound command or the command containing
+the function call completes.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p style="margin-top: 1em"><b>−f</b></p></td>
+<td width="7%"></td>
+<td width="72%">
+
+
+<p style="margin-top: 1em">Disable pathname expansion.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−h</b></p></td>
+<td width="7%"></td>
+<td width="72%">
+
+
+<p>Remember the location of commands as they are looked up
+for execution. This is enabled by default.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−k</b></p></td>
+<td width="7%"></td>
+<td width="72%">
+
+
+<p>All arguments in the form of assignment statements are
+placed in the environment for a command, not just those that
+precede the command name.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−m</b></p></td>
+<td width="7%"></td>
+<td width="72%">
+
+
+<p>Monitor mode. Job control is enabled. This option is on
+by default for interactive shells on systems that support it
+(see <b><small>JOB CONTROL</small></b> above). All processes
+run in a separate process group. When a background job
+completes, the shell prints a line containing its exit
+status.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−n</b></p></td>
+<td width="7%"></td>
+<td width="72%">
+
+
+<p>Read commands but do not execute them. This may be used
+to check a shell script for syntax errors. This is ignored
+by interactive shells.</p></td></tr>
+</table>
+
+<p style="margin-left:18%;"><b>−o</b>
+<i>option−name</i></p>
+
+<p style="margin-left:28%;">The <i>option−name</i>
+can be one of the following: <b><br>
+allexport</b></p>
+
+<p style="margin-left:38%;">Same as <b>−a</b>.</p>
+
+<p style="margin-left:28%;"><b>braceexpand</b></p>
+
+<p style="margin-left:38%;">Same as <b>−B</b>.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="28%"></td>
+<td width="9%">
+
+
+<p><b>emacs</b></p></td>
+<td width="1%"></td>
+<td width="62%">
+
+
+<p>Use an emacs-style command line editing interface. This
+is enabled by default when the shell is interactive, unless
+the shell is started with the <b>−−noediting</b>
+option. This also affects the editing interface used for
+<b>read −e</b>.</p></td></tr>
+<tr valign="top" align="left">
+<td width="28%"></td>
+<td width="9%">
+
+
+<p><b>errexit</b></p></td>
+<td width="1%"></td>
+<td width="62%">
+
+
+<p>Same as <b>−e</b>.</p></td></tr>
+</table>
+
+<p style="margin-left:28%;"><b>errtrace</b></p>
+
+<p style="margin-left:38%;">Same as <b>−E</b>.</p>
+
+<p style="margin-left:28%;"><b>functrace</b></p>
+
+<p style="margin-left:38%;">Same as <b>−T</b>.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="28%"></td>
+<td width="9%">
+
+
+<p><b>hashall</b></p></td>
+<td width="1%"></td>
+<td width="15%">
+
+
+<p>Same as <b>−h</b>.</p></td>
+<td width="47%">
+</td></tr>
+</table>
+
+<p style="margin-left:28%;"><b>histexpand</b></p>
+
+<p style="margin-left:38%;">Same as <b>−H</b>.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="28%"></td>
+<td width="9%">
+
+
+<p><b>history</b></p></td>
+<td width="1%"></td>
+<td width="62%">
+
+
+<p>Enable command history, as described above under
+<b><small>HISTORY</small></b><small>.</small> This option is
+on by default in interactive shells.</p></td></tr>
+</table>
+
+<p style="margin-left:28%;"><b>ignoreeof</b></p>
+
+<p style="margin-left:38%;">The effect is as if the shell
+command “IGNOREEOF=10” had been executed (see
+<b>Shell Variables</b> above).</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="28%"></td>
+<td width="9%">
+
+
+<p><b>keyword</b></p></td>
+<td width="1%"></td>
+<td width="15%">
+
+
+<p>Same as <b>−k</b>.</p></td>
+<td width="47%">
+</td></tr>
+<tr valign="top" align="left">
+<td width="28%"></td>
+<td width="9%">
+
+
+<p><b>monitor</b></p></td>
+<td width="1%"></td>
+<td width="15%">
+
+
+<p>Same as <b>−m</b>.</p></td>
+<td width="47%">
+</td></tr>
+</table>
+
+<p style="margin-left:28%;"><b>noclobber</b></p>
+
+<p style="margin-left:38%;">Same as <b>−C</b>.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="28%"></td>
+<td width="9%">
+
+
+<p><b>noexec</b></p></td>
+<td width="1%"></td>
+<td width="24%">
+
+
+<p>Same as <b>−n</b>.</p></td>
+<td width="38%">
+</td></tr>
+<tr valign="top" align="left">
+<td width="28%"></td>
+<td width="9%">
+
+
+<p><b>noglob</b></p></td>
+<td width="1%"></td>
+<td width="24%">
+
+
+<p>Same as <b>−f</b>.</p></td>
+<td width="38%">
+</td></tr>
+<tr valign="top" align="left">
+<td width="28%"></td>
+<td width="9%">
+
+
+<p><b>nolog</b></p></td>
+<td width="1%"></td>
+<td width="24%">
+
+
+<p>Currently ignored.</p></td>
+<td width="38%">
+</td></tr>
+<tr valign="top" align="left">
+<td width="28%"></td>
+<td width="9%">
+
+
+<p><b>notify</b></p></td>
+<td width="1%"></td>
+<td width="24%">
+
+
+<p>Same as <b>−b</b>.</p></td>
+<td width="38%">
+</td></tr>
+<tr valign="top" align="left">
+<td width="28%"></td>
+<td width="9%">
+
+
+<p><b>nounset</b></p></td>
+<td width="1%"></td>
+<td width="24%">
+
+
+<p>Same as <b>−u</b>.</p></td>
+<td width="38%">
+</td></tr>
+<tr valign="top" align="left">
+<td width="28%"></td>
+<td width="9%">
+
+
+<p><b>onecmd</b></p></td>
+<td width="1%"></td>
+<td width="24%">
+
+
+<p>Same as <b>−t</b>.</p></td>
+<td width="38%">
+</td></tr>
+</table>
+
+<p style="margin-left:28%;"><b>physical</b></p>
+
+<p style="margin-left:38%;">Same as <b>−P</b>.</p>
+
+<p style="margin-left:28%;"><b>pipefail</b></p>
+
+<p style="margin-left:38%;">If set, the return value of a
+pipeline is the value of the last (rightmost) command to
+exit with a non-zero status, or zero if all commands in the
+pipeline exit successfully. This option is disabled by
+default.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="28%"></td>
+<td width="7%">
+
+
+<p><b>posix</b></p></td>
+<td width="3%"></td>
+<td width="62%">
+
+
+<p>Enable posix mode; change the behavior of <b>bash</b>
+where the default operation differs from the
+<small>POSIX</small> standard to match the standard. See
+<b><small>SEE ALSO</small></b> below for a reference to a
+document that details how posix mode affects bash’s
+behavior.</p> </td></tr>
+</table>
+
+<p style="margin-left:28%;"><b>privileged</b></p>
+
+<p style="margin-left:38%;">Same as <b>−p</b>.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="28%"></td>
+<td width="9%">
+
+
+<p><b>verbose</b></p></td>
+<td width="1%"></td>
+<td width="62%">
+
+
+<p>Same as <b>−v</b>.</p></td></tr>
+<tr valign="top" align="left">
+<td width="28%"></td>
+<td width="9%">
+
+
+<p><b>vi</b></p></td>
+<td width="1%"></td>
+<td width="62%">
+
+
+<p>Use a vi-style command line editing interface. This also
+affects the editing interface used for <b>read
+−e</b>.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="28%"></td>
+<td width="9%">
+
+
+<p><b>xtrace</b></p></td>
+<td width="1%"></td>
+<td width="62%">
+
+
+<p>Same as <b>−x</b>.</p></td></tr>
+</table>
+
+<p style="margin-left:28%;">If <b>−o</b> is supplied
+with no <i>option−name</i>, <b>set</b> prints the
+current shell option settings. If <b>+o</b> is supplied with
+no <i>option−name</i>, <b>set</b> prints a series of
+<b>set</b> commands to recreate the current option settings
+on the standard output.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p style="margin-top: 1em"><b>−p</b></p></td>
+<td width="7%"></td>
+<td width="72%">
+
+
+<p style="margin-top: 1em">Turn on <i>privileged</i> mode.
+In this mode, the shell does not read the
+<b><small>$ENV</small></b> and
+<b><small>$BASH_ENV</small></b> files, shell functions are
+not inherited from the environment, and the
+<b><small>SHELLOPTS</small></b><small>, <b>BASHOPTS</b>,
+<b>CDPATH</b>,</small> and <b><small>GLOBIGNORE</small></b>
+variables, if they appear in the environment, are ignored.
+If the shell is started with the effective user (group) id
+not equal to the real user (group) id, and the
+<b>−p</b> option is not supplied, these actions are
+taken and the effective user id is set to the real user id.
+If the <b>−p</b> option is supplied at startup, the
+effective user id is not reset. Turning this option off
+causes the effective user and group ids to be set to the
+real user and group ids.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−r</b></p></td>
+<td width="7%"></td>
+<td width="72%">
+
+
+<p>Enable restricted shell mode. This option cannot be
+unset once it has been set.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−t</b></p></td>
+<td width="7%"></td>
+<td width="72%">
+
+
+<p>Exit after reading and executing one command.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−u</b></p></td>
+<td width="7%"></td>
+<td width="72%">
+
+
+<p>Treat unset variables and parameters other than the
+special parameters “@” and “*”, or
+array variables subscripted with “@” or
+“*”, as an error when performing parameter
+expansion. If expansion is attempted on an unset variable or
+parameter, the shell prints an error message, and, if not
+interactive, exits with a non-zero status.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−v</b></p></td>
+<td width="7%"></td>
+<td width="72%">
+
+
+<p>Print shell input lines as they are read.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−x</b></p></td>
+<td width="7%"></td>
+<td width="72%">
+
+
+<p>After expanding each <i>simple command</i>, <b>for</b>
+command, <b>case</b> command, <b>select</b> command, or
+arithmetic <b>for</b> command, display the expanded value of
+<b><small>PS4</small></b><small>,</small> followed by the
+command and its expanded arguments or associated word list,
+to the standard error.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−B</b></p></td>
+<td width="7%"></td>
+<td width="72%">
+
+
+<p>The shell performs brace expansion (see <b>Brace
+Expansion</b> above). This is on by default.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−C</b></p></td>
+<td width="7%"></td>
+<td width="72%">
+
+
+<p>If set, <b>bash</b> does not overwrite an existing file
+with the <b>></b>, <b>>&</b>, and <b><></b>
+redirection operators. Using the redirection operator
+<b>>|</b> instead of <b>></b> will override this and
+force the creation of an output file.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−E</b></p></td>
+<td width="7%"></td>
+<td width="72%">
+
+
+<p>If set, any trap on <b>ERR</b> is inherited by shell
+functions, command substitutions, and commands executed in a
+subshell environment. The <b>ERR</b> trap is normally not
+inherited in such cases.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−H</b></p></td>
+<td width="7%"></td>
+<td width="72%">
+
+
+<p>Enable <b>!</b> style history substitution. This option
+is on by default when the shell is interactive.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−P</b></p></td>
+<td width="7%"></td>
+<td width="72%">
+
+
+<p>If set, the shell does not resolve symbolic links when
+executing commands such as <b>cd</b> that change the current
+working directory. It uses the physical directory structure
+instead. By default, <b>bash</b> follows the logical chain
+of directories when performing commands which change the
+current directory.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−T</b></p></td>
+<td width="7%"></td>
+<td width="72%">
+
+
+<p>If set, any traps on <b>DEBUG</b> and <b>RETURN</b> are
+inherited by shell functions, command substitutions, and
+commands executed in a subshell environment. The
+<b>DEBUG</b> and <b>RETURN</b> traps are normally not
+inherited in such cases.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−−</b></p></td>
+<td width="7%"></td>
+<td width="72%">
+
+
+<p>If no arguments follow this option, unset the positional
+parameters. Otherwise, set the positional parameters to the
+<i>arg</i>s, even if some of them begin with a
+<b>−</b>.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−</b></p></td>
+<td width="7%"></td>
+<td width="72%">
+
+
+<p>Signal the end of options, and assign all remaining
+<i>arg</i>s to the positional parameters. The
+<b>−x</b> and <b>−v</b> options are turned off.
+If there are no <i>arg</i>s, the positional parameters
+remain unchanged.</p></td></tr>
+</table>
+
+<p style="margin-left:18%; margin-top: 1em">The options are
+off by default unless otherwise noted. Using + rather than
+− causes these options to be turned off. The options
+can also be specified as arguments to an invocation of the
+shell. The current set of options may be found in
+<b>$−</b>. The return status is always zero unless an
+invalid option is encountered.</p>
+
+<p style="margin-left:9%;"><b>shift</b> [<i>n</i>]</p>
+
+<p style="margin-left:18%;">Rename positional parameters
+from <i>n</i>+1 ... to <b>$1 ....</b> Parameters represented
+by the numbers <b>$#</b> down to <b>$#</b>−<i>n</i>+1
+are unset. <i>n</i> must be a non-negative number less than
+or equal to <b>$#</b>. If <i>n</i> is 0, no parameters are
+changed. If <i>n</i> is not given, it is assumed to be 1. If
+<i>n</i> is greater than <b>$#</b>, the positional
+parameters are not changed. The return status is greater
+than zero if <i>n</i> is greater than <b>$#</b> or less than
+zero; otherwise 0.</p>
+
+<p style="margin-left:9%;"><b>shopt</b>
+[<b>−pqsu</b>] [<b>−o</b>] [<i>optname</i>
+...]</p>
+
+<p style="margin-left:18%;">Toggle the values of settings
+controlling optional shell behavior. The settings can be
+either those listed below, or, if the <b>−o</b> option
+is used, those available with the <b>−o</b> option to
+the <b>set</b> builtin command.</p>
+
+<p style="margin-left:18%; margin-top: 1em">With no
+options, or with the <b>−p</b> option, display a list
+of all settable options, with an indication of whether or
+not each is set; if any <i>optnames</i> are supplied, the
+output is restricted to those options. The <b>−p</b>
+option displays output in a form that may be reused as
+input.</p>
+
+<p style="margin-left:18%; margin-top: 1em">Other options
+have the following meanings:</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−s</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Enable (set) each <i>optname</i>.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−u</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Disable (unset) each <i>optname</i>.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−q</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Suppresses normal output (quiet mode); the return status
+indicates whether the <i>optname</i> is set or unset. If
+multiple <i>optname</i> arguments are supplied with
+<b>−q</b>, the return status is zero if all
+<i>optnames</i> are enabled; non-zero otherwise.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−o</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Restricts the values of <i>optname</i> to be those
+defined for the <b>−o</b> option to the <b>set</b>
+builtin.</p> </td></tr>
+</table>
+
+<p style="margin-left:18%; margin-top: 1em">If either
+<b>−s</b> or <b>−u</b> is used with no
+<i>optname</i> arguments, <b>shopt</b> shows only those
+options which are set or unset, respectively. Unless
+otherwise noted, the <b>shopt</b> options are disabled
+(unset) by default.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The return
+status when listing options is zero if all <i>optnames</i>
+are enabled, non-zero otherwise. When setting or unsetting
+options, the return status is zero unless an <i>optname</i>
+is not a valid shell option.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The list of
+<b>shopt</b> options is: <b><br>
+array_expand_once</b></p>
+
+<p style="margin-left:28%;">If set, the shell suppresses
+multiple evaluation of associative and indexed array
+subscripts during arithmetic expression evaluation, while
+executing builtins that can perform variable assignments,
+and while executing builtins that perform array
+dereferencing.</p>
+
+<p style="margin-left:18%;"><b>assoc_expand_once</b></p>
+
+<p style="margin-left:28%;">Deprecated; a synonym for
+<b>array_expand_once</b>.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="8%">
+
+
+<p><b>autocd</b></p></td>
+<td width="2%"></td>
+<td width="72%">
+
+
+<p>If set, a command name that is the name of a directory
+is executed as if it were the argument to the <b>cd</b>
+command. This option is only used by interactive shells.</p></td></tr>
+</table>
+
+
+<p style="margin-left:18%;"><b>bash_source_fullpath</b></p>
+
+<p style="margin-left:28%;">If set, filenames added to the
+<b>BASH_SOURCE</b> array variable are converted to full
+pathnames (see <b>Shell Variables</b> above).</p>
+
+<p style="margin-left:18%;"><b>cdable_vars</b></p>
+
+<p style="margin-left:28%;">If set, an argument to the
+<b>cd</b> builtin command that is not a directory is assumed
+to be the name of a variable whose value is the directory to
+change to.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="9%">
+
+
+<p><b>cdspell</b></p></td>
+<td width="1%"></td>
+<td width="72%">
+
+
+<p>If set, the <b>cd</b> command attempts to correct minor
+errors in the spelling of a directory component. Minor
+errors include transposed characters, a missing character,
+and one extra character. If <b>cd</b> corrects the directory
+name, it prints the corrected filename, and the command
+proceeds. This option is only used by interactive
+shells.</p> </td></tr>
+</table>
+
+<p style="margin-left:18%;"><b>checkhash</b></p>
+
+<p style="margin-left:28%;">If set, <b>bash</b> checks that
+a command found in the hash table exists before trying to
+execute it. If a hashed command no longer exists,
+<b>bash</b> performs a normal path search.</p>
+
+<p style="margin-left:18%;"><b>checkjobs</b></p>
+
+<p style="margin-left:28%;">If set, <b>bash</b> lists the
+status of any stopped and running jobs before exiting an
+interactive shell. If any jobs are running, <b>bash</b>
+defers the exit until a second exit is attempted without an
+intervening command (see <b><small>JOB CONTROL</small></b>
+above). The shell always postpones exiting if any jobs are
+stopped.</p>
+
+<p style="margin-left:18%;"><b>checkwinsize</b></p>
+
+<p style="margin-left:28%;">If set, <b>bash</b> checks the
+window size after each external (non-builtin) command and,
+if necessary, updates the values of
+<b><small>LINES</small></b> and
+<b><small>COLUMNS</small></b><small>,</small> using the file
+descriptor associated with the standard error if it is a
+terminal. This option is enabled by default.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="9%">
+
+
+<p><b>cmdhist</b></p></td>
+<td width="1%"></td>
+<td width="72%">
+
+
+<p>If set, <b>bash</b> attempts to save all lines of a
+multiple-line command in the same history entry. This allows
+easy re-editing of multi-line commands. This option is
+enabled by default, but only has an effect if command
+history is enabled, as described above under
+<b><small>HISTORY</small></b><small>.</small></p> </td></tr>
+</table>
+
+<p style="margin-left:18%;"><b>compat31 <br>
+compat32 <br>
+compat40 <br>
+compat41 <br>
+compat42 <br>
+compat43 <br>
+compat44</b></p>
+
+<p style="margin-left:28%;">These control aspects of the
+shell’s compatibility mode (see <b><small>SHELL
+COMPATIBILITY MODE</small></b> below).</p>
+
+<p style="margin-left:18%;"><b>complete_fullquote</b></p>
+
+<p style="margin-left:28%;">If set, <b>bash</b> quotes all
+shell metacharacters in filenames and directory names when
+performing completion. If not set, <b>bash</b> removes
+metacharacters such as the dollar sign from the set of
+characters that will be quoted in completed filenames when
+these metacharacters appear in shell variable references in
+words to be completed. This means that dollar signs in
+variable names that expand to directories will not be
+quoted; however, any dollar signs appearing in filenames
+will not be quoted, either. This is active only when bash is
+using backslashes to quote completed filenames. This
+variable is set by default, which is the default bash
+behavior in versions through 4.2.</p>
+
+<p style="margin-left:18%;"><b>direxpand</b></p>
+
+<p style="margin-left:28%;">If set, <b>bash</b> replaces
+directory names with the results of word expansion when
+performing filename completion. This changes the contents of
+the <b>readline</b> editing buffer. If not set, <b>bash</b>
+attempts to preserve what the user typed.</p>
+
+<p style="margin-left:18%;"><b>dirspell</b></p>
+
+<p style="margin-left:28%;">If set, <b>bash</b> attempts
+spelling correction on directory names during word
+completion if the directory name initially supplied does not
+exist.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="9%">
+
+
+<p><b>dotglob</b></p></td>
+<td width="1%"></td>
+<td width="72%">
+
+
+<p>If set, <b>bash</b> includes filenames beginning with a
+“.” in the results of pathname expansion. The
+filenames <i>.</i> and <i>..</i> must always be matched
+explicitly, even if <b>dotglob</b> is set.</p></td></tr>
+</table>
+
+<p style="margin-left:18%;"><b>execfail</b></p>
+
+<p style="margin-left:28%;">If set, a non-interactive shell
+will not exit if it cannot execute the file specified as an
+argument to the <b>exec</b> builtin. An interactive shell
+does not exit if <b>exec</b> fails.</p>
+
+<p style="margin-left:18%;"><b>expand_aliases</b></p>
+
+<p style="margin-left:28%;">If set, aliases are expanded as
+described above under
+<b><small>ALIASES</small></b><small>.</small> This option is
+enabled by default for interactive shells.</p>
+
+<p style="margin-left:18%;"><b>extdebug</b></p>
+
+<p style="margin-left:28%;">If set at shell invocation, or
+in a shell startup file, arrange to execute the debugger
+profile before the shell starts, identical to the
+<b>−−debugger</b> option. If set after
+invocation, behavior intended for use by debuggers is
+enabled:</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="13%">
+
+
+<p><b>1.</b></p></td>
+<td width="6%"></td>
+<td width="63%">
+
+
+<p>The <b>−F</b> option to the <b>declare</b> builtin
+displays the source file name and line number corresponding
+to each function name supplied as an argument.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="13%">
+
+
+<p><b>2.</b></p></td>
+<td width="6%"></td>
+<td width="63%">
+
+
+<p>If the command run by the <b>DEBUG</b> trap returns a
+non-zero value, the next command is skipped and not
+executed.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="13%">
+
+
+<p><b>3.</b></p></td>
+<td width="6%"></td>
+<td width="63%">
+
+
+<p>If the command run by the <b>DEBUG</b> trap returns a
+value of 2, and the shell is executing in a subroutine (a
+shell function or a shell script executed by the <b>.</b> or
+<b>source</b> builtins), the shell simulates a call to
+<b>return</b>.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="13%">
+
+
+<p><b>4.</b></p></td>
+<td width="6%"></td>
+<td width="63%">
+
+
+<p><b><small>BASH_ARGC</small></b> and
+<b><small>BASH_ARGV</small></b> are updated as described in
+their descriptions above).</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="13%">
+
+
+<p><b>5.</b></p></td>
+<td width="6%"></td>
+<td width="63%">
+
+
+<p>Function tracing is enabled: command substitution, shell
+functions, and subshells invoked with <b>(</b>
+<i>command</i> <b>)</b> inherit the <b>DEBUG</b> and
+<b>RETURN</b> traps.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="13%">
+
+
+<p><b>6.</b></p></td>
+<td width="6%"></td>
+<td width="63%">
+
+
+<p>Error tracing is enabled: command substitution, shell
+functions, and subshells invoked with <b>(</b>
+<i>command</i> <b>)</b> inherit the <b>ERR</b> trap.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="13%">
+
+
+<p><b>extglob</b></p></td>
+<td width="6%"></td>
+<td width="63%">
+</td></tr>
+</table>
+
+<p style="margin-left:28%; margin-top: 1em">If set, enable
+the extended pattern matching features described above under
+<b>Pathname Expansion</b>.</p>
+
+<p style="margin-left:18%;"><b>extquote</b></p>
+
+<p style="margin-left:28%;">If set, <b>$</b>'<i>string</i>'
+and <b>$</b>"<i>string</i>" quoting is performed
+within <b>${</b><i>parameter</i><b>}</b> expansions enclosed
+in double quotes. This option is enabled by default.</p>
+
+<p style="margin-left:18%;"><b>failglob</b></p>
+
+<p style="margin-left:28%;">If set, patterns which fail to
+match filenames during pathname expansion result in an
+expansion error.</p>
+
+<p style="margin-left:18%;"><b>force_fignore</b></p>
+
+<p style="margin-left:28%;">If set, the suffixes specified
+by the <b><small>FIGNORE</small></b> shell variable cause
+words to be ignored when performing word completion even if
+the ignored words are the only possible completions. See
+<b>Shell Variables</b> above for a description of
+<b><small>FIGNORE</small></b><small>.</small> This option is
+enabled by default.</p>
+
+<p style="margin-left:18%;"><b>globasciiranges</b></p>
+
+<p style="margin-left:28%;">If set, range expressions used
+in pattern matching bracket expressions (see
+<b><small>Pattern Matching</small></b> above) behave as if
+in the traditional C locale when performing comparisons.
+That is, pattern matching does not take the current
+locale’s collating sequence into account, so <b>b</b>
+will not collate between <b>A</b> and <b>B</b>, and
+upper-case and lower-case ASCII characters will collate
+together.</p>
+
+<p style="margin-left:18%;"><b>globskipdots</b></p>
+
+<p style="margin-left:28%;">If set, pathname expansion will
+never match the filenames <i>.</i> and <i>..</i>, even if
+the pattern begins with a “.”. This option is
+enabled by default.</p>
+
+<p style="margin-left:18%;"><b>globstar</b></p>
+
+<p style="margin-left:28%;">If set, the pattern <b>**</b>
+used in a pathname expansion context will match all files
+and zero or more directories and subdirectories. If the
+pattern is followed by a <b>/</b>, only directories and
+subdirectories match.</p>
+
+<p style="margin-left:18%;"><b>gnu_errfmt</b></p>
+
+<p style="margin-left:28%;">If set, shell error messages
+are written in the standard GNU error message format.</p>
+
+<p style="margin-left:18%;"><b>histappend</b></p>
+
+<p style="margin-left:28%;">If set, the history list is
+appended to the file named by the value of the
+<b><small>HISTFILE</small></b> variable when the shell
+exits, rather than overwriting the file.</p>
+
+<p style="margin-left:18%;"><b>histreedit</b></p>
+
+<p style="margin-left:28%;">If set, and <b>readline</b> is
+being used, the user is given the opportunity to re-edit a
+failed history substitution.</p>
+
+<p style="margin-left:18%;"><b>histverify</b></p>
+
+<p style="margin-left:28%;">If set, and <b>readline</b> is
+being used, the results of history substitution are not
+immediately passed to the shell parser. Instead, the
+resulting line is loaded into the <b>readline</b> editing
+buffer, allowing further modification.</p>
+
+<p style="margin-left:18%;"><b>hostcomplete</b></p>
+
+<p style="margin-left:28%;">If set, and <b>readline</b> is
+being used, <b>bash</b> will attempt to perform hostname
+completion when a word containing a <b>@</b> is being
+completed (see <b>Completing</b> under
+<b><small>READLINE</small></b> above). This is enabled by
+default.</p>
+
+<p style="margin-left:18%;"><b>huponexit</b></p>
+
+<p style="margin-left:28%;">If set, <b>bash</b> will send
+<b><small>SIGHUP</small></b> to all jobs when an interactive
+login shell exits.</p>
+
+<p style="margin-left:18%;"><b>inherit_errexit</b></p>
+
+<p style="margin-left:28%;">If set, command substitution
+inherits the value of the <b>errexit</b> option, instead of
+unsetting it in the subshell environment. This option is
+enabled when posix mode is enabled.</p>
+
+
+<p style="margin-left:18%;"><b>interactive_comments</b></p>
+
+<p style="margin-left:28%;">In an interactive shell, a word
+beginning with <b>#</b> causes that word and all remaining
+characters on that line to be ignored, as in a
+non-interactive shell (see <b><small>COMMENTS</small></b>
+above). This option is enabled by default.</p>
+
+<p style="margin-left:18%;"><b>lastpipe</b></p>
+
+<p style="margin-left:28%;">If set, and job control is not
+active, the shell runs the last command of a pipeline not
+executed in the background in the current shell
+environment.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="9%">
+
+
+<p><b>lithist</b></p></td>
+<td width="1%"></td>
+<td width="72%">
+
+
+<p>If set, and the <b>cmdhist</b> option is enabled,
+multi-line commands are saved to the history with embedded
+newlines rather than using semicolon separators where
+possible.</p> </td></tr>
+</table>
+
+<p style="margin-left:18%;"><b>localvar_inherit</b></p>
+
+<p style="margin-left:28%;">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 not inherited.</p>
+
+<p style="margin-left:18%;"><b>localvar_unset</b></p>
+
+<p style="margin-left:28%;">If set, calling <b>unset</b> on
+local variables in previous function scopes marks them so
+subsequent lookups find them unset until that function
+returns. This is identical to the behavior of unsetting
+local variables at the current function scope.</p>
+
+<p style="margin-left:18%;"><b>login_shell</b></p>
+
+<p style="margin-left:28%;">The shell sets this option if
+it is started as a login shell (see
+<b><small>INVOCATION</small></b> above). The value may not
+be changed.</p>
+
+<p style="margin-left:18%;"><b>mailwarn</b></p>
+
+<p style="margin-left:28%;">If set, and a file that
+<b>bash</b> is checking for mail has been accessed since the
+last time it was checked, <b>bash</b> displays the message
+“The mail in <i>mailfile</i> has been read”.</p>
+
+
+<p style="margin-left:18%;"><b>no_empty_cmd_completion</b></p>
+
+<p style="margin-left:28%;">If set, and <b>readline</b> is
+being used, <b>bash</b> does not search
+<b><small>PATH</small></b> for possible completions when
+completion is attempted on an empty line.</p>
+
+<p style="margin-left:18%;"><b>nocaseglob</b></p>
+
+<p style="margin-left:28%;">If set, <b>bash</b> matches
+filenames in a case−insensitive fashion when
+performing pathname expansion (see <b>Pathname Expansion</b>
+above).</p>
+
+<p style="margin-left:18%;"><b>nocasematch</b></p>
+
+<p style="margin-left:28%;">If set, <b>bash</b> matches
+patterns in a case−insensitive fashion when performing
+matching while executing <b>case</b> or <b>[[</b>
+conditional commands, when performing pattern substitution
+word expansions, or when filtering possible completions as
+part of programmable completion.</p>
+
+
+<p style="margin-left:18%;"><b>noexpand_translation</b></p>
+
+<p style="margin-left:28%;">If set, <b>bash</b> encloses
+the translated results of <b>$"</b>...<b>"</b>
+quoting in single quotes instead of double quotes. If the
+string is not translated, this has no effect.</p>
+
+<p style="margin-left:18%;"><b>nullglob</b></p>
+
+<p style="margin-left:28%;">If set, pathname expansion
+patterns which match no files (see <b>Pathname Expansion</b>
+above) expand to nothing and are removed, rather than
+expanding to themselves.</p>
+
+<p style="margin-left:18%;"><b>patsub_replacement</b></p>
+
+<p style="margin-left:28%;">If set, <b>bash</b> expands
+occurrences of <b>&</b> in the replacement string of
+pattern substitution to the text matched by the pattern, as
+described under <b>Parameter Expansion</b> above. This
+option is enabled by default.</p>
+
+<p style="margin-left:18%;"><b>progcomp</b></p>
+
+<p style="margin-left:28%;">If set, enable the programmable
+completion facilities (see <b>Programmable Completion</b>
+above). This option is enabled by default.</p>
+
+<p style="margin-left:18%;"><b>progcomp_alias</b></p>
+
+<p style="margin-left:28%;">If set, and programmable
+completion is enabled, <b>bash</b> treats a command name
+that doesn’t have any completions as a possible alias
+and attempts alias expansion. If it has an alias,
+<b>bash</b> attempts programmable completion using the
+command word resulting from the expanded alias.</p>
+
+<p style="margin-left:18%;"><b>promptvars</b></p>
+
+<p style="margin-left:28%;">If set, prompt strings undergo
+parameter expansion, command substitution, arithmetic
+expansion, and quote removal after being expanded as
+described in <b><small>PROMPTING</small></b> above. This
+option is enabled by default.</p>
+
+<p style="margin-left:18%;"><b>restricted_shell</b></p>
+
+<p style="margin-left:28%;">The shell sets this option if
+it is started in restricted mode (see <b><small>RESTRICTED
+SHELL</small></b> below). The value may not be changed. This
+is not reset when the startup files are executed, allowing
+the startup files to discover whether or not a shell is
+restricted.</p>
+
+<p style="margin-left:18%;"><b>shift_verbose</b></p>
+
+<p style="margin-left:28%;">If set, the <b>shift</b>
+builtin prints an error message when the shift count exceeds
+the number of positional parameters.</p>
+
+<p style="margin-left:18%;"><b>sourcepath</b></p>
+
+<p style="margin-left:28%;">If set, the <b>.</b>
+(<b>source</b>) builtin uses the value of
+<b><small>PATH</small></b> to find the directory containing
+the file supplied as an argument when the <b>−p</b>
+option is not supplied. This option is enabled by
+default.</p>
+
+<p style="margin-left:18%;"><b>varredir_close</b></p>
+
+<p style="margin-left:28%;">If set, the shell automatically
+closes file descriptors assigned using the <i>{varname}</i>
+redirection syntax (see <b><small>REDIRECTION</small></b>
+above) instead of leaving them open when the command
+completes.</p>
+
+<p style="margin-left:18%;"><b>xpg_echo</b></p>
+
+<p style="margin-left:28%;">If set, the <b>echo</b> builtin
+expands backslash-escape sequences by default. If the
+<b>posix</b> shell option is also enabled, <b>echo</b> does
+not interpret any options.</p>
+
+<p style="margin-left:9%;"><b>suspend</b>
+[<b>−f</b>]</p>
+
+<p style="margin-left:18%;">Suspend the execution of this
+shell until it receives a <b><small>SIGCONT</small></b>
+signal. A login shell, or a shell without job control
+enabled, cannot be suspended; the <b>−f</b> option
+will 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 <b>−f</b> is not supplied.</p>
+
+<p style="margin-left:9%;"><b>test</b> <i>expr</i> <b><br>
+[</b> <i>expr</i> <b>]</b></p>
+
+<p style="margin-left:18%;">Return a status of 0 (true) or
+1 (false) depending on the evaluation of the conditional
+expression <i>expr</i>. Each operator and operand must be a
+separate argument. Expressions are composed of the primaries
+described above under <b><small>CONDITIONAL
+EXPRESSIONS</small></b><small>.</small> <b>test</b> does not
+accept any options, nor does it accept and ignore an
+argument of <b>−−</b> as signifying the end of
+options.</p>
+
+<p style="margin-left:18%; margin-top: 1em">Expressions may
+be combined using the following operators, listed in
+decreasing order of precedence. The evaluation depends on
+the number of arguments; see below. <b>test</b> uses
+operator precedence when there are five or more
+arguments.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="8%">
+
+
+<p><b>!</b> <i>expr</i></p></td>
+<td width="1%"></td>
+<td width="28%">
+
+
+<p>True if <i>expr</i> is false.</p></td>
+<td width="45%">
+</td></tr>
+</table>
+
+<p style="margin-left:18%;"><b>(</b> <i>expr</i>
+<b>)</b></p>
+
+<p style="margin-left:27%;">Returns the value of
+<i>expr</i>. This may be used to override normal operator
+precedence.</p>
+
+<p style="margin-left:18%;"><i>expr1</i> −<b>a</b>
+<i>expr2</i></p>
+
+<p style="margin-left:27%;">True if both <i>expr1</i> and
+<i>expr2</i> are true.</p>
+
+<p style="margin-left:18%;"><i>expr1</i> −<b>o</b>
+<i>expr2</i></p>
+
+<p style="margin-left:27%;">True if either <i>expr1</i> or
+<i>expr2</i> is true.</p>
+
+<p style="margin-left:18%; margin-top: 1em"><b>test</b> and
+<b>[</b> evaluate conditional expressions using a set of
+rules based on the number of arguments. <br>
+0 arguments</p>
+
+<p style="margin-left:27%;">The expression is false.</p>
+
+<p style="margin-left:18%;">1 argument</p>
+
+<p style="margin-left:27%;">The expression is true if and
+only if the argument is not null.</p>
+
+<p style="margin-left:18%;">2 arguments</p>
+
+<p style="margin-left:27%;">If the first argument is
+<b>!</b>, the expression is true if and only if the second
+argument is null. If the first argument is one of the unary
+conditional operators listed above under
+<b><small>CONDITIONAL
+EXPRESSIONS</small></b><small>,</small> the expression is
+true if the unary test is true. If the first argument is not
+a valid unary conditional operator, the expression is
+false.</p>
+
+<p style="margin-left:18%;">3 arguments</p>
+
+<p style="margin-left:27%;">The following conditions are
+applied in the order listed. If the second argument is one
+of the binary conditional operators listed above under
+<b><small>CONDITIONAL
+EXPRESSIONS</small></b><small>,</small> the result of the
+expression is the result of the binary test using the first
+and third arguments as operands. The <b>−a</b> and
+<b>−o</b> operators are considered binary operators
+when there are three arguments. If the first argument is
+<b>!</b>, the value is the negation of the two-argument test
+using the second and third arguments. If the first argument
+is exactly <b>(</b> and the third argument is exactly
+<b>)</b>, the result is the one-argument test of the second
+argument. Otherwise, the expression is false.</p>
+
+<p style="margin-left:18%;">4 arguments</p>
+
+<p style="margin-left:27%;">The following conditions are
+applied in the order listed. If the first argument is
+<b>!</b>, the result is the negation of the three-argument
+expression composed of the remaining arguments. If the first
+argument is exactly <b>(</b> and the fourth argument is
+exactly <b>)</b>, the result is the two-argument test of the
+second and third arguments. Otherwise, the expression is
+parsed and evaluated according to precedence using the rules
+listed above.</p>
+
+<p style="margin-left:18%;">5 or more arguments</p>
+
+<p style="margin-left:27%;">The expression is parsed and
+evaluated according to precedence using the rules listed
+above.</p>
+
+<p style="margin-left:18%; margin-top: 1em">When the shell
+is in posix mode, or if the expression is part of the
+<b>[[</b> command, the <b><</b> and <b>></b> operators
+sort using the current locale. If the shell is not in posix
+mode, the <b>test</b> and <b>[</b> commands sort
+lexicographically using ASCII ordering.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The historical
+operator-precedence parsing with 4 or more arguments can
+lead to ambiguities when it encounters strings that look
+like primaries. The <small>POSIX</small> standard has
+deprecated the <b>−a</b> and <b>−o</b> primaries
+and enclosing expressions within parentheses. Scripts should
+no longer use them. It’s much more reliable to
+restrict test invocations to a single primary, and to
+replace uses of <b>−a</b> and <b>−o</b> with the
+shell’s <b>&&</b> and <b>||</b> list
+operators.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="6%">
+
+
+<p><b>times</b></p></td>
+<td width="3%"></td>
+<td width="82%">
+
+
+<p>Print the accumulated user and system times for the
+shell and for processes run from the shell. The return
+status is 0.</p></td></tr>
+</table>
+
+<p style="margin-left:9%;"><b>trap</b> [<b>−lpP</b>]
+[[<i>action</i>] <i>sigspec</i> ...]</p>
+
+<p style="margin-left:18%;">The <i>action</i> is a command
+that is read and executed when the shell receives any of the
+signals <i>sigspec</i>. If <i>action</i> is absent (and
+there is a single <i>sigspec</i>) or <b>−</b>, each
+specified <i>sigspec</i> is reset to the value it had when
+the shell was started. If <i>action</i> is the null string
+the signal specified by each <i>sigspec</i> is ignored by
+the shell and by the commands it invokes.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If no arguments
+are supplied, <b>trap</b> displays the actions associated
+with each trapped signal as a set of <b>trap</b> commands
+that can be reused as shell input to restore the current
+signal dispositions. If <b>−p</b> is given, and
+<i>action</i> is not present, then <b>trap</b> displays the
+actions associated with each <i>sigspec</i> or, if none are
+supplied, for all trapped signals, as a set of <b>trap</b>
+commands that can be reused as shell input to restore the
+current signal dispositions. The <b>−P</b> option
+behaves similarly, but displays only the actions associated
+with each <i>sigspec</i> argument. <b>−P</b> requires
+at least one <i>sigspec</i> argument. The <b>−P</b> or
+<b>−p</b> options may be used in a subshell
+environment (e.g., command substitution) and, as long as
+they are used before <b>trap</b> is used to change a
+signal’s handling, will display the state of its
+parent’s traps.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The
+<b>−l</b> option prints a list of signal names and
+their corresponding numbers. Each <i>sigspec</i> is either a
+signal name defined in <<i>signal.h</i>>, or a signal
+number. Signal names are case insensitive and the
+<b><small>SIG</small></b> prefix is optional. If
+<b>−l</b> is supplied with no <i>sigspec</i>
+arguments, it prints a list of valid signal names.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If a
+<i>sigspec</i> is <b><small>EXIT</small></b> (0),
+<i>action</i> is executed on exit from the shell. If a
+<i>sigspec</i> is
+<b><small>DEBUG</small></b><small>,</small> <i>action</i> is
+executed before every <i>simple command</i>, <i>for</i>
+command, <i>case</i> command, <i>select</i> command, ((
+arithmetic command, [[ conditional command, arithmetic
+<i>for</i> command, and before the first command executes in
+a shell function (see <b><small>SHELL GRAMMAR</small></b>
+above). Refer to the description of the <b>extdebug</b>
+shell option (see <b>shopt</b> above) for details of its
+effect on the <b>DEBUG</b> trap. If a <i>sigspec</i> is
+<b><small>RETURN</small></b><small>,</small> <i>action</i>
+is executed each time a shell function or a script executed
+with the <b>.</b> or <b>source</b> builtins finishes
+executing.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If a
+<i>sigspec</i> is <b><small>ERR</small></b><small>,</small>
+<i>action</i> is executed whenever a pipeline (which may
+consist of a single simple command), a list, or a compound
+command returns a non−zero exit status, subject to the
+following conditions. The <b><small>ERR</small></b> trap is
+not executed if the failed command is part of the command
+list immediately following a <b>while</b> or <b>until</b>
+reserved word, part of the test in an <i>if</i> statement,
+part of a command executed in a <b>&&</b> or
+<b>||</b> list except the command following the final
+<b>&&</b> or <b>||</b>, any command in a pipeline
+but the last (subject to the state of the <b>pipefail</b>
+shell option), or if the command’s return value is
+being inverted using <b>!</b>. These are the same conditions
+obeyed by the <b>errexit</b> (<b>−e</b>) option.</p>
+
+<p style="margin-left:18%; margin-top: 1em">When the shell
+is not interactive, signals ignored upon entry to the shell
+cannot be trapped or reset. Interactive shells permit
+trapping signals ignored on entry. Trapped signals that are
+not being ignored are reset to their original values in a
+subshell or subshell environment when one is created. The
+return status is false if any <i>sigspec</i> is invalid;
+otherwise <b>trap</b> returns true.</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="5%">
+
+
+<p><b>true</b></p></td>
+<td width="4%"></td>
+<td width="42%">
+
+
+<p>Does nothing, returns a 0 status.</p></td>
+<td width="40%">
+</td></tr>
+</table>
+
+<p style="margin-left:9%;"><b>type</b>
+[<b>−aftpP</b>] <i>name</i> [<i>name</i> ...]</p>
+
+<p style="margin-left:18%;">Indicate how each <i>name</i>
+would be interpreted if used as a command name.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If the
+<b>−t</b> option is used, <b>type</b> prints a string
+which is one of <i>alias</i>, <i>keyword</i>,
+<i>function</i>, <i>builtin</i>, or <i>file</i> if
+<i>name</i> is an alias, shell reserved word, function,
+builtin, or executable file, respectively. If the
+<i>name</i> is not found, <b>type</b> prints nothing and
+returns a non-zero exit status.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If the
+<b>−p</b> option is used, <b>type</b> either returns
+the pathname of the executable file that would be found by
+searching <b>$PATH</b> for <i>name</i> or nothing if
+“type −t name” would not return
+<i>file</i>. The <b>−P</b> option forces a
+<b><small>PATH</small></b> search for each <i>name</i>, even
+if “type −t name” would not return
+<i>file</i>. If <i>name</i> is present in the table of
+hashed commands, <b>−p</b> and <b>−P</b> print
+the hashed value, which is not necessarily the file that
+appears first in
+<b><small>PATH</small></b><small>.</small></p>
+
+<p style="margin-left:18%; margin-top: 1em">If the
+<b>−a</b> option is used, <b>type</b> prints all of
+the places that contain a command named <i>name</i>. This
+includes aliases, reserved words, functions, and builtins,
+but the path search options (<b>−p</b> and
+<b>−P</b>) can be supplied to restrict the output to
+executable files. <b>type</b> does not consult the table of
+hashed commands when using <b>−a</b> with
+<b>−p</b>, and only performs a
+<b><small>PATH</small></b> search for <i>name</i>.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The
+<b>−f</b> option suppresses shell function lookup, as
+with the <b>command</b> builtin. <b>type</b> returns true if
+all of the arguments are found, false if any are not
+found.</p>
+
+<p style="margin-left:9%;"><b>ulimit</b> [<b>−HS</b>]
+<b>−a <br>
+ulimit</b> [<b>−HS</b>]
+[<b>−bcdefiklmnpqrstuvxPRT</b> [<i>limit</i>]]</p>
+
+<p style="margin-left:18%;">Provides control over the
+resources available to the shell and to processes it starts,
+on systems that allow such control.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The
+<b>−H</b> and <b>−S</b> options specify whether
+the hard or soft limit is set for the given resource. A hard
+limit cannot be increased by a non-root user once it is set;
+a soft limit may be increased up to the value of the hard
+limit. If neither <b>−H</b> nor <b>−S</b> is
+specified, <b>ulimit</b> sets both the soft and hard
+limits.</p>
+
+<p style="margin-left:18%; margin-top: 1em">The value of
+<i>limit</i> can be a number in the unit specified for the
+resource or one of the special values <b>hard</b>,
+<b>soft</b>, or <b>unlimited</b>, which stand for the
+current hard limit, the current soft limit, and no limit,
+respectively. If <i>limit</i> is omitted, <b>ulimit</b>
+prints the current value of the soft limit of the resource,
+unless the <b>−H</b> option is given. When more than
+one resource is specified, the limit name and unit, if
+appropriate, are printed before the value. Other options are
+interpreted as follows:</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−a</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>Report all current limits; no limits are set.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−b</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>The maximum socket buffer size.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−c</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>The maximum size of core files created.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−d</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>The maximum size of a process’s data segment.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−e</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>The maximum scheduling priority
+(“nice”).</p> </td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−f</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>The maximum size of files written by the shell and its
+children.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−i</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>The maximum number of pending signals.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−k</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>The maximum number of kqueues that may be allocated.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−l</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>The maximum size that may be locked into memory.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−m</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>The maximum resident set size (many systems do not honor
+this limit).</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−n</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>The maximum number of open file descriptors (most
+systems do not allow this value to be set).</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−p</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>The pipe size in 512-byte blocks (this may not be
+set).</p> </td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−q</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>The maximum number of bytes in <small>POSIX</small>
+message queues.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−r</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>The maximum real-time scheduling priority.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−s</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>The maximum stack size.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−t</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>The maximum amount of cpu time in seconds.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−u</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>The maximum number of processes available to a single
+user.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−v</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>The maximum amount of virtual memory available to the
+shell and, on some systems, to its children.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−x</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>The maximum number of file locks.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−P</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>The maximum number of pseudoterminals.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−R</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>The maximum time a real-time process can run before
+blocking, in microseconds.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="3%">
+
+
+<p><b>−T</b></p></td>
+<td width="6%"></td>
+<td width="73%">
+
+
+<p>The maximum number of threads.</p></td></tr>
+</table>
+
+<p style="margin-left:18%; margin-top: 1em">If <i>limit</i>
+is supplied, and the <b>−a</b> option is not used,
+<i>limit</i> is the new value of the specified resource. If
+no option is supplied, then <b>−f</b> is assumed.</p>
+
+<p style="margin-left:18%; margin-top: 1em">Values are in
+1024-byte increments, except for <b>−t</b>, which is
+in seconds; <b>−R</b>, which is in microseconds;
+<b>−p</b>, which is in units of 512-byte blocks;
+<b>−P</b>, <b>−T</b>, <b>−b</b>,
+<b>−k</b>, <b>−n</b>, and <b>−u</b>, which
+are unscaled values; and, when in posix mode,
+<b>−c</b> and <b>−f</b>, which are in 512-byte
+increments. The return status is 0 unless an invalid option
+or argument is supplied, or an error occurs while setting a
+new limit.</p>
+
+<p style="margin-left:9%;"><b>umask</b> [<b>−p</b>]
+[<b>−S</b>] [<i>mode</i>]</p>
+
+<p style="margin-left:18%;">Set the user file-creation mask
+to <i>mode</i>. If <i>mode</i> begins with a digit, it is
+interpreted as an octal number; otherwise it is interpreted
+as a symbolic mode mask similar to that accepted by
+<i>chmod</i>(1). If <i>mode</i> is omitted, <b>umask</b>
+prints the current value of the mask. The <b>−S</b>
+option without a <i>mode</i> argument prints the mask in a
+symbolic format; the default output is an octal number. If
+the <b>−p</b> option is supplied, and <i>mode</i> is
+omitted, the output is in a form that may be reused as
+input. The return status is zero if the mode was
+successfully changed or if no <i>mode</i> argument was
+supplied, and non-zero otherwise.</p>
+
+<p style="margin-left:9%;"><b>unalias</b> [−<b>a</b>]
+[<i>name</i> ...]</p>
+
+<p style="margin-left:18%;">Remove each <i>name</i> from
+the list of defined aliases. If <b>−a</b> is supplied,
+remove all alias definitions. The return value is true
+unless a supplied <i>name</i> is not a defined alias.</p>
+
+<p style="margin-left:9%;"><b>unset</b> [−<b>fv</b>]
+[−<b>n</b>] [<i>name</i> ...]</p>
+
+<p style="margin-left:18%;">For each <i>name</i>, remove
+the corresponding variable or function. If the
+<b>−v</b> option is given, each <i>name</i> refers to
+a shell variable, and that variable is removed. If
+<b>−f</b> is specified, each <i>name</i> refers to a
+shell function, and the function definition is removed. If
+the <b>−n</b> option is supplied, and <i>name</i> is a
+variable with the <i>nameref</i> attribute, <i>name</i> will
+be unset rather than the variable it references.
+<b>−n</b> has no effect if the <b>−f</b> option
+is supplied. Read-only variables and functions may not be
+unset. When variables or functions are removed, they are
+also removed from the environment passed to subsequent
+commands. If no options are supplied, each <i>name</i>
+refers to a variable; if there is no variable by that name,
+a function with that name, if any, is unset. Some shell
+variables may not be unset. If any of
+<b><small>BASH_ALIASES</small></b><small>,
+<b>BASH_ARGV0</b>, <b>BASH_CMDS</b>, <b>BASH_COMMAND</b>,
+<b>BASH_SUBSHELL</b>, <b>BASHPID</b>,
+<b>COMP_WORDBREAKS</b>, <b>DIRSTACK</b>,
+<b>EPOCHREALTIME</b>, <b>EPOCHSECONDS</b>, <b>FUNCNAME</b>,
+<b>GROUPS</b>, <b>HISTCMD</b>, <b>LINENO</b>, <b>RANDOM</b>,
+<b>SECONDS</b>,</small> or <b><small>SRANDOM</small></b> are
+unset, they lose their special properties, even if they are
+subsequently reset. The exit status is true unless a
+<i>name</i> is readonly or may not be unset.</p>
+
+<p style="margin-left:9%;"><b>wait</b> [<b>−fn</b>]
+[<b>−p</b> <i>varname</i>] [<i>id</i> ...]</p>
+
+<p style="margin-left:18%;">Wait for each specified child
+process <i>id</i> and return the termination status of the
+last <i>id</i>. Each <i>id</i> may be a process ID
+<i>pid</i> or a job specification <i>jobspec</i>; if a
+jobspec is supplied, <b>wait</b> waits for all processes in
+the job.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If no options
+or <i>id</i>s are supplied, <b>wait</b> waits for all
+running background jobs and the last-executed process
+substitution, if its process id is the same as <b>$!</b>,
+and the return status is zero.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If the
+<b>−n</b> option is supplied, <b>wait</b> waits for
+any one of the given <i>id</i>s or, if no <i>id</i>s are
+supplied, any job or process substitution, to complete and
+returns its exit status. If none of the supplied <i>id</i>s
+is a child of the shell, or if no <i>id</i>s are supplied
+and the shell has no unwaited-for children, the exit status
+is 127.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If the
+<b>−p</b> option is supplied, <b>wait</b> assigns the
+process or job identifier of the job for which the exit
+status is returned to the variable <i>varname</i> named by
+the option argument. The variable, which cannot be readonly,
+will be unset initially, before any assignment. This is
+useful only when used with the <b>−n</b> option.</p>
+
+<p style="margin-left:18%; margin-top: 1em">Supplying the
+<b>−f</b> option, when job control is enabled, forces
+<b>wait</b> to wait for each <i>id</i> to terminate before
+returning its status, instead of returning when it changes
+status.</p>
+
+<p style="margin-left:18%; margin-top: 1em">If none of the
+<i>id</i>s specify one of the shell’s active child
+processes, the return status is 127. If <b>wait</b> is
+interrupted by a signal, any <i>varname</i> will remain
+unset, and the return status will be greater than 128, as
+described under <b>SIGNALS</b> above. Otherwise, the return
+status is the exit status of the last <i>id</i>.</p>
+
+<h2>SHELL COMPATIBILITY MODE
+<a name="SHELL COMPATIBILITY MODE"></a>
+</h2>
+
+
+<p style="margin-left:9%; margin-top: 1em">Bash-4.0
+introduced the concept of a <i>shell compatibility
+level</i>, specified as a set of options to the shopt
+builtin (<b>compat31</b>, <b>compat32</b>, <b>compat40</b>,
+<b>compat41</b>, and so on). There is only one current
+compatibility level — each option is mutually
+exclusive. The compatibility level is intended to allow
+users to select behavior from previous versions that is
+incompatible with newer versions while they migrate scripts
+to use current features and behavior. It’s intended to
+be a temporary solution.</p>
+
+<p style="margin-left:9%; margin-top: 1em">This section
+does not mention behavior that is standard for a particular
+version (e.g., setting <b>compat32</b> means that quoting
+the right hand side of the regexp matching operator quotes
+special regexp characters in the word, which is default
+behavior in bash-3.2 and subsequent versions).</p>
+
+<p style="margin-left:9%; margin-top: 1em">If a user
+enables, say, <b>compat32</b>, it may affect the behavior of
+other compatibility levels up to and including the current
+compatibility level. The idea is that each compatibility
+level controls behavior that changed in that version of
+<b>bash</b>, but that behavior may have been present in
+earlier versions. For instance, the change to use
+locale-based comparisons with the <b>[[</b> command came in
+bash-4.1, and earlier versions used ASCII-based comparisons,
+so enabling <b>compat32</b> will enable ASCII-based
+comparisons as well. That granularity may not be sufficient
+for all uses, and as a result users should employ
+compatibility levels carefully. Read the documentation for a
+particular feature to find out the current behavior.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Bash-4.3
+introduced a new shell variable:
+<b><small>BASH_COMPAT</small></b><small>.</small> The value
+assigned to this variable (a decimal version number like
+4.2, or an integer corresponding to the
+<b>compat</b><i>NN</i> option, like 42) determines the
+compatibility level.</p>
+
+<p style="margin-left:9%; margin-top: 1em">Starting with
+bash-4.4, <b>bash</b> began deprecating older compatibility
+levels. Eventually, the options will be removed in favor of
+<b><small>BASH_COMPAT</small></b><small>.</small></p>
+
+<p style="margin-left:9%; margin-top: 1em">Bash-5.0 was the
+final version for which there was an individual shopt option
+for the previous version. <b><small>BASH_COMPAT</small></b>
+is the only mechanism to control the compatibility level in
+versions newer than bash-5.0.</p>
+
+<p style="margin-left:9%; margin-top: 1em">The following
+table describes the behavior changes controlled by each
+compatibility level setting. The <b>compat</b><i>NN</i> tag
+is used as shorthand for setting the compatibility level to
+<i>NN</i> using one of the following mechanisms. For
+versions prior to bash-5.0, the compatibility level may be
+set using the corresponding <b>compat</b><i>NN</i> shopt
+option. For bash-4.3 and later versions, the
+<b><small>BASH_COMPAT</small></b> variable is preferred, and
+it is required for bash-5.1 and later versions. <b><br>
+compat31</b></p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="1%">
+
+
+<p>•</p></td>
+<td width="8%"></td>
+<td width="73%">
+
+
+<p>Quoting the rhs of the <b>[[</b> command’s regexp
+matching operator (=~) has no special effect.</p></td></tr>
+</table>
+
+<p style="margin-left:9%;"><b>compat32</b></p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="1%">
+
+
+<p>•</p></td>
+<td width="8%"></td>
+<td width="73%">
+
+
+<p>The <b><</b> and <b>></b> operators to the
+<b>[[</b> command do not consider the current locale when
+comparing strings; they use ASCII ordering.</p></td></tr>
+</table>
+
+<p style="margin-left:9%;"><b>compat40</b></p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="1%">
+
+
+<p>•</p></td>
+<td width="8%"></td>
+<td width="73%">
+
+
+<p>The <b><</b> and <b>></b> operators to the
+<b>[[</b> command do not consider the current locale when
+comparing strings; they use ASCII ordering. <b>Bash</b>
+versions prior to bash-4.1 use ASCII collation and
+<i>strcmp</i>(3); bash-4.1 and later use the current
+locale’s collation sequence and <i>strcoll</i>(3).</p></td></tr>
+</table>
+
+<p style="margin-left:9%;"><b>compat41</b></p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="1%">
+
+
+<p>•</p></td>
+<td width="8%"></td>
+<td width="73%">
+
+
+<p>In posix mode, <b>time</b> may be followed by options
+and still be recognized as a reserved word (this is
+<small>POSIX</small> interpretation 267).</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="1%">
+
+
+<p>•</p></td>
+<td width="8%"></td>
+<td width="73%">
+
+
+<p>In <i>posix</i> mode, the parser requires that an even
+number of single quotes occur in the <i>word</i> portion of
+a double-quoted parameter expansion and treats them
+specially, so that characters within the single quotes are
+considered quoted (this is <small>POSIX</small>
+interpretation 221).</p></td></tr>
+</table>
+
+<p style="margin-left:9%;"><b>compat42</b></p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="1%">
+
+
+<p>•</p></td>
+<td width="8%"></td>
+<td width="73%">
+
+
+<p>The replacement string in double-quoted pattern
+substitution does not undergo quote removal, as it does in
+versions after bash-4.2.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="1%">
+
+
+<p>•</p></td>
+<td width="8%"></td>
+<td width="73%">
+
+
+<p>In posix mode, single quotes are considered special when
+expanding the <i>word</i> portion of a double-quoted
+parameter expansion and can be used to quote a closing brace
+or other special character (this is part of
+<small>POSIX</small> interpretation 221); in later versions,
+single quotes are not special within double-quoted word
+expansions.</p> </td></tr>
+</table>
+
+<p style="margin-left:9%;"><b>compat43</b></p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="1%">
+
+
+<p>•</p></td>
+<td width="8%"></td>
+<td width="73%">
+
+
+<p>Word expansion errors are considered non-fatal errors
+that cause the current command to fail, even in posix mode
+(the default behavior is to make them fatal errors that
+cause the shell to exit).</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="1%">
+
+
+<p>•</p></td>
+<td width="8%"></td>
+<td width="73%">
+
+
+<p>When executing a shell function, the loop state
+(while/until/etc.) is not reset, so <b>break</b> or
+<b>continue</b> in that function will break or continue
+loops in the calling context. Bash-4.4 and later reset the
+loop state to prevent this.</p></td></tr>
+</table>
+
+<p style="margin-left:9%;"><b>compat44</b></p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="1%">
+
+
+<p>•</p></td>
+<td width="8%"></td>
+<td width="73%">
+
+
+<p>The shell sets up the values used by
+<b><small>BASH_ARGV</small></b> and
+<b><small>BASH_ARGC</small></b> so they can expand to the
+shell’s positional parameters even if extended
+debugging mode is not enabled.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="1%">
+
+
+<p>•</p></td>
+<td width="8%"></td>
+<td width="73%">
+
+
+<p>A subshell inherits loops from its parent context, so
+<b>break</b> or <b>continue</b> will cause the subshell to
+exit. Bash-5.0 and later reset the loop state to prevent the
+exit</p> </td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="1%">
+
+
+<p>•</p></td>
+<td width="8%"></td>
+<td width="73%">
+
+
+<p>Variable assignments preceding builtins like
+<b>export</b> and <b>readonly</b> that set attributes
+continue to affect variables with the same name in the
+calling environment even if the shell is not in posix
+mode.</p> </td></tr>
+</table>
+
+<p style="margin-left:9%;"><b>compat50</b></p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="1%">
+
+
+<p>•</p></td>
+<td width="8%"></td>
+<td width="73%">
+
+
+<p>Bash-5.1 changed the way <b><small>$RANDOM</small></b>
+is generated to introduce slightly more randomness. If the
+shell compatibility level is set to 50 or lower, it reverts
+to the method from bash-5.0 and previous versions, so
+seeding the random number generator by assigning a value to
+<b><small>RANDOM</small></b> will produce the same sequence
+as in bash-5.0.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="1%">
+
+
+<p>•</p></td>
+<td width="8%"></td>
+<td width="73%">
+
+
+<p>If the command hash table is empty, bash versions prior
+to bash-5.1 printed an informational message to that effect,
+even when producing output that can be reused as input.
+Bash-5.1 suppresses that message when the <b>−l</b>
+option is supplied.</p></td></tr>
+</table>
+
+<p style="margin-left:9%;"><b>compat51</b></p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="1%">
+
+
+<p>•</p></td>
+<td width="8%"></td>
+<td width="73%">
+
+
+<p>The <b>unset</b> builtin treats attempts to unset array
+subscripts <b>@</b> and <b>*</b> differently depending on
+whether the array is indexed or associative, and differently
+than in previous versions.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="1%">
+
+
+<p>•</p></td>
+<td width="8%"></td>
+<td width="73%">
+
+
+<p>Arithmetic commands ( <b>((</b>...<b>))</b> ) and the
+expressions in an arithmetic for statement can be expanded
+more than once.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="1%">
+
+
+<p>•</p></td>
+<td width="8%"></td>
+<td width="73%">
+
+
+<p>Expressions used as arguments to arithmetic operators in
+the <b>[[</b> conditional command can be expanded more than
+once.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="1%">
+
+
+<p>•</p></td>
+<td width="8%"></td>
+<td width="73%">
+
+
+<p>The expressions in substring parameter brace expansion
+can be expanded more than once.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="1%">
+
+
+<p>•</p></td>
+<td width="8%"></td>
+<td width="73%">
+
+
+<p>The expressions in the <b>$((</b>...<b>))</b> word
+expansion can be expanded more than once.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="1%">
+
+
+<p>•</p></td>
+<td width="8%"></td>
+<td width="73%">
+
+
+<p>Arithmetic expressions used as indexed array subscripts
+can be expanded more than once.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="1%">
+
+
+<p>•</p></td>
+<td width="8%"></td>
+<td width="73%">
+
+
+<p><b>test −v</b>, when given an argument of
+<b>A[@]</b>, where <b>A</b> 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
+<b>@</b>.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="1%">
+
+
+<p>•</p></td>
+<td width="8%"></td>
+<td width="73%">
+
+
+<p>The ${<i>parameter</i><b>[:]=</b><i>value</i>} word
+expansion will return <i>value</i>, 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.</p></td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="1%">
+
+
+<p>•</p></td>
+<td width="8%"></td>
+<td width="73%">
+
+
+<p>Parsing command substitutions will behave as if extended
+globbing (see the description of the <b>shopt</b> builtin
+above) 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.</p></td></tr>
+</table>
+
+<p style="margin-left:9%;"><b>compat52</b></p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="1%">
+
+
+<p>•</p></td>
+<td width="8%"></td>
+<td width="73%">
+
+
+<p>The <b>test</b> builtin uses its historical algorithm to
+parse parenthesized subexpressions when given five or more
+arguments.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="18%"></td>
+<td width="1%">
+
+
+<p>•</p></td>
+<td width="8%"></td>
+<td width="73%">
+
+
+<p>If the <b>−p</b> or <b>−P</b> option is
+supplied to the <b>bind</b> builtin, <b>bind</b> treats any
+arguments remaining after option processing as bindable
+command names, and displays any key sequences bound to those
+commands, instead of treating the arguments as key sequences
+to bind.</p></td></tr>
+</table>
+
+<h2>RESTRICTED SHELL
+<a name="RESTRICTED SHELL"></a>
+</h2>
+
+
+<p style="margin-left:9%; margin-top: 1em">If <b>bash</b>
+is started with the name <b>rbash</b>, or the
+<b>−r</b> option is supplied at invocation, the shell
+becomes <i>restricted</i>. A restricted shell is used to set
+up an environment more controlled than the standard shell.
+It behaves identically to <b>bash</b> with the exception
+that the following are disallowed or not performed:</p>
+
+<table width="100%" border="0" rules="none" frame="void"
+ cellspacing="0" cellpadding="0">
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
+
+
+<p style="margin-top: 1em">•</p></td>
+<td width="8%"></td>
+<td width="82%">
+
+
+<p style="margin-top: 1em">Changing directories with
+<b>cd</b>.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
+
+
+<p>•</p></td>
+<td width="8%"></td>
+<td width="82%">
+
+
+<p>Setting or unsetting the values of
+<b><small>SHELL</small></b><small>, <b>PATH</b>,
+<b>HISTFILE</b>, <b>ENV</b>,</small> or
+<b><small>BASH_ENV</small></b><small>.</small></p> </td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
+
+
+<p>•</p></td>
+<td width="8%"></td>
+<td width="82%">
+
-with
-<B>-p</B>,
-
-and only performs a
-<FONT SIZE=-1><B>PATH</B>
-
-</FONT>
-search for <I>name</I>.
-<DT><DD>
-The
-<B>-f</B>
-
-option suppresses shell function lookup, as with the <B>command</B> builtin.
-<B>type</B>
-
-returns true if all of the arguments are found, false if
-any are not found.
-<DT><B>ulimit</B> [<B>-HS</B>] <B>-a</B><DD>
-
-<DT><B>ulimit</B> [<B>-HS</B>] [<B>-bcdefiklmnpqrstuvxPRT</B> [<I>limit</I>]]<DD>
-
-Provides control over the resources available to the shell and to
-processes it starts, on systems that allow such control.
-<DT><DD>
-The <B>-H</B> and <B>-S</B> options specify whether
-the hard or soft limit is set for the given resource.
-A hard limit cannot be increased by a non-root user once it is set;
-a soft limit may be increased up to the value of the hard limit.
-If neither <B>-H</B> nor <B>-S</B> is specified,
-<B>ulimit</B> sets both the soft and hard limits.
-<DT><DD>
-The value of
-<I>limit</I>
-
-can be a number in the unit specified for the resource
-or one of the special values
-<B>hard</B>,
-
-<B>soft</B>,
-
-or
-<B>unlimited</B>,
-
-which stand for the current hard limit, the current soft limit, and
-no limit, respectively.
-If
-<I>limit</I>
-
-is omitted, <B>ulimit</B> prints the current value of the soft limit of
-the resource, unless the <B>-H</B> option is given.
-When more than one resource is specified, the limit name and unit,
-if appropriate, are printed before the value.
-Other options are interpreted as follows:
-<DL COMPACT><DT><DD>
-
-<DL COMPACT>
-<DT><B>-a</B>
-
-<DD>
-Report all current limits; no limits are set.
-<DT><B>-b</B>
-
-<DD>
-The maximum socket buffer size.
-<DT><B>-c</B>
-
-<DD>
-The maximum size of core files created.
-<DT><B>-d</B>
+<p>Specifying command names containing <b>/</b>.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-<DD>
-The maximum size of a process's data segment.
-<DT><B>-e</B>
-<DD>
-The maximum scheduling priority (
+<p>•</p></td>
+<td width="8%"></td>
+<td width="82%">
-<DT><B>-f</B>
-<DD>
-The maximum size of files written by the shell and its children.
-<DT><B>-i</B>
+<p>Specifying a filename containing a <b>/</b> as an
+argument to the <b>.</b> builtin command.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-<DD>
-The maximum number of pending signals.
-<DT><B>-k</B>
-<DD>
-The maximum number of kqueues that may be allocated.
-<DT><B>-l</B>
+<p>•</p></td>
+<td width="8%"></td>
+<td width="82%">
-<DD>
-The maximum size that may be locked into memory.
-<DT><B>-m</B>
-<DD>
-The maximum resident set size (many systems do not honor this limit).
-<DT><B>-n</B>
+<p>Using the <b>−p</b> option to the <b>.</b> builtin
+command to specify a search path.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-<DD>
-The maximum number of open file descriptors (most systems do not
-allow this value to be set).
-<DT><B>-p</B>
-<DD>
-The pipe size in 512-byte blocks (this may not be set).
-<DT><B>-q</B>
+<p>•</p></td>
+<td width="8%"></td>
+<td width="82%">
-<DD>
-The maximum number of bytes in
-<FONT SIZE=-1>POSIX</FONT>
-message queues.
-<DT><B>-r</B>
-<DD>
-The maximum real-time scheduling priority.
-<DT><B>-s</B>
+<p>Specifying a filename containing a slash as an argument
+to the <b>history</b> builtin command.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-<DD>
-The maximum stack size.
-<DT><B>-t</B>
-<DD>
-The maximum amount of cpu time in seconds.
-<DT><B>-u</B>
+<p>•</p></td>
+<td width="8%"></td>
+<td width="82%">
-<DD>
-The maximum number of processes available to a single user.
-<DT><B>-v</B>
-<DD>
-The maximum amount of virtual memory available to the shell and, on
-some systems, to its children.
-<DT><B>-x</B>
+<p>Specifying a filename containing a slash as an argument
+to the <b>−p</b> option to the <b>hash</b> builtin
+command.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-<DD>
-The maximum number of file locks.
-<DT><B>-P</B>
-<DD>
-The maximum number of pseudoterminals.
-<DT><B>-R</B>
+<p>•</p></td>
+<td width="8%"></td>
+<td width="82%">
-<DD>
-The maximum time a real-time process can run before blocking, in microseconds.
-<DT><B>-T</B>
-<DD>
-The maximum number of threads.
+<p>Importing function definitions from the shell
+environment at startup.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-</DL>
-<P>
-If
-<I>limit</I>
+<p>•</p></td>
+<td width="8%"></td>
+<td width="82%">
-is supplied, and the
-<B>-a</B>
-option is not used,
-<I>limit</I> is the new value of the specified resource.
-If no option is supplied, then
-<B>-f</B>
+<p>Parsing the values of <b><small>BASHOPTS</small></b> and
+<b><small>SHELLOPTS</small></b> from the shell environment
+at startup.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-is assumed.
-<P>
-Values are in 1024-byte increments, except for
-<B>-t</B>,
+<p>•</p></td>
+<td width="8%"></td>
+<td width="82%">
-which is in seconds;
-<B>-R</B>,
-which is in microseconds;
-<B>-p</B>,
+<p>Redirecting output using the >, >|, <>,
+>&, &>, and >> redirection
+operators.</p> </td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-which is in units of 512-byte blocks;
-<B>-P</B>,
-<B>-T</B>,
+<p>•</p></td>
+<td width="8%"></td>
+<td width="82%">
-<B>-b</B>,
-<B>-k</B>,
+<p>Using the <b>exec</b> builtin command to replace the
+shell with another command.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-<B>-n</B>,
-and
-<B>-u</B>,
+<p>•</p></td>
+<td width="8%"></td>
+<td width="82%">
-which are unscaled values;
-and, when in posix mode,
-<B>-c</B>
-and
-<B>-f</B>,
+<p>Adding or deleting builtin commands with the
+<b>−f</b> and <b>−d</b> options to the
+<b>enable</b> builtin command.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-which are in 512-byte increments.
-The return status is 0 unless an invalid option or argument is supplied,
-or an error occurs while setting a new limit.
-</DL>
-<DT><B>umask</B> [<B>-p</B>] [<B>-S</B>] [<I>mode</I>]<DD>
-Set the user file-creation mask to
-<I>mode</I>.
+<p>•</p></td>
+<td width="8%"></td>
+<td width="82%">
-If
-<I>mode</I>
-begins with a digit, it is interpreted as an octal number;
-otherwise it is interpreted as a symbolic mode mask similar
-to that accepted by
-<I>chmod</I>(1).
+<p>Using the <b>enable</b> builtin command to enable
+disabled shell builtins.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-If
-<I>mode</I>
-is omitted, <B>umask</B> prints the current value of the mask.
-The
-<B>-S</B>
+<p>•</p></td>
+<td width="8%"></td>
+<td width="82%">
-option without a <I>mode</I> argument
-prints the mask in a symbolic format;
-the default output is an octal number.
-If the
-<B>-p</B>
-option is supplied, and
-<I>mode</I>
+<p>Specifying the <b>−p</b> option to the
+<b>command</b> builtin command.</p></td></tr>
+<tr valign="top" align="left">
+<td width="9%"></td>
+<td width="1%">
-is omitted, the output is in a form that may be reused as input.
-The return status is zero if the mode was successfully changed or
-if no <I>mode</I> argument was supplied, and non-zero otherwise.
-<DT><B>unalias</B> [-<B>a</B>] [<I>name</I> ...]<DD>
-Remove each <I>name</I> from the list of defined aliases.
-If
-<B>-a</B>
-is supplied, remove all alias definitions.
-The return value is true unless a supplied
-<I>name</I>
+<p>•</p></td>
+<td width="8%"></td>
+<td width="82%">
-is not a defined alias.
-<DT><B>unset</B> [-<B>fv</B>] [-<B>n</B>] [<I>name</I> ...]<DD>
-For each
-<I>name</I>,
-remove the corresponding variable or function.
-If the
-<B>-v</B>
+<p>Turning off restricted mode with <b>set +r</b> or
+<b>shopt −u restricted_shell</b>.</p></td></tr>
+</table>
-option is given, each
-<I>name</I>
-
-refers to a shell variable, and that variable is removed.
-If
-<B>-f</B>
-
-is specified, each
-<I>name</I>
-
-refers to a shell function, and the function definition
-is removed.
-If the
-<B>-n</B>
-
-option is supplied, and <I>name</I> is a variable with the <I>nameref</I>
-attribute, <I>name</I> will be unset rather than the variable it
-references.
-<B>-n</B> has no effect if the <B>-f</B> option is supplied.
-Read-only variables and functions may not be unset.
-When variables or functions are removed, they are also removed
-from the environment passed to subsequent commands.
-If no options are supplied, each <I>name</I> refers to a variable; if
-there is no variable by that name, a function with that name, if any, is
-unset.
-Some shell variables may not be unset.
-If any of
-<FONT SIZE=-1><B>BASH_ALIASES</B>,
-
-</FONT>
-<FONT SIZE=-1><B>BASH_ARGV0</B>,
-
-</FONT>
-<FONT SIZE=-1><B>BASH_CMDS</B>,
-
-</FONT>
-<FONT SIZE=-1><B>BASH_COMMAND</B>,
-
-</FONT>
-<FONT SIZE=-1><B>BASH_SUBSHELL</B>,
-
-</FONT>
-<FONT SIZE=-1><B>BASHPID</B>,
-
-</FONT>
-<FONT SIZE=-1><B>COMP_WORDBREAKS</B>,
-
-</FONT>
-<FONT SIZE=-1><B>DIRSTACK</B>,
-
-</FONT>
-<FONT SIZE=-1><B>EPOCHREALTIME</B>,
-
-</FONT>
-<FONT SIZE=-1><B>EPOCHSECONDS</B>,
-
-</FONT>
-<FONT SIZE=-1><B>FUNCNAME</B>,
-
-</FONT>
-<FONT SIZE=-1><B>GROUPS</B>,
-
-</FONT>
-<FONT SIZE=-1><B>HISTCMD</B>,
-
-</FONT>
-<FONT SIZE=-1><B>LINENO</B>,
-
-</FONT>
-<FONT SIZE=-1><B>RANDOM</B>,
-
-</FONT>
-<FONT SIZE=-1><B>SECONDS</B>,
-
-</FONT>
-or
-<FONT SIZE=-1><B>SRANDOM</B>
-
-</FONT>
-are unset, they lose their special properties, even if they are
-subsequently reset.
-The exit status is true unless a
-<I>name</I>
-
-is readonly or may not be unset.
-<DT><B>wait</B> [<B>-fn</B>] [-p <I>varname</I>] [<I>id</I> ...]<DD>
-Wait for each specified child process <I>id</I> and return the
-termination status of the last <I>id</I>.
-Each <I>id</I> may be a process ID <I>pid</I>
-or a job specification <I>jobspec</I>;
-if a jobspec is supplied, <B>wait</B> waits for all processes in the job.
-<DT><DD>
-If no options or <I>id</I>s are supplied,
-<B>wait</B> waits for all running background jobs and
-the last-executed process substitution,
-if its process id is the same as <B>$!</B>,
-and the return status is zero.
-<DT><DD>
-If the <B>-n</B> option is supplied, <B>wait</B> waits for any one of
-the given <I>id</I>s or,
-if no <I>id</I>s are supplied, any job or process substitution,
-to complete and returns its exit status.
-If none of the supplied <I>id</I>s is a child of the shell,
-or if no <I>id</I>s are supplied and the shell has no unwaited-for children,
-the exit status is 127.
-<DT><DD>
-If the <B>-p</B> option is supplied, <B>wait</B> assigns
-the process or job identifier of the job
-for which the exit status is returned to the
-variable <I>varname</I> named by the option argument.
-The variable,
-which cannot be readonly,
-will be unset initially, before any assignment.
-This is useful only when used with the <B>-n</B> option.
-<DT><DD>
-Supplying the <B>-f</B> option, when job control is enabled,
-forces <B>wait</B> to wait for each <I>id</I> to terminate before
-returning its status, instead of returning when it changes status.
-<DT><DD>
-If none of the <I>id</I>s specify one of the shell's active child
-processes, the return status is 127.
-If <B>wait</B> is interrupted by a signal,
-any <I>varname</I> will remain unset,
-and the return status will be greater
-than 128, as described under
-<B>SIGNALS</B>
-
-
-above.
-Otherwise, the return status is the exit status of the last <I>id</I>.
-</DL>
-<A NAME="lbDD"> </A>
-<H3>SHELL COMPATIBILITY MODE</H3>
-
-Bash-4.0 introduced the concept of a <I>shell compatibility level</I>,
-specified as a set of options to the shopt builtin (
-<B>compat31</B>,
-
-<B>compat32</B>,
-
-<B>compat40</B>,
-
-<B>compat41</B>,
-
-and so on).
-There is only one current
-compatibility level - each option is mutually exclusive.
-The compatibility level is intended to allow users to select behavior
-from previous versions that is incompatible with newer versions
-while they migrate scripts to use current features and behavior.
-It's intended to be a temporary solution.
-<P>
-
-This section does not mention behavior that is standard for a particular
-version (e.g., setting <B>compat32</B> means that quoting the right hand
-side of the regexp
-matching operator quotes special regexp characters in the word, which is
-default behavior in bash-3.2 and subsequent versions).
-<P>
-
-If a user enables, say, <B>compat32</B>, it may affect the behavior of other
-compatibility levels up to and including the current compatibility level.
-The idea is that each compatibility level controls behavior that changed
-in that version of <B>bash</B>,
-but that behavior may have been present in earlier versions.
-For instance, the change to use locale-based comparisons with the <B>[[</B>
-command came in bash-4.1, and earlier versions used ASCII-based comparisons,
-so enabling <B>compat32</B> will enable ASCII-based comparisons as well.
-That granularity may not be sufficient for
-all uses, and as a result users should employ compatibility levels carefully.
-Read the documentation for a particular feature to find out the
-current behavior.
-<P>
-
-Bash-4.3 introduced a new shell variable:
-<FONT SIZE=-1><B>BASH_COMPAT</B>.
-
-</FONT>
-The value assigned
-to this variable (a decimal version number like 4.2, or an integer
-corresponding to the <B>compat</B><I>NN</I> option, like 42) determines the
-compatibility level.
-<P>
-
-Starting with bash-4.4, <B>bash</B> began deprecating older compatibility
-levels.
-Eventually, the options will be removed in favor of
-<FONT SIZE=-1><B>BASH_COMPAT</B>.
-
-</FONT>
-<P>
-
-Bash-5.0 was the final version for which there was an individual shopt
-option for the previous version.
-<FONT SIZE=-1><B>BASH_COMPAT</B>
-
-</FONT>
-is the only mechanism to control the compatibility level
-in versions newer than bash-5.0.
-<P>
-
-The following table describes the behavior changes controlled by each
-compatibility level setting.
-The <B>compat</B><I>NN</I> tag is used as shorthand for setting the
-compatibility level
-to <I>NN</I> using one of the following mechanisms.
-For versions prior to bash-5.0, the compatibility level may be set using
-the corresponding <B>compat</B><I>NN</I> shopt option.
-For bash-4.3 and later versions, the
-<FONT SIZE=-1><B>BASH_COMPAT</B>
-
-</FONT>
-variable is preferred,
-and it is required for bash-5.1 and later versions.
-<DL COMPACT>
-<DT><B>compat31</B><DD>
-
-<DL COMPACT><DT><DD>
-<DL COMPACT>
-<DT>*<DD>
-Quoting the rhs of the <B>[[</B> command's regexp matching operator (=~)
-has no special effect.
-</DL></DL>
-
-
-<DT><B>compat32</B><DD>
-
-<DL COMPACT><DT><DD>
-<DL COMPACT>
-<DT>*<DD>
-The <B><</B> and <B>></B> operators to the <B>[[</B> command do not
-consider the current locale when comparing strings; they use ASCII
-ordering.
-</DL></DL>
-
-
-<DT><B>compat40</B><DD>
-
-<DL COMPACT><DT><DD>
-<DL COMPACT>
-<DT>*<DD>
-The <B><</B> and <B>></B> operators to the <B>[[</B> command do not
-consider the current locale when comparing strings; they use ASCII
-ordering.
-<B>Bash</B> versions prior to bash-4.1 use ASCII collation and
-<I>strcmp</I>(3);
-
-bash-4.1 and later use the current locale's collation sequence and
-<I>strcoll</I>(3).
-
-</DL></DL>
-
-
-<DT><B>compat41</B><DD>
-
-<DL COMPACT><DT><DD>
-<DL COMPACT>
-<DT>*<DD>
-In posix mode, <B>time</B> may be followed by options and still be
-recognized as a reserved word (this is
-<FONT SIZE=-1>POSIX</FONT>
-interpretation 267).
-<DT>*<DD>
-In <I>posix</I> mode, the parser requires that an even number of single
-quotes occur in the <I>word</I> portion of a double-quoted
-parameter expansion and treats them specially, so that characters within
-the single quotes are considered quoted
-(this is
-<FONT SIZE=-1>POSIX</FONT>
-interpretation 221).
-</DL></DL>
-
-
-<DT><B>compat42</B><DD>
-
-<DL COMPACT><DT><DD>
-<DL COMPACT>
-<DT>*<DD>
-The replacement string in double-quoted pattern substitution does not
-undergo quote removal, as it does in versions after bash-4.2.
-<DT>*<DD>
-In posix mode, single quotes are considered special when expanding
-the <I>word</I> portion of a double-quoted parameter expansion
-and can be used to quote a closing brace or other special character
-(this is part of
-<FONT SIZE=-1>POSIX</FONT>
-interpretation 221);
-in later versions, single quotes
-are not special within double-quoted word expansions.
-</DL></DL>
-
-
-<DT><B>compat43</B><DD>
-
-<DL COMPACT><DT><DD>
-<DL COMPACT>
-<DT>*<DD>
-Word expansion errors are considered non-fatal errors that cause the
-current command to fail, even in posix mode
-(the default behavior is to make them fatal errors that cause the shell
-to exit).
-<DT>*<DD>
-When executing a shell function, the loop state (while/until/etc.)
-is not reset, so <B>break</B> or <B>continue</B> in that function will break
-or continue loops in the calling context.
-Bash-4.4 and later reset the loop state to prevent this.
-</DL></DL>
-
-
-<DT><B>compat44</B><DD>
-
-<DL COMPACT><DT><DD>
-<DL COMPACT>
-<DT>*<DD>
-The shell sets up the values used by
-<FONT SIZE=-1><B>BASH_ARGV</B>
-
-</FONT>
-and
-<FONT SIZE=-1><B>BASH_ARGC</B>
-
-</FONT>
-so they can expand to the shell's positional parameters even if extended
-debugging mode is not enabled.
-<DT>*<DD>
-A subshell inherits loops from its parent context, so <B>break</B>
-or <B>continue</B> will cause the subshell to exit.
-Bash-5.0 and later reset the loop state to prevent the exit
-<DT>*<DD>
-Variable assignments preceding builtins like <B>export</B> and <B>readonly</B>
-that set attributes continue to affect variables with the same
-name in the calling environment even if the shell is not in posix
-mode.
-</DL></DL>
-
-
-<DT><B>compat50</B><DD>
-
-<DL COMPACT><DT><DD>
-<DL COMPACT>
-<DT>*<DD>
-Bash-5.1 changed the way
-<FONT SIZE=-1><B>$RANDOM</B>
-
-</FONT>
-is generated to introduce slightly more randomness.
-If the shell compatibility level is set to 50 or
-lower, it reverts to the method from bash-5.0 and previous versions,
-so seeding the random number generator by assigning a value to
-<FONT SIZE=-1><B>RANDOM</B>
-
-</FONT>
-will produce the same sequence as in bash-5.0.
-<DT>*<DD>
-If the command hash table is empty, bash versions prior to bash-5.1
-printed an informational message to that effect, even when producing
-output that can be reused as input.
-Bash-5.1 suppresses that message
-when the <B>-l</B> option is supplied.
-</DL></DL>
-
-
-<DT><B>compat51</B><DD>
-
-<DL COMPACT><DT><DD>
-<DL COMPACT>
-<DT>*<DD>
-The <B>unset</B> builtin treats attempts to unset array subscripts <B>@</B>
-and <B>*</B> differently depending on whether the array is indexed or
-associative, and differently than in previous versions.
-<DT>*<DD>
-Arithmetic commands (
-<B>((</B>...<B>))</B>
-
-) and the expressions in an arithmetic for
-statement can be expanded more than once.
-<DT>*<DD>
-Expressions used as arguments to arithmetic operators in the <B>[[</B>
-conditional command can be expanded more than once.
-<DT>*<DD>
-The expressions in substring parameter brace expansion can be
-expanded more than once.
-<DT>*<DD>
-The expressions in the
-<B>$((</B>...<B>))</B>
-
-word expansion can be expanded more than once.
-<DT>*<DD>
-Arithmetic expressions used as indexed array subscripts can be
-expanded more than once.
-<DT>*<DD>
-<B>test -v</B>, when given an argument of <B>A[@]</B>, where <B>A</B> 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 <B>@</B>.
-<DT>*<DD>
-The ${<I>parameter</I><B>[:]=</B><I>value</I>} word expansion will return
-<I>value</I>, 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.
-<DT>*<DD>
-Parsing command substitutions will behave as if extended globbing
-(see the description of the
-<B>shopt</B>
-
-builtin above)
-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.
-</DL></DL>
-
-
-<DT><B>compat52</B><DD>
-
-<DL COMPACT><DT><DD>
-<DL COMPACT>
-<DT>*<DD>
-The <B>test</B> builtin uses its historical algorithm to parse parenthesized
-subexpressions when given five or more arguments.
-<DT>*<DD>
-If the <B>-p</B> or <B>-P</B> option is supplied to the <B>bind</B> builtin,
-<B>bind</B> treats any arguments remaining after option processing
-as bindable command names, and
-displays any key sequences bound to those commands, instead of treating
-the arguments as key sequences to bind.
-</DL></DL>
-
-
-
-
-</DL>
-<A NAME="lbDE"> </A>
-<H3>RESTRICTED SHELL</H3>
-
-
-
-<P>
-
-If
-<B>bash</B>
-
-is started with the name
-<B>rbash</B>,
-
-or the
-<B>-r</B>
-
-option is supplied at invocation, the shell becomes <I>restricted</I>.
-A restricted shell is used to
-set up an environment more controlled than the standard shell.
-It behaves identically to
-<B>bash</B>
-
-with the exception that the following are disallowed or not performed:
-<DL COMPACT>
-<DT>*<DD>
-Changing directories with <B>cd</B>.
-<DT>*<DD>
-Setting or unsetting the values of
-<FONT SIZE=-1><B>SHELL</B>,
-
-</FONT>
-<FONT SIZE=-1><B>PATH</B>,
-
-</FONT>
-<FONT SIZE=-1><B>HISTFILE</B>,
-
-</FONT>
-<FONT SIZE=-1><B>ENV</B>,
-
-</FONT>
-or
-<FONT SIZE=-1><B>BASH_ENV</B>.
-
-</FONT>
-<DT>*<DD>
-Specifying command names containing
-<B>/</B>.
-
-<DT>*<DD>
-Specifying a filename containing a
-<B>/</B>
-
-as an argument to the
-<B>.</B>
-
-builtin command.
-<DT>*<DD>
-Using the <B>-p</B> option to the
-<B>.</B>
+<p style="margin-left:9%; margin-top: 1em">These
+restrictions are enforced after any startup files are
+read.</p>
-builtin command to specify a search path.
-<DT>*<DD>
-Specifying a filename containing a slash as an argument to the
-<B>history</B>
+<p style="margin-left:9%; margin-top: 1em">When a command
+that is found to be a shell script is executed (see
+<b><small>COMMAND EXECUTION</small></b> above), <b>rbash</b>
+turns off any restrictions in the shell spawned to execute
+the script.</p>
-builtin command.
-<DT>*<DD>
-Specifying a filename containing a slash as an argument to the
-<B>-p</B>
+<h2>SEE ALSO
+<a name="SEE ALSO"></a>
+</h2>
-option to the
-<B>hash</B>
-builtin command.
-<DT>*<DD>
-Importing function definitions from the shell environment at startup.
-<DT>*<DD>
-Parsing the values of
-<FONT SIZE=-1><B>BASHOPTS</B>
+<p style="margin-left:9%; margin-top: 1em"><i>Bash
+Reference Manual</i>, Brian Fox and Chet Ramey <i><br>
+The Gnu Readline Library</i>, Brian Fox and Chet Ramey
+<i><br>
+The Gnu History Library</i>, Brian Fox and Chet Ramey
+<i><br>
+Portable Operating System Interface (POSIX) Part 2: Shell
+and <br>
+Utilities</i>, IEEE —</p>
-</FONT>
-and
-<FONT SIZE=-1><B>SHELLOPTS</B>
-</FONT>
-from the shell environment at startup.
-<DT>*<DD>
-Redirecting output using the >, >|, <>, >&, &>, and >> redirection operators.
-<DT>*<DD>
-Using the
-<B>exec</B>
+<p style="margin-left:18%;">http://pubs.opengroup.org/onlinepubs/9799919799/</p>
-builtin command to replace the shell with another command.
-<DT>*<DD>
-Adding or deleting builtin commands with the
-<B>-f</B>
-and
-<B>-d</B>
+<p style="margin-left:9%;">http://tiswww.case.edu/~chet/bash/POSIX
+— a description of posix mode <i><br>
+sh</i>(1), <i>ksh</i>(1), <i>csh</i>(1) <i><br>
+emacs</i>(1), <i>vi</i>(1) <i><br>
+readline</i>(3)</p>
-options to the
-<B>enable</B>
+<h2>FILES
+<a name="FILES"></a>
+</h2>
-builtin command.
-<DT>*<DD>
-Using the <B>enable</B> builtin command to enable disabled shell builtins.
-<DT>*<DD>
-Specifying the
-<B>-p</B>
-option to the
-<B>command</B>
-builtin command.
-<DT>*<DD>
-Turning off restricted mode with
-<B>set +r</B> or <B>shopt -u restricted_shell</B>.
-</DL>
-<P>
+<p style="margin-left:9%; margin-top: 1em"><A HREF="file:/bin/bash"><i>/bin/bash</i></A></p>
-These restrictions are enforced after any startup files are read.
-<P>
+<p style="margin-left:18%;">The <b>bash</b> executable</p>
+<p style="margin-left:9%;"><A HREF="file:/etc/profile"><i>/etc/profile</i></A></p>
- When a command that is found to be a shell script is executed
-(see
-<FONT SIZE=-1><B>COMMAND EXECUTION</B>
+<p style="margin-left:18%;">The systemwide initialization
+file, executed for login shells</p>
-</FONT>
+<p style="margin-left:9%;"><A HREF="file:~/.bash_profile"><i>~/.bash_profile</i></A></p>
-above),
+<p style="margin-left:18%;">The personal initialization
+file, executed for login shells</p>
+<p style="margin-left:9%;"><A HREF="file:~/.bashrc"><i>~/.bashrc</i></A></p>
-<B>rbash</B>
+<p style="margin-left:18%;">The individual
+per-interactive-shell startup file</p>
-turns off any restrictions in the shell spawned to execute the
-script.
+<p style="margin-left:9%;"><A HREF="file:~/.bash_logout"><i>~/.bash_logout</i></A></p>
+<p style="margin-left:18%;">The individual login shell
+cleanup file, executed when a login shell exits</p>
-<A NAME="lbDF"> </A>
-<H3>SEE ALSO</H3>
+<p style="margin-left:9%;"><A HREF="file:~/.bash_history"><i>~/.bash_history</i></A></p>
+<p style="margin-left:18%;">The default value of
+<b>HISTFILE</b>, the file in which bash saves the command
+history</p>
-<DL COMPACT>
-<DT><I>Bash Reference Manual</I>, Brian Fox and Chet Ramey<DD>
-<DT><I>The Gnu Readline Library</I>, Brian Fox and Chet Ramey<DD>
-<DT><I>The Gnu History Library</I>, Brian Fox and Chet Ramey<DD>
-<DT><I>Portable Operating System Interface (POSIX) Part 2: Shell and Utilities</I>, IEEE -<DD>
-<A HREF="http://pubs.opengroup.org/onlinepubs/9799919799/">http://pubs.opengroup.org/onlinepubs/9799919799/</A>
-<DT><A HREF="http://tiswww.case.edu/~chet/bash/POSIX">http://tiswww.case.edu/~chet/bash/POSIX</A> - a description of posix mode<DD>
-<DT><I>sh</I>(1), <I>ksh</I>(1), <I>csh</I>(1)<DD>
-<DT><I>emacs</I>(1), <I>vi</I>(1)<DD>
-<DT><I>readline</I>(3)<DD>
+<p style="margin-left:9%;"><A HREF="file:~/.inputrc"><i>~/.inputrc</i></A></p>
-</DL>
-<A NAME="lbDG"> </A>
-<H3>FILES</H3>
+<p style="margin-left:18%;">Individual <i>readline</i>
+initialization file</p>
+<h2>AUTHORS
+<a name="AUTHORS"></a>
+</h2>
-<DL COMPACT>
-<DT>
-<A HREF="file:/bin/bash"><I>/bin/bash</I></A>
-<DD>
-The <B>bash</B> executable
-<DT>
-<A HREF="file:/etc/profile"><I>/etc/profile</I></A>
+<p style="margin-left:9%; margin-top: 1em">Brian Fox, Free
+Software Foundation <br>
+bfox@gnu.org</p>
-<DD>
-The systemwide initialization file, executed for login shells
-<DT>
-<A HREF="file:~/.bash_profile"><I>~/.bash_profile</I></A>
+<p style="margin-left:9%; margin-top: 1em">Chet Ramey, Case
+Western Reserve University <br>
+chet.ramey@case.edu</p>
-<DD>
-The personal initialization file, executed for login shells
-<DT>
-<A HREF="file:~/.bashrc"><I>~/.bashrc</I></A>
+<h2>BUG REPORTS
+<a name="BUG REPORTS"></a>
+</h2>
-<DD>
-The individual per-interactive-shell startup file
-<DT>
-<A HREF="file:~/.bash_logout"><I>~/.bash_logout</I></A>
-<DD>
-The individual login shell cleanup file, executed when a login shell exits
-<DT>
-<A HREF="file:~/.bash_history"><I>~/.bash_history</I></A>
+<p style="margin-left:9%; margin-top: 1em">If you find a
+bug in <b>bash</b>, you should report it. But first, you
+should make sure that it really is a bug, and that it
+appears in the latest version of <b>bash</b>. The latest
+version is always available from
+<i>ftp://ftp.gnu.org/pub/gnu/bash/</i> and
+<i>http://git.savannah.gnu.org/cgit/bash.git/snapshot/bash-master.tar.gz</i>.</p>
-<DD>
-The default value of <B>HISTFILE</B>, the file in which bash saves the
-command history
-<DT>
-<A HREF="file:~/.inputrc"><I>~/.inputrc</I></A>
+<p style="margin-left:9%; margin-top: 1em">Once you have
+determined that a bug actually exists, use the
+<i>bashbug</i> command to submit a bug report. If you have a
+fix, you are encouraged to mail that as well! You may send
+suggestions and “philosophical” bug reports to
+<i>bug-bash@gnu.org</i> or post them to the Usenet newsgroup
+<b>gnu.bash.bug</b>.</p>
-<DD>
-Individual <I>readline</I> initialization file
+<p style="margin-left:9%; margin-top: 1em">ALL bug reports
+should include: <br>
+The version number of <b>bash</b> <br>
+The hardware and operating system <br>
+The compiler used to compile <br>
+A description of the bug behavior <br>
+A short script or “recipe” which exercises the
+bug</p>
-</DL>
-<A NAME="lbDH"> </A>
-<H3>AUTHORS</H3>
+<p style="margin-left:9%; margin-top: 1em"><i>bashbug</i>
+inserts the first three items automatically into the
+template it provides for filing a bug report.</p>
-Brian Fox, Free Software Foundation
-<BR>
+<p style="margin-left:9%; margin-top: 1em">Comments and bug
+reports concerning this manual page should be directed to
+<i>chet.ramey@case.edu</i>.</p>
-<A HREF="mailto:bfox@gnu.org">bfox@gnu.org</A>
-<P>
+<h2>BUGS
+<a name="BUGS"></a>
+</h2>
-Chet Ramey, Case Western Reserve University
-<BR>
-<A HREF="mailto:chet.ramey@case.edu">chet.ramey@case.edu</A>
-<A NAME="lbDI"> </A>
-<H3>BUG REPORTS</H3>
+<p style="margin-left:9%; margin-top: 1em">It’s too
+big and too slow.</p>
-If you find a bug in
-<B>bash</B>,
+<p style="margin-left:9%; margin-top: 1em">There are some
+subtle differences between <b>bash</b> and traditional
+versions of <b>sh</b>, mostly because of the
+<small>POSIX</small> specification.</p>
-you should report it. But first, you should
-make sure that it really is a bug, and that it appears in the latest
-version of
-<B>bash</B>.
+<p style="margin-left:9%; margin-top: 1em">Aliases are
+confusing in some uses.</p>
-The latest version is always available from
-<I><A HREF="ftp://ftp.gnu.org/pub/gnu/bash/">ftp://ftp.gnu.org/pub/gnu/bash/</A></I> and
-<I><A HREF="http://git.savannah.gnu.org/cgit/bash.git/snapshot/bash-master.tar.gz">http://git.savannah.gnu.org/cgit/bash.git/snapshot/bash-master.tar.gz</A></I>.
-<P>
+<p style="margin-left:9%; margin-top: 1em">Shell builtin
+commands and functions are not stoppable/restartable.</p>
-Once you have determined that a bug actually exists, use the
-<I>bashbug</I>
+<p style="margin-left:9%; margin-top: 1em">Compound
+commands and command lists of the form “a ; b ;
+c” are not handled gracefully when combined with
+process suspension. When a process is stopped, the shell
+immediately executes the next command in the list or breaks
+out of any existing loops. It suffices to enclose the
+command in parentheses to force it into a subshell, which
+may be stopped as a unit, or to start the command in the
+background and immediately bring it into the foreground.</p>
-command to submit a bug report.
-If you have a fix, you are encouraged to mail that as well!
-You may send suggestions and
-
-bug reports to <I><A HREF="mailto:bug-bash@gnu.org">bug-bash@gnu.org</A></I> or post them to the Usenet
-newsgroup
-<A HREF="news:gnu.bash.bug">gnu.bash.bug</A>.
-
-<P>
-
-ALL bug reports should include:
-<P>
-
-
-<DL COMPACT>
-<DT>The version number of <B>bash</B><DD>
-<DT>The hardware and operating system<DD>
-<DT>The compiler used to compile<DD>
-<DT>A description of the bug behavior<DD>
-<DT>A short script or <DD>
-
-which exercises the bug
-
-</DL>
-<P>
-
-<I>bashbug</I>
-
-inserts the first three items automatically into the template
-it provides for filing a bug report.
-<P>
-
-Comments and bug reports concerning
-this manual page should be directed to
-<I><A HREF="mailto:chet.ramey@case.edu">chet.ramey@case.edu</A></I>.
-
-<A NAME="lbDJ"> </A>
-<H3>BUGS</H3>
-
-It's too big and too slow.
-<P>
-
-There are some subtle differences between
-<B>bash</B>
-
-and traditional versions of
-<B>sh</B>,
-
-mostly because of the
-<FONT SIZE=-1>POSIX</FONT>
-specification.
-<P>
-
-Aliases are confusing in some uses.
-<P>
-
-Shell builtin commands and functions are not stoppable/restartable.
-<P>
-
-Compound commands and command lists of the form
-
-are not handled gracefully when combined with process suspension.
-When a process is stopped, the shell immediately executes the next
-command in the list or breaks out of any existing loops.
-It suffices to enclose the command in parentheses to
-force it into a subshell, which may be stopped as a unit,
-or to start the command in the background and immediately
-bring it into the foreground.
-<P>
-
-Array variables may not (yet) be exported.
-
-
-
-<HR>
-<TABLE WIDTH=100%>
-<TR>
-<TH ALIGN=LEFT width=33%>GNU Bash 5.3<TH ALIGN=CENTER width=33%>2025 August 25<TH ALIGN=RIGHT width=33%>BASH(1)
-</TR>
-</TABLE>
-<HR>
-<A NAME="index"> </A><H2>Index</H2>
-<DL>
-<DT><A HREF="#lbAB">NAME</A><DD>
-<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
-<DT><A HREF="#lbAD">COPYRIGHT</A><DD>
-<DT><A HREF="#lbAE">DESCRIPTION</A><DD>
-<DT><A HREF="#lbAF">OPTIONS</A><DD>
-<DT><A HREF="#lbAG">ARGUMENTS</A><DD>
-<DT><A HREF="#lbAH">INVOCATION</A><DD>
-<DT><A HREF="#lbAI">DEFINITIONS</A><DD>
-<DT><A HREF="#lbAJ">RESERVED WORDS</A><DD>
-<DT><A HREF="#lbAK">SHELL GRAMMAR</A><DD>
-<DL>
-<DT><A HREF="#lbAL">Simple Commands</A><DD>
-<DT><A HREF="#lbAM">Pipelines</A><DD>
-<DT><A HREF="#lbAN">Lists</A><DD>
-<DT><A HREF="#lbAO">Compound Commands</A><DD>
-<DT><A HREF="#lbAP">Coprocesses</A><DD>
-<DT><A HREF="#lbAQ">Shell Function Definitions</A><DD>
-</DL>
-<DT><A HREF="#lbAR">COMMENTS</A><DD>
-<DT><A HREF="#lbAS">QUOTING</A><DD>
-<DL>
-<DT><A HREF="#lbAT">Translating Strings</A><DD>
-</DL>
-<DT><A HREF="#lbAU">PARAMETERS</A><DD>
-<DL>
-<DT><A HREF="#lbAV">Positional Parameters</A><DD>
-<DT><A HREF="#lbAW">Special Parameters</A><DD>
-<DT><A HREF="#lbAX">Shell Variables</A><DD>
-<DT><A HREF="#lbAY">Arrays</A><DD>
-</DL>
-<DT><A HREF="#lbAZ">EXPANSION</A><DD>
-<DL>
-<DT><A HREF="#lbBA">Brace Expansion</A><DD>
-<DT><A HREF="#lbBB">Tilde Expansion</A><DD>
-<DT><A HREF="#lbBC">Parameter Expansion</A><DD>
-<DT><A HREF="#lbBD">Command Substitution</A><DD>
-<DT><A HREF="#lbBE">Arithmetic Expansion</A><DD>
-<DT><A HREF="#lbBF">Process Substitution</A><DD>
-<DT><A HREF="#lbBG">Word Splitting</A><DD>
-<DT><A HREF="#lbBH">Pathname Expansion</A><DD>
-<DT><A HREF="#lbBI">Quote Removal</A><DD>
-</DL>
-<DT><A HREF="#lbBJ">REDIRECTION</A><DD>
-<DL>
-<DT><A HREF="#lbBK">Redirecting Input</A><DD>
-<DT><A HREF="#lbBL">Redirecting Output</A><DD>
-<DT><A HREF="#lbBM">Appending Redirected Output</A><DD>
-<DT><A HREF="#lbBN">Redirecting Standard Output and Standard Error</A><DD>
-<DT><A HREF="#lbBO">Appending Standard Output and Standard Error</A><DD>
-<DT><A HREF="#lbBP">Here Documents</A><DD>
-<DT><A HREF="#lbBQ">Here Strings</A><DD>
-<DT><A HREF="#lbBR">Duplicating File Descriptors</A><DD>
-<DT><A HREF="#lbBS">Moving File Descriptors</A><DD>
-<DT><A HREF="#lbBT">Opening File Descriptors for Reading and Writing</A><DD>
-</DL>
-<DT><A HREF="#lbBU">ALIASES</A><DD>
-<DT><A HREF="#lbBV">FUNCTIONS</A><DD>
-<DT><A HREF="#lbBW">ARITHMETIC EVALUATION</A><DD>
-<DT><A HREF="#lbBX">CONDITIONAL EXPRESSIONS</A><DD>
-<DT><A HREF="#lbBY">SIMPLE COMMAND EXPANSION</A><DD>
-<DT><A HREF="#lbBZ">COMMAND EXECUTION</A><DD>
-<DT><A HREF="#lbCA">COMMAND EXECUTION ENVIRONMENT</A><DD>
-<DT><A HREF="#lbCB">ENVIRONMENT</A><DD>
-<DT><A HREF="#lbCC">EXIT STATUS</A><DD>
-<DT><A HREF="#lbCD">SIGNALS</A><DD>
-<DT><A HREF="#lbCE">JOB CONTROL</A><DD>
-<DT><A HREF="#lbCF">PROMPTING</A><DD>
-<DT><A HREF="#lbCG">READLINE</A><DD>
-<DL>
-<DT><A HREF="#lbCH">Readline Notation</A><DD>
-<DT><A HREF="#lbCI">Readline Initialization</A><DD>
-<DT><A HREF="#lbCJ">Readline Key Bindings</A><DD>
-<DT><A HREF="#lbCK">Readline Variables</A><DD>
-<DT><A HREF="#lbCL">Readline Conditional Constructs</A><DD>
-<DT><A HREF="#lbCM">Searching</A><DD>
-<DT><A HREF="#lbCN">Readline Command Names</A><DD>
-<DT><A HREF="#lbCO">Commands for Moving</A><DD>
-<DT><A HREF="#lbCP">Commands for Manipulating the History</A><DD>
-<DT><A HREF="#lbCQ">Commands for Changing Text</A><DD>
-<DT><A HREF="#lbCR">Killing and Yanking</A><DD>
-<DT><A HREF="#lbCS">Numeric Arguments</A><DD>
-<DT><A HREF="#lbCT">Completing</A><DD>
-<DT><A HREF="#lbCU">Keyboard Macros</A><DD>
-<DT><A HREF="#lbCV">Miscellaneous</A><DD>
-<DT><A HREF="#lbCW">Programmable Completion</A><DD>
-</DL>
-<DT><A HREF="#lbCX">HISTORY</A><DD>
-<DT><A HREF="#lbCY">HISTORY EXPANSION</A><DD>
-<DL>
-<DT><A HREF="#lbCZ">Event Designators</A><DD>
-<DT><A HREF="#lbDA">Word Designators</A><DD>
-<DT><A HREF="#lbDB">Modifiers</A><DD>
-</DL>
-<DT><A HREF="#lbDC">SHELL BUILTIN COMMANDS</A><DD>
-<DT><A HREF="#lbDD">SHELL COMPATIBILITY MODE</A><DD>
-<DT><A HREF="#lbDE">RESTRICTED SHELL</A><DD>
-<DT><A HREF="#lbDF">SEE ALSO</A><DD>
-<DT><A HREF="#lbDG">FILES</A><DD>
-<DT><A HREF="#lbDH">AUTHORS</A><DD>
-<DT><A HREF="#lbDI">BUG REPORTS</A><DD>
-<DT><A HREF="#lbDJ">BUGS</A><DD>
-</DL>
-<HR>
-This document was created by man2html from /usr/local/src/bash/bash-20250822/doc/bash.1.<BR>
-Time: 25 August 2025 11:45:48 EDT
-</BODY>
-</HTML>
+<p style="margin-left:9%; margin-top: 1em">Array variables
+may not (yet) be exported.</p>
+<hr>
+</body>
+</html>