b\bba\bas\bsh\bh [options] [file]
C\bCO\bOP\bPY\bYR\bRI\bIG\bGH\bHT\bT
- Bash is Copyright (C) 1989-2009 by the Free Software Foundation, Inc.
+ Bash is Copyright (C) 1989-2010 by the Free Software Foundation, Inc.
D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
B\bBa\bas\bsh\bh is an s\bsh\bh-compatible command language interpreter that executes
1003.1). B\bBa\bas\bsh\bh can be configured to be POSIX-conformant by default.
O\bOP\bPT\bTI\bIO\bON\bNS\bS
- In addition to the single-character shell options documented in the
- description of the s\bse\bet\bt builtin command, b\bba\bas\bsh\bh interprets the following
- options when it is invoked:
+ All of the single-character shell options documented in the descrip-
+ tion of the s\bse\bet\bt builtin command can be used as options when the shell
+ is invoked. In addition, b\bba\bas\bsh\bh interprets the following options when it
+ is invoked:
- -\b-c\bc _\bs_\bt_\br_\bi_\bn_\bg If the -\b-c\bc option is present, then commands are read from
- _\bs_\bt_\br_\bi_\bn_\bg. If there are arguments after the _\bs_\bt_\br_\bi_\bn_\bg, they are
+ -\b-c\bc _\bs_\bt_\br_\bi_\bn_\bg If the -\b-c\bc option is present, then commands are read from
+ _\bs_\bt_\br_\bi_\bn_\bg. If there are arguments after the _\bs_\bt_\br_\bi_\bn_\bg, they are
assigned to the positional parameters, starting with $\b$0\b0.
-\b-i\bi If the -\b-i\bi option is present, the shell is _\bi_\bn_\bt_\be_\br_\ba_\bc_\bt_\bi_\bv_\be.
-\b-l\bl Make b\bba\bas\bsh\bh act as if it had been invoked as a login shell (see
I\bIN\bNV\bVO\bOC\bCA\bAT\bTI\bIO\bON\bN below).
- -\b-r\br If the -\b-r\br option is present, the shell becomes _\br_\be_\bs_\bt_\br_\bi_\bc_\bt_\be_\bd
+ -\b-r\br If the -\b-r\br option is present, the shell becomes _\br_\be_\bs_\bt_\br_\bi_\bc_\bt_\be_\bd
(see R\bRE\bES\bST\bTR\bRI\bIC\bCT\bTE\bED\bD S\bSH\bHE\bEL\bLL\bL below).
- -\b-s\bs If the -\b-s\bs option is present, or if no arguments remain after
- option processing, then commands are read from the standard
- input. This option allows the positional parameters to be
+ -\b-s\bs If the -\b-s\bs option is present, or if no arguments remain after
+ option processing, then commands are read from the standard
+ input. This option allows the positional parameters to be
set when invoking an interactive shell.
- -\b-D\bD A list of all double-quoted strings preceded by $\b$ is printed
- on the standard output. These are the strings that are sub-
+ -\b-D\bD A list of all double-quoted strings preceded by $\b$ is printed
+ on the standard output. These are the strings that are sub-
ject to language translation when the current locale is not C\bC
- or P\bPO\bOS\bSI\bIX\bX. This implies the -\b-n\bn option; no commands will be
+ or P\bPO\bOS\bSI\bIX\bX. This implies the -\b-n\bn option; no commands will be
executed.
[\b[-\b-+\b+]\b]O\bO [\b[_\bs_\bh_\bo_\bp_\bt_\b__\bo_\bp_\bt_\bi_\bo_\bn]\b]
- _\bs_\bh_\bo_\bp_\bt_\b__\bo_\bp_\bt_\bi_\bo_\bn is one of the shell options accepted by the
- s\bsh\bho\bop\bpt\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). If
+ _\bs_\bh_\bo_\bp_\bt_\b__\bo_\bp_\bt_\bi_\bo_\bn is one of the shell options accepted by the
+ s\bsh\bho\bop\bpt\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). If
_\bs_\bh_\bo_\bp_\bt_\b__\bo_\bp_\bt_\bi_\bo_\bn is present, -\b-O\bO sets the value of that option; +\b+O\bO
- unsets it. If _\bs_\bh_\bo_\bp_\bt_\b__\bo_\bp_\bt_\bi_\bo_\bn is not supplied, the names and
- values of the shell options accepted by s\bsh\bho\bop\bpt\bt are printed on
- the standard output. If the invocation option is +\b+O\bO, the
- output is displayed in a format that may be reused as input.
- -\b--\b- A -\b--\b- signals the end of options and disables further option
- processing. Any arguments after the -\b--\b- are treated as file-
+ unsets it. If _\bs_\bh_\bo_\bp_\bt_\b__\bo_\bp_\bt_\bi_\bo_\bn is not supplied, the names and
+ values of the shell options accepted by s\bsh\bho\bop\bpt\bt are printed on
+ the standard output. If the invocation option is +\b+O\bO, the
+ output is displayed in a format that may be reused as input.
+ -\b--\b- A -\b--\b- signals the end of options and disables further option
+ processing. Any arguments after the -\b--\b- are treated as file-
names and arguments. An argument of -\b- is equivalent to -\b--\b-.
- B\bBa\bas\bsh\bh also interprets a number of multi-character options. These
- options must appear on the command line before the single-character
+ B\bBa\bas\bsh\bh 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--\b-d\bde\beb\bbu\bug\bgg\bge\ber\br
Arrange for the debugger profile to be executed before the shell
- starts. Turns on 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) and shell
- function tracing (see the description of the -\b-o\bo f\bfu\bun\bnc\bct\btr\bra\bac\bce\be option
- to the s\bse\bet\bt builtin below).
+ starts. Turns on 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).
-\b--\b-d\bdu\bum\bmp\bp-\b-p\bpo\bo-\b-s\bst\btr\bri\bin\bng\bgs\bs
- Equivalent to -\b-D\bD, but the output is in the GNU _\bg_\be_\bt_\bt_\be_\bx_\bt p\bpo\bo (por-
+ Equivalent to -\b-D\bD, but the output is in the GNU _\bg_\be_\bt_\bt_\be_\bx_\bt p\bpo\bo (por-
table object) file format.
-\b--\b-d\bdu\bum\bmp\bp-\b-s\bst\btr\bri\bin\bng\bgs\bs
Equivalent to -\b-D\bD.
- -\b--\b-h\bhe\bel\blp\bp Display a usage message on standard output and exit success-
+ -\b--\b-h\bhe\bel\blp\bp Display a usage message on standard output and exit success-
fully.
-\b--\b-i\bin\bni\bit\bt-\b-f\bfi\bil\ble\be _\bf_\bi_\bl_\be
-\b--\b-r\brc\bcf\bfi\bil\ble\be _\bf_\bi_\bl_\be
Execute commands from _\bf_\bi_\bl_\be instead of the standard personal ini-
- tialization file _\b~_\b/_\b._\bb_\ba_\bs_\bh_\br_\bc if the shell is interactive (see
+ tialization file _\b~_\b/_\b._\bb_\ba_\bs_\bh_\br_\bc if the shell is interactive (see
I\bIN\bNV\bVO\bOC\bCA\bAT\bTI\bIO\bON\bN below).
-\b--\b-l\blo\bog\bgi\bin\bn
Equivalent to -\b-l\bl.
-\b--\b-n\bno\boe\bed\bdi\bit\bti\bin\bng\bg
- Do not use the GNU r\bre\bea\bad\bdl\bli\bin\bne\be library to read command lines when
+ Do not use the GNU r\bre\bea\bad\bdl\bli\bin\bne\be library to read command lines when
the shell is interactive.
-\b--\b-n\bno\bop\bpr\bro\bof\bfi\bil\ble\be
- Do not read either the system-wide startup file _\b/_\be_\bt_\bc_\b/_\bp_\br_\bo_\bf_\bi_\bl_\be or
- any of the personal initialization files _\b~_\b/_\b._\bb_\ba_\bs_\bh_\b__\bp_\br_\bo_\bf_\bi_\bl_\be,
- _\b~_\b/_\b._\bb_\ba_\bs_\bh_\b__\bl_\bo_\bg_\bi_\bn, or _\b~_\b/_\b._\bp_\br_\bo_\bf_\bi_\bl_\be. By default, b\bba\bas\bsh\bh reads these
- files when it is invoked as a login shell (see I\bIN\bNV\bVO\bOC\bCA\bAT\bTI\bIO\bON\bN
+ Do not read either the system-wide startup file _\b/_\be_\bt_\bc_\b/_\bp_\br_\bo_\bf_\bi_\bl_\be or
+ any of the personal initialization files _\b~_\b/_\b._\bb_\ba_\bs_\bh_\b__\bp_\br_\bo_\bf_\bi_\bl_\be,
+ _\b~_\b/_\b._\bb_\ba_\bs_\bh_\b__\bl_\bo_\bg_\bi_\bn, or _\b~_\b/_\b._\bp_\br_\bo_\bf_\bi_\bl_\be. By default, b\bba\bas\bsh\bh reads these
+ files when it is invoked as a login shell (see I\bIN\bNV\bVO\bOC\bCA\bAT\bTI\bIO\bON\bN
below).
-\b--\b-n\bno\bor\brc\bc Do not read and execute the personal initialization file
- _\b~_\b/_\b._\bb_\ba_\bs_\bh_\br_\bc if the shell is interactive. This option is on by
+ _\b~_\b/_\b._\bb_\ba_\bs_\bh_\br_\bc if the shell is interactive. This option is on by
default if the shell is invoked as s\bsh\bh.
-\b--\b-p\bpo\bos\bsi\bix\bx
- Change the behavior of b\bba\bas\bsh\bh where the default operation differs
+ Change the behavior of b\bba\bas\bsh\bh where the default operation differs
from the POSIX standard to match the standard (_\bp_\bo_\bs_\bi_\bx _\bm_\bo_\bd_\be).
-\b--\b-r\bre\bes\bst\btr\bri\bic\bct\bte\bed\bd
Equivalent to -\b-v\bv.
-\b--\b-v\bve\ber\brs\bsi\bio\bon\bn
- Show version information for this instance of b\bba\bas\bsh\bh on the stan-
+ Show version information for this instance of b\bba\bas\bsh\bh on the stan-
dard output and exit successfully.
A\bAR\bRG\bGU\bUM\bME\bEN\bNT\bTS\bS
If arguments remain after option processing, and neither the -\b-c\bc nor the
- -\b-s\bs option has been supplied, the first argument is assumed to be the
- name of a file containing shell commands. If b\bba\bas\bsh\bh is invoked in this
- fashion, $\b$0\b0 is set to the name of the file, and the positional parame-
- ters are set to the remaining arguments. B\bBa\bas\bsh\bh reads and executes com-
- mands from this file, then exits. B\bBa\bas\bsh\bh's exit status is the exit sta-
- tus of the last command executed in the script. If no commands are
- executed, the exit status is 0. An attempt is first made to open the
+ -\b-s\bs option has been supplied, the first argument is assumed to be the
+ name of a file containing shell commands. If b\bba\bas\bsh\bh is invoked in this
+ fashion, $\b$0\b0 is set to the name of the file, and the positional parame-
+ ters are set to the remaining arguments. B\bBa\bas\bsh\bh reads and executes com-
+ mands from this file, then exits. B\bBa\bas\bsh\bh's exit status is the exit sta-
+ tus of the last command executed in the script. If no commands are
+ executed, the exit status is 0. An attempt is first made to open the
file in the current directory, and, if no file is found, then the shell
searches the directories in P\bPA\bAT\bTH\bH for the script.
I\bIN\bNV\bVO\bOC\bCA\bAT\bTI\bIO\bON\bN
- A _\bl_\bo_\bg_\bi_\bn _\bs_\bh_\be_\bl_\bl is one whose first character of argument zero is a -\b-, or
+ A _\bl_\bo_\bg_\bi_\bn _\bs_\bh_\be_\bl_\bl is one whose first character of argument zero is a -\b-, or
one started with the -\b--\b-l\blo\bog\bgi\bin\bn option.
- An _\bi_\bn_\bt_\be_\br_\ba_\bc_\bt_\bi_\bv_\be shell is one started without non-option arguments and
+ An _\bi_\bn_\bt_\be_\br_\ba_\bc_\bt_\bi_\bv_\be shell is one started without non-option arguments and
without the -\b-c\bc option whose standard input and error are both connected
- to terminals (as determined by _\bi_\bs_\ba_\bt_\bt_\by(3)), or one started with the -\b-i\bi
- option. P\bPS\bS1\b1 is set and $\b$-\b- includes i\bi if b\bba\bas\bsh\bh is interactive, allowing
+ to terminals (as determined by _\bi_\bs_\ba_\bt_\bt_\by(3)), or one started with the -\b-i\bi
+ option. P\bPS\bS1\b1 is set and $\b$-\b- includes i\bi if b\bba\bas\bsh\bh is interactive, allowing
a shell script or a startup file to test this state.
- The following paragraphs describe how b\bba\bas\bsh\bh executes its startup files.
- If any of the files exist but cannot be read, b\bba\bas\bsh\bh reports an error.
+ The following paragraphs describe how b\bba\bas\bsh\bh executes its startup files.
+ If any of the files exist but cannot be read, b\bba\bas\bsh\bh reports an error.
Tildes are expanded in file names as described below under T\bTi\bil\bld\bde\be E\bEx\bxp\bpa\ban\bn-\b-
s\bsi\bio\bon\bn in the E\bEX\bXP\bPA\bAN\bNS\bSI\bIO\bON\bN section.
- When b\bba\bas\bsh\bh is invoked as an interactive login shell, or as a non-inter-
- active shell with the -\b--\b-l\blo\bog\bgi\bin\bn option, it first reads and executes com-
- mands from the file _\b/_\be_\bt_\bc_\b/_\bp_\br_\bo_\bf_\bi_\bl_\be, if that file exists. After reading
+ When b\bba\bas\bsh\bh is invoked as an interactive login shell, or as a non-inter-
+ active shell with the -\b--\b-l\blo\bog\bgi\bin\bn option, it first reads and executes com-
+ mands from the file _\b/_\be_\bt_\bc_\b/_\bp_\br_\bo_\bf_\bi_\bl_\be, if that file exists. After reading
that file, it looks for _\b~_\b/_\b._\bb_\ba_\bs_\bh_\b__\bp_\br_\bo_\bf_\bi_\bl_\be, _\b~_\b/_\b._\bb_\ba_\bs_\bh_\b__\bl_\bo_\bg_\bi_\bn, and _\b~_\b/_\b._\bp_\br_\bo_\bf_\bi_\bl_\be,
- in that order, and reads and executes commands from the first one that
- exists and is readable. The -\b--\b-n\bno\bop\bpr\bro\bof\bfi\bil\ble\be option may be used when the
+ in that order, and reads and executes commands from the first one that
+ exists and is readable. The -\b--\b-n\bno\bop\bpr\bro\bof\bfi\bil\ble\be option may be used when the
shell is started to inhibit this behavior.
- When a login shell exits, b\bba\bas\bsh\bh reads and executes commands from the
+ When a login shell exits, b\bba\bas\bsh\bh reads and executes commands from the
file _\b~_\b/_\b._\bb_\ba_\bs_\bh_\b__\bl_\bo_\bg_\bo_\bu_\bt, if it exists.
- When an interactive shell that is not a login shell is started, b\bba\bas\bsh\bh
- reads and executes commands from _\b~_\b/_\b._\bb_\ba_\bs_\bh_\br_\bc, if that file exists. This
- may be inhibited by using the -\b--\b-n\bno\bor\brc\bc option. The -\b--\b-r\brc\bcf\bfi\bil\ble\be _\bf_\bi_\bl_\be option
- will force b\bba\bas\bsh\bh to read and execute commands from _\bf_\bi_\bl_\be instead of
+ When an interactive shell that is not a login shell is started, b\bba\bas\bsh\bh
+ reads and executes commands from _\b~_\b/_\b._\bb_\ba_\bs_\bh_\br_\bc, if that file exists. This
+ may be inhibited by using the -\b--\b-n\bno\bor\brc\bc option. The -\b--\b-r\brc\bcf\bfi\bil\ble\be _\bf_\bi_\bl_\be option
+ will force b\bba\bas\bsh\bh to read and execute commands from _\bf_\bi_\bl_\be instead of
_\b~_\b/_\b._\bb_\ba_\bs_\bh_\br_\bc.
- When b\bba\bas\bsh\bh is started non-interactively, to run a shell script, for
+ When b\bba\bas\bsh\bh is started non-interactively, to run a shell script, for
example, it looks for the variable B\bBA\bAS\bSH\bH_\b_E\bEN\bNV\bV 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\bBa\bas\bsh\bh behaves as if the following com-
+ its value if it appears there, and uses the expanded value as the name
+ of a file to read and execute. B\bBa\bas\bsh\bh behaves as if the following com-
mand were executed:
if [ -n "$BASH_ENV" ]; then . "$BASH_ENV"; fi
- but the value of the P\bPA\bAT\bTH\bH variable is not used to search for the file
+ but the value of the P\bPA\bAT\bTH\bH variable is not used to search for the file
name.
- If b\bba\bas\bsh\bh is invoked with the name s\bsh\bh, it tries to mimic the startup
- behavior of historical versions of s\bsh\bh as closely as possible, while
- conforming to the POSIX standard as well. When invoked as an interac-
- tive login shell, or a non-interactive shell with the -\b--\b-l\blo\bog\bgi\bin\bn option,
- it first attempts to read and execute commands from _\b/_\be_\bt_\bc_\b/_\bp_\br_\bo_\bf_\bi_\bl_\be and
- _\b~_\b/_\b._\bp_\br_\bo_\bf_\bi_\bl_\be, in that order. The -\b--\b-n\bno\bop\bpr\bro\bof\bfi\bil\ble\be option may be used to
- inhibit this behavior. When invoked as an interactive shell with the
- name s\bsh\bh, b\bba\bas\bsh\bh looks for the variable E\bEN\bNV\bV, expands its value if it is
- defined, and uses the expanded value as the name of a file to read and
+ If b\bba\bas\bsh\bh is invoked with the name s\bsh\bh, it tries to mimic the startup
+ behavior of historical versions of s\bsh\bh as closely as possible, while
+ conforming to the POSIX standard as well. When invoked as an interac-
+ tive login shell, or a non-interactive shell with the -\b--\b-l\blo\bog\bgi\bin\bn option,
+ it first attempts to read and execute commands from _\b/_\be_\bt_\bc_\b/_\bp_\br_\bo_\bf_\bi_\bl_\be and
+ _\b~_\b/_\b._\bp_\br_\bo_\bf_\bi_\bl_\be, in that order. The -\b--\b-n\bno\bop\bpr\bro\bof\bfi\bil\ble\be option may be used to
+ inhibit this behavior. When invoked as an interactive shell with the
+ name s\bsh\bh, b\bba\bas\bsh\bh looks for the variable E\bEN\bNV\bV, 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 s\bsh\bh does not attempt to read and exe-
- cute commands from any other startup files, the -\b--\b-r\brc\bcf\bfi\bil\ble\be option has no
- effect. A non-interactive shell invoked with the name s\bsh\bh does not
- attempt to read any other startup files. When invoked as s\bsh\bh, b\bba\bas\bsh\bh
+ cute commands from any other startup files, the -\b--\b-r\brc\bcf\bfi\bil\ble\be option has no
+ effect. A non-interactive shell invoked with the name s\bsh\bh does not
+ attempt to read any other startup files. When invoked as s\bsh\bh, b\bba\bas\bsh\bh
enters _\bp_\bo_\bs_\bi_\bx mode after the startup files are read.
- When b\bba\bas\bsh\bh is started in _\bp_\bo_\bs_\bi_\bx mode, as with the -\b--\b-p\bpo\bos\bsi\bix\bx command line
+ When b\bba\bas\bsh\bh is started in _\bp_\bo_\bs_\bi_\bx mode, as with the -\b--\b-p\bpo\bos\bsi\bix\bx command line
option, it follows the POSIX standard for startup files. In this mode,
- interactive shells expand the E\bEN\bNV\bV variable and commands are read and
- executed from the file whose name is the expanded value. No other
+ interactive shells expand the E\bEN\bNV\bV variable and commands are read and
+ executed from the file whose name is the expanded value. No other
startup files are read.
B\bBa\bas\bsh\bh attempts to determine when it is being run with its standard input
- connected to a a network connection, as if by the remote shell daemon,
- usually _\br_\bs_\bh_\bd, or the secure shell daemon _\bs_\bs_\bh_\bd. If b\bba\bas\bsh\bh determines it
- is being run in this fashion, it reads and executes commands from
- _\b~_\b/_\b._\bb_\ba_\bs_\bh_\br_\bc, if that file exists and is readable. It will not do this if
- invoked as s\bsh\bh. The -\b--\b-n\bno\bor\brc\bc option may be used to inhibit this behavior,
- and the -\b--\b-r\brc\bcf\bfi\bil\ble\be option may be used to force another file to be read,
- but _\br_\bs_\bh_\bd does not generally invoke the shell with those options or
- allow them to be specified.
+ connected to a network connection, as when executed by the remote shell
+ daemon, usually _\br_\bs_\bh_\bd, or the secure shell daemon _\bs_\bs_\bh_\bd. If b\bba\bas\bsh\bh deter-
+ mines it is being run in this fashion, it reads and executes commands
+ from _\b~_\b/_\b._\bb_\ba_\bs_\bh_\br_\bc, if that file exists and is readable. It will not do
+ this if invoked as s\bsh\bh. The -\b--\b-n\bno\bor\brc\bc option may be used to inhibit this
+ behavior, and the -\b--\b-r\brc\bcf\bfi\bil\ble\be option may be used to force another file to
+ be read, but _\br_\bs_\bh_\bd does not generally invoke the shell with those
+ options or allow them to be specified.
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, no startup
files are read, shell functions are not inherited from the environment,
- the S\bSH\bHE\bEL\bLL\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, and the effective user id is
- set to the real user id. If the -\b-p\bp option is supplied at invocation,
- the startup behavior is the same, but the effective user id is not
+ the S\bSH\bHE\bEL\bLL\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, and the effective user id is
+ set to the real user id. If the -\b-p\bp option is supplied at invocation,
+ the startup behavior is the same, but the effective user id is not
reset.
D\bDE\bEF\bFI\bIN\bNI\bIT\bTI\bIO\bON\bNS\bS
- The following definitions are used throughout the rest of this docu-
+ The following definitions are used throughout the rest of this docu-
ment.
b\bbl\bla\ban\bnk\bk A space or tab.
- w\bwo\bor\brd\bd A sequence of characters considered as a single unit by the
+ w\bwo\bor\brd\bd A sequence of characters considered as a single unit by the
shell. Also known as a t\bto\bok\bke\ben\bn.
- n\bna\bam\bme\be A _\bw_\bo_\br_\bd consisting only of alphanumeric characters and under-
- scores, and beginning with an alphabetic character or an under-
+ n\bna\bam\bme\be A _\bw_\bo_\br_\bd consisting only of alphanumeric characters and under-
+ scores, and beginning with an alphabetic character or an under-
score. Also referred to as an i\bid\bde\ben\bnt\bti\bif\bfi\bie\ber\br.
m\bme\bet\bta\bac\bch\bha\bar\bra\bac\bct\bte\ber\br
- A character that, when unquoted, separates words. One of the
+ A character that, when unquoted, separates words. One of the
following:
|\b| &\b& ;\b; (\b( )\b) <\b< >\b> s\bsp\bpa\bac\bce\be t\bta\bab\bb
c\bco\bon\bnt\btr\bro\bol\bl o\bop\bpe\ber\bra\bat\bto\bor\br
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 simple command (see S\bSH\bHE\bEL\bLL\bL G\bGR\bRA\bAM\bMM\bMA\bAR\bR below) or the third
+ first word of a simple command (see S\bSH\bHE\bEL\bLL\bL G\bGR\bRA\bAM\bMM\bMA\bAR\bR below) or the third
word of a c\bca\bas\bse\be or f\bfo\bor\br command:
- !\b! c\bca\bas\bse\be 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
+ !\b! c\bca\bas\bse\be 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]
S\bSH\bHE\bEL\bLL\bL G\bGR\bRA\bAM\bMM\bMA\bAR\bR
S\bSi\bim\bmp\bpl\ble\be C\bCo\bom\bmm\bma\ban\bnd\bds\bs
- A _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd is a sequence of optional variable assignments fol-
- lowed by b\bbl\bla\ban\bnk\bk-separated words and redirections, and terminated by a
+ A _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd is a sequence of optional variable assignments fol-
+ lowed by b\bbl\bla\ban\bnk\bk-separated words and redirections, and terminated by a
_\bc_\bo_\bn_\bt_\br_\bo_\bl _\bo_\bp_\be_\br_\ba_\bt_\bo_\br. The first word specifies the command to be executed,
- and is passed as argument zero. The remaining words are passed as
+ and is passed as argument zero. The remaining words are passed as
arguments to the invoked command.
- The return value of a _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd is its exit status, or 128+_\bn if
+ The return value of a _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd is its exit status, or 128+_\bn if
the command is terminated by signal _\bn.
P\bPi\bip\bpe\bel\bli\bin\bne\bes\bs
- A _\bp_\bi_\bp_\be_\bl_\bi_\bn_\be is a sequence of one or more commands separated by one of
+ A _\bp_\bi_\bp_\be_\bl_\bi_\bn_\be is a sequence of one or more commands separated by one of
the control operators |\b| or |\b|&\b&. The format for a pipeline is:
[t\bti\bim\bme\be [-\b-p\bp]] [ ! ] _\bc_\bo_\bm_\bm_\ba_\bn_\bd [ [|\b|||\b|&\b&] _\bc_\bo_\bm_\bm_\ba_\bn_\bd_\b2 ... ]
- The standard output of _\bc_\bo_\bm_\bm_\ba_\bn_\bd is connected via a pipe to the standard
- input of _\bc_\bo_\bm_\bm_\ba_\bn_\bd_\b2. This connection is performed before any redirec-
+ The standard output of _\bc_\bo_\bm_\bm_\ba_\bn_\bd is connected via a pipe to the standard
+ input of _\bc_\bo_\bm_\bm_\ba_\bn_\bd_\b2. This connection is performed before any redirec-
tions specified by the command (see R\bRE\bED\bDI\bIR\bRE\bEC\bCT\bTI\bIO\bON\bN below). If |\b|&\b& is used,
the standard error of _\bc_\bo_\bm_\bm_\ba_\bn_\bd is connected to _\bc_\bo_\bm_\bm_\ba_\bn_\bd_\b2's standard input
- through the pipe; it is shorthand for 2\b2>\b>&\b&1\b1 |\b|. This implicit redirect-
+ through the pipe; it is shorthand for 2\b2>\b>&\b&1\b1 |\b|. This implicit redirect-
ion of the standard error is performed after any redirections specified
by the command.
The return status of a pipeline is the exit status of the last command,
- unless the p\bpi\bip\bpe\bef\bfa\bai\bil\bl option is enabled. If p\bpi\bip\bpe\bef\bfa\bai\bil\bl 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 success-
+ unless the p\bpi\bip\bpe\bef\bfa\bai\bil\bl option is enabled. If p\bpi\bip\bpe\bef\bfa\bai\bil\bl 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 success-
fully. If the reserved word !\b! precedes a pipeline, the exit status of
- that pipeline is the logical negation of the exit status as described
- above. The shell waits for all commands in the pipeline to terminate
+ that pipeline is the logical negation of the exit status as described
+ above. The shell waits for all commands in the pipeline to terminate
before returning a value.
- If the t\bti\bim\bme\be reserved word precedes a pipeline, the elapsed as well as
- user and system time consumed by its execution are reported when the
- pipeline terminates. The -\b-p\bp option changes the output format to that
- specified by POSIX. The T\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT variable may be set to a format
- string that specifies how the timing information should be displayed;
- see the description of T\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT under S\bSh\bhe\bel\bll\bl V\bVa\bar\bri\bia\bab\bbl\ble\bes\bs below.
+ If the t\bti\bim\bme\be reserved word precedes a pipeline, the elapsed as well as
+ user and system time consumed by its execution are reported when the
+ pipeline terminates. The -\b-p\bp option changes the output format to that
+ specified by POSIX. When the shell is in _\bp_\bo_\bs_\bi_\bx _\bm_\bo_\bd_\be, it does not rec-
+ ognize t\bti\bim\bme\be as a reserved word if the next token begins with a `-'.
+ The T\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT variable may be set to a format string that specifies
+ how the timing information should be displayed; see the description of
+ T\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT under S\bSh\bhe\bel\bll\bl V\bVa\bar\bri\bia\bab\bbl\ble\bes\bs below.
+
+ When the shell is in _\bp_\bo_\bs_\bi_\bx _\bm_\bo_\bd_\be, t\bti\bim\bme\be may be followed by a newline. In
+ this case, the shell displays the total user and system time consumed
+ by the shell and its children. The T\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT variable may be used to
+ specify the format of the time information.
Each command in a pipeline is executed as a separate process (i.e., in
a subshell).
tional 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
tus of the last command executed, or zero if no condition tested
true.
- w\bwh\bhi\bil\ble\be _\bl_\bi_\bs_\bt; d\bdo\bo _\bl_\bi_\bs_\bt; d\bdo\bon\bne\be
- u\bun\bnt\bti\bil\bl _\bl_\bi_\bs_\bt; d\bdo\bo _\bl_\bi_\bs_\bt; d\bdo\bon\bne\be
- The w\bwh\bhi\bil\ble\be command continuously executes the d\bdo\bo _\bl_\bi_\bs_\bt as long as
- the last command in _\bl_\bi_\bs_\bt 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, except that the
- test is negated; the d\bdo\bo _\bl_\bi_\bs_\bt is executed as long as the last
- command in _\bl_\bi_\bs_\bt 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 last
- d\bdo\bo _\bl_\bi_\bs_\bt command executed, or zero if none was executed.
+ 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
+ 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,
+ except 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 last command executed in _\bl_\bi_\bs_\bt_\b-_\b2, or zero if none was exe-
+ cuted.
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 format 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. If _\bN_\bA_\bM_\bE is not supplied, the
+ This creates a coprocess named _\bN_\bA_\bM_\bE. If _\bN_\bA_\bM_\bE is not supplied, the
default name is _\bC_\bO_\bP_\bR_\bO_\bC. _\bN_\bA_\bM_\bE must not be supplied if _\bc_\bo_\bm_\bm_\ba_\bn_\bd is a _\bs_\bi_\bm_\b-
_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd (see above); otherwise, it is interpreted as the first word
- of the simple command. When the coproc 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 descriptor 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 assigned 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. The process
- id of the shell spawned to execute the coprocess is available as the
- value of the variable _\bN_\bA_\bM_\bE_PID. The w\bwa\bai\bit\bt builtin command may be used
+ of the simple command. When the coproc 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 descriptor 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 assigned 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. The process
+ ID of the shell spawned to execute the coprocess is available as the
+ value of the variable _\bN_\bA_\bM_\bE_PID. The w\bwa\bai\bit\bt builtin command may be used
to wait for the coprocess to terminate.
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:
- [ f\bfu\bun\bnc\bct\bti\bio\bon\bn ] _\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 _\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
- 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. _\bc_\bo_\bm_\b-
+ _\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 _\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 _\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
+ 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. _\bc_\bo_\bm_\b-
_\bp_\bo_\bu_\bn_\bd_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd is executed whenever _\bn_\ba_\bm_\be is specified as the name
- of a simple command. 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
+ of a simple command. 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 command executed in
+ 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# 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
+ 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# 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 on by default in interac-
tive 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 three quoting mechanisms: the _\be_\bs_\bc_\ba_\bp_\be _\bc_\bh_\ba_\br_\ba_\bc_\bt_\be_\br, single
+ There are three quoting mechanisms: the _\be_\bs_\bc_\ba_\bp_\be _\bc_\bh_\ba_\br_\ba_\bc_\bt_\be_\br, single
quotes, and double 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
+ 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, 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
+ <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,
- when history expansion is enabled, !\b!. The characters $\b$ and `\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\, or <\b<n\bne\bew\bwl\bli\bin\bne\be>\b>. A double quote may be quoted within double
+ 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!. The characters $\b$ and `\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\, or <\b<n\bne\bew\bwl\bli\bin\bne\be>\b>. 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
+ will be performed unless an !\b! appearing in double quotes is escaped
using a backslash. The backslash 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).
Words of the form $\b$'_\bs_\bt_\br_\bi_\bn_\bg' are treated specially. The word expands to
- _\bs_\bt_\br_\bi_\bn_\bg, with backslash-escaped characters replaced as specified by the
- ANSI C standard. Backslash escape sequences, if present, are decoded
+ _\bs_\bt_\br_\bi_\bn_\bg, with backslash-escaped characters replaced as specified by the
+ ANSI C standard. Backslash escape sequences, if present, are decoded
as follows:
\\b\a\ba alert (bell)
\\b\b\bb backspace
\\b\\\b\ backslash
\\b\'\b' single quote
\\b\"\b" double quote
- \\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)
+ \\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
+ 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.
A double-quoted string preceded by a dollar sign ($\b$"_\bs_\bt_\br_\bi_\bn_\bg") will cause
- the string to be translated according to the current locale. If the
- current locale is C\bC or P\bPO\bOS\bSI\bIX\bX, the dollar sign is ignored. If the
+ the string to be translated according to the current locale. If the
+ current locale is C\bC or P\bPO\bOS\bSI\bIX\bX, the dollar sign is ignored. If the
string is translated and replaced, the replacement is double-quoted.
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-
+ 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\bam\bm-\b-
- e\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).
+ e\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).
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 may be assigned to by 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 $((...)) 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 is not
- performed, with the exception of "\b"$\b$@\b@"\b" as explained below under S\bSp\bpe\bec\bci\bia\bal\bl
- P\bPa\bar\bra\bam\bme\bet\bte\ber\brs\bs. Pathname expansion is not performed. Assignment state-
- ments may also appear 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,
+ 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 is not
+ performed, with the exception of "\b"$\b$@\b@"\b" as explained below under S\bSp\bpe\bec\bci\bia\bal\bl
+ P\bPa\bar\bra\bam\bme\bet\bte\ber\brs\bs. Pathname expansion is not performed. Assignment state-
+ ments may also appear 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.
- In the context where an assignment statement is assigning a value to a
+ In the context where an assignment statement is assigning a value to a
shell variable or array index, the += operator can be used to append to
or add to the variable's previous value. When += is applied to a vari-
- able for which the integer attribute has been set, _\bv_\ba_\bl_\bu_\be is evaluated
- as an arithmetic expression and added to the variable's current value,
+ able for which the _\bi_\bn_\bt_\be_\bg_\be_\br attribute has been set, _\bv_\ba_\bl_\bu_\be is evaluated
+ as an arithmetic expression and added to the variable's current value,
which is also evaluated. When += is applied to an array variable using
- compound assignment (see A\bAr\brr\bra\bay\bys\bs below), the variable's value is not
+ 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
+ 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, _\bv_\ba_\bl_\bu_\be is expanded and
+ When applied to a string-valued variable, _\bv_\ba_\bl_\bu_\be is expanded and
appended to the variable's value.
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).
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.
- *\b* Expands to the positional parameters, starting from one. When
- the expansion occurs within double quotes, it expands to a sin-
+ *\b* Expands to the positional parameters, starting from one. When
+ the expansion occurs within double quotes, it expands to a sin-
gle word with the value of each parameter separated by the first
character of the I\bIF\bFS\bS special variable. That is, "$\b$*\b*" is equiva-
lent to "$\b$1\b1_\bc$\b$2\b2_\bc.\b..\b..\b.", where _\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 sepa-
- rated by spaces. If I\bIF\bFS\bS is null, the parameters are joined
+ of the I\bIF\bFS\bS variable. If I\bIF\bFS\bS is unset, the parameters are sepa-
+ rated by spaces. If I\bIF\bFS\bS is null, the parameters are joined
without intervening separators.
- @\b@ Expands to the positional parameters, starting from one. When
+ @\b@ Expands to the positional parameters, starting from one. When
the expansion occurs within double quotes, each parameter
expands to a separate word. That is, "$\b$@\b@" is equivalent to "$\b$1\b1"
- "$\b$2\b2" ... If the double-quoted expansion occurs within a word,
- the expansion of the first parameter is joined with the begin-
- ning part of the original word, and the expansion of the last
- parameter is joined with the last part of the original word.
- When there are no positional parameters, "$\b$@\b@" and $\b$@\b@ expand to
+ "$\b$2\b2" ... If the double-quoted expansion occurs within a word,
+ the expansion of the first parameter is joined with the begin-
+ ning part of the original word, and the expansion of the last
+ parameter is joined with 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).
#\b# Expands to the number of positional parameters in decimal.
- ?\b? Expands to the exit status of the most recently executed fore-
+ ?\b? Expands to the exit status of the most recently executed fore-
ground pipeline.
- -\b- Expands to the current option flags as specified upon invoca-
- tion, by the s\bse\bet\bt builtin command, or those set by the shell
+ -\b- Expands to the current option flags as specified upon invoca-
+ tion, by the s\bse\bet\bt builtin command, or those set by the shell
itself (such as the -\b-i\bi option).
- $\b$ Expands to the process ID of the shell. In a () subshell, it
- expands to the process ID of the current shell, not the sub-
+ $\b$ Expands to the process ID of the shell. In a () subshell, it
+ expands to the process ID of the current shell, not the sub-
shell.
- !\b! Expands to the process ID of the most recently executed back-
+ !\b! Expands to the process ID of the most recently executed back-
ground (asynchronous) command.
- 0\b0 Expands to the name of the shell or shell script. This is set
+ 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 com-
- mands, $\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, it is
- set to the file name used to invoke b\bba\bas\bsh\bh, as given by argument
+ mands, $\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, it is
+ set to the file name used to invoke b\bba\bas\bsh\bh, as given by argument
zero.
- _\b_ At shell startup, set to the absolute pathname used to invoke
- the shell or shell script being executed as passed in the envi-
- ronment or argument list. Subsequently, expands to the last
- argument to the previous command, after expansion. Also set to
- the full pathname used to invoke each command executed and
+ _\b_ At shell startup, set to the absolute pathname used to invoke
+ the shell or shell script being executed as passed in the envi-
+ ronment or argument list. Subsequently, expands to the last
+ argument to the previous command, after expansion. Also set to
+ the full pathname used to invoke each command executed and
placed in the environment exported to that command. When check-
- ing mail, this parameter holds the name of the mail file cur-
+ ing mail, this parameter holds the name of the mail file cur-
rently being checked.
S\bSh\bhe\bel\bll\bl V\bVa\bar\bri\bia\bab\bbl\ble\bes\bs
The following variables are set by the shell:
- B\bBA\bAS\bSH\bH Expands to the full file name used to invoke this instance of
+ B\bBA\bAS\bSH\bH Expands to the full file name 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, each
- shell option in the list will be enabled before reading any
+ 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, each
+ shell option in the list will be enabled before reading any
startup files. 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
+ 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.
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 Ele-
- ments added to this array appear in the alias list; unsetting
- array elements cause aliases to be removed from the alias list.
+ 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; unsetting
+ array elements cause aliases to be removed from the alias list.
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
+ 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)
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 parameters supplied are pushed 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
+ cuted, the parameters supplied are pushed 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)
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. Elements added to this array appear in the hash table;
- unsetting array elements cause commands to be removed from the
+ unsetting array elements cause commands to be removed from the
hash table.
B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMM\bMA\bAN\bND\bD
- The command currently being executed or about to be executed,
+ 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
+ in which case it is the command executing at the time of the
trap.
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 corresponding to each member of F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE.
- $\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 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 refer-
- enced within another shell function). The corresponding source
- file name is $\b${\b{B\bBA\bAS\bSH\bH_\b_S\bSO\bOU\bUR\bRC\bCE\bE[\b[_\b$_\bi]\b]}\b}. Use L\bLI\bIN\bNE\bEN\bNO\bO to obtain the cur-
- rent line number.
+ 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.
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
string matching the _\bnth parenthesized subexpression. This vari-
able is read-only.
B\bBA\bAS\bSH\bH_\b_S\bSO\bOU\bUR\bRC\bCE\bE
- An array variable whose members are the source filenames corre-
- sponding to the elements in the F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE array variable.
+ 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
+ defined 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}.
B\bBA\bAS\bSH\bH_\b_S\bSU\bUB\bBS\bSH\bHE\bEL\bLL\bL
- Incremented by one each time a subshell or subshell environment
+ Incremented by one each time a subshell or subshell environment
is spawned. The initial value is 0.
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[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[2]\b] The patch level.
B\bBA\bAS\bSH\bH_\b_V\bVE\bER\bRS\bSI\bIN\bNF\bFO\bO[\b[3]\b] The build version.
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_\b1).
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.
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
rent completion function.
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 pro-
- grammable 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
+ The current command line. This variable is available only in
+ shell functions and external commands invoked by the pro-
+ grammable 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 pro-
- grammable 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
+ 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 pro-
+ grammable 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 completion
- attempted 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 pro-
- grammable 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
+ Set to an integer value corresponding to the type of completion
+ attempted 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 pro-
+ grammable 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
+ 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
described above. 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\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
+ 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. Assignment to this vari-
- able will not change the current directory. If D\bDI\bIR\bRS\bST\bTA\bAC\bCK\bK is
- unset, it loses its special properties, even if it is subse-
+ able will not change the current directory. If D\bDI\bIR\bRS\bST\bTA\bAC\bCK\bK is
+ unset, it loses its special properties, even if it is subse-
quently 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 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 and return an error status. If F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE is unset, it
- loses its special properties, even if it is subsequently reset.
-
- 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
- and return an error status. If G\bGR\bRO\bOU\bUP\bPS\bS is unset, it loses its
+ 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 and return an error sta-
+ tus. If F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE is unset, it loses its special properties,
+ even if it is subsequently reset.
+
+ 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
+ instance, $\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
+ current user is a member. Assignments to G\bGR\bRO\bOU\bUP\bPS\bS have no effect
+ and return an error status. 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. If H\bHI\bIS\bST\bTC\bCM\bMD\bD is unset, it loses its special properties,
+ command. If H\bHI\bIS\bST\bTC\bCM\bMD\bD is unset, it loses its special properties,
even if it is subsequently 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
+ 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
it loses its special properties, even if it is subsequently
reset.
+ R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE_\b_L\bLI\bIN\bNE\bE
+ The contents of 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\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
no arguments are supplied.
subjected to parameter expansion, command substitution, and
arithmetic expansion before being interpreted as a file name.
P\bPA\bAT\bTH\bH is not used to search for the resultant file name.
- C\bCD\bDP\bPA\bAT\bTH\bH The search path for the c\bcd\bd command. This is a colon-separated
- list of directories in which the shell looks for destination
- directories specified by the c\bcd\bd command. A sample value is
- ".:~:/usr".
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 will write the trace output generated when _\bs_\be_\bt _\b-_\bx is
- enabled to that file descriptor. The file descriptor is closed
- when B\bBA\bAS\bSH\bH_\b_X\bXT\bTR\bRA\bAC\bCE\bEF\bFD\bD is unset or assigned 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 error. Note that setting
+ If set to an integer corresponding to a valid file descriptor,
+ b\bba\bas\bsh\bh will write the trace output generated when _\bs_\be_\bt _\b-_\bx is
+ enabled to that file descriptor. The file descriptor is closed
+ when B\bBA\bAS\bSH\bH_\b_X\bXT\bTR\bRA\bAC\bCE\bEF\bFD\bD is unset or assigned 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 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 standard error being closed.
+ C\bCD\bDP\bPA\bAT\bTH\bH The search path for the c\bcd\bd command. This is a colon-separated
+ list of directories in which the shell looks for destination
+ directories specified by the c\bcd\bd command. A sample value is
+ ".:~:/usr".
C\bCO\bOL\bLU\bUM\bMN\bNS\bS
- Used by the s\bse\bel\ble\bec\bct\bt builtin command to determine the terminal
+ Used by the s\bse\bel\ble\bec\bct\bt compound command to determine the terminal
width when printing selection lists. Automatically set upon
- receipt of a SIGWINCH.
+ 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).
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.
+ an Emacs shell buffer and disables line editing.
+ E\bEN\bNV\bV Similar to B\bBA\bAS\bSH\bH_\b_E\bEN\bNV\bV; used when the shell is invoked in POSIX
+ mode.
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
+ nesting level will 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 filenames
to be ignored by pathname expansion. If a filename matched by a
- pathname expansion pattern also matches one of the patterns in
+ 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.
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 to not 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, all lines read by 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, all lines read by the
shell parser are saved on the history list, subject to the value
- of H\bHI\bIS\bST\bTI\bIG\bGN\bNO\bOR\bRE\bE. The second and subsequent lines of a multi-line
- compound command are not tested, and are added to the history
+ of H\bHI\bIS\bST\bTI\bIG\bGN\bNO\bOR\bRE\bE. The second and subsequent lines of a multi-line
+ compound command 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.
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). The default value is _\b~_\b/_\b._\bb_\ba_\bs_\bh_\b__\bh_\bi_\bs_\bt_\bo_\br_\by. If unset,
- the command history is not saved when an interactive shell
+ T\bTO\bOR\bRY\bY below). The default value is _\b~_\b/_\b._\bb_\ba_\bs_\bh_\b__\bh_\bi_\bs_\bt_\bo_\br_\by. If unset,
+ the command history is not saved when an interactive shell
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, by removing the oldest entries, to contain
- no more than that number of lines. The default value is 500.
+ this variable is assigned a value, the history file is trun-
+ cated, if necessary, by removing the oldest entries, to contain
+ no more than that number of lines. The default value is 500.
The history file is also truncated to this size after writing it
when an interactive shell exits.
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. Each pattern is
- anchored at the beginning of the line and must match the com-
- plete line (no implicit `*\b*' is appended). Each pattern is
- tested against the line after the checks specified by H\bHI\bIS\bST\bTC\bCO\bON\bN-\b-
- T\bTR\bRO\bOL\bL are applied. In addition to the normal shell pattern
+ A colon-separated list of patterns used to decide which command
+ lines should be saved on the history list. Each pattern is
+ anchored at the beginning of the line and must match the com-
+ plete line (no implicit `*\b*' is appended). Each pattern is
+ tested against the line after the checks specified by H\bHI\bIS\bST\bTC\bCO\bON\bN-\b-
+ T\bTR\bRO\bOL\bL are applied. In addition to the normal shell pattern
matching characters, `&\b&' matches the previous history line. `&\b&'
- may be escaped using a backslash; the backslash is removed
+ may be escaped using a backslash; the backslash is removed
before attempting a match. The second and subsequent lines of a
multi-line compound command 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.
H\bHI\bIS\bST\bTS\bSI\bIZ\bZE\bE
- The number of commands to remember in the command history (see
+ The number of commands to remember in the command history (see
H\bHI\bIS\bST\bTO\bOR\bRY\bY below). The default value is 500.
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, time stamps are written to the history
- file so they may be preserved across shell sessions. This uses
- the history comment character to distinguish timestamps from
+ with each history entry displayed by the h\bhi\bis\bst\bto\bor\bry\by builtin. If
+ this variable is set, time stamps are written to the history
+ file so they may be preserved across shell sessions. This uses
+ the history comment 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
- attempted 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
+ attempted 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, the hostname list is cleared.
- 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
- after expansion and to split lines into words with the r\bre\bea\bad\bd
+ 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
+ after expansion and to split lines into words with the r\bre\bea\bad\bd
builtin command. The default value is ``<space><tab><new-
line>''.
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
- exists but does not have a numeric value, or has no value, the
- default value is 10. If it does not exist, E\bEO\bOF\bF signifies the
+ 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
+ exists but does not have a numeric value, or has no value, the
+ default value is 10. If it does not exist, 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
+ The filename for the r\bre\bea\bad\bdl\bli\bin\bne\be startup file, overriding the
default of _\b~_\b/_\b._\bi_\bn_\bp_\bu_\bt_\br_\bc (see R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE below).
- 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
+ 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.
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\bLI\bIN\bNE\bES\bS Used by the s\bse\bel\ble\bec\bct\bt builtin command to determine the column
- length for printing selection lists. Automatically set 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 upon
receipt of a S\bSI\bIG\bGW\bWI\bIN\bNC\bCH\bH.
- M\bMA\bAI\bIL\bL If this parameter is set to a file name and the M\bMA\bAI\bIL\bLP\bPA\bAT\bTH\bH vari-
- able is not set, b\bba\bas\bsh\bh informs the user of the arrival of mail in
- the specified file.
+ M\bMA\bAI\bIL\bL If this parameter 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 mail in the specified file or Maildir-format direc-
+ tory.
M\bMA\bAI\bIL\bLC\bCH\bHE\bEC\bCK\bK
Specifies how often (in seconds) b\bba\bas\bsh\bh checks for mail. The
default is 60 seconds. When it is time to check for mail, the
issuing the primary prompt. B\bBa\bas\bsh\bh terminates after waiting for
that number of seconds if 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
- B\bBa\bas\bsh\bh creates temporary files for the shell's use.
+ 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
An indexed array is created automatically 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 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). d\bde\bec\bcl\bla\bar\bre\be -\b-a\ba _\bn_\ba_\bm_\be[\b[_\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt]\b] is
- also accepted; the _\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt is ignored.
+ an arithmetic expression that must evaluate to a number. If _\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt
+ evaluates to a number less than zero, it is used as an offset from one
+ greater than the array's maximum index (so a subcript of -1 refers to
+ the last element of the array). 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). d\bde\bec\bcl\bla\bar\bre\be
+ -\b-a\ba _\bn_\ba_\bm_\be[\b[_\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt]\b] is also accepted; the _\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt is ignored.
Associative arrays are created using d\bde\bec\bcl\bla\bar\bre\be -\b-A\bA _\bn_\ba_\bm_\be.
able; this variable is then expanded and that value is used in the rest
of the substitution, rather than the value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br itself. This
is known as _\bi_\bn_\bd_\bi_\br_\be_\bc_\bt _\be_\bx_\bp_\ba_\bn_\bs_\bi_\bo_\bn. The exceptions to this are the expan-
- sions of ${!_\bp_\br_\be_\bf_\bi_\bx*} and ${!\b!_\bn_\ba_\bm_\be[_\b@]} described below. The exclamation
- point must immediately follow the left brace in order to introduce
- indirection.
+ sions of ${!\b!\\b\f\bfP\bPf\bfI\bIp\bpr\bre\bef\bfi\bix\bx*\b*} and ${!\b!_\bn_\ba_\bm_\be[_\b@]} described below. The excla-
+ mation point must immediately follow the left brace in order to intro-
+ duce indirection.
In each of the cases below, _\bw_\bo_\br_\bd is subject to tilde expansion, parame-
ter expansion, command substitution, and arithmetic expansion.
substituted, otherwise the expansion of _\bw_\bo_\br_\bd is substituted.
${_\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.\b. Expands to up to _\bl_\be_\bn_\bg_\bt_\bh characters of
+ 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
_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br starting at the character specified by _\bo_\bf_\bf_\bs_\be_\bt. If
_\bl_\be_\bn_\bg_\bt_\bh is omitted, expands to the substring of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br start-
ing at the character specified by _\bo_\bf_\bf_\bs_\be_\bt. _\bl_\be_\bn_\bg_\bt_\bh and _\bo_\bf_\bf_\bs_\be_\bt are
- 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 below).
- _\bl_\be_\bn_\bg_\bt_\bh must evaluate to a number greater than or equal to zero.
- If _\bo_\bf_\bf_\bs_\be_\bt evaluates to a number less than zero, the value is
- used as an offset from the end of the value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br. If
- _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is @\b@, the result is _\bl_\be_\bn_\bg_\bt_\bh positional parameters
- beginning at _\bo_\bf_\bf_\bs_\be_\bt. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is an indexed array name sub-
- scripted by @ or *, the result is the _\bl_\be_\bn_\bg_\bt_\bh members of the
- array beginning with ${_\bp_\ba_\br_\ba_\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. Substring expansion applied to an associative
- array produces undefined results. Note that a negative offset
- must be separated from the colon by at least one space to avoid
- being confused with the :- expansion. Substring indexing is
- zero-based unless the positional parameters are used, in which
- case the indexing starts at 1 by default. If _\bo_\bf_\bf_\bs_\be_\bt is 0, and
- the positional parameters are used, $\b$0\b0 is prefixed to the list.
+ 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 below). If
+ _\bo_\bf_\bf_\bs_\be_\bt evaluates to a number less than zero, the value is used
+ as an offset from the end of the value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br. If _\bl_\be_\bn_\bg_\bt_\bh
+ evaluates to a number less than zero, and _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is not @\b@ and
+ not an indexed or associative array, it is interpreted as an
+ offset from the end of the value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br rather than a num-
+ ber of characters, and the expansion is the characters between
+ the two offsets. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is @\b@, the result is _\bl_\be_\bn_\bg_\bt_\bh posi-
+ tional parameters beginning at _\bo_\bf_\bf_\bs_\be_\bt. 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_\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 max-
+ imum index of the specified array. Substring expansion applied
+ to an associative array produces undefined results. Note that a
+ negative offset must be separated from the colon by at least one
+ space to avoid being confused with the :- expansion. Substring
+ indexing is zero-based unless the positional parameters are
+ used, in which case the indexing starts at 1 by default. If
+ _\bo_\bf_\bf_\bs_\be_\bt is 0, and the positional parameters are used, $\b$0\b0 is pre-
+ fixed 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.\b. 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.\b. 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.\b. The length in characters of the value of
- _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is substituted. 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-
+ P\bPa\bar\bra\bam\bme\bet\bte\ber\br l\ble\ben\bng\bgt\bth\bh. The length in characters of the value of
+ _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is substituted. 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.
${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br#\b#_\bw_\bo_\br_\bd}
${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br#\b##\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.\b. The _\bw_\bo_\br_\bd is expanded to produce
+ 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. 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 ``#\b#'' case) or the longest matching pat-
- tern (the ``#\b##\b#'' 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 parame-
+ 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 ``#\b#'' case) or the longest matching pat-
+ tern (the ``#\b##\b#'' 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 parame-
ter in turn, and the expansion is the resultant list. If _\bp_\ba_\br_\ba_\bm_\b-
- _\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
+ _\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%_\bw_\bo_\br_\bd}
${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br%\b%%\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.\b. The _\bw_\bo_\br_\bd is expanded to produce
+ 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. 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 expansion is the expanded value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br with
- the shortest matching pattern (the ``%\b%'' case) or the longest
- matching pattern (the ``%\b%%\b%'' case) deleted. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is @\b@
- or *\b*, the pattern removal 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 pattern removal operation is applied to each member of
+ a trailing portion of the expanded 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 ``%\b%'' case) or the longest
+ matching pattern (the ``%\b%%\b%'' case) deleted. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is @\b@
+ or *\b*, the pattern removal 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 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}
- P\bPa\bat\btt\bte\ber\brn\bn s\bsu\bub\bbs\bst\bti\bit\btu\but\bti\bio\bon\bn.\b. The _\bp_\ba_\bt_\bt_\be_\br_\bn is expanded to produce a pat-
- tern just as in pathname expansion. _\bP_\ba_\br_\ba_\bm_\be_\bt_\be_\br is expanded and
- the longest match of _\bp_\ba_\bt_\bt_\be_\br_\bn against its value is replaced with
- _\bs_\bt_\br_\bi_\bn_\bg. If _\bp_\ba_\bt_\bt_\be_\br_\bn begins with /\b/, all matches of _\bp_\ba_\bt_\bt_\be_\br_\bn are
- replaced with _\bs_\bt_\br_\bi_\bn_\bg. Normally only the first match is
+ 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 just as in pathname expansion. _\bP_\ba_\br_\ba_\bm_\be_\bt_\be_\br is expanded and
+ the longest match of _\bp_\ba_\bt_\bt_\be_\br_\bn against its value is replaced with
+ _\bs_\bt_\br_\bi_\bn_\bg. If _\bp_\ba_\bt_\bt_\be_\br_\bn begins with /\b/, all matches of _\bp_\ba_\bt_\bt_\be_\br_\bn are
+ replaced with _\bs_\bt_\br_\bi_\bn_\bg. Normally only the first match is
replaced. If _\bp_\ba_\bt_\bt_\be_\br_\bn begins with #\b#, it must match at the begin-
ning of the expanded value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br. If _\bp_\ba_\bt_\bt_\be_\br_\bn begins with
- %\b%, it must match at the end of the expanded value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br.
+ %\b%, it must match at the end of the expanded value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br.
If _\bs_\bt_\br_\bi_\bn_\bg is null, matches of _\bp_\ba_\bt_\bt_\be_\br_\bn are deleted and the /\b/ fol-
lowing _\bp_\ba_\bt_\bt_\be_\br_\bn may be omitted. If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is @\b@ or *\b*, the sub-
- stitution 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 substitution
- operation is applied to each member of the array in turn, and
+ stitution 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 substitution
+ 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}
${_\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.\b. This expansion modifies the case of alpha-
- betic characters in _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br. The _\bp_\ba_\bt_\bt_\be_\br_\bn is expanded to pro-
- duce a pattern just as in pathname expansion. The ^\b^ operator
- converts lowercase letters matching _\bp_\ba_\bt_\bt_\be_\br_\bn to uppercase; the ,\b,
- operator converts matching uppercase letters to lowercase. The
- ^\b^^\b^ and ,\b,,\b, expansions convert each matched character in the
- expanded value; the ^\b^ and ,\b, expansions match and convert only
- the first character in the expanded value.. If _\bp_\ba_\bt_\bt_\be_\br_\bn is omit-
- ted, 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 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 case modification operation is applied to each
- member of the array in turn, and the expansion is the resultant
+ 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. The _\bp_\ba_\bt_\bt_\be_\br_\bn is expanded to pro-
+ duce a pattern just as in pathname expansion. The ^\b^ operator
+ converts lowercase letters matching _\bp_\ba_\bt_\bt_\be_\br_\bn to uppercase; the ,\b,
+ operator converts matching uppercase letters to lowercase. The
+ ^\b^^\b^ and ,\b,,\b, expansions convert each matched character in the
+ expanded value; the ^\b^ and ,\b, expansions match and convert only
+ the first character in the expanded value. If _\bp_\ba_\bt_\bt_\be_\br_\bn is omit-
+ ted, 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 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 case modification operation is applied to each
+ member of the array in turn, and the expansion is the resultant
list.
C\bCo\bom\bmm\bma\ban\bnd\bd S\bSu\bub\bbs\bst\bti\bit\btu\but\bti\bio\bon\bn
`\b`_\bc_\bo_\bm_\bm_\ba_\bn_\bd`\b`
B\bBa\bas\bsh\bh performs the expansion by executing _\bc_\bo_\bm_\bm_\ba_\bn_\bd and replacing the com-
- mand substitution with the standard output of the command, with any
+ mand 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$(\b(c\bca\bat\bt
+ may be removed during word splitting. The command 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).
- When the old-style backquote form of substitution is used, backslash
- retains its literal meaning except when followed by $\b$, `\b`, or \\b\. The
+ When the old-style backquote form of substitution is used, backslash
+ retains its literal meaning except when followed by $\b$, `\b`, or \\b\. The
first backquote not preceded by a backslash terminates the command sub-
- stitution. When using the $(_\bc_\bo_\bm_\bm_\ba_\bn_\bd) form, all characters between the
+ stitution. When using the $(_\bc_\bo_\bm_\bm_\ba_\bn_\bd) form, all characters between the
parentheses make up the command; none are treated specially.
Command substitutions may be nested. To nest when using the backquoted
form, escape the inner backquotes with backslashes.
- If the substitution appears within double quotes, word splitting and
+ If the substitution appears within double quotes, word splitting and
pathname expansion are not performed on the results.
A\bAr\bri\bit\bth\bhm\bme\bet\bti\bic\bc E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn
- Arithmetic expansion allows the evaluation of an arithmetic expression
- and the substitution of the result. The format for arithmetic expan-
+ Arithmetic expansion allows the evaluation of an arithmetic expression
+ and the substitution of the result. The format for arithmetic expan-
sion is:
$\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 is treated as if it were within double quotes, but a
- double quote inside the parentheses is not treated specially. All
+ The _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn is treated as if it were within double quotes, but a
+ double quote inside the parentheses is not treated specially. All
tokens in the expression undergo parameter expansion, string expansion,
- command substitution, and quote removal. Arithmetic expansions may be
+ command substitution, and quote removal. 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
indicating failure and no substitution occurs.
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 is supported on systems that support named pipes
- (_\bF_\bI_\bF_\bO_\bs) or the /\b/d\bde\bev\bv/\b/f\bfd\bd method of naming open files. 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 with its input or out-
+ _\bP_\br_\bo_\bc_\be_\bs_\bs _\bs_\bu_\bb_\bs_\bt_\bi_\bt_\bu_\bt_\bi_\bo_\bn is supported on systems that support named pipes
+ (_\bF_\bI_\bF_\bO_\bs) or the /\b/d\bde\bev\bv/\b/f\bfd\bd method of naming open files. 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 with its input or out-
put connected to a _\bF_\bI_\bF_\bO or some file in /\b/d\bde\bev\bv/\b/f\bfd\bd. The name of this file
- is passed as an argument to the current command as the result of the
- expansion. If the >\b>(\b(_\bl_\bi_\bs_\bt)\b) form is used, writing to the file will pro-
- vide input for _\bl_\bi_\bs_\bt. If the <\b<(\b(_\bl_\bi_\bs_\bt)\b) form is used, the file passed as
+ is passed as an argument to the current command as the result of the
+ expansion. If the >\b>(\b(_\bl_\bi_\bs_\bt)\b) form is used, writing to the file will pro-
+ vide input for _\bl_\bi_\bs_\bt. If the <\b<(\b(_\bl_\bi_\bs_\bt)\b) form is used, the file passed as
an argument should be read to obtain the output of _\bl_\bi_\bs_\bt.
- 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.
- The shell treats each character of I\bIF\bFS\bS as a delimiter, and splits the
+ The shell treats each character of I\bIF\bFS\bS as a delimiter, and splits the
results of the other expansions into words on these characters. If I\bIF\bFS\bS
- is unset, or its value is exactly <\b<s\bsp\bpa\bac\bce\be>\b><\b<t\bta\bab\bb>\b><\b<n\bne\bew\bwl\bli\bin\bne\be>\b>, the default,
- then sequences of <\b<s\bsp\bpa\bac\bce\be>\b>, <\b<t\bta\bab\bb>\b>, and <\b<n\bne\bew\bwl\bli\bin\bne\be>\b> at the beginning and
- end of the results of the previous expansions are ignored, and any
- sequence of I\bIF\bFS\bS characters not at the beginning or end serves to
- delimit words. If I\bIF\bFS\bS has a value other than the default, then
+ is unset, or its value is exactly <\b<s\bsp\bpa\bac\bce\be>\b><\b<t\bta\bab\bb>\b><\b<n\bne\bew\bwl\bli\bin\bne\be>\b>, the default,
+ then sequences of <\b<s\bsp\bpa\bac\bce\be>\b>, <\b<t\bta\bab\bb>\b>, and <\b<n\bne\bew\bwl\bli\bin\bne\be>\b> at the beginning and
+ end of the results of the previous expansions are ignored, and any
+ sequence of I\bIF\bFS\bS characters not at the beginning or end serves to
+ delimit words. If I\bIF\bFS\bS has a value other than the default, then
sequences of the whitespace characters s\bsp\bpa\bac\bce\be and t\bta\bab\bb are ignored at the
- beginning and end of the word, as long as the whitespace character is
- in the value of I\bIF\bFS\bS (an I\bIF\bFS\bS whitespace character). Any character in
- I\bIF\bFS\bS that is not I\bIF\bFS\bS whitespace, along with any adjacent I\bIF\bFS\bS whitespace
- characters, delimits a field. A sequence of I\bIF\bFS\bS whitespace characters
- is also treated as a delimiter. If the value of I\bIF\bFS\bS is null, no word
+ beginning and end of the word, as long as the whitespace character is
+ in the value of I\bIF\bFS\bS (an I\bIF\bFS\bS whitespace character). Any character in
+ I\bIF\bFS\bS that is not I\bIF\bFS\bS whitespace, along with any adjacent I\bIF\bFS\bS whitespace
+ characters, delimits a field. A sequence of I\bIF\bFS\bS whitespace characters
+ is also treated as a delimiter. If the value of I\bIF\bFS\bS is null, no word
splitting occurs.
- Explicit null arguments ("\b""\b" or '\b''\b') are retained. Unquoted implicit
+ Explicit null arguments ("\b""\b" or '\b''\b') are retained. Unquoted implicit
null arguments, resulting from the expansion of parameters that have no
- values, are removed. If a parameter with no value is expanded within
+ values, are removed. If a parameter with no value is expanded within
double quotes, a null argument results and is retained.
Note that if no expansion occurs, no splitting is performed.
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
- appears, then the word is regarded as a _\bp_\ba_\bt_\bt_\be_\br_\bn, and replaced with an
- alphabetically sorted list of file names matching the pattern. If no
- matching file names 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, an error message is printed
- and the command is not executed. If the shell option n\bno\boc\bca\bas\bse\beg\bgl\blo\bob\bb is
- enabled, the match is performed without regard to the case of alpha-
- betic characters. When a pattern is used for pathname expansion, the
- character `\b``\b`.\b.'\b''\b' at the start of a name or immediately following a
- slash must be matched explicitly, unless the shell option d\bdo\bot\btg\bgl\blo\bob\bb is
- set. When matching a pathname, the slash character must always be
- matched explicitly. In other cases, the `\b``\b`.\b.'\b''\b' character is not
- treated specially. 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, f\bfa\bai\bil\bl-\b-
+ 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, then the word is regarded as a _\bp_\ba_\bt_\bt_\be_\br_\bn, and replaced with an
+ alphabetically sorted list of file names matching the pattern. If no
+ matching file names 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, an error message is printed
+ and the command is not executed. If the shell option n\bno\boc\bca\bas\bse\beg\bgl\blo\bob\bb is
+ enabled, the match is performed without regard to the case of alpha-
+ betic characters. When a pattern is used for pathname expansion, the
+ character `\b``\b`.\b.'\b''\b' at the start of a name or immediately following a
+ slash must be matched explicitly, unless the shell option d\bdo\bot\btg\bgl\blo\bob\bb is
+ set. When matching a pathname, the slash character must always be
+ matched explicitly. In other cases, the `\b``\b`.\b.'\b''\b' character is not
+ treated specially. 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, f\bfa\bai\bil\bl-\b-
g\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
+ 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. The file names `\b``\b`.\b.'\b''\b' and `\b``\b`.\b..\b.'\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\bG-\b-
- N\bNO\bOR\bRE\bE to a non-null value has the effect of enabling the d\bdo\bot\btg\bgl\blo\bob\bb shell
+ 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\bG-\b-
+ N\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 file names beginning with a `\b``\b`.\b.'\b''\b' will match. To
- get the old behavior of ignoring file names beginning with a `\b``\b`.\b.'\b''\b',
- make `\b``\b`.\b.*\b*'\b''\b' one of the patterns in G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE. The d\bdo\bot\btg\bgl\blo\bob\bb option is
+ get the old behavior of ignoring file names beginning with a `\b``\b`.\b.'\b''\b',
+ make `\b``\b`.\b.*\b*'\b''\b' one of the patterns in G\bGL\bLO\bOB\bBI\bIG\bGN\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.
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\bb-\b-
- s\bst\bta\bar\br shell option is enabled, and *\b* is used in a pathname expan-
- sion context, two adjacent *\b*s used as a single pattern will
- match all files and zero or more directories and subdirectories.
- If followed by a /\b/, two adjacent *\b*s will match only directories
- and subdirectories.
- ?\b? Matches any single character.
- [\b[.\b..\b..\b.]\b] Matches any one of the enclosed characters. A pair of charac-
- ters separated by a hyphen denotes a _\br_\ba_\bn_\bg_\be _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn; any char-
- acter that sorts between those two characters, inclusive, using
- the current locale's collating sequence and character set, is
- matched. If the first character following the [\b[ is a !\b! or a ^\b^
- then any character not enclosed is matched. The sorting order
- of characters in range expressions is determined by the current
- locale and the value of the L\bLC\bC_\b_C\bCO\bOL\bLL\bLA\bAT\bTE\bE shell variable, if set.
- A -\b- may be matched by including it as the first or last charac-
- ter in the set. A ]\b] may be matched by including it as the first
- character in the set.
-
- Within [\b[ and ]\b], _\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 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 char-
- acter _.
-
- Within [\b[ and ]\b], 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 characters with the same colla-
- tion weight (as defined by the current locale) as the character
- _\bc.
-
- Within [\b[ and ]\b], the syntax [\b[.\b._\bs_\by_\bm_\bb_\bo_\bl.\b.]\b] matches the collating sym-
- bol _\bs_\by_\bm_\bb_\bo_\bl.
+ *\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 will match all files and zero or more
+ directories and subdirectories. If followed by a /\b/, two
+ adjacent *\b*s will match only directories and subdirecto-
+ ries.
+ ?\b? Matches any single character.
+ [\b[.\b..\b..\b.]\b] Matches any one of the enclosed characters. A pair of
+ characters separated by a hyphen denotes a _\br_\ba_\bn_\bg_\be _\be_\bx_\bp_\br_\be_\bs_\b-
+ _\bs_\bi_\bo_\bn; any character that sorts between those two charac-
+ ters, inclusive, using the current locale's collating
+ sequence and character set, is matched. If the first
+ character following the [\b[ is a !\b! or a ^\b^ then any charac-
+ ter not enclosed is matched. The sorting order of char-
+ acters in range expressions is determined by the current
+ locale and the value of the L\bLC\bC_\b_C\bCO\bOL\bLL\bLA\bAT\bTE\bE shell variable, if
+ set. A -\b- may be matched by including it as the first or
+ last character in the set. A ]\b] may be matched by includ-
+ ing it as the first character in the set.
+
+ Within [\b[ and ]\b], _\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
+ 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 [\b[ and ]\b], 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 characters with
+ the same collation weight (as defined by the current
+ locale) as the character _\bc.
+
+ Within [\b[ and ]\b], the syntax [\b[.\b._\bs_\by_\bm_\bb_\bo_\bl.\b.]\b] matches the collat-
+ ing 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, several
- extended pattern matching operators are recognized. In the following
+ extended pattern matching operators are recognized. 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 of the fol-
lowing sub-patterns:
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. Redirection may
- also be used to open and close files for the current shell execution
+ 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. Redirection may
+ also be used to open and close files for 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 order 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 >&- and <&-, the shell will allocate a
- file descriptor greater than 10 and assign it to _\bv_\ba_\br_\bn_\ba_\bm_\be. If >&- or
- <&- is preceded by {_\bv_\ba_\br_\bn_\ba_\bm_\be}, the value of _\bv_\ba_\br_\bn_\ba_\bm_\be defines the file
+ file descriptor greater than 10 and assign it to _\bv_\ba_\br_\bn_\ba_\bm_\be. If >&- or
+ <&- is preceded by {_\bv_\ba_\br_\bn_\ba_\bm_\be}, the value of _\bv_\ba_\br_\bn_\ba_\bm_\be defines the file
descriptor to close.
- In the following descriptions, if the file descriptor number is omit-
- ted, and the first character of the redirection operator is <\b<, the re-
- direction refers to the standard input (file descriptor 0). If the
- first character of the redirection operator is >\b>, the redirection
+ In the following descriptions, if the file descriptor number is omit-
+ ted, and the first character of the redirection operator is <\b<, the re-
+ direction refers to the standard input (file descriptor 0). If the
+ first character of the redirection operator is >\b>, the redirection
refers to the standard output (file descriptor 1).
- The word following the redirection operator in the following descrip-
- tions, unless otherwise noted, is subjected to brace expansion, tilde
+ The word following the redirection operator in the following descrip-
+ tions, unless otherwise noted, is subjected to brace expansion, tilde
expansion, parameter expansion, command substitution, arithmetic expan-
- sion, quote removal, pathname expansion, and word splitting. If it
+ sion, quote removal, pathname expansion, and word splitting. If it
expands to more than one word, b\bba\bas\bsh\bh reports an error.
- Note that the order of redirections is significant. For example, the
+ Note that 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 duplicated from the standard output before the standard out-
+ directs only the standard output to file _\bd_\bi_\br_\bl_\bi_\bs_\bt, because the standard
+ error was duplicated from the standard output before the standard out-
put 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:
/\b/d\bde\bev\bv/\b/f\bfd\bd/\b/_\bf_\bd
- If _\bf_\bd is a valid integer, file descriptor _\bf_\bd is dupli-
+ If _\bf_\bd is a valid integer, file descriptor _\bf_\bd is dupli-
cated.
/\b/d\bde\bev\bv/\b/s\bst\btd\bdi\bin\bn
File descriptor 0 is duplicated.
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 a TCP connection to the corresponding 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 a UDP connection to the corresponding 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
Redirection of input causes the file whose name results from the expan-
- sion of _\bw_\bo_\br_\bd to be opened for reading on file descriptor _\bn, or the
+ sion of _\bw_\bo_\br_\bd to be opened 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:
[_\bn]<\b<_\bw_\bo_\br_\bd
R\bRe\bed\bdi\bir\bre\bec\bct\bti\bin\bng\bg O\bOu\but\btp\bpu\but\bt
- Redirection of output causes the file whose name results from the
+ Redirection of output causes the file whose name results from the
expansion of _\bw_\bo_\br_\bd to be opened 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
+ 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 has been enabled, the redirection will fail 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>, and the n\bno\boc\bcl\blo\bob\bbb\bbe\ber\br option to the s\bse\bet\bt
+ builtin has been enabled, the redirection will fail 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 command is not enabled, the re-
direction is attempted 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
- Redirection of output in this fashion causes the file whose name
- results from the expansion of _\bw_\bo_\br_\bd to be opened for appending on file
- descriptor _\bn, or the standard output (file descriptor 1) if _\bn is not
+ Redirection of output in this fashion causes the file whose name
+ results from the expansion of _\bw_\bo_\br_\bd to be opened 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.
The general format for appending output is:
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 allows both the standard output (file descriptor 1) and
- the standard error output (file descriptor 2) to be redirected to the
+ This construct allows both the standard output (file descriptor 1) and
+ the standard error output (file descriptor 2) to be redirected to the
file whose name is the expansion of _\bw_\bo_\br_\bd.
- There are two formats for redirecting standard output and standard
+ There are two formats for redirecting standard output and standard
error:
&\b&>\b>_\bw_\bo_\br_\bd
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
- This construct allows both the standard output (file descriptor 1) and
- the standard error output (file descriptor 2) to be appended to the
+ This construct allows both the standard output (file descriptor 1) and
+ the standard error output (file descriptor 2) to be appended to the
file whose name is the expansion of _\bw_\bo_\br_\bd.
The format for appending standard output and standard error is:
>\b>>\b>_\bw_\bo_\br_\bd 2>\b>&\b&1
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 a line containing only _\bd_\be_\bl_\bi_\bm_\bi_\bt_\be_\br (with no trailing
- blanks) is seen. All of the lines read up to that point are then used
+ blanks) is seen. All of the lines read up to that point are then used
as the standard input for a command.
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
- No parameter expansion, command substitution, arithmetic expansion, or
+ No parameter expansion, command substitution, arithmetic expansion, or
pathname expansion is performed on _\bw_\bo_\br_\bd. If any characters in _\bw_\bo_\br_\bd are
- quoted, the _\bd_\be_\bl_\bi_\bm_\bi_\bt_\be_\br is the result of quote removal on _\bw_\bo_\br_\bd, and the
- lines in the here-document are not expanded. If _\bw_\bo_\br_\bd is unquoted, all
- lines of the here-document are subjected to parameter expansion, com-
- mand substitution, and arithmetic expansion. In the latter case, the
- character sequence \\b\<\b<n\bne\bew\bwl\bli\bin\bne\be>\b> is ignored, and \\b\ must be used to quote
+ quoted, the _\bd_\be_\bl_\bi_\bm_\bi_\bt_\be_\br is the result of quote removal on _\bw_\bo_\br_\bd, and the
+ lines in the here-document are not expanded. If _\bw_\bo_\br_\bd is unquoted, all
+ lines of the here-document are subjected to parameter expansion, com-
+ mand substitution, and arithmetic expansion. In the latter case, the
+ character sequence \\b\<\b<n\bne\bew\bwl\bli\bin\bne\be>\b> is ignored, and \\b\ must be used to quote
the characters \\b\, $\b$, and `\b`.
If the redirection operator is <\b<<\b<-\b-, then all leading tab characters are
- stripped 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
+ stripped 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.
H\bHe\ber\bre\be S\bSt\btr\bri\bin\bng\bgs\bs
[_\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, the file descriptor denoted by _\bn is made to be a copy of
- that file descriptor. If the digits in _\bw_\bo_\br_\bd do not specify a file
- descriptor open for input, a redirection error occurs. If _\bw_\bo_\br_\bd evalu-
- ates to -\b-, file descriptor _\bn is closed. If _\bn is not specified, the
+ more digits, the file descriptor denoted by _\bn is made to be a copy of
+ that file descriptor. If the digits in _\bw_\bo_\br_\bd do not specify a file
+ descriptor open for input, a redirection error occurs. If _\bw_\bo_\br_\bd evalu-
+ ates to -\b-, file descriptor _\bn is closed. If _\bn is not specified, the
standard input (file descriptor 0) is used.
The operator
[_\bn]>\b>&\b&_\bw_\bo_\br_\bd
- is used similarly to duplicate output file descriptors. If _\bn is not
- specified, the standard output (file descriptor 1) is used. If the
- digits in _\bw_\bo_\br_\bd do not specify a file descriptor open for output, a re-
- direction error occurs. As a special case, if _\bn is omitted, and _\bw_\bo_\br_\bd
+ is used similarly to duplicate output file descriptors. If _\bn is not
+ specified, the standard output (file descriptor 1) is used. If the
+ digits in _\bw_\bo_\br_\bd do not specify a file descriptor open for output, a re-
+ direction error occurs. As a special case, if _\bn is omitted, and _\bw_\bo_\br_\bd
does not expand to one or more digits, the standard output and standard
error are redirected as described previously.
[_\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
[_\bn]<\b<>\b>_\bw_\bo_\br_\bd
- causes the file whose name is the expansion of _\bw_\bo_\br_\bd to be opened for
- both reading and writing on file descriptor _\bn, or on file descriptor 0
+ causes the file whose name is the expansion of _\bw_\bo_\br_\bd to be opened for
+ both reading and writing on file descriptor _\bn, or on file descriptor 0
if _\bn is not specified. 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 when it is used as
- the first word of a simple command. The shell maintains a list of
- aliases that may be set and unset with the 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). The first word of each
- simple command, if unquoted, is checked to see if it has an alias. If
- so, that word is replaced by the text of the alias. 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
+ _\bA_\bl_\bi_\ba_\bs_\be_\bs allow a string to be substituted for a word when it is used as
+ the first word of a simple command. The shell maintains a list of
+ aliases that may be set and unset with the 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). The first word of each
+ simple command, if unquoted, is checked to see if it has an alias. If
+ so, that word is replaced by the text of the alias. 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 text. If the
- last character of the alias value is a _\bb_\bl_\ba_\bn_\bk, then the next command
+ 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 text. If the
+ last character of the alias value is a _\bb_\bl_\ba_\bn_\bk, then the next command
word following the alias is also checked 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, a shell function should be used (see F\bFU\bUN\bNC\bCT\bTI\bIO\bON\bNS\bS
+ There is no mechanism for using arguments in the replacement text. If
+ arguments are needed, a shell function should be used (see F\bFU\bUN\bNC\bCT\bTI\bIO\bON\bNS\bS
below).
- 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
- before executing any of the commands on that line. 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 next line of input is read. The commands
+ 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
+ before executing any of the commands on that line. 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 next line of input is read. The commands
following the alias definition on that line 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 com-
+ 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 com-
pound 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 a\bal\bli\bia\bas\bs in com-
+ available until after that function is executed. To be safe, always
+ put alias definitions on a separate line, and do not use a\bal\bli\bia\bas\bs in com-
pound commands.
For almost every purpose, aliases are superseded by shell functions.
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
- shell function is used as a simple command name, the list of commands
+ 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 list of commands
associated with that function name is executed. Functions are executed
- in the context of the current shell; no new process is 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
+ in the context of the current shell; no new process is 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
positional parameters during its execution. The special parameter #\b# is
- updated to reflect the change. Special parameter 0 is unchanged. The
- first element of the F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE variable is set to the name of the func-
+ updated to reflect the change. 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 func-
tion while the function is executing.
- All other aspects of the shell execution environment are identical
+ All other aspects of the shell execution environment are identical
between 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
+ 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 may be declared with the l\blo\boc\bca\bal\bl builtin
+ Variables local to the function may be declared with the l\blo\boc\bca\bal\bl builtin
command. Ordinarily, variables and their values are shared between the
function and its caller.
- 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. Any command associated with the R\bRE\bET\bTU\bUR\bRN\bN trap is executed
+ The F\bFU\bUN\bNC\bCN\bNE\bES\bST\bT 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.
+
+ 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. Any command associated with the R\bRE\bET\bTU\bUR\bRN\bN trap is executed
before execution resumes. When a function completes, the values of the
- positional parameters and the special parameter #\b# are restored to the
+ positional parameters and the special parameter #\b# are restored to the
values they had prior to the function's execution.
- Function names and definitions may be listed with the -\b-f\bf option to the
+ Function names and definitions may be listed with 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. The -\b-F\bF option to d\bde\bec\bcl\bla\bar\bre\be or t\bty\byp\bpe\be-\b-
- s\bse\bet\bt will list 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 subshells automatically have them defined with
- the -\b-f\bf option to the e\bex\bxp\bpo\bor\brt\bt builtin. A function definition may be
- deleted using the -\b-f\bf option to the u\bun\bns\bse\bet\bt builtin. Note that shell
+ s\bse\bet\bt will list 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 subshells automatically have them defined with
+ the -\b-f\bf option to the e\bex\bxp\bpo\bor\brt\bt builtin. A function definition may be
+ deleted using the -\b-f\bf option to the u\bun\bns\bse\bet\bt builtin. Note that shell
functions and variables with the same name may result in multiple iden-
- tically-named entries in the environment passed to the shell's chil-
+ tically-named entries in the environment passed to the shell's chil-
dren. Care should be taken in cases where this may cause a problem.
- Functions may be recursive. No limit is imposed on the number of
+ 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, no limit is imposed 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 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 fixed-width integers 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
+ 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 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 fixed-width integers 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.
_\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
- expansion syntax. A shell variable that is null or unset evaluates to
+ variables may also be referenced by name without using the parameter
+ expansion syntax. A shell variable that is null or unset evaluates to
0 when referenced by name without using the parameter expansion syntax.
- The value of a variable is evaluated as an arithmetic expression when
- it is referenced, or when a variable which has been given the _\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 integer attribute turned on
+ to 0. A shell variable need not have its _\bi_\bn_\bt_\be_\bg_\be_\br attribute turned on
to be used in an expression.
Constants with a leading 0 are interpreted as octal numbers. A leading
- 0x or 0X denotes hexadecimal. Otherwise, numbers take the form
- [_\bb_\ba_\bs_\be_\b#]n, where _\bb_\ba_\bs_\be is a decimal number between 2 and 64 representing
- the arithmetic base, and _\bn is a number in that base. If _\bb_\ba_\bs_\be_\b# is omit-
- ted, then base 10 is used. 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 uppercase
- letters may be used interchangeably to represent numbers between 10 and
- 35.
-
- Operators are evaluated in order of precedence. Sub-expressions in
- parentheses are evaluated first and may override the precedence rules
+ 0x or 0X denotes hexadecimal. Otherwise, numbers take the form
+ [_\bb_\ba_\bs_\be_\b#]n, where the optional _\bb_\ba_\bs_\be is a decimal number between 2 and 64
+ representing the arithmetic base, and _\bn is a number in that base. If
+ _\bb_\ba_\bs_\be_\b# is omitted, then base 10 is used. 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
+ uppercase letters may be used interchangeably to represent numbers
+ between 10 and 35.
+
+ Operators are evaluated in order of precedence. Sub-expressions in
+ parentheses 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. Expressions are formed from the following
- unary or binary primaries. If any _\bf_\bi_\bl_\be argument to one of the pri-
+ 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. Expressions are formed from the following
+ unary or binary primaries. 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 file descriptor _\bn is checked. 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, file descriptor 0, 1, or 2, respectively,
+ 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, file descriptor 0, 1, or 2, respectively,
is checked.
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[, The <\b< and >\b> operators sort lexicographically using
- the current locale.
+ When used with [\b[[\b[, the <\b< and >\b> operators sort lexicographically using
+ the current locale. The t\bte\bes\bst\bt command sorts using ASCII ordering.
-\b-a\ba _\bf_\bi_\bl_\be
True if _\bf_\bi_\bl_\be exists.
True if _\bf_\bi_\bl_\be exists and is writable.
-\b-x\bx _\bf_\bi_\bl_\be
True if _\bf_\bi_\bl_\be exists and is executable.
- -\b-O\bO _\bf_\bi_\bl_\be
- True if _\bf_\bi_\bl_\be exists and is owned by the effective user id.
-\b-G\bG _\bf_\bi_\bl_\be
True if _\bf_\bi_\bl_\be exists and is owned by the effective group id.
-\b-L\bL _\bf_\bi_\bl_\be
True if _\bf_\bi_\bl_\be exists and is a symbolic link.
- -\b-S\bS _\bf_\bi_\bl_\be
- True if _\bf_\bi_\bl_\be exists and is a socket.
-\b-N\bN _\bf_\bi_\bl_\be
- True if _\bf_\bi_\bl_\be exists and has been modified since it was last
+ True if _\bf_\bi_\bl_\be exists and has been modified since it was last
read.
+ -\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.
+ _\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-
+ 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
_\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
does not.
- _\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-
- bers.
-\b-o\bo _\bo_\bp_\bt_\bn_\ba_\bm_\be
- True if 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).
-\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
ronment cannot affect the shell's execution environment.
Subshells spawned to execute command substitutions inherit the value of
- the -\b-e\be option from the parent shell. When not in posix mode, Bash
+ the -\b-e\be option from the parent shell. When not in _\bp_\bo_\bs_\bi_\bx mode, b\bba\bas\bsh\bh
clears the -\b-e\be option in such subshells.
If a command is followed by a &\b& and job control is not active, the
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 given at shell invocation.
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
+ 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\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
s\bse\bet\bt builtin.
R\bRe\bea\bad\bdl\bli\bin\bne\be N\bNo\bot\bta\bat\bti\bio\bon\bn
- In this section, the emacs-style notation is used to denote keystrokes.
+ In this section, the Emacs-style notation is used to denote keystrokes.
Control keys are denoted by C-_\bk_\be_\by, e.g., C-n means Control-N. Simi-
larly, _\bm_\be_\bt_\ba keys are denoted by M-_\bk_\be_\by, so M-x means Meta-X. (On key-
boards without a _\bm_\be_\bt_\ba key, M-_\bx means ESC _\bx, i.e., press the Escape key
mapped to s\bse\bel\blf\bf-\b-i\bin\bns\bse\ber\brt\bt.
e\bed\bdi\bit\bti\bin\bng\bg-\b-m\bmo\bod\bde\be (\b(e\bem\bma\bac\bcs\bs)\b)
Controls whether readline begins with a set of key bindings sim-
- ilar 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
+ ilar 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\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
key the terminal claims to support when it is called. On many
terminals, the meta key is used to send eight-bit characters.
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, tilde expansion is performed when readline
+ If set to O\bOn\bn, tilde expansion is performed when readline
attempts word completion.
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
+ 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(0\b0)\b)
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, causes readline to match files
whose names begin with a `.' (hidden files) when performing
- filename completion, unless the leading `.' is supplied by the
- user in the filename to be completed.
+ filename completion. If set to O\bOf\bff\bf, the leading `.' must be
+ supplied by the user 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
+ 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, readline will display characters with the eighth
bit set directly rather than as a meta-prefixed escape sequence.
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, readline will undo all changes to history lines
+ If set to O\bOn\bn, readline will undo all changes to history lines
before returning when a\bac\bcc\bce\bep\bpt\bt-\b-l\bli\bin\bne\be is executed. 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\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.
- If set to o\bon\bn, words which have more than one possible completion
+ If set to O\bOn\bn, words which have more than one possible completion
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
- 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
+ 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
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
- Bash:
+ b\bba\bas\bsh\bh:
$\b$i\bif\bf Bash
# Quote the current or previous word
"!_\bn" history expansion 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
- of the previous history entry). With an argument, behave
+ 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 argument
- of each line in turn. The history expansion facilities are used
- to extract the last argument, as if the "!$" history expansion
- had been specified.
+ 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). The history expansion facilities are used to
+ extract the last argument, 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 as the shell does. This performs alias and his-
tory expansion as well as all of the shell word expansions. See
moves _\bn positions forward in the list of matches; a negative
argument may be used to move backward through the list. This
command is intended to be bound to T\bTA\bAB\bB, but is unbound by
- default.\bc\bc
- m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-k\bkr\brd\bd
- Identicw\bw\bal to m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be, but moves backward through the list
+ 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
negative argument. 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
A character is read and point is moved to the previous occur-
rence of that character. A negative count searches for subse-
quent occurrences.
- s\bsk\bki\bip\bp-\b-c\bcs\bsi\bi-\b-s\bse\beq\bqu\bue\ben\bnc\bce\be (\b()\b)
+ 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. Such sequences begin
with a Control Sequence Indicator (CSI), usually ESC-[. If this
word is a full pathname, a compspec for the full pathname is searched
for first. If no compspec is found for the full pathname, an attempt
is made to find a compspec for the portion following the final slash.
- If those searches to not result in a compspec, any compspec defined
+ If those searches do not result in a compspec, any compspec defined
with the -\b-D\bD option to c\bco\bom\bmp\bpl\ble\bet\bte\be is used as the default.
Once a compspec has been found, it is used to generate the list of
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 compspec for that command. This allows a set of com-
- pletions to be built dynamically as completion is attempted, rather
+ attempt to find a new compspec for that command. This allows a set of
+ completions to be built dynamically as completion is attempted, rather
than being loaded all at once.
For instance, assuming that there is a library of compspecs, each kept
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 a command line entry in the his-
- tory list.
+ tory list. 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 command line _\bn.
- !\b!-\b-_\bn Refer to the current command line minus _\bn.
+ !\b!-\b-_\bn Refer to the current command minus _\bn.
!\b!!\b! Refer to the previous command. This is a synonym for `!-1'.
!\b!_\bs_\bt_\br_\bi_\bn_\bg
- Refer to the most recent command starting with _\bs_\bt_\br_\bi_\bn_\bg.
+ 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 containing _\bs_\bt_\br_\bi_\bn_\bg. The trail-
- ing ?\b? may be omitted if _\bs_\bt_\br_\bi_\bn_\bg is followed immediately by a new-
- line.
+ Refer to the most recent command preceding the current postition
+ 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.
^\b^_\bs_\bt_\br_\bi_\bn_\bg_\b1^\b^_\bs_\bt_\br_\bi_\bn_\bg_\b2^\b^
- Quick substitution. Repeat the last 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\bd-\b-
- i\bif\bfi\bie\ber\brs\bs below).
+ 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.
W\bWo\bor\brd\bd D\bDe\bes\bsi\big\bgn\bna\bat\bto\bor\brs\bs
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. With-
+ tion or a script executed with the .\b. or s\bso\bou\bur\brc\bce\be builtins). With-
out _\be_\bx_\bp_\br, c\bca\bal\bll\ble\ber\br displays the line number and source filename of
the current subroutine call. If a non-negative integer is sup-
plied as _\be_\bx_\bp_\br, c\bca\bal\bll\ble\ber\br displays the line number, subroutine name,
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-P\bP] [_\bd_\bi_\br]
+ c\bcd\bd [-\b-L\bL|[-\b-P\bP [-\b-e\be]]] [_\bd_\bi_\br]
Change the current directory to _\bd_\bi_\br. The variable H\bHO\bOM\bME\bE is the
default _\bd_\bi_\br. The variable C\bCD\bDP\bPA\bAT\bTH\bH defines the search path for
the directory containing _\bd_\bi_\br. Alternative directory names in
option says to use the physical directory structure instead of
following symbolic links (see also the -\b-P\bP option to the s\bse\bet\bt
builtin command); the -\b-L\bL option forces symbolic links to be fol-
- lowed. An argument of -\b- is equivalent to $\b$O\bOL\bLD\bDP\bPW\bWD\bD. If a non-
- empty directory name from C\bCD\bDP\bPA\bAT\bTH\bH is used, or if -\b- is the first
- argument, and the directory change is successful, the absolute
- pathname of the new working directory is written to the standard
- output. The return value is true if the directory was success-
+ lowed. If the -\b-e\be option is supplied with -\b-P\bP, and the current
+ working directory cannot be successfully determined after a suc-
+ cessful directory change, c\bcd\bd will return an unsuccessful status.
+ An argument of -\b- is equivalent to $\b$O\bOL\bLD\bDP\bPW\bWD\bD. If a non-empty
+ directory name from C\bCD\bDP\bPA\bAT\bTH\bH is used, or if -\b- is the first argu-
+ ment, and the directory change is successful, the absolute path-
+ name of the new working directory is written to the standard
+ output. The return value is true if the directory was success-
fully 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 ...]
- Run _\bc_\bo_\bm_\bm_\ba_\bn_\bd with _\ba_\br_\bg_\bs suppressing the normal shell function
- lookup. Only builtin commands or commands found in the P\bPA\bAT\bTH\bH are
- executed. If the -\b-p\bp option is given, 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 standard utilities. If either the -\b-V\bV or -\b-v\bv
+ Run _\bc_\bo_\bm_\bm_\ba_\bn_\bd with _\ba_\br_\bg_\bs suppressing the normal shell function
+ lookup. Only builtin commands or commands found in the P\bPA\bAT\bTH\bH are
+ executed. If the -\b-p\bp option is given, 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 standard utilities. If either the -\b-V\bV or -\b-v\bv
option is supplied, a description of _\bc_\bo_\bm_\bm_\ba_\bn_\bd is printed. The -\b-v\bv
- option causes a single word indicating the command or file name
+ option causes a single word indicating the command or file name
used to invoke _\bc_\bo_\bm_\bm_\ba_\bn_\bd to be displayed; 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 0 if _\bc_\bo_\bm_\bm_\ba_\bn_\bd was found, and 1 if not. If
+ more verbose description. If the -\b-V\bV or -\b-v\bv option is supplied,
+ the exit status is 0 if _\bc_\bo_\bm_\bm_\ba_\bn_\bd was found, and 1 if not. If
neither option is supplied and an error occurred or _\bc_\bo_\bm_\bm_\ba_\bn_\bd can-
- not be found, the exit status is 127. Otherwise, the exit sta-
+ not be found, the exit status is 127. Otherwise, the exit sta-
tus 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 [_\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
- builtin with the exception of -\b-p\bp and -\b-r\br, and write the matches
- to the standard output. When using the -\b-F\bF or -\b-C\bC options, the
- various shell variables set by the programmable completion
+ 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 exception of -\b-p\bp and -\b-r\br, and write the matches
+ to the standard output. When using the -\b-F\bF or -\b-C\bC options, the
+ various shell variables set by the programmable completion
facilities, while available, will not have useful values.
- The matches will be generated in the same way as if the pro-
- grammable completion code had generated them directly from a
+ The matches will be generated in the same way as if the pro-
+ grammable completion code had generated them directly from a
completion specification with the same flags. If _\bw_\bo_\br_\bd is speci-
fied, only those completions matching _\bw_\bo_\br_\bd will be displayed.
- 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\bE] [-\b-A\bA _\ba_\bc_\bt_\bi_\bo_\bn] [-\b-G\bG _\bg_\bl_\bo_\bb_\b-
+ 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\bE] [-\b-A\bA _\ba_\bc_\bt_\bi_\bo_\bn] [-\b-G\bG _\bg_\bl_\bo_\bb_\b-
_\bp_\ba_\bt] [-\b-W\bW _\bw_\bo_\br_\bd_\bl_\bi_\bs_\bt] [-\b-F\bF _\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn] [-\b-C\bC _\bc_\bo_\bm_\bm_\ba_\bn_\bd]
[-\b-X\bX _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt] [-\b-P\bP _\bp_\br_\be_\bf_\bi_\bx] [-\b-S\bS _\bs_\bu_\bf_\bf_\bi_\bx] _\bn_\ba_\bm_\be [_\bn_\ba_\bm_\be _\b._\b._\b.]
c\bco\bom\bmp\bpl\ble\bet\bte\be -\b-p\bpr\br [-\b-D\bDE\bE] [_\bn_\ba_\bm_\be ...]
- Specify how arguments to each _\bn_\ba_\bm_\be should be completed. If the
- -\b-p\bp option is supplied, or if no options are supplied, existing
- completion specifications are printed in a way that allows them
+ Specify how arguments to each _\bn_\ba_\bm_\be should be completed. If the
+ -\b-p\bp option is supplied, or if no options are supplied, existing
+ completion specifications are printed in a way that allows them
to be reused as input. The -\b-r\br option removes a completion spec-
- ification for each _\bn_\ba_\bm_\be, or, if no _\bn_\ba_\bm_\bes are supplied, all com-
+ ification for each _\bn_\ba_\bm_\be, or, if no _\bn_\ba_\bm_\bes are supplied, all com-
pletion specifications. The -\b-D\bD option indicates that the
- remaining 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\bE
- option indicates that the remaining options and actions should
- apply to ``empty'' command completion; that is, completion
+ remaining 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\bE
+ option indicates that the remaining options and actions should
+ apply to ``empty'' command completion; that is, completion
attempted on a blank line.
- The process of applying these completion specifications when
- word completion is attempted is described above under P\bPr\bro\bo-\b-
+ The process of applying these completion specifications when
+ word completion is attempted is described above under P\bPr\bro\bo-\b-
g\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 readline's default filename completion if
+ d\bde\bef\bfa\bau\bul\blt\bt Use readline'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 readline that the compspec generates file-
- names, so it can perform any filename-specific
- processing (like adding a slash to directory
- names, quoting special characters, or suppress-
- ing trailing spaces). Intended to be used with
+ Tell readline that the compspec generates file-
+ names, so it can perform any filename-specific
+ processing (like adding a slash to directory
+ names, quoting special characters, or suppress-
+ ing trailing spaces). Intended to be used with
shell functions.
- n\bno\bos\bsp\bpa\bac\bce\be Tell readline not to append a space (the
- default) to words completed at the end of the
+ n\bno\bos\bsp\bpa\bac\bce\be Tell readline not to append a space (the
+ default) to words completed at the end of the
line.
p\bpl\blu\bus\bsd\bdi\bir\brs\bs
- After any matches defined by the compspec are
- generated, directory name completion is
- attempted and any matches are added to the
+ After any matches defined by the compspec are
+ generated, directory name completion is
+ attempted and any matches are added to the
results of the other actions.
-\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 names. May also be specified as -\b-f\bf.
f\bfu\bun\bnc\bct\bti\bio\bon\bn
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.
v\bva\bar\bri\bia\bab\bbl\ble\be
Names of all shell variables. May also be spec-
ified as -\b-v\bv.
- -\b-G\bG _\bg_\bl_\bo_\bb_\bp_\ba_\bt
- The pathname expansion pattern _\bg_\bl_\bo_\bb_\bp_\ba_\bt is expanded to
- generate the possible completions.
- -\b-W\bW _\bw_\bo_\br_\bd_\bl_\bi_\bs_\bt
- The _\bw_\bo_\br_\bd_\bl_\bi_\bs_\bt is split using the characters in the I\bIF\bFS\bS
- special variable as delimiters, and each resultant word
- is expanded. The possible completions are the members
- of the resultant list which match the word being com-
- pleted.
-\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.
shell environment. When it finishes, the possible com-
pletions are retrieved from the value of the C\bCO\bOM\bMP\bPR\bRE\bEP\bPL\bLY\bY
array variable.
- -\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.
- 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
- case, any completion not matching _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt is removed.
+ -\b-G\bG _\bg_\bl_\bo_\bb_\bp_\ba_\bt
+ The pathname expansion pattern _\bg_\bl_\bo_\bb_\bp_\ba_\bt is expanded to
+ generate the possible completions.
-\b-P\bP _\bp_\br_\be_\bf_\bi_\bx
- _\bp_\br_\be_\bf_\bi_\bx is added at the beginning of each possible com-
+ _\bp_\br_\be_\bf_\bi_\bx is added at the beginning of each possible com-
pletion after all other options have been applied.
-\b-S\bS _\bs_\bu_\bf_\bf_\bi_\bx
_\bs_\bu_\bf_\bf_\bi_\bx is appended to each possible completion after all
other options have been applied.
-
- The return value is true unless an invalid option is supplied,
- an option other than -\b-p\bp or -\b-r\br is supplied without a _\bn_\ba_\bm_\be argu-
- ment, an attempt is made to remove a completion specification
+ -\b-W\bW _\bw_\bo_\br_\bd_\bl_\bi_\bs_\bt
+ The _\bw_\bo_\br_\bd_\bl_\bi_\bs_\bt is split using the characters in the I\bIF\bFS\bS
+ special variable as delimiters, and each resultant word
+ is expanded. The possible completions are the members
+ of the resultant list which match 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.
+ 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
+ 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,
+ an option other than -\b-p\bp or -\b-r\br is supplied without a _\bn_\ba_\bm_\be argu-
+ ment, an attempt is made to remove a completion specification
for a _\bn_\ba_\bm_\be for which no specification exists, or an error 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\bE] [+\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_\bt_\bi_\bo_\bns, or for the currently-execution completion if no _\bn_\ba_\bm_\bes
- are supplied. If no _\bo_\bp_\bt_\bi_\bo_\bns are given, 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
- described above. The -\b-D\bD option indicates that the remaining
+ _\bo_\bp_\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 given, 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
+ described above. The -\b-D\bD option indicates that the remaining
options 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\bE option indicates that the
- remaining options should apply to ``empty'' command completion;
+ is, completion attempted on a command for which no completion
+ has previously been defined. The -\b-E\bE option indicates that the
+ remaining options should apply to ``empty'' command completion;
that is, completion attempted on a blank line.
- 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 comple-
- tion specification exists, or an output error occurs.
+ 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]
Resume 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, resume at the _\bnth enclosing
- loop. _\bn must be >= 1. If _\bn is greater than the number of
- enclosing loops, the last enclosing loop (the ``top-level''
+ s\bse\bel\ble\bec\bct\bt loop. If _\bn is specified, resume at the _\bnth enclosing
+ loop. _\bn must be >= 1. If _\bn is greater than the number of
+ enclosing loops, the last enclosing loop (the ``top-level''
loop) is resumed. 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\bFi\bil\blr\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\bFi\bil\blr\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
- given then display the values of variables. The -\b-p\bp option will
+ d\bde\bec\bcl\bla\bar\bre\be [-\b-a\baA\bAf\bfF\bFg\bgi\bil\blr\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\bil\blr\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
+ given then display the values of variables. 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 are ignored. When -\b-p\bp is
- supplied without _\bn_\ba_\bm_\be arguments, it 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\bp, d\bde\bec\bcl\bla\bar\bre\be will display the attributes and values of all shell
- variables. The -\b-f\bf option will restrict the display to shell
+ supplied without _\bn_\ba_\bm_\be arguments, it 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\bp, d\bde\bec\bcl\bla\bar\bre\be will display the attributes and values of all shell
+ variables. The -\b-f\bf option will restrict the display to shell
functions. The -\b-F\bF option inhibits the display of function defi-
- nitions; 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
+ nitions; 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 the function is defined are dis-
- played as well. The -\b-F\bF option implies -\b-f\bf. The following
- options can be used to restrict output to variables with the
- specified attribute or to give variables attributes:
+ played 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 global scope, even
+ when d\bde\bec\bcl\bla\bar\bre\be is executed in a shell function. It is ignored in
+ all other cases. The following options can be used to restrict
+ output to variables with the specified attribute or to give
+ variables attributes:
-\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
Using `+' instead of `-' turns off the attribute instead, with
the exceptions that +\b+a\ba may not be used to destroy an array vari-
able and +\b+r\br will not remove the readonly attribute. When used
- in a function, makes each _\bn_\ba_\bm_\be local, as with the l\blo\boc\bca\bal\bl command.
- If a variable name is followed by =_\bv_\ba_\bl_\bu_\be, the value of the vari-
- able is set to _\bv_\ba_\bl_\bu_\be. 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
- 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 read-
- only variable, an attempt is made to turn off array status for
- an array variable, or an attempt is made to display a non-exis-
- tent function with -\b-f\bf.
-
- d\bdi\bir\brs\bs [\b[+\b+_\bn]\b] [\b[-\b-_\bn]\b] [\b[-\b-c\bcp\bpl\blv\bv]\b]
+ in a function, makes each _\bn_\ba_\bm_\be local, as with the l\blo\boc\bca\bal\bl command,
+ unless the -\b-g\bgP\bP o\bop\bpt\bti\bio\bon\bn i\bis\bs s\bsu\bup\bpp\bpl\bli\bie\bed\bd,\b, I\bIf\bf a\ba v\bva\bar\bri\bia\bab\bbl\ble\be n\bna\bam\bme\be i\bis\bs f\bfo\bol\bl-\b-
+ l\blo\bow\bwe\bed\bd b\bby\by =\b=_\bv_\ba_\bl_\bu_\be,\b, t\bth\bhe\be v\bva\bal\blu\bue\be o\bof\bf t\bth\bhe\be v\bva\bar\bri\bia\bab\bbl\ble\be i\bis\bs s\bse\bet\bt t\bto\bo _\bv_\ba_\bl_\bu_\be.\b. T\bTh\bhe\be
+ r\bre\bet\btu\bur\brn\bn v\bva\bal\blu\bue\be i\bis\bs 0\b0 u\bun\bnl\ble\bes\bss\bs a\ban\bn i\bin\bnv\bva\bal\bli\bid\bd o\bop\bpt\bti\bio\bon\bn i\bis\bs e\ben\bnc\bco\bou\bun\bnt\bte\ber\bre\bed\bd,\b, a\ban\bn
+ a\bat\btt\bte\bem\bmp\bpt\bt i\bis\bs m\bma\bad\bde\be t\bto\bo d\bde\bef\bfi\bin\bne\be a\ba f\bfu\bun\bnc\bct\bti\bio\bon\bn u\bus\bsi\bin\bng\bg `\b``\b`-\b-f\bf f\bfo\boo\bo=\b=b\bba\bar\br'\b''\b',\b, a\ban\bn
+ a\bat\btt\bte\bem\bmp\bpt\bt i\bis\bs m\bma\bad\bde\be t\bto\bo a\bas\bss\bsi\big\bgn\bn a\ba v\bva\bal\blu\bue\be t\bto\bo a\ba r\bre\bea\bad\bdo\bon\bnl\bly\by v\bva\bar\bri\bia\bab\bbl\ble\be,\b, a\ban\bn
+ a\bat\btt\bte\bem\bmp\bpt\bt i\bis\bs m\bma\bad\bde\be t\bto\bo a\bas\bss\bsi\big\bgn\bn a\ba v\bva\bal\blu\bue\be t\bto\bo a\ban\bn a\bar\brr\bra\bay\by v\bva\bar\bri\bia\bab\bbl\ble\be w\bwi\bit\bth\bho\bou\but\bt
+ u\bus\bsi\bin\bng\bg t\bth\bhe\be c\bco\bom\bmp\bpo\bou\bun\bnd\bd a\bas\bss\bsi\big\bgn\bnm\bme\ben\bnt\bt s\bsy\byn\bnt\bta\bax\bx (\b(s\bse\bee\be 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
+ attempt is made to display a non-existent function with -\b-f\bf.
+
+ d\bdi\bir\brs\bs [\b[+\b+_\bn]\b] [\b[-\b-_\bn]\b] [\b[-\b-c\bcl\blp\bpv\bv]\b]
Without options, displays the list of currently remembered
directories. The default display is on a single line with
directory names separated by spaces. Directories are added to
\\b\a\ba alert (bell)
\\b\b\bb backspace
\\b\c\bc suppress further output
- \\b\e\be an escape character
+ \\b\e\be
+ \\b\E\bE an escape character
\\b\f\bf form feed
\\b\n\bn new line
\\b\r\br carriage return
_\bn_\bn_\bn (zero to three octal digits)
\\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
+ 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
+ hexadecimal value _\bH_\bH_\bH_\bH_\bH_\bH_\bH_\bH (one to eight hex digits)
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
When the end of options is encountered, 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 n\bna\bam\bme\be is set to ?.
+ 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 given in _\ba_\br_\bg_\bs, g\bge\bet\bto\bop\bpt\bts\bs parses those instead.
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]
- For each _\bn_\ba_\bm_\be, the full file name of the command is determined
- by searching the directories in $\b$P\bPA\bAT\bTH\bH and remembered. If the -\b-p\bp
- option is supplied, no path search is performed, and _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be is
- used as the full file name of the command. The -\b-r\br option causes
- the shell to forget all remembered locations. The -\b-d\bd option
- causes the shell to forget the remembered location of each _\bn_\ba_\bm_\be.
- If the -\b-t\bt option is supplied, the full pathname to which each
- _\bn_\ba_\bm_\be corresponds is printed. If multiple _\bn_\ba_\bm_\be arguments are
- supplied with -\b-t\bt, the _\bn_\ba_\bm_\be is printed before the hashed full
- pathname. The -\b-l\bl option causes output to be displayed in a for-
- mat that may be reused as input. If no arguments are given, or
- if only -\b-l\bl is supplied, information about remembered commands is
- printed. The return status is true unless a _\bn_\ba_\bm_\be is not found
- or an invalid option is supplied.
+ Each time h\bha\bas\bsh\bh is invoked, the full pathname of the command _\bn_\ba_\bm_\be
+ is determined by searching the directories in $\b$P\bPA\bAT\bTH\bH and remem-
+ bered. Any previously-remembered pathname is discarded. If the
+ -\b-p\bp option is supplied, no path search is performed, and _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
+ is used as the full file name of the command. The -\b-r\br option
+ causes the shell to forget all remembered locations. The -\b-d\bd
+ option causes the shell to forget the remembered location of
+ each _\bn_\ba_\bm_\be. If the -\b-t\bt option is supplied, the full pathname to
+ which each _\bn_\ba_\bm_\be corresponds is printed. If multiple _\bn_\ba_\bm_\be argu-
+ ments are supplied with -\b-t\bt, the _\bn_\ba_\bm_\be is printed before the
+ hashed full pathname. The -\b-l\bl option causes output to be dis-
+ played in a format that may be reused as input. If no arguments
+ are given, or if only -\b-l\bl is supplied, information about remem-
+ bered commands is printed. The return status is true unless a
+ _\bn_\ba_\bm_\be is not found or an invalid 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; otherwise help for all the builtins and shell control
+ 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; otherwise help for all the builtins and shell control
structures is printed.
-\b-d\bd Display a short description of each _\bp_\ba_\bt_\bt_\be_\br_\bn
-\b-m\bm Display the description of each _\bp_\ba_\bt_\bt_\be_\br_\bn in a manpage-like
h\bhi\bis\bst\bto\bor\bry\by -\b-s\bs _\ba_\br_\bg [_\ba_\br_\bg _\b._\b._\b.]
With no options, display the command history list with line num-
bers. Lines listed with a *\b* have been modified. An argument of
- _\bn lists only the last _\bn lines. 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. No intervening blank is printed between
- the formatted time stamp and the history line. If _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be is
- supplied, it is used as the name of the history file; if not,
- the value of H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE is used. Options, if supplied, have the
+ _\bn lists only the last _\bn lines. 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. No intervening blank is printed between
+ the formatted time stamp and the history line. If _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be is
+ supplied, it is used as the name of the history file; if not,
+ the value of H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE is used. Options, if supplied, have the
following meanings:
-\b-c\bc Clear the history list by deleting all the entries.
-\b-d\bd _\bo_\bf_\bf_\bs_\be_\bt
Delete the history entry at position _\bo_\bf_\bf_\bs_\be_\bt.
- -\b-a\ba Append the ``new'' history lines (history lines entered
- since the beginning of the current b\bba\bas\bsh\bh session) to the
+ -\b-a\ba Append the ``new'' history lines (history lines entered
+ since the beginning of the current b\bba\bas\bsh\bh session) to the
history file.
- -\b-n\bn Read the history lines not already read from the history
- file into the current history list. These are lines
- appended to the history file since the beginning of the
+ -\b-n\bn Read the history lines not already read from the history
+ file into the current history list. These are lines
+ appended to the history file since the beginning of the
current b\bba\bas\bsh\bh session.
-\b-r\br Read the contents of the history file and use them as the
current history.
- -\b-w\bw Write the current history to the history file, overwrit-
+ -\b-w\bw Write the current history to the history file, overwrit-
ing the history file's contents.
- -\b-p\bp Perform history substitution on the following _\ba_\br_\bg_\bs and
- display the result on the standard output. Does not
- store 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. Does not
+ store 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
the _\ba_\br_\bg_\bs are added.
- If the H\bHI\bIS\bST\bTT\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT variable is set, the time stamp informa-
- tion associated with each history entry is written to the his-
- tory file, marked with the history comment character. When the
- history file is read, lines beginning with the history comment
- character followed immediately by a digit are interpreted as
+ If the H\bHI\bIS\bST\bTT\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT variable is set, the time stamp informa-
+ tion associated with each history entry is written to the his-
+ tory file, marked with the history comment character. When the
+ history file is read, lines beginning with the history comment
+ character followed immediately by a digit are interpreted as
timestamps for the previous history line. 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 is sup-
+ unless an invalid option is encountered, an error occurs while
+ reading or writing the history file, an invalid _\bo_\bf_\bf_\bs_\be_\bt is sup-
plied 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-p\bp List only the process ID of the job's process group
- leader.
-\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
+ leader.
-\b-r\br Restrict output to running jobs.
-\b-s\bs Restrict output to stopped jobs.
- If _\bj_\bo_\bb_\bs_\bp_\be_\bc is given, output is restricted to information about
- that job. The return status is 0 unless an invalid option is
+ If _\bj_\bo_\bb_\bs_\bp_\be_\bc is given, output is restricted 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.
If the -\b-x\bx option is supplied, j\bjo\bob\bbs\bs replaces any _\bj_\bo_\bb_\bs_\bp_\be_\bc found in
- _\bc_\bo_\bm_\bm_\ba_\bn_\bd or _\ba_\br_\bg_\bs with the corresponding process group ID, and
+ _\bc_\bo_\bm_\bm_\ba_\bn_\bd or _\ba_\br_\bg_\bs with the corresponding process group ID, and
executes _\bc_\bo_\bm_\bm_\ba_\bn_\bd passing it _\ba_\br_\bg_\bs, returning its exit status.
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] [_\bp_\bi_\bd | _\bj_\bo_\bb_\bs_\bp_\be_\bc] ...
k\bki\bil\bll\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 named by _\bs_\bi_\bg_\bs_\bp_\be_\bc or _\bs_\bi_\bg_\bn_\bu_\bm to the processes
- named by _\bp_\bi_\bd or _\bj_\bo_\bb_\bs_\bp_\be_\bc. _\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 signal number; _\bs_\bi_\bg_\bn_\bu_\bm is a signal number. If _\bs_\bi_\bg_\bs_\bp_\be_\bc is not
- present, then S\bSI\bIG\bGT\bTE\bER\bRM\bM is assumed. An argument of -\b-l\bl lists the
- signal names. If any arguments are supplied when -\b-l\bl is given,
- the names of the signals corresponding to the arguments are
+ Send the signal named by _\bs_\bi_\bg_\bs_\bp_\be_\bc or _\bs_\bi_\bg_\bn_\bu_\bm to the processes
+ named by _\bp_\bi_\bd or _\bj_\bo_\bb_\bs_\bp_\be_\bc. _\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 signal number; _\bs_\bi_\bg_\bn_\bu_\bm is a signal number. If _\bs_\bi_\bg_\bs_\bp_\be_\bc is not
+ present, then S\bSI\bIG\bGT\bTE\bER\bRM\bM is assumed. An argument of -\b-l\bl lists the
+ signal names. If any arguments are supplied when -\b-l\bl is given,
+ the names of the signals corresponding to the arguments are
listed, 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 signal number or the exit
- status of a process terminated by a signal. k\bki\bil\bll\bl returns true
- if at least one signal was successfully sent, or false if an
+ -\b-l\bl is a number specifying either a signal number or the exit
+ status of a process terminated by a signal. 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 an arithmetic expression to be evaluated (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
+ 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; 0 is returned otherwise.
l\blo\boc\bca\bal\bl [_\bo_\bp_\bt_\bi_\bo_\bn] [_\bn_\ba_\bm_\be[=_\bv_\ba_\bl_\bu_\be] ...]
- For each argument, a local variable named _\bn_\ba_\bm_\be is created, and
- assigned _\bv_\ba_\bl_\bu_\be. The _\bo_\bp_\bt_\bi_\bo_\bn can be any of the options accepted
+ For each argument, a local variable named _\bn_\ba_\bm_\be is created, and
+ assigned _\bv_\ba_\bl_\bu_\be. The _\bo_\bp_\bt_\bi_\bo_\bn can be any of the options accepted
by d\bde\bec\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-
+ variable _\bn_\ba_\bm_\be to have a visible scope restricted to that func-
tion and its children. With no operands, l\blo\boc\bca\bal\bl writes a list of
- local variables to the standard output. It is an error to use
+ local variables to the standard output. It is an error to use
l\blo\boc\bca\bal\bl when not within 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,
+ 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 Exit a login shell.
- m\bma\bap\bpf\bfi\bil\ble\be [-\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]
+ m\bma\bap\bpf\bfi\bil\ble\be [-\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-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]
+ r\bre\bea\bad\bda\bar\brr\bra\bay\by [-\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 into the indexed array vari-
- able _\ba_\br_\br_\ba_\by, or from file descriptor _\bf_\bd if the -\b-u\bu option is sup-
- plied. 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 into the indexed array vari-
+ able _\ba_\br_\br_\ba_\by, or from file descriptor _\bf_\bd if the -\b-u\bu option is sup-
+ plied. 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-n\bn Copy at most _\bc_\bo_\bu_\bn_\bt lines. If _\bc_\bo_\bu_\bn_\bt is 0, all lines are
+ -\b-n\bn Copy at most _\bc_\bo_\bu_\bn_\bt lines. If _\bc_\bo_\bu_\bn_\bt is 0, all lines are
copied.
- -\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 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 as an additional argument. _\bc_\ba_\bl_\bl_\b-
- _\bb_\ba_\bc_\bk is evaluated after the line is read but before the array
- element is assigned.
+ 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
+ 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
+ If not supplied with an explicit origin, m\bma\bap\bpf\bfi\bil\ble\be will clear
_\ba_\br_\br_\ba_\by before assigning to it.
- m\bma\bap\bpf\bfi\bil\ble\be returns successfully unless an invalid option or option
- argument is supplied, _\ba_\br_\br_\ba_\by is invalid or unassignable, or if
+ m\bma\bap\bpf\bfi\bil\ble\be returns successfully 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 not an indexed array.
p\bpo\bop\bpd\bd [-n\bn] [+_\bn] [-_\bn]
- Removes entries from the directory stack. With no arguments,
- removes the top directory from the stack, and performs a c\bcd\bd to
+ Removes entries from the directory stack. With no arguments,
+ removes the top directory from the stack, and performs a c\bcd\bd to
the new top directory. Arguments, if supplied, have the follow-
ing meanings:
- -\b-n\bn Suppresses the normal change of directory when removing
- directories from the stack, so that only the stack is
+ -\b-n\bn Suppresses the normal change of directory when removing
+ directories from the stack, so that only the stack is
manipulated.
- +\b+_\bn Removes the _\bnth entry counting from the left of the list
- shown by d\bdi\bir\brs\bs, starting with zero. For example: ``popd
+ +\b+_\bn Removes the _\bnth entry counting from the left of the list
+ shown by d\bdi\bir\brs\bs, starting with zero. For example: ``popd
+0'' removes the first directory, ``popd +1'' the second.
-\b-_\bn Removes 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
+ 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 p\bpo\bop\bpd\bd command is successful, a d\bdi\bir\brs\bs is performed as well,
- and the return status is 0. p\bpo\bop\bpd\bd returns false if an invalid
+ If the p\bpo\bop\bpd\bd command is successful, a d\bdi\bir\brs\bs is performed as well,
+ and the return status is 0. p\bpo\bop\bpd\bd returns false if an invalid
option is encountered, the directory stack is empty, a non-exis-
tent directory stack entry is specified, or the directory change
fails.
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 _\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 for-
- mat 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(1) for-
- mats, %\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 (except that \\b\c\bc terminates output,
- backslashes in \\b\'\b', \\b\"\b", and \\b\?\b? are not removed, and octal escapes
- beginning with \\b\0\b0 may contain up to four digits), and %\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.
-
- The -\b-v\bv option causes the output to be assigned to the variable
- _\bv_\ba_\br rather than being printed to the standard output.
+ 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 causes the output to be
+ assigned to the variable _\bv_\ba_\br rather than being printed 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(1) format specifications, p\bpr\bri\bin\bnt\btf\bf
+ interprets the following extensions:
+ %\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 (except that \\b\c\bc terminates output,
+ backslashes in \\b\'\b', \\b\"\b", and \\b\?\b? are not removed, and octal
+ escapes beginning with \\b\0\b0 may contain up to four digits).
+ %\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%(\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).
+ The corresponding _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt is an integer representing the
+ number of seconds since the epoch. Two special argument
+ values may be used: -1 represents the current time, and
+ -2 represents the time the shell was invoked.
+
+ 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 ASCII value of the following character.
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,
status is false. Any command associated with the R\bRE\bET\bTU\bUR\bRN\bN trap is
executed before execution resumes after the function or script.
- s\bse\bet\bt [-\b--\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] [_\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] [_\ba_\br_\bg ...]
+ s\bse\bet\bt [-\b--\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] [_\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] [_\ba_\br_\bg ...]
Without options, the name and value of each shell variable are
displayed in a format that can be reused as input for setting or
resetting the currently-set variables. Read-only variables can-
easy re-editing of multi-line commands.
c\bco\bom\bmp\bpa\bat\bt3\b31\b1
If set, b\bba\bas\bsh\bh changes its behavior to that of version 3.1
- with respect to quoted arguments to the conditional com-
- mand's =~ operator.
+ with respect to quoted arguments to the [\b[[\b[ conditional
+ command's =\b=~\b~ operator.
c\bco\bom\bmp\bpa\bat\bt3\b32\b2
If set, b\bba\bas\bsh\bh changes its behavior to that of version 3.2
with respect to locale-specific string comparison when
- using the conditional command's < and > operators.
+ using the [\b[[\b[ conditional command's <\b< and >\b> operators.
+ Bash versions prior to bash-4.1 use ASCII collation 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\b40\b0
If set, b\bba\bas\bsh\bh changes its behavior to that of version 4.0
- with respect to locale-specific string comparison when
- using the conditional command's < and > operators and
- the effect of interrupting a command list.
+ with respect to locale-specific string comparison when
+ using the [\b[[\b[ conditional command's <\b< and >\b> operators
+ (see previous item) and the effect of interrupting a
+ command list.
+ c\bco\bom\bmp\bpa\bat\bt4\b41\b1
+ @item compat41 If set, b\bba\bas\bsh\bh, when in posix mode, treats
+ a single quote in a double-quoted parameter expansion as
+ a special character. The single quotes must match (an
+ even number) and the characters between the single
+ quotes are considered quoted. This is the behavior of
+ posix mode through version 4.1. The default bash behav-
+ ior remains as in previous versions.
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-
(\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(
- _\bc_\bo_\bm_\bm_\ba_\bn_\bd )\b) inherit the E\bER\bRR\bRO\bOR\bR trap.
+ _\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, 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 are enabled.
e\bex\bxt\btq\bqu\buo\bot\bte\be
and all remaining characters on that line to be ignored
in an 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
+ 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
commands are saved to the history with embedded newlines
rather than using semicolon separators where possible.
Expressions may be combined using the following operators,
listed in decreasing order of precedence. The evaluation
- depends on the number of arguments; see below.
+ depends on the number of arguments; see below. Operator prece-
+ dence is used 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
the normal precedence of operators.
_\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
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
The expression is parsed and evaluated according to
precedence using the rules listed above.
- t\bti\bim\bme\bes\bs Print the accumulated user and system times for the shell and
+ When used with t\bte\bes\bst\bt or [\b[, the <\b< and >\b> operators sort lexico-
+ graphically using ASCII ordering.
+
+ 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\bp] [[_\ba_\br_\bg] _\bs_\bi_\bg_\bs_\bp_\be_\bc ...]
- The command _\ba_\br_\bg is to be read and executed when the shell
- receives signal(s) _\bs_\bi_\bg_\bs_\bp_\be_\bc. If _\ba_\br_\bg is absent (and there is a
- single _\bs_\bi_\bg_\bs_\bp_\be_\bc) or -\b-, each specified signal is reset to its
- original disposition (the value it had upon entrance to the
- shell). If _\ba_\br_\bg 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 _\ba_\br_\bg is not present and -\b-p\bp has been supplied, then the trap
- commands associated with each _\bs_\bi_\bg_\bs_\bp_\be_\bc are displayed. If no
- arguments are supplied or if only -\b-p\bp is given, t\btr\bra\bap\bp prints the
- list of commands associated with each signal. The -\b-l\bl option
- causes the shell to print a list of signal names and their cor-
- responding 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 insensitive and the SIG prefix is optional.
-
- If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is E\bEX\bXI\bIT\bT (0) the command _\ba_\br_\bg is executed on exit
- from the shell. If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is D\bDE\bEB\bBU\bUG\bG, the command _\ba_\br_\bg is exe-
- cuted 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, every arithmetic _\bf_\bo_\br command, 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 option to the
+ The command _\ba_\br_\bg is to be read and executed when the shell
+ receives signal(s) _\bs_\bi_\bg_\bs_\bp_\be_\bc. If _\ba_\br_\bg is absent (and there is a
+ single _\bs_\bi_\bg_\bs_\bp_\be_\bc) or -\b-, each specified signal is reset to its
+ original disposition (the value it had upon entrance to the
+ shell). If _\ba_\br_\bg 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 _\ba_\br_\bg is not present and -\b-p\bp has been supplied, then the trap
+ commands associated with each _\bs_\bi_\bg_\bs_\bp_\be_\bc are displayed. If no
+ arguments are supplied or if only -\b-p\bp is given, t\btr\bra\bap\bp prints the
+ list of commands associated with each signal. The -\b-l\bl option
+ causes the shell to print a list of signal names and their cor-
+ responding 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 insensitive and the S\bSI\bIG\bG prefix is optional.
+
+ If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is E\bEX\bXI\bIT\bT (0) the command _\ba_\br_\bg is executed on exit
+ from the shell. If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is D\bDE\bEB\bBU\bUG\bG, the command _\ba_\br_\bg is exe-
+ cuted 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, every arithmetic _\bf_\bo_\br command, 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 option to the
s\bsh\bho\bop\bpt\bt builtin for details of its effect 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, the command _\ba_\br_\bg is executed each time a shell
function or a script executed with the .\b. or s\bso\bou\bur\brc\bce\be builtins fin-
If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is E\bER\bRR\bR, the command _\ba_\br_\bg is executed whenever a sim-
ple command has 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 keyword, part of the test in an _\bi_\bf statement, part of a
- command executed in a &\b&&\b& or |\b||\b| list, or if the command's return
- value is being inverted via !\b!. These are the same conditions
+ 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 keyword, part of the test in an _\bi_\bf statement, part of a
+ command executed in a &\b&&\b& or |\b||\b| list, or if the command's return
+ value is being inverted via !\b!. These are the same conditions
obeyed by the e\ber\brr\bre\bex\bxi\bit\bt option.
- Signals ignored upon entry to the shell cannot be trapped or
- reset. Trapped signals that are not being ignored are reset to
+ Signals ignored upon entry to the shell cannot be trapped or
+ reset. 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 _\bs_\bi_\bg_\bs_\bp_\be_\bc is
+ 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\bty\byp\bpe\be [-\b-a\baf\bft\btp\bpP\bP] _\bn_\ba_\bm_\be [_\bn_\ba_\bm_\be ...]
- With no options, indicate how each _\bn_\ba_\bm_\be would be interpreted if
+ With no options, 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 disk file, respectively. If the _\bn_\ba_\bm_\be is not found,
- then nothing is printed, and an exit status of false is
- returned. If the -\b-p\bp option is used, t\bty\byp\bpe\be either returns the
+ 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 disk file, respectively. If the _\bn_\ba_\bm_\be is not found,
+ then nothing is printed, and an exit status of false is
+ returned. If the -\b-p\bp option is used, t\bty\byp\bpe\be either returns the
name of the disk file that would be executed if _\bn_\ba_\bm_\be were speci-
fied as a command name, 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,
+ 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 name'' would not return _\bf_\bi_\bl_\be. If a command is
- hashed, -\b-p\bp and -\b-P\bP print the hashed value, not necessarily the
+ hashed, -\b-p\bp and -\b-P\bP print the hashed value, 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 an executable named _\bn_\ba_\bm_\be.
- This includes aliases and functions, if and only if the -\b-p\bp
- option is not also used. The table of hashed commands is not
- consulted when using -\b-a\ba. The -\b-f\bf option suppresses shell func-
- tion lookup, as with the c\bco\bom\bmm\bma\ban\bnd\bd builtin. t\bty\byp\bpe\be returns true if
+ prints all of the places that contain an executable named _\bn_\ba_\bm_\be.
+ This includes aliases and functions, if and only if the -\b-p\bp
+ option is not also used. The table of hashed commands is not
+ consulted when using -\b-a\ba. The -\b-f\bf option suppresses shell func-
+ tion lookup, as with the c\bco\bom\bmm\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\bST\bTa\bab\bbc\bcd\bde\bef\bfi\bil\blm\bmn\bnp\bpq\bqr\brs\bst\btu\buv\bvx\bx [_\bl_\bi_\bm_\bi_\bt]]
- Provides control over the resources available to the shell and
- to processes started by it, on systems that allow such control.
+ Provides control over the resources available to the shell and
+ to processes started by it, on systems that allow such control.
The -\b-H\bH and -\b-S\bS options specify that 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-
+ 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-
fied, both the soft and hard limits are set. 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, the current value of the
- soft limit of the resource is printed, unless the -\b-H\bH option is
+ current hard limit, the current soft limit, and no limit,
+ respectively. If _\bl_\bi_\bm_\bi_\bt is omitted, the current value of the
+ soft limit of the resource is printed, unless the -\b-H\bH option is
given. When more than one resource is specified, the limit name
and unit are printed before the value. Other options are inter-
preted as follows:
-\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-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
- shell
+ -\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-T\bT The maximum number of threads
If _\bl_\bi_\bm_\bi_\bt is given, it is the new value of the specified resource
(the -\b-a\ba option is display only). If no option is given, then -\b-f\bf
- is assumed. Values are in 1024-byte increments, except for -\b-t\bt,
- which is in seconds, -\b-p\bp, which is in units of 512-byte blocks,
- and -\b-T\bT, -\b-b\bb, -\b-n\bn, and -\b-u\bu, which are unscaled values. The return
+ is assumed. Values are in 1024-byte increments, except for -\b-t\bt,
+ which is in seconds, -\b-p\bp, which is in units of 512-byte blocks,
+ and -\b-T\bT, -\b-b\bb, -\b-n\bn, and -\b-u\bu, which are unscaled values. 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]
The user file-creation mask is set to _\bm_\bo_\bd_\be. If _\bm_\bo_\bd_\be 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
- _\bc_\bh_\bm_\bo_\bd(1). If _\bm_\bo_\bd_\be is omitted, the current value of the mask is
- printed. The -\b-S\bS option causes the mask to be printed in sym-
- bolic form; the default output is an octal number. If the -\b-p\bp
+ a digit, it is interpreted as an octal number; otherwise it is
+ interpreted as a symbolic mode mask similar to that accepted by
+ _\bc_\bh_\bm_\bo_\bd(1). If _\bm_\bo_\bd_\be is omitted, the current value of the mask is
+ printed. The -\b-S\bS option causes the mask to be printed in sym-
+ bolic form; 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 0 if the mode
- was successfully changed or if no _\bm_\bo_\bd_\be argument was supplied,
+ was successfully changed or if no _\bm_\bo_\bd_\be argument was supplied,
and false 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, all alias definitions are removed. The return value
+ Remove each _\bn_\ba_\bm_\be from the list of defined aliases. If -\b-a\ba is
+ supplied, all alias definitions are removed. 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] [_\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 no options are supplied, or the -\b-v\bv option is given, each _\bn_\ba_\bm_\be
- refers to a shell variable. Read-only variables may not be
- unset. If -\b-f\bf is specified, each _\bn_\ba_\bm_\be refers to a shell func-
- tion, and the function definition is removed. Each unset vari-
- able or function is removed from the environment passed to sub-
- sequent commands. If any of C\bCO\bOM\bMP\bP_\b_W\bWO\bOR\bRD\bDB\bBR\bRE\bEA\bAK\bKS\bS, R\bRA\bAN\bND\bDO\bOM\bM, S\bSE\bEC\bCO\bON\bND\bDS\bS,
- L\bLI\bIN\bNE\bEN\bNO\bO, H\bHI\bIS\bST\bTC\bCM\bMD\bD, F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE, G\bGR\bRO\bOU\bUP\bPS\bS, or D\bDI\bIR\bRS\bST\bTA\bAC\bCK\bK are unset, they
- lose their special properties, even if they are subsequently
+ refers to a shell variable. Read-only variables may not be
+ unset. If -\b-f\bf is specified, each _\bn_\ba_\bm_\be refers to a shell func-
+ tion, and the function definition is removed. Each unset vari-
+ able or function is removed from the environment passed to sub-
+ sequent commands. If any of C\bCO\bOM\bMP\bP_\b_W\bWO\bOR\bRD\bDB\bBR\bRE\bEA\bAK\bKS\bS, R\bRA\bAN\bND\bDO\bOM\bM, S\bSE\bEC\bCO\bON\bND\bDS\bS,
+ L\bLI\bIN\bNE\bEN\bNO\bO, H\bHI\bIS\bST\bTC\bCM\bMD\bD, F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE, G\bGR\bRO\bOU\bUP\bPS\bS, or D\bDI\bIR\bRS\bST\bTA\bAC\bCK\bK 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.
w\bwa\bai\bit\bt [_\bn _\b._\b._\b.]
- Wait for each specified process and return its termination sta-
- tus. Each _\bn may be a process ID or a job specification; if a
- job spec is given, all processes in that job's pipeline are
- waited for. If _\bn is not given, all currently active child pro-
- cesses are waited for, and the return status is zero. If _\bn
- specifies a non-existent process or job, the return status is
- 127. Otherwise, the return status is the exit status of the
+ Wait for each specified process and return its termination sta-
+ tus. Each _\bn may be a process ID or a job specification; if a
+ job spec is given, all processes in that job's pipeline are
+ waited for. If _\bn is not given, all currently active child pro-
+ cesses are waited for, and the return status is zero. If _\bn
+ specifies a non-existent process or job, the return status is
+ 127. Otherwise, the return status is the exit status of the
last process or job waited for.
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 restricted. 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 restricted. 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 specifying command names containing /\b/
- +\bo specifying a file name containing a /\b/ as an argument to the .\b.
+ +\bo specifying a file name containing a /\b/ as an argument to the .\b.
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 value of S\bSH\bHE\bEL\bLL\bLO\bOP\bPT\bTS\bS from the shell environment at
+ +\bo parsing the value of S\bSH\bHE\bEL\bLL\bLO\bOP\bPT\bTS\bS from the shell environment at
startup
+\bo redirecting output using the >, >|, <>, >&, &>, and >> redirect-
+\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
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
_\bB_\ba_\bs_\bh _\bR_\be_\bf_\be_\br_\be_\bn_\bc_\be _\bM_\ba_\bn_\bu_\ba_\bl, Brian Fox and Chet Ramey
_\bT_\bh_\be _\bG_\bn_\bu _\bR_\be_\ba_\bd_\bl_\bi_\bn_\be _\bL_\bi_\bb_\br_\ba_\br_\by, Brian Fox and Chet Ramey
_\bT_\bh_\be _\bG_\bn_\bu _\bH_\bi_\bs_\bt_\bo_\br_\by _\bL_\bi_\bb_\br_\ba_\br_\by, Brian Fox and Chet Ramey
- _\bP_\bo_\br_\bt_\ba_\bb_\bl_\be _\bO_\bp_\be_\br_\ba_\bt_\bi_\bn_\bg _\bS_\by_\bs_\bt_\be_\bm _\bI_\bn_\bt_\be_\br_\bf_\ba_\bc_\be _\b(_\bP_\bO_\bS_\bI_\bX_\b) _\bP_\ba_\br_\bt _\b2_\b: _\bS_\bh_\be_\bl_\bl _\ba_\bn_\bd _\bU_\bt_\bi_\bl_\bi_\b-
+ _\bP_\bo_\br_\bt_\ba_\bb_\bl_\be _\bO_\bp_\be_\br_\ba_\bt_\bi_\bn_\bg _\bS_\by_\bs_\bt_\be_\bm _\bI_\bn_\bt_\be_\br_\bf_\ba_\bc_\be _\b(_\bP_\bO_\bS_\bI_\bX_\b) _\bP_\ba_\br_\bt _\b2_\b: _\bS_\bh_\be_\bl_\bl _\ba_\bn_\bd _\bU_\bt_\bi_\bl_\bi_\b-
_\bt_\bi_\be_\bs, IEEE
_\bs_\bh(1), _\bk_\bs_\bh(1), _\bc_\bs_\bh(1)
_\be_\bm_\ba_\bc_\bs(1), _\bv_\bi(1)
_\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._\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,\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\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/_\bb_\ba_\bs_\bh_\b/.
-
- 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! Suggestions and `philosophical' bug reports may
- be mailed to _\bb_\bu_\bg_\b-_\bb_\ba_\bs_\bh_\b@_\bg_\bn_\bu_\b._\bo_\br_\bg or posted to the Usenet newsgroup
+ 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/.
+
+ 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! Suggestions and `philosophical' bug reports may
+ be mailed to _\bb_\bu_\bg_\b-_\bb_\ba_\bs_\bh_\b@_\bg_\bn_\bu_\b._\bo_\br_\bg or posted 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 behaviour
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 sequences of the form `a ; b ; c' are not
- handled gracefully when process suspension is attempted. When a
- process is stopped, the shell immediately executes the next command in
- the sequence. It suffices to place the sequence of commands between
- parentheses to force it into a subshell, which may be stopped as a
+ handled gracefully when process suspension is attempted. When a
+ process is stopped, the shell immediately executes the next command in
+ the sequence. It suffices to place the sequence of commands between
+ parentheses to force it into a subshell, which may be stopped as a
unit.
Array variables may not (yet) be exported.
-GNU Bash-4.1 2009 December 29 BASH(1)
+GNU Bash-4.2 2010 December 28 BASH(1)