config.status
config.cache
config.log
+configure~
autom4te.cache
parser-built
y.tab.c
y.tab.h
+
+# doc files created as part of making dvi versions from texinfo source
+
+doc/bashref.aux
+doc/bashref.bt
+doc/bashref.bts
+doc/bashref.cp
+doc/bashref.cps
+doc/bashref.fn
+doc/bashref.fns
+doc/bashref.ky
+doc/bashref.pg
+doc/bashref.rw
+doc/bashref.rws
+doc/bashref.toc
+doc/bashref.tp
+doc/bashref.vr
+doc/bashref.vrs
+lib/readline/doc/history.aux
+lib/readline/doc/history.bt
+lib/readline/doc/history.cp
+lib/readline/doc/history.cps
+lib/readline/doc/history.fn
+lib/readline/doc/history.fns
+lib/readline/doc/history.ky
+lib/readline/doc/history.log
+lib/readline/doc/history.pg
+lib/readline/doc/history.toc
+lib/readline/doc/history.tp
+lib/readline/doc/history.vr
+lib/readline/doc/history.vrs
+lib/readline/doc/rlman.aux
+lib/readline/doc/rlman.bt
+lib/readline/doc/rlman.cp
+lib/readline/doc/rlman.cps
+lib/readline/doc/rlman.fn
+lib/readline/doc/rlman.fns
+lib/readline/doc/rlman.ky
+lib/readline/doc/rlman.log
+lib/readline/doc/rlman.pg
+lib/readline/doc/rlman.toc
+lib/readline/doc/rlman.tp
+lib/readline/doc/rlman.vr
+lib/readline/doc/rlman.vrs
+lib/readline/doc/rluserman.aux
+lib/readline/doc/rluserman.bt
+lib/readline/doc/rluserman.cp
+lib/readline/doc/rluserman.cps
+lib/readline/doc/rluserman.fn
+lib/readline/doc/rluserman.fns
+lib/readline/doc/rluserman.ky
+lib/readline/doc/rluserman.log
+lib/readline/doc/rluserman.pg
+lib/readline/doc/rluserman.toc
+lib/readline/doc/rluserman.tp
+lib/readline/doc/rluserman.vr
+lib/readline/doc/rluserman.vrs
+
+# example loadable builtins
+
+examples/loadables/accept
+examples/loadables/asort
+examples/loadables/basename
+examples/loadables/cat
+examples/loadables/csv
+examples/loadables/cut
+examples/loadables/dirname
+examples/loadables/dsv
+examples/loadables/fdflags
+examples/loadables/finfo
+examples/loadables/getconf
+examples/loadables/head
+examples/loadables/hello
+examples/loadables/id
+examples/loadables/kv
+examples/loadables/ln
+examples/loadables/logname
+examples/loadables/mkdir
+examples/loadables/mkfifo
+examples/loadables/mktemp
+examples/loadables/mypid
+examples/loadables/necho
+examples/loadables/pathchk
+examples/loadables/print
+examples/loadables/printenv
+examples/loadables/push
+examples/loadables/pushd
+examples/loadables/realpath
+examples/loadables/rm
+examples/loadables/rmdir
+examples/loadables/seq
+examples/loadables/setpgid
+examples/loadables/sleep
+examples/loadables/stat
+examples/loadables/strftime
+examples/loadables/sync
+examples/loadables/tee
+examples/loadables/truefalse
+examples/loadables/tty
+examples/loadables/uname
+examples/loadables/unlink
+examples/loadables/whoami
- printf_builtin: when parsing the format string, consume entire
multibyte characters at a time unless they begin with '\\' or '%',
to avoid characters whose encoding contains those characters
+
+ 9/11
+ ----
+builtins/hash.def
+ - hash_builtin: if the -p option is supplied without a name to hash,
+ it's an error
+
+hashcmd.c
+ - phash_remove: if the hash table is empty, return 1 like unalias does
+ when the alias isn't in the hash table.
+ Report from from Mike Jonkmans <bashbug@jonkmans.nl>
+
+ 9/13
+ ----
+test.c
+ - binary_test,unary_test: now static
+ - cond_test: new function, calls binary_test or unary_test as appropriate
+ and handles longjmps from test_syntax_error
+
+test.h
+ - cond_test: extern declaration
+
+execute_cmd.c
+ - execute_cond_node: call cond_test instead of binary_test or unary_test.
+ From a report and patch fro Grisha Levit <grishalevit@gmail.com>
+
+doc/bash.1,doc/bashref.texi
+ - hash: add some text about the mutual exclusivity of the -t, -p, and
+ -d options
return (EXECUTION_FAILURE);
}
+ /* It's an error to specify a pathname to hash to, but no name to hash. */
+ if (pathname && list == 0)
+ {
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+
/* We want hash -r to be silent, but hash -- to print hashing info, so
we test expunge_hash_table. */
+
if (list == 0 && expunge_hash_table == 0)
{
opt = print_hashed_commands (list_portably);
/* If someone runs `hash -r -t xyz' he will be disappointed. */
if (list_targets)
return (list_hashed_filename_targets (list, list_portably));
-
+
#if defined (RESTRICTED_SHELL)
if (restricted && pathname)
{
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 filename of the command. The -\b-r\br option
- causes the shell to forget all remembered locations. Assigning
- to the P\bPA\bAT\bTH\bH variable also clears all hashed filenames. The -\b-d\bd
- option causes the shell to forget the 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.
+ -\b-p\bp option is supplied, h\bha\bas\bsh\bh uses _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be as the full filename
+ of the command. The -\b-r\br option causes the shell to forget all
+ remembered locations. Assigning to the P\bPA\bAT\bTH\bH variable also
+ clears all hashed filenames. The -\b-d\bd option causes the shell to
+ forget the 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 format 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 -\b-t\bt, -\b-d\bd,
+ and -\b-p\bp options (the options that act on the _\bn_\ba_\bm_\be arguments) are
+ mutually exclusive. Only one will be active. If more than one
+ is supplied, -\b-t\bt has higher priority than -\b-p\bp, and both are higher
+ priority than -\b-d\bd. 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. If _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be is not supplied and
- H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE is unset or null, the -\b-a\ba,\b, -\b-n\bn,\b, -\b-r\br,\b, and -\b-w\bw options have
+ _\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. If _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be is not supplied and
+ H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE is unset or null, the -\b-a\ba,\b, -\b-n\bn,\b, -\b-r\br,\b, and -\b-w\bw options have
no effect. Options, if supplied, have the following meanings:
-\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. If _\bo_\bf_\bf_\bs_\be_\bt
+ Delete the history entry at position _\bo_\bf_\bf_\bs_\be_\bt. If _\bo_\bf_\bf_\bs_\be_\bt
is negative, it is interpreted as relative to one greater
than the last history position, so negative indices count
- back from the end of the history, and an index of -1
+ back from the end of the history, and an index of -1
refers to the current h\bhi\bis\bst\bto\bor\bry\by -\b-d\bd command.
-\b-d\bd _\bs_\bt_\ba_\br_\bt-_\be_\bn_\bd
- Delete the range of history entries between positions
- _\bs_\bt_\ba_\br_\bt and _\be_\bn_\bd, inclusive. Positive and negative values
+ Delete the range of history entries between positions
+ _\bs_\bt_\ba_\br_\bt and _\be_\bn_\bd, inclusive. Positive and negative values
for _\bs_\bt_\ba_\br_\bt and _\be_\bn_\bd are interpreted as described above.
- -\b-a\ba Append the ``new'' history lines to the history file.
- These are history lines entered since the beginning of
+ -\b-a\ba Append the ``new'' history lines to the history file.
+ These are history lines entered since the beginning of
the current b\bba\bas\bsh\bh session, but not already appended to the
history file.
- -\b-n\bn Read the history lines not already read from the history
- file into the current history list. These are lines ap-
- pended 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 ap-
+ pended 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 append them to
+ -\b-r\br Read the contents of the history file and append them to
the current history list.
-\b-w\bw Write the current history list to the history file, over-
writing 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 following history entry. The return value is
0 unless an invalid option is encountered, an error occurs while
- reading or writing the history file, an invalid _\bo_\bf_\bf_\bs_\be_\bt or range
- is supplied as an argument to -\b-d\bd, or the history expansion sup-
+ reading or writing the history file, an invalid _\bo_\bf_\bf_\bs_\be_\bt or range
+ is supplied as an argument to -\b-d\bd, or the history expansion sup-
plied as an argument to -\b-p\bp fails.
j\bjo\bob\bbs\bs [-\b-l\bln\bnp\bpr\brs\bs] [ _\bj_\bo_\bb_\bs_\bp_\be_\bc ... ]
The first form lists the active jobs. The options have the fol-
lowing meanings:
-\b-l\bl List process IDs in addition to the normal information.
- -\b-n\bn Display information only about jobs that have changed
+ -\b-n\bn Display information only about jobs that have changed
status since the user was last notified of their status.
- -\b-p\bp List only the process ID of the job's process group
+ -\b-p\bp List only the process ID of the job's process group
leader.
-\b-r\br Display only running jobs.
-\b-s\bs Display only stopped jobs.
- If _\bj_\bo_\bb_\bs_\bp_\be_\bc is 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
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|-\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. The -\b-L\bL option is
- equivalent to -\b-l\bl. k\bki\bil\bll\bl returns true if at least one signal was
+ -\b-l\bl is a number specifying either a signal number or the exit
+ status of a process terminated by a signal. The -\b-L\bL option is
+ equivalent to -\b-l\bl. k\bki\bil\bll\bl returns true if at least one signal was
successfully sent, or false if an error occurs or an invalid op-
tion 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-
- tion and its children. If _\bn_\ba_\bm_\be is -, the set of shell options
- is made local to the function in which l\blo\boc\bca\bal\bl is invoked: shell
- options changed using the s\bse\bet\bt builtin inside the function after
+ variable _\bn_\ba_\bm_\be to have a visible scope restricted to that func-
+ tion and its children. If _\bn_\ba_\bm_\be is -, the set of shell options
+ is made local to the function in which l\blo\boc\bca\bal\bl is invoked: shell
+ options changed using the s\bse\bet\bt builtin inside the function after
the call to l\blo\boc\bca\bal\bl are restored to their original values when the
function returns. The restore is effected as if a series of s\bse\bet\bt
- commands were executed to restore the values that were in place
- before the function. With no operands, l\blo\boc\bca\bal\bl writes a list of
- local variables to the standard output. It is an error to use
+ commands were executed to restore the values that were in place
+ before the function. With no operands, l\blo\boc\bca\bal\bl writes a list of
+ local variables to the 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-d\bd _\bd_\be_\bl_\bi_\bm] [-\b-n\bn _\bc_\bo_\bu_\bn_\bt] [-\b-O\bO _\bo_\br_\bi_\bg_\bi_\bn] [-\b-s\bs _\bc_\bo_\bu_\bn_\bt] [-\b-t\bt] [-\b-u\bu _\bf_\bd] [-\b-C\bC
+ m\bma\bap\bpf\bfi\bil\ble\be [-\b-d\bd _\bd_\be_\bl_\bi_\bm] [-\b-n\bn _\bc_\bo_\bu_\bn_\bt] [-\b-O\bO _\bo_\br_\bi_\bg_\bi_\bn] [-\b-s\bs _\bc_\bo_\bu_\bn_\bt] [-\b-t\bt] [-\b-u\bu _\bf_\bd] [-\b-C\bC
_\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk] [-\b-c\bc _\bq_\bu_\ba_\bn_\bt_\bu_\bm] [_\ba_\br_\br_\ba_\by]
r\bre\bea\bad\bda\bar\brr\bra\bay\by [-\b-d\bd _\bd_\be_\bl_\bi_\bm] [-\b-n\bn _\bc_\bo_\bu_\bn_\bt] [-\b-O\bO _\bo_\br_\bi_\bg_\bi_\bn] [-\b-s\bs _\bc_\bo_\bu_\bn_\bt] [-\b-t\bt] [-\b-u\bu _\bf_\bd] [-\b-C\bC
_\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk] [-\b-c\bc _\bq_\bu_\ba_\bn_\bt_\bu_\bm] [_\ba_\br_\br_\ba_\by]
- Read lines from the standard input 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-d\bd The first character of _\bd_\be_\bl_\bi_\bm is used to terminate each
- input line, rather than newline. If _\bd_\be_\bl_\bi_\bm is the empty
+ -\b-d\bd The first character of _\bd_\be_\bl_\bi_\bm is used to terminate each
+ input line, rather than newline. If _\bd_\be_\bl_\bi_\bm is the empty
string, m\bma\bap\bpf\bfi\bil\ble\be will terminate a line when it reads a NUL
character.
- -\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 _\bd_\be_\bl_\bi_\bm (default newline) from each line
+ -\b-t\bt Remove a trailing _\bd_\be_\bl_\bi_\bm (default newline) from each line
read.
- -\b-u\bu Read lines from file descriptor _\bf_\bd instead of the stan-
+ -\b-u\bu Read lines from file descriptor _\bf_\bd instead of the stan-
dard input.
- -\b-C\bC Evaluate _\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk each time _\bq_\bu_\ba_\bn_\bt_\bu_\bm lines are read. The
+ -\b-C\bC Evaluate _\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk each time _\bq_\bu_\ba_\bn_\bt_\bu_\bm lines are read. The
-\b-c\bc option specifies _\bq_\bu_\ba_\bn_\bt_\bu_\bm.
- -\b-c\bc Specify the number of lines read between each call to
+ -\b-c\bc Specify the number of lines read between each call to
_\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk.
- If -\b-C\bC is specified without -\b-c\bc, the default quantum is 5000.
+ If -\b-C\bC is specified without -\b-c\bc, the default quantum is 5000.
When _\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk is evaluated, it is supplied the index of the next
array element to be assigned and the line to be assigned to that
- element as additional arguments. _\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk is evaluated after
+ element as additional arguments. _\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk is evaluated after
the line is read but before the array element is assigned.
- If not supplied with an explicit origin, m\bma\bap\bpf\bfi\bil\ble\be will clear _\ba_\br_\b-
+ If not supplied with an explicit origin, m\bma\bap\bpf\bfi\bil\ble\be will clear _\ba_\br_\b-
_\br_\ba_\by before assigning to it.
- m\bma\bap\bpf\bfi\bil\ble\be returns 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. The elements are num-
- bered from 0 starting at the first directory listed by d\bdi\bir\brs\bs.
- With no arguments, p\bpo\bop\bpd\bd removes the top directory from the
+ bered from 0 starting at the first directory listed by d\bdi\bir\brs\bs.
+ With no arguments, p\bpo\bop\bpd\bd removes the top directory from the
stack, and changes to the new top directory. Arguments, if sup-
plied, have the following meanings:
- -\b-n\bn Suppresses the normal change of directory when removing
+ -\b-n\bn Suppresses the normal change of directory when removing
directories from the stack, so that only the stack is ma-
nipulated.
- +\b+_\bn Removes the _\bnth entry counting from the left of the list
- shown by d\bdi\bir\brs\bs, starting with zero, from the stack. For
- example: ``popd +0'' removes the first directory, ``popd
+ +\b+_\bn Removes the _\bnth entry counting from the left of the list
+ shown by d\bdi\bir\brs\bs, starting with zero, from the stack. For
+ example: ``popd +0'' removes the first directory, ``popd
+1'' the second.
-\b-_\bn 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 top element of the directory stack is modified, and the
- _\b-_\bn option was not supplied, p\bpo\bop\bpd\bd uses the c\bcd\bd builtin to change
+ If the top element of the directory stack is modified, and the
+ _\b-_\bn option was not supplied, p\bpo\bop\bpd\bd uses the c\bcd\bd builtin to change
to the directory at the top of the stack. If the c\bcd\bd fails, p\bpo\bop\bpd\bd
returns a non-zero value.
- Otherwise, p\bpo\bop\bpd\bd returns false if an invalid option is encoun-
+ Otherwise, p\bpo\bop\bpd\bd returns false if an invalid option is encoun-
tered, the directory stack is empty, or a non-existent directory
stack entry is specified.
- If the p\bpo\bop\bpd\bd command is successful, bash runs d\bdi\bir\brs\bs to show the
- final contents of the directory stack, and the return status is
+ If the p\bpo\bop\bpd\bd command is successful, bash runs d\bdi\bir\brs\bs to show the
+ final contents of the directory stack, and the return status is
0.
p\bpr\bri\bin\bnt\btf\bf [-\b-v\bv _\bv_\ba_\br] _\bf_\bo_\br_\bm_\ba_\bt [_\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs]
- Write the formatted _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs to the standard output under the
- control of the _\bf_\bo_\br_\bm_\ba_\bt. The -\b-v\bv option causes the output to be
- assigned to the variable _\bv_\ba_\br rather than being printed to the
+ Write the formatted _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs to the standard output under the
+ control of the _\bf_\bo_\br_\bm_\ba_\bt. The -\b-v\bv option 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
+ The _\bf_\bo_\br_\bm_\ba_\bt is a character string which contains three types of
+ objects: plain characters, which are simply copied to standard
+ output, character escape sequences, which are converted and
+ copied to the standard output, and format specifications, each
+ of which causes printing of the next successive _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt. In
addition to the standard _\bp_\br_\bi_\bn_\bt_\bf(3) format characters c\bcs\bsn\bnd\bdi\bio\bou\bux\bxX\bXe\be-\b-
E\bEf\bfF\bFg\bgG\bGa\baA\bA, p\bpr\bri\bin\bnt\btf\bf interprets the following additional format spec-
ifiers:
%\b%b\bb causes p\bpr\bri\bin\bnt\btf\bf to expand backslash escape sequences in the
corresponding _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt in the same way as e\bec\bch\bho\bo -\b-e\be.
- %\b%q\bq causes p\bpr\bri\bin\bnt\btf\bf to output the corresponding _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt in a
- format that can be reused as shell input. %\b%q\bq and %\b%Q\bQ use
- the $\b$'\b''\b' quoting style if any characters in the argument
- string require it, and backslash quoting otherwise. If
- the format string uses the _\bp_\br_\bi_\bn_\bt_\bf alternate form, these
+ %\b%q\bq causes p\bpr\bri\bin\bnt\btf\bf to output the corresponding _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt in a
+ format that can be reused as shell input. %\b%q\bq and %\b%Q\bQ use
+ the $\b$'\b''\b' quoting style if any characters in the argument
+ string require it, and backslash quoting otherwise. If
+ the format string uses the _\bp_\br_\bi_\bn_\bt_\bf alternate form, these
two formats quote the argument string using single
quotes.
- %\b%Q\bQ like %\b%q\bq, but applies any supplied precision to the _\ba_\br_\bg_\bu_\b-
+ %\b%Q\bQ like %\b%q\bq, but applies any supplied precision to the _\ba_\br_\bg_\bu_\b-
_\bm_\be_\bn_\bt before quoting it.
%\b%(\b(_\bd_\ba_\bt_\be_\bf_\bm_\bt)\b)T\bT
- causes p\bpr\bri\bin\bnt\btf\bf to output the date-time string resulting
- from using _\bd_\ba_\bt_\be_\bf_\bm_\bt as a format string for _\bs_\bt_\br_\bf_\bt_\bi_\bm_\be(3).
+ causes p\bpr\bri\bin\bnt\btf\bf to output the date-time string resulting
+ from using _\bd_\ba_\bt_\be_\bf_\bm_\bt as a format string for _\bs_\bt_\br_\bf_\bt_\bi_\bm_\be(3).
The corresponding _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt is an integer representing the
- number of seconds since the epoch. Two special argument
- values may be used: -1 represents the current time, and
- -2 represents the time the shell was invoked. If no ar-
+ 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. If no ar-
gument is specified, conversion behaves as if -1 had been
- given. This is an exception to the usual p\bpr\bri\bin\bnt\btf\bf behav-
+ given. This is an exception to the usual p\bpr\bri\bin\bnt\btf\bf behav-
ior.
The %b, %q, and %T format specifiers all use the field width and
precision arguments from the format specification and write that
- many bytes from (or use that wide a field for) the expanded ar-
- gument, which usually contains more characters than the origi-
+ many bytes from (or use that wide a field for) the expanded ar-
+ gument, which usually contains more characters than the origi-
nal.
The %n format specifier accepts a corresponding argument that is
treated as a shell variable name.
- The %s and %c format specifiers accept an l (long) modifier,
+ The %s and %c format specifiers accept an l (long) modifier,
which forces them to convert the argument string to a wide-char-
acter string and apply any supplied field width and precision in
terms of characters, not bytes.
- Arguments to non-string format specifiers are treated as C con-
+ Arguments to non-string format specifiers are treated as C con-
stants, except that a leading plus or minus sign is allowed, and
- if the leading character is a single or double quote, the value
+ 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-
+ The _\bf_\bo_\br_\bm_\ba_\bt is reused as necessary to consume all of the _\ba_\br_\bg_\bu_\b-
_\bm_\be_\bn_\bt_\bs. If the _\bf_\bo_\br_\bm_\ba_\bt requires more _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs than are supplied,
- the extra format specifications behave as if a zero value or
- null string, as appropriate, had been supplied. The return
- value is zero on success, non-zero if an invalid option is sup-
+ the extra format specifications behave as if a zero value or
+ null string, as appropriate, had been supplied. The return
+ value is zero on success, non-zero if an invalid option is sup-
plied or a write or assignment error occurs.
p\bpu\bus\bsh\bhd\bd [-\b-n\bn] [+_\bn] [-_\bn]
p\bpu\bus\bsh\bhd\bd [-\b-n\bn] [_\bd_\bi_\br]
- Adds a directory to the top of the directory stack, or rotates
- the stack, making the new top of the stack the current working
- directory. With no arguments, p\bpu\bus\bsh\bhd\bd exchanges the top two ele-
- ments of the directory stack. Arguments, if supplied, have the
+ Adds a directory to the top of the directory stack, or rotates
+ the stack, making the new top of the stack the current working
+ directory. With no arguments, p\bpu\bus\bsh\bhd\bd exchanges the top two ele-
+ ments of the directory stack. Arguments, if supplied, have the
following meanings:
- -\b-n\bn Suppresses the normal change of directory when rotating
- or adding directories to the stack, so that only the
+ -\b-n\bn Suppresses the normal change of directory when rotating
+ or adding directories to the stack, so that only the
stack is manipulated.
- +\b+_\bn Rotates the stack so that the _\bnth directory (counting
- from the left of the list shown by d\bdi\bir\brs\bs, starting with
+ +\b+_\bn Rotates the stack so that the _\bnth directory (counting
+ from the left of the list shown by d\bdi\bir\brs\bs, starting with
zero) is at the top.
- -\b-_\bn Rotates the stack so that the _\bnth directory (counting
- from the right of the list shown by d\bdi\bir\brs\bs, starting with
+ -\b-_\bn Rotates the stack so that the _\bnth directory (counting
+ from the right of the list shown by d\bdi\bir\brs\bs, starting with
zero) is at the top.
_\bd_\bi_\br Adds _\bd_\bi_\br to the directory stack at the top
After the stack has been modified, if the -\b-n\bn option was not sup-
- plied, p\bpu\bus\bsh\bhd\bd uses the c\bcd\bd builtin to change to the directory at
+ plied, p\bpu\bus\bsh\bhd\bd uses the c\bcd\bd builtin to change to the directory at
the top of the stack. If the c\bcd\bd fails, p\bpu\bus\bsh\bhd\bd returns a non-zero
value.
- Otherwise, if no arguments are supplied, p\bpu\bus\bsh\bhd\bd returns 0 unless
- the directory stack is empty. When rotating the directory
- stack, p\bpu\bus\bsh\bhd\bd returns 0 unless the directory stack is empty or a
+ Otherwise, if no arguments are supplied, p\bpu\bus\bsh\bhd\bd returns 0 unless
+ the directory stack is empty. When rotating the directory
+ stack, p\bpu\bus\bsh\bhd\bd returns 0 unless the directory stack is empty or a
non-existent directory stack element is specified.
- If the p\bpu\bus\bsh\bhd\bd command is successful, bash runs d\bdi\bir\brs\bs to show the
+ If the p\bpu\bus\bsh\bhd\bd command is successful, bash runs d\bdi\bir\brs\bs to show the
final contents of the directory stack.
p\bpw\bwd\bd [-\b-L\bLP\bP]
- Print the absolute pathname of the current working directory.
+ Print the absolute pathname of the current working directory.
The pathname printed contains no symbolic links if the -\b-P\bP option
is supplied or the -\b-o\bo p\bph\bhy\bys\bsi\bic\bca\bal\bl option to the s\bse\bet\bt builtin command
- is enabled. If the -\b-L\bL option is used, the pathname printed may
- contain symbolic links. The return status is 0 unless an error
+ is enabled. If the -\b-L\bL option is used, the pathname printed may
+ contain symbolic links. The return status is 0 unless an error
occurs while reading the name of the current directory or an in-
valid option is supplied.
- r\bre\bea\bad\bd [-\b-E\bEe\ber\brs\bs] [-\b-a\ba _\ba_\bn_\ba_\bm_\be] [-\b-d\bd _\bd_\be_\bl_\bi_\bm] [-\b-i\bi _\bt_\be_\bx_\bt] [-\b-n\bn _\bn_\bc_\bh_\ba_\br_\bs] [-\b-N\bN _\bn_\bc_\bh_\ba_\br_\bs]
+ r\bre\bea\bad\bd [-\b-E\bEe\ber\brs\bs] [-\b-a\ba _\ba_\bn_\ba_\bm_\be] [-\b-d\bd _\bd_\be_\bl_\bi_\bm] [-\b-i\bi _\bt_\be_\bx_\bt] [-\b-n\bn _\bn_\bc_\bh_\ba_\br_\bs] [-\b-N\bN _\bn_\bc_\bh_\ba_\br_\bs]
[-\b-p\bp _\bp_\br_\bo_\bm_\bp_\bt] [-\b-t\bt _\bt_\bi_\bm_\be_\bo_\bu_\bt] [-\b-u\bu _\bf_\bd] [_\bn_\ba_\bm_\be ...]
- One line is read from the standard input, or from the file de-
+ One line is read from the standard input, or from the file de-
scriptor _\bf_\bd supplied as an argument to the -\b-u\bu option, split into
- words as described above under W\bWo\bor\brd\bd S\bSp\bpl\bli\bit\btt\bti\bin\bng\bg, and the first
- word is assigned to the first _\bn_\ba_\bm_\be, the second word to the sec-
- ond _\bn_\ba_\bm_\be, and so on. If there are more words than names, the
+ words as described above under W\bWo\bor\brd\bd S\bSp\bpl\bli\bit\btt\bti\bin\bng\bg, and the first
+ word is assigned to the first _\bn_\ba_\bm_\be, the second word to the sec-
+ ond _\bn_\ba_\bm_\be, and so on. If there are more words than names, the
remaining words and their intervening delimiters are assigned to
- the last _\bn_\ba_\bm_\be. If there are fewer words read from the input
- stream than names, the remaining names are assigned empty val-
- ues. The characters in I\bIF\bFS\bS are used to split the line into
- words using the same rules the shell uses for expansion (de-
- scribed above under W\bWo\bor\brd\bd S\bSp\bpl\bli\bit\btt\bti\bin\bng\bg). The backslash character
+ the last _\bn_\ba_\bm_\be. If there are fewer words read from the input
+ stream than names, the remaining names are assigned empty val-
+ ues. The characters in I\bIF\bFS\bS are used to split the line into
+ words using the same rules the shell uses for expansion (de-
+ scribed above under W\bWo\bor\brd\bd S\bSp\bpl\bli\bit\btt\bti\bin\bng\bg). The backslash character
(\\b\) may be used to remove any special meaning for the next char-
- acter read and for line continuation. Options, if supplied,
+ acter read and for line continuation. Options, if supplied,
have the following meanings:
-\b-a\ba _\ba_\bn_\ba_\bm_\be
The words are assigned to sequential indices of the array
variable _\ba_\bn_\ba_\bm_\be, starting at 0. _\ba_\bn_\ba_\bm_\be is unset before any
- new values are assigned. Other _\bn_\ba_\bm_\be arguments are ig-
+ new values are assigned. Other _\bn_\ba_\bm_\be arguments are ig-
nored.
-\b-d\bd _\bd_\be_\bl_\bi_\bm
The first character of _\bd_\be_\bl_\bi_\bm is used to terminate the in-
- put line, rather than newline. If _\bd_\be_\bl_\bi_\bm is the empty
- string, r\bre\bea\bad\bd will terminate a line when it reads a NUL
+ put line, rather than newline. If _\bd_\be_\bl_\bi_\bm is the empty
+ string, r\bre\bea\bad\bd will terminate a line when it reads a NUL
character.
- -\b-e\be If the standard input is coming from a terminal, r\bre\bea\bad\bd
- uses r\bre\bea\bad\bdl\bli\bin\bne\be (see R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE above) to obtain the line.
- Readline uses the current (or default, if line editing
- was not previously active) editing settings, but uses
+ -\b-e\be If the standard input is coming from a terminal, r\bre\bea\bad\bd
+ uses r\bre\bea\bad\bdl\bli\bin\bne\be (see R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE above) to obtain the line.
+ Readline uses the current (or default, if line editing
+ was not previously active) editing settings, but uses
readline's default filename completion.
- -\b-E\bE If the standard input is coming from a terminal, r\bre\bea\bad\bd
- uses r\bre\bea\bad\bdl\bli\bin\bne\be (see R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE above) to obtain the line.
- Readline uses the current (or default, if line editing
- was not previously active) editing settings, but uses
+ -\b-E\bE If the standard input is coming from a terminal, r\bre\bea\bad\bd
+ uses r\bre\bea\bad\bdl\bli\bin\bne\be (see R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE above) to obtain the line.
+ Readline uses the current (or default, if line editing
+ was not previously active) editing settings, but uses
bash's default completion, including programmable comple-
tion.
-\b-i\bi _\bt_\be_\bx_\bt
- If r\bre\bea\bad\bdl\bli\bin\bne\be is being used to read the line, _\bt_\be_\bx_\bt is
+ If r\bre\bea\bad\bdl\bli\bin\bne\be is being used to read the line, _\bt_\be_\bx_\bt is
placed into the editing buffer before editing begins.
-\b-n\bn _\bn_\bc_\bh_\ba_\br_\bs
- r\bre\bea\bad\bd returns after reading _\bn_\bc_\bh_\ba_\br_\bs characters rather than
+ r\bre\bea\bad\bd returns after reading _\bn_\bc_\bh_\ba_\br_\bs characters rather than
waiting for a complete line of input, but honors a delim-
- iter if fewer than _\bn_\bc_\bh_\ba_\br_\bs characters are read before the
+ iter if fewer than _\bn_\bc_\bh_\ba_\br_\bs characters are read before the
delimiter.
-\b-N\bN _\bn_\bc_\bh_\ba_\br_\bs
- r\bre\bea\bad\bd returns after reading exactly _\bn_\bc_\bh_\ba_\br_\bs characters
- rather than waiting for a complete line of input, unless
- EOF is encountered or r\bre\bea\bad\bd times out. Delimiter charac-
- ters encountered in the input are not treated specially
- and do not cause r\bre\bea\bad\bd to return until _\bn_\bc_\bh_\ba_\br_\bs characters
- are read. The result is not split on the characters in
- I\bIF\bFS\bS; the intent is that the variable is assigned exactly
+ r\bre\bea\bad\bd returns after reading exactly _\bn_\bc_\bh_\ba_\br_\bs characters
+ rather than waiting for a complete line of input, unless
+ EOF is encountered or r\bre\bea\bad\bd times out. Delimiter charac-
+ ters encountered in the input are not treated specially
+ and do not cause r\bre\bea\bad\bd to return until _\bn_\bc_\bh_\ba_\br_\bs characters
+ are read. The result is not split on the characters in
+ I\bIF\bFS\bS; the intent is that the variable is assigned exactly
the characters read (with the exception of backslash; see
the -\b-r\br option below).
-\b-p\bp _\bp_\br_\bo_\bm_\bp_\bt
line, before attempting to read any input. The prompt is
displayed only if input is coming from a terminal.
-\b-r\br Backslash does not act as an escape character. The back-
- slash is considered to be part of the line. In particu-
- lar, a backslash-newline pair may not then be used as a
+ slash is considered to be part of the line. In particu-
+ lar, a backslash-newline pair may not then be used as a
line continuation.
-\b-s\bs Silent mode. If input is coming from a terminal, charac-
ters are not echoed.
-\b-t\bt _\bt_\bi_\bm_\be_\bo_\bu_\bt
- Cause r\bre\bea\bad\bd to time out and return failure if a complete
- line of input (or a specified number of characters) is
- not read within _\bt_\bi_\bm_\be_\bo_\bu_\bt seconds. _\bt_\bi_\bm_\be_\bo_\bu_\bt may be a deci-
- mal number with a fractional portion following the deci-
- mal point. This option is only effective if r\bre\bea\bad\bd is
- reading input from a terminal, pipe, or other special
- file; it has no effect when reading from regular files.
+ Cause r\bre\bea\bad\bd to time out and return failure if a complete
+ line of input (or a specified number of characters) is
+ not read within _\bt_\bi_\bm_\be_\bo_\bu_\bt seconds. _\bt_\bi_\bm_\be_\bo_\bu_\bt may be a deci-
+ mal number with a fractional portion following the deci-
+ mal point. This option is only effective if r\bre\bea\bad\bd is
+ reading input from a terminal, pipe, or other special
+ file; it has no effect when reading from regular files.
If r\bre\bea\bad\bd times out, r\bre\bea\bad\bd saves any partial input read into
- the specified variable _\bn_\ba_\bm_\be. If _\bt_\bi_\bm_\be_\bo_\bu_\bt is 0, r\bre\bea\bad\bd re-
- turns immediately, without trying to read any data. The
- exit status is 0 if input is available on the specified
- file descriptor, or the read will return EOF, non-zero
- otherwise. The exit status is greater than 128 if the
+ the specified variable _\bn_\ba_\bm_\be. If _\bt_\bi_\bm_\be_\bo_\bu_\bt is 0, r\bre\bea\bad\bd re-
+ turns immediately, without trying to read any data. The
+ exit status is 0 if input is available on the specified
+ file descriptor, or the read will return EOF, non-zero
+ otherwise. The exit status is greater than 128 if the
timeout is exceeded.
-\b-u\bu _\bf_\bd Read input from file descriptor _\bf_\bd.
- If no _\bn_\ba_\bm_\be_\bs are supplied, the line read, without the ending de-
- limiter but otherwise unmodified, is assigned to the variable
- R\bRE\bEP\bPL\bLY\bY. The exit status is zero, unless end-of-file is encoun-
- tered, r\bre\bea\bad\bd times out (in which case the status is greater than
- 128), a variable assignment error (such as assigning to a read-
+ If no _\bn_\ba_\bm_\be_\bs are supplied, the line read, without the ending de-
+ limiter but otherwise unmodified, is assigned to the variable
+ R\bRE\bEP\bPL\bLY\bY. The exit status is zero, unless end-of-file is encoun-
+ tered, r\bre\bea\bad\bd times out (in which case the status is greater than
+ 128), a variable assignment error (such as assigning to a read-
only variable) occurs, or an invalid file descriptor is supplied
as the argument to -\b-u\bu.
r\bre\bea\bad\bdo\bon\bnl\bly\by [-\b-a\baA\bAf\bf] [-\b-p\bp] [_\bn_\ba_\bm_\be[=_\bw_\bo_\br_\bd] ...]
- The given _\bn_\ba_\bm_\be_\bs are marked readonly; the values of these _\bn_\ba_\bm_\be_\bs
- may not be changed by subsequent assignment. If the -\b-f\bf option
- is supplied, the functions corresponding to the _\bn_\ba_\bm_\be_\bs are so
- marked. The -\b-a\ba option restricts the variables to indexed ar-
- rays; the -\b-A\bA option restricts the variables to associative ar-
+ The given _\bn_\ba_\bm_\be_\bs are marked readonly; the values of these _\bn_\ba_\bm_\be_\bs
+ may not be changed by subsequent assignment. If the -\b-f\bf option
+ is supplied, the functions corresponding to the _\bn_\ba_\bm_\be_\bs are so
+ marked. The -\b-a\ba option restricts the variables to indexed ar-
+ rays; the -\b-A\bA option restricts the variables to associative ar-
rays. If both options are supplied, -\b-A\bA takes precedence. If no
- _\bn_\ba_\bm_\be arguments are given, or if the -\b-p\bp option is supplied, a
+ _\bn_\ba_\bm_\be arguments are given, or if the -\b-p\bp option is supplied, a
list of all readonly names is printed. The other options may be
- used to restrict the output to a subset of the set of readonly
- names. The -\b-p\bp option causes output to be displayed in a format
- that may be reused as input. If a variable name is followed by
- =_\bw_\bo_\br_\bd, the value of the variable is set to _\bw_\bo_\br_\bd. The return
- status is 0 unless an invalid option is encountered, one of the
+ used to restrict the output to a subset of the set of readonly
+ names. The -\b-p\bp option causes output to be displayed in a format
+ that may be reused as input. If a variable name is followed by
+ =_\bw_\bo_\br_\bd, the value of the variable is set to _\bw_\bo_\br_\bd. The return
+ status is 0 unless an invalid option is encountered, one of the
_\bn_\ba_\bm_\be_\bs is not a valid shell variable name, or -\b-f\bf is supplied with
a _\bn_\ba_\bm_\be that is not a function.
r\bre\bet\btu\bur\brn\bn [_\bn]
- Causes a function to stop executing and return the value speci-
- fied by _\bn to its caller. If _\bn is omitted, the return status is
- that of the last command executed in the function body. If r\bre\be-\b-
+ Causes a function to stop executing and return the value speci-
+ fied by _\bn to its caller. If _\bn is omitted, the return status is
+ that of the last command executed in the function body. If r\bre\be-\b-
t\btu\bur\brn\bn is executed by a trap handler, the last command used to de-
- termine the status is the last command executed before the trap
- handler. If r\bre\bet\btu\bur\brn\bn is executed during a D\bDE\bEB\bBU\bUG\bG trap, the last
- command used to determine the status is the last command exe-
- cuted by the trap handler before r\bre\bet\btu\bur\brn\bn was invoked. If r\bre\bet\btu\bur\brn\bn
- is used outside a function, but during execution of a script by
- the .\b. (s\bso\bou\bur\brc\bce\be) command, it causes the shell to stop executing
- that script and return either _\bn or the exit status of the last
- command executed within the script as the exit status of the
+ termine the status is the last command executed before the trap
+ handler. If r\bre\bet\btu\bur\brn\bn is executed during a D\bDE\bEB\bBU\bUG\bG trap, the last
+ command used to determine the status is the last command exe-
+ cuted by the trap handler before r\bre\bet\btu\bur\brn\bn was invoked. If r\bre\bet\btu\bur\brn\bn
+ is used outside a function, but during execution of a script by
+ the .\b. (s\bso\bou\bur\brc\bce\be) command, it causes the shell to stop executing
+ that script and return either _\bn or the exit status of the last
+ command executed within the script as the exit status of the
script. If _\bn is supplied, the return value is its least signif-
- icant 8 bits. The return status is non-zero if r\bre\bet\btu\bur\brn\bn is sup-
- plied a non-numeric argument, or is used outside a function and
- not during execution of a script by .\b. or s\bso\bou\bur\brc\bce\be. Any command
+ icant 8 bits. The return status is non-zero if r\bre\bet\btu\bur\brn\bn is sup-
+ plied a non-numeric argument, or is used outside a function and
+ not during execution of a script by .\b. or s\bso\bou\bur\brc\bce\be. Any command
associated with the R\bRE\bET\bTU\bUR\bRN\bN trap is executed before execution re-
sumes after the function or script.
s\bse\bet\bt [-\b-a\bab\bbe\bef\bfh\bhk\bkm\bmn\bnp\bpt\btu\buv\bvx\bxB\bBC\bCE\bEH\bHP\bPT\bT] [-\b-o\bo _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be] [-\b--\b-] [-\b-] [_\ba_\br_\bg ...]
s\bse\bet\bt [+\b+a\bab\bbe\bef\bfh\bhk\bkm\bmn\bnp\bpt\btu\buv\bvx\bxB\bBC\bCE\bEH\bHP\bPT\bT] [+\b+o\bo _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be] [-\b--\b-] [-\b-] [_\ba_\br_\bg ...]
s\bse\bet\bt -\b-o\bo
- s\bse\bet\bt +\b+o\bo Without options, display the name and value of each shell vari-
- able in a format that can be reused as input for setting or re-
+ s\bse\bet\bt +\b+o\bo Without options, display the name and value of each shell vari-
+ able in a format that can be reused as input for setting or re-
setting the currently-set variables. Read-only variables cannot
- be reset. In _\bp_\bo_\bs_\bi_\bx _\bm_\bo_\bd_\be, only shell variables are listed. The
- output is sorted according to the current locale. When options
- are specified, they set or unset shell attributes. Any argu-
- ments remaining after option processing are treated as values
+ be reset. In _\bp_\bo_\bs_\bi_\bx _\bm_\bo_\bd_\be, only shell variables are listed. The
+ output is sorted according to the current locale. When options
+ are specified, they set or unset shell attributes. Any argu-
+ ments remaining after option processing are treated as values
for the positional parameters and are assigned, in order, to $\b$1\b1,
- $\b$2\b2, .\b..\b..\b. $\b$_\bn. Options, if specified, have the following mean-
+ $\b$2\b2, .\b..\b..\b. $\b$_\bn. Options, if specified, have the following mean-
ings:
-\b-a\ba Each variable or function that is created or modified is
- given the export attribute and marked for export to the
+ given the export attribute and marked for export to the
environment of subsequent commands.
- -\b-b\bb Report the status of terminated background jobs immedi-
+ -\b-b\bb Report the status of terminated background jobs immedi-
ately, rather than before the next primary prompt. This
is effective only when job control is enabled.
- -\b-e\be Exit immediately if a _\bp_\bi_\bp_\be_\bl_\bi_\bn_\be (which may consist of a
- single _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd), a _\bl_\bi_\bs_\bt, or a _\bc_\bo_\bm_\bp_\bo_\bu_\bn_\bd _\bc_\bo_\bm_\bm_\ba_\bn_\bd
+ -\b-e\be Exit immediately if a _\bp_\bi_\bp_\be_\bl_\bi_\bn_\be (which may consist of a
+ single _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd), a _\bl_\bi_\bs_\bt, or a _\bc_\bo_\bm_\bp_\bo_\bu_\bn_\bd _\bc_\bo_\bm_\bm_\ba_\bn_\bd
(see S\bSH\bHE\bEL\bLL\bL G\bGR\bRA\bAM\bMM\bMA\bAR\bR above), exits with a non-zero status.
- The shell does not exit if the command that fails is
- part of the command list immediately following a w\bwh\bhi\bil\ble\be
- or u\bun\bnt\bti\bil\bl keyword, part of the test following the i\bif\bf or
- e\bel\bli\bif\bf reserved words, part of any command executed in a
- &\b&&\b& or |\b||\b| list except the command following the final &\b&&\b&
+ The shell does not exit if the command that fails is
+ part of the command list immediately following a w\bwh\bhi\bil\ble\be
+ or u\bun\bnt\bti\bil\bl keyword, part of the test following the i\bif\bf or
+ e\bel\bli\bif\bf reserved words, part of any command executed in a
+ &\b&&\b& or |\b||\b| list except the command following the final &\b&&\b&
or |\b||\b|, any command in a pipeline but the last, or if the
- command's return value is being inverted with !\b!. If a
- compound command other than a subshell returns a non-
- zero status because a command failed while -\b-e\be was being
- ignored, the shell does not exit. A trap on E\bER\bRR\bR, if
- set, is executed before the shell exits. This option
+ command's return value is being inverted with !\b!. If a
+ compound command other than a subshell returns a non-
+ zero status because a command failed while -\b-e\be was being
+ ignored, the shell does not exit. A trap on E\bER\bRR\bR, if
+ set, is executed before the shell exits. This option
applies to the shell environment and each subshell envi-
- ronment separately (see C\bCO\bOM\bMM\bMA\bAN\bND\bD E\bEX\bXE\bEC\bCU\bUT\bTI\bIO\bON\bN E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT
+ ronment separately (see C\bCO\bOM\bMM\bMA\bAN\bND\bD E\bEX\bXE\bEC\bCU\bUT\bTI\bIO\bON\bN E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT
above), and may cause subshells to exit before executing
all the commands in the subshell.
- If a compound command or shell function executes in a
- context where -\b-e\be is being ignored, none of the commands
- executed within the compound command or function body
- will be affected by the -\b-e\be setting, even if -\b-e\be is set
- and a command returns a failure status. If a compound
- command or shell function sets -\b-e\be while executing in a
- context where -\b-e\be is ignored, that setting will not have
- any effect until the compound command or the command
+ If a compound command or shell function executes in a
+ context where -\b-e\be is being ignored, none of the commands
+ executed within the compound command or function body
+ will be affected by the -\b-e\be setting, even if -\b-e\be is set
+ and a command returns a failure status. If a compound
+ command or shell function sets -\b-e\be while executing in a
+ context where -\b-e\be is ignored, that setting will not have
+ any effect until the compound command or the command
containing the function call completes.
-\b-f\bf Disable pathname expansion.
- -\b-h\bh Remember the location of commands as they are looked up
+ -\b-h\bh Remember the location of commands as they are looked up
for execution. This is enabled by default.
- -\b-k\bk All arguments in the form of assignment statements are
- placed in the environment for a command, not just those
+ -\b-k\bk All arguments in the form of assignment statements are
+ placed in the environment for a command, not just those
that precede the command name.
- -\b-m\bm Monitor mode. Job control is enabled. This option is
- on by default for interactive shells on systems that
- support it (see J\bJO\bOB\bB C\bCO\bON\bNT\bTR\bRO\bOL\bL above). All processes run
+ -\b-m\bm Monitor mode. Job control is enabled. This option is
+ on by default for interactive shells on systems that
+ support it (see J\bJO\bOB\bB C\bCO\bON\bNT\bTR\bRO\bOL\bL above). All processes run
in a separate process group. When a background job com-
pletes, the shell prints a line containing its exit sta-
tus.
-\b-n\bn Read commands but do not execute them. This may be used
- to check a shell script for syntax errors. This is ig-
+ to check a shell script for syntax errors. This is ig-
nored by interactive shells.
-\b-o\bo _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be
The _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be can be one of the following:
Same as -\b-a\ba.
b\bbr\bra\bac\bce\bee\bex\bxp\bpa\ban\bnd\bd
Same as -\b-B\bB.
- e\bem\bma\bac\bcs\bs Use an emacs-style command line editing inter-
+ e\bem\bma\bac\bcs\bs Use an emacs-style command line editing inter-
face. This is enabled by default when the shell
is interactive, unless the shell is started with
- the -\b--\b-n\bno\boe\bed\bdi\bit\bti\bin\bng\bg option. This also affects the
+ the -\b--\b-n\bno\boe\bed\bdi\bit\bti\bin\bng\bg option. This also affects the
editing interface used for r\bre\bea\bad\bd -\b-e\be.
e\ber\brr\bre\bex\bxi\bit\bt Same as -\b-e\be.
e\ber\brr\brt\btr\bra\bac\bce\be
H\bHI\bIS\bST\bTO\bOR\bRY\bY. This option is on by default in inter-
active shells.
i\big\bgn\bno\bor\bre\bee\beo\bof\bf
- The effect is as if the shell command ``IG-
- NOREEOF=10'' had been executed (see S\bSh\bhe\bel\bll\bl V\bVa\bar\bri\bi-\b-
+ The effect is as if the shell command ``IG-
+ NOREEOF=10'' had been executed (see S\bSh\bhe\bel\bll\bl V\bVa\bar\bri\bi-\b-
a\bab\bbl\ble\bes\bs above).
k\bke\bey\byw\bwo\bor\brd\bd Same as -\b-k\bk.
m\bmo\bon\bni\bit\bto\bor\br Same as -\b-m\bm.
p\bph\bhy\bys\bsi\bic\bca\bal\bl
Same as -\b-P\bP.
p\bpi\bip\bpe\bef\bfa\bai\bil\bl
- If set, the return value of a pipeline is the
- value of the last (rightmost) command to exit
- with a non-zero status, or zero if all commands
- in the pipeline exit successfully. This option
+ If set, the return value of a pipeline is the
+ value of the last (rightmost) command to exit
+ with a non-zero status, or zero if all commands
+ in the pipeline exit successfully. This option
is disabled by default.
- p\bpo\bos\bsi\bix\bx 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). See S\bSE\bEE\bE A\bAL\bLS\bSO\bO
+ p\bpo\bos\bsi\bix\bx 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). See S\bSE\bEE\bE A\bAL\bLS\bSO\bO
below for a reference to a document that details
how posix mode affects bash's behavior.
p\bpr\bri\biv\bvi\bil\ble\beg\bge\bed\bd
Same as -\b-p\bp.
v\bve\ber\brb\bbo\bos\bse\be Same as -\b-v\bv.
- v\bvi\bi Use a vi-style command line editing interface.
+ v\bvi\bi Use a vi-style command line editing interface.
This also affects the editing interface used for
r\bre\bea\bad\bd -\b-e\be.
x\bxt\btr\bra\bac\bce\be Same as -\b-x\bx.
- If -\b-o\bo is supplied with no _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be, s\bse\bet\bt prints the
- current shell option settings. If +\b+o\bo is supplied with
- no _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be, s\bse\bet\bt prints a series of s\bse\bet\bt commands to
- recreate the current option settings on the standard
+ If -\b-o\bo is supplied with no _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be, s\bse\bet\bt prints the
+ current shell option settings. If +\b+o\bo is supplied with
+ no _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be, s\bse\bet\bt prints a series of s\bse\bet\bt commands to
+ recreate the current option settings on the standard
output.
- -\b-p\bp Turn on _\bp_\br_\bi_\bv_\bi_\bl_\be_\bg_\be_\bd mode. In this mode, the $\b$E\bEN\bNV\bV and
- $\b$B\bBA\bAS\bSH\bH_\b_E\bEN\bNV\bV files are not processed, shell functions are
- not inherited from the environment, and 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 ap-
- pear in the environment, are ignored. If the shell is
- started with the effective user (group) id not equal to
- the real user (group) id, and the -\b-p\bp option is not sup-
+ -\b-p\bp Turn on _\bp_\br_\bi_\bv_\bi_\bl_\be_\bg_\be_\bd mode. In this mode, the $\b$E\bEN\bNV\bV and
+ $\b$B\bBA\bAS\bSH\bH_\b_E\bEN\bNV\bV files are not processed, shell functions are
+ not inherited from the environment, and 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 ap-
+ pear in the environment, are ignored. If the shell is
+ started with the effective user (group) id not equal to
+ the real user (group) id, and the -\b-p\bp option is not sup-
plied, these actions are taken and the effective user id
- is set to the real user id. If the -\b-p\bp option is sup-
- plied at startup, the effective user id is not reset.
- Turning this option off causes the effective user and
+ is set to the real user id. If the -\b-p\bp option is sup-
+ plied at startup, the effective user id is not reset.
+ Turning this option off causes the effective user and
group ids to be set to the real user and group ids.
-\b-r\br Enable restricted shell mode. This option cannot be un-
set once it has been set.
-\b-t\bt Exit after reading and executing one command.
-\b-u\bu Treat unset variables and parameters other than the spe-
- cial parameters "@" and "*", or array variables sub-
- scripted with "@" or "*", as an error when performing
- parameter expansion. If expansion is attempted on an
- unset variable or parameter, the shell prints an error
- message, and, if not interactive, exits with a non-zero
+ cial parameters "@" and "*", or array variables sub-
+ scripted with "@" or "*", as an error when performing
+ parameter expansion. If expansion is attempted on an
+ unset variable or parameter, the shell prints an error
+ message, and, if not interactive, exits with a non-zero
status.
-\b-v\bv Print shell input lines as they are read.
- -\b-x\bx After expanding each _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd, f\bfo\bor\br command, c\bca\bas\bse\be
+ -\b-x\bx After expanding each _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd, f\bfo\bor\br command, c\bca\bas\bse\be
command, s\bse\bel\ble\bec\bct\bt command, or arithmetic f\bfo\bor\br command, dis-
- play the expanded value of P\bPS\bS4\b4, followed by the command
- and its expanded arguments or associated word list, to
+ play the expanded value of P\bPS\bS4\b4, followed by the command
+ and its expanded arguments or associated word list, to
standard error.
- -\b-B\bB The shell performs brace expansion (see B\bBr\bra\bac\bce\be E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn
+ -\b-B\bB The shell performs brace expansion (see B\bBr\bra\bac\bce\be E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn
above). This is on by default.
- -\b-C\bC If set, b\bba\bas\bsh\bh does not overwrite an existing file with
- the >\b>, >\b>&\b&, and <\b<>\b> redirection operators. This may be
+ -\b-C\bC If set, b\bba\bas\bsh\bh does not overwrite an existing file with
+ the >\b>, >\b>&\b&, and <\b<>\b> redirection operators. This may be
overridden when creating output files by using the redi-
rection operator >\b>|\b| instead of >\b>.
-\b-E\bE If set, any trap on E\bER\bRR\bR is inherited by shell functions,
- command substitutions, and commands executed in a sub-
- shell environment. The E\bER\bRR\bR trap is normally not inher-
+ command substitutions, and commands executed in a sub-
+ shell environment. The E\bER\bRR\bR trap is normally not inher-
ited in such cases.
-\b-H\bH Enable !\b! style history substitution. This option is on
by default when the shell is interactive.
- -\b-P\bP If set, the shell does not resolve symbolic links when
- executing commands such as c\bcd\bd that change the current
+ -\b-P\bP If set, the shell does not resolve symbolic links when
+ executing commands such as c\bcd\bd that change the current
working directory. It uses the physical directory
structure instead. By default, b\bba\bas\bsh\bh follows the logical
- chain of directories when performing commands which
+ chain of directories when performing commands which
change the current directory.
- -\b-T\bT If set, any traps on D\bDE\bEB\bBU\bUG\bG and R\bRE\bET\bTU\bUR\bRN\bN are inherited by
+ -\b-T\bT If set, any traps on D\bDE\bEB\bBU\bUG\bG and R\bRE\bET\bTU\bUR\bRN\bN are inherited by
shell functions, command substitutions, and commands ex-
- ecuted in a subshell environment. The D\bDE\bEB\bBU\bUG\bG and R\bRE\bET\bTU\bUR\bRN\bN
+ ecuted in a subshell environment. The D\bDE\bEB\bBU\bUG\bG and R\bRE\bET\bTU\bUR\bRN\bN
traps are normally not inherited in such cases.
- -\b--\b- If no arguments follow this option, then the positional
+ -\b--\b- If no arguments follow this option, then the positional
parameters are unset. Otherwise, the positional parame-
- ters are set to the _\ba_\br_\bgs, even if some of them begin
+ ters are set to the _\ba_\br_\bgs, even if some of them begin
with a -\b-.
- -\b- Signal the end of options, cause all remaining _\ba_\br_\bgs to
+ -\b- Signal the end of options, cause all remaining _\ba_\br_\bgs to
be assigned to the positional parameters. The -\b-x\bx and -\b-v\bv
options are turned off. If there are no _\ba_\br_\bgs, the posi-
tional parameters remain unchanged.
- The options are off by default unless otherwise noted. Using +
- rather than - causes these options to be turned off. The op-
+ The options are off by default unless otherwise noted. Using +
+ rather than - causes these options to be turned off. The op-
tions can also be specified as arguments to an invocation of the
- shell. The current set of options may be found in $\b$-\b-. The re-
- turn status is always true unless an invalid option is encoun-
+ shell. The current set of options may be found in $\b$-\b-. The re-
+ turn status is always true unless an invalid option is encoun-
tered.
s\bsh\bhi\bif\bft\bt [_\bn]
- The positional parameters from _\bn+1 ... are renamed to $\b$1\b1 .\b..\b..\b..\b.
- Parameters represented by the numbers $\b$#\b# down to $\b$#\b#-_\bn+1 are un-
- set. _\bn must be a non-negative number less than or equal to $\b$#\b#.
- If _\bn is 0, no parameters are changed. If _\bn is not given, it is
+ The positional parameters from _\bn+1 ... are renamed to $\b$1\b1 .\b..\b..\b..\b.
+ Parameters represented by the numbers $\b$#\b# down to $\b$#\b#-_\bn+1 are un-
+ set. _\bn must be a non-negative number less than or equal to $\b$#\b#.
+ If _\bn is 0, no parameters are changed. If _\bn is not given, it is
assumed to be 1. If _\bn is greater than $\b$#\b#, the positional param-
- eters are not changed. The return status is greater than zero
+ eters are not changed. The return status is greater than zero
if _\bn is greater than $\b$#\b# or less than zero; otherwise 0.
s\bsh\bho\bop\bpt\bt [-\b-p\bpq\bqs\bsu\bu] [-\b-o\bo] [_\bo_\bp_\bt_\bn_\ba_\bm_\be ...]
- Toggle the values of settings controlling optional shell behav-
- ior. The settings can be either those listed below, or, if the
+ Toggle the values of settings controlling optional shell behav-
+ ior. The settings can be either those listed below, or, if the
-\b-o\bo option is used, those available with the -\b-o\bo option to the s\bse\bet\bt
builtin command. With no options, or with the -\b-p\bp option, a list
- of all settable options is displayed, with an indication of
+ of all settable options is displayed, with an indication of
whether or not each is set; if _\bo_\bp_\bt_\bn_\ba_\bm_\be_\bs are supplied, the output
- is restricted to those options. The -\b-p\bp option causes output to
- be displayed in a form that may be reused as input. Other op-
+ is restricted to those options. The -\b-p\bp option causes output to
+ be displayed in a form that may be reused as input. Other op-
tions have the following meanings:
-\b-s\bs Enable (set) each _\bo_\bp_\bt_\bn_\ba_\bm_\be.
-\b-u\bu Disable (unset) each _\bo_\bp_\bt_\bn_\ba_\bm_\be.
- -\b-q\bq Suppresses normal output (quiet mode); the return status
+ -\b-q\bq Suppresses normal output (quiet mode); the return status
indicates whether the _\bo_\bp_\bt_\bn_\ba_\bm_\be is set or unset. If multi-
- ple _\bo_\bp_\bt_\bn_\ba_\bm_\be arguments are given with -\b-q\bq, the return sta-
- tus is zero if all _\bo_\bp_\bt_\bn_\ba_\bm_\be_\bs are enabled; non-zero other-
+ ple _\bo_\bp_\bt_\bn_\ba_\bm_\be arguments are given with -\b-q\bq, the return sta-
+ tus is zero if all _\bo_\bp_\bt_\bn_\ba_\bm_\be_\bs are enabled; non-zero other-
wise.
- -\b-o\bo Restricts the values of _\bo_\bp_\bt_\bn_\ba_\bm_\be to be those defined for
+ -\b-o\bo Restricts the values of _\bo_\bp_\bt_\bn_\ba_\bm_\be to be those defined for
the -\b-o\bo option to the s\bse\bet\bt builtin.
- If either -\b-s\bs or -\b-u\bu is used with no _\bo_\bp_\bt_\bn_\ba_\bm_\be arguments, s\bsh\bho\bop\bpt\bt
- shows only those options which are set or unset, respectively.
- Unless otherwise noted, the s\bsh\bho\bop\bpt\bt options are disabled (unset)
+ If either -\b-s\bs or -\b-u\bu is used with no _\bo_\bp_\bt_\bn_\ba_\bm_\be arguments, s\bsh\bho\bop\bpt\bt
+ shows only those options which are set or unset, respectively.
+ Unless otherwise noted, the s\bsh\bho\bop\bpt\bt options are disabled (unset)
by default.
- The return status when listing options is zero if all _\bo_\bp_\bt_\bn_\ba_\bm_\be_\bs
- are enabled, non-zero otherwise. When setting or unsetting op-
- tions, the return status is zero unless an _\bo_\bp_\bt_\bn_\ba_\bm_\be is not a
+ The return status when listing options is zero if all _\bo_\bp_\bt_\bn_\ba_\bm_\be_\bs
+ are enabled, non-zero otherwise. When setting or unsetting op-
+ tions, the return status is zero unless an _\bo_\bp_\bt_\bn_\ba_\bm_\be is not a
valid shell option.
The list of s\bsh\bho\bop\bpt\bt options is:
a\bar\brr\bra\bay\by_\b_e\bex\bxp\bpa\ban\bnd\bd_\b_o\bon\bnc\bce\be
- If set, the shell suppresses multiple evaluation of as-
+ If set, the shell suppresses multiple evaluation of as-
sociative and indexed array subscripts during arithmetic
expression evaluation, while executing builtins that can
- perform variable assignments, and while executing
+ perform variable assignments, and while executing
builtins that perform array dereferencing.
a\bas\bss\bso\boc\bc_\b_e\bex\bxp\bpa\ban\bnd\bd_\b_o\bon\bnc\bce\be
Deprecated; a synonym for a\bar\brr\bra\bay\by_\b_e\bex\bxp\bpa\ban\bnd\bd_\b_o\bon\bnc\bce\be.
- a\bau\but\bto\boc\bcd\bd If set, a command name that is the name of a directory
- is executed as if it were the argument to the c\bcd\bd com-
+ a\bau\but\bto\boc\bcd\bd If set, a command name that is the name of a directory
+ is executed as if it were the argument to the c\bcd\bd com-
mand. This option is only used by interactive shells.
c\bcd\bda\bab\bbl\ble\be_\b_v\bva\bar\brs\bs
- If set, an argument to the c\bcd\bd builtin command that is
- not a directory is assumed to be the name of a variable
+ If set, an argument to the c\bcd\bd builtin command that is
+ not a directory is assumed to be the name of a variable
whose value is the directory to change to.
c\bcd\bds\bsp\bpe\bel\bll\bl If set, minor errors in the spelling of a directory com-
- ponent in a c\bcd\bd command will be corrected. The errors
+ ponent in a c\bcd\bd command will be corrected. The errors
checked for are transposed characters, a missing charac-
- ter, and one character too many. If a correction is
- found, the corrected filename is printed, and the com-
- mand proceeds. This option is only used by interactive
+ ter, and one character too many. If a correction is
+ found, the corrected filename is printed, and the com-
+ mand proceeds. This option is only used by interactive
shells.
c\bch\bhe\bec\bck\bkh\bha\bas\bsh\bh
If set, b\bba\bas\bsh\bh checks that a command found in the hash ta-
- ble exists before trying to execute it. If a hashed
- command no longer exists, a normal path search is per-
+ ble exists before trying to execute it. If a hashed
+ command no longer exists, a normal path search is per-
formed.
c\bch\bhe\bec\bck\bkj\bjo\bob\bbs\bs
If set, b\bba\bas\bsh\bh lists the status of any stopped and running
- jobs before exiting an interactive shell. If any jobs
+ jobs before exiting an interactive shell. If any jobs
are running, this causes the exit to be deferred until a
- second exit is attempted without an intervening command
+ second exit is attempted without an intervening command
(see J\bJO\bOB\bB C\bCO\bON\bNT\bTR\bRO\bOL\bL above). The shell always postpones ex-
iting if any jobs are stopped.
c\bch\bhe\bec\bck\bkw\bwi\bin\bns\bsi\biz\bze\be
- If set, b\bba\bas\bsh\bh checks the window size after each external
- (non-builtin) command and, if necessary, updates the
- values of L\bLI\bIN\bNE\bES\bS and C\bCO\bOL\bLU\bUM\bMN\bNS\bS. This option is enabled by
+ If set, b\bba\bas\bsh\bh checks the window size after each external
+ (non-builtin) command and, if necessary, updates the
+ values of L\bLI\bIN\bNE\bES\bS and C\bCO\bOL\bLU\bUM\bMN\bNS\bS. This option is enabled by
default.
- c\bcm\bmd\bdh\bhi\bis\bst\bt If set, b\bba\bas\bsh\bh attempts to save all lines of a multiple-
- line command in the same history entry. This allows
- easy re-editing of multi-line commands. This option is
- enabled by default, but only has an effect if command
+ c\bcm\bmd\bdh\bhi\bis\bst\bt If set, b\bba\bas\bsh\bh attempts to save all lines of a multiple-
+ line command in the same history entry. This allows
+ easy re-editing of multi-line commands. This option is
+ enabled by default, but only has an effect if command
history is enabled, as described above under H\bHI\bIS\bST\bTO\bOR\bRY\bY.
c\bco\bom\bmp\bpa\bat\bt3\b31\b1
c\bco\bom\bmp\bpa\bat\bt3\b32\b2
c\bco\bom\bmp\bpa\bat\bt4\b43\b3
c\bco\bom\bmp\bpa\bat\bt4\b44\b4
c\bco\bom\bmp\bpa\bat\bt5\b50\b0
- These control aspects of the shell's compatibility mode
+ These control aspects of the shell's compatibility mode
(see S\bSH\bHE\bEL\bLL\bL C\bCO\bOM\bMP\bPA\bAT\bTI\bIB\bBI\bIL\bLI\bIT\bTY\bY M\bMO\bOD\bDE\bE below).
c\bco\bom\bmp\bpl\ble\bet\bte\be_\b_f\bfu\bul\bll\blq\bqu\buo\bot\bte\be
- If set, b\bba\bas\bsh\bh quotes all shell metacharacters in file-
- names and directory names when performing completion.
+ If set, b\bba\bas\bsh\bh quotes all shell metacharacters in file-
+ names and directory names when performing completion.
If not set, b\bba\bas\bsh\bh removes metacharacters such as the dol-
- lar sign from the set of characters that will be quoted
- in completed filenames when these metacharacters appear
- in shell variable references in words to be completed.
- This means that dollar signs in variable names that ex-
- pand to directories will not be quoted; however, any
- dollar signs appearing in filenames will not be quoted,
- either. This is active only when bash is using back-
- slashes to quote completed filenames. This variable is
- set by default, which is the default bash behavior in
+ lar sign from the set of characters that will be quoted
+ in completed filenames when these metacharacters appear
+ in shell variable references in words to be completed.
+ This means that dollar signs in variable names that ex-
+ pand to directories will not be quoted; however, any
+ dollar signs appearing in filenames will not be quoted,
+ either. This is active only when bash is using back-
+ slashes to quote completed filenames. This variable is
+ set by default, which is the default bash behavior in
versions through 4.2.
d\bdi\bir\bre\bex\bxp\bpa\ban\bnd\bd
- If set, b\bba\bas\bsh\bh replaces directory names with the results
- of word expansion when performing filename completion.
- This changes the contents of the readline editing buf-
- fer. If not set, b\bba\bas\bsh\bh attempts to preserve what the
+ If set, b\bba\bas\bsh\bh replaces directory names with the results
+ of word expansion when performing filename completion.
+ This changes the contents of the readline editing buf-
+ fer. If not set, b\bba\bas\bsh\bh attempts to preserve what the
user typed.
d\bdi\bir\brs\bsp\bpe\bel\bll\bl
- If set, b\bba\bas\bsh\bh attempts spelling correction on directory
- names during word completion if the directory name ini-
+ If set, b\bba\bas\bsh\bh attempts spelling correction on directory
+ names during word completion if the directory name ini-
tially supplied does not exist.
- d\bdo\bot\btg\bgl\blo\bob\bb If set, b\bba\bas\bsh\bh includes filenames beginning with a `.' in
- the results of pathname expansion. The filenames `\b``\b`.\b.'\b''\b'
- and `\b``\b`.\b..\b.'\b''\b' must always be matched explicitly, even if
+ d\bdo\bot\btg\bgl\blo\bob\bb If set, b\bba\bas\bsh\bh includes filenames beginning with a `.' in
+ the results of pathname expansion. The filenames `\b``\b`.\b.'\b''\b'
+ and `\b``\b`.\b..\b.'\b''\b' must always be matched explicitly, even if
d\bdo\bot\btg\bgl\blo\bob\bb is set.
e\bex\bxe\bec\bcf\bfa\bai\bil\bl
If set, a non-interactive shell will not exit if it can-
- not execute the file specified as an argument to the
- e\bex\bxe\bec\bc builtin command. An interactive shell does not
+ not execute the file specified as an argument to the
+ e\bex\bxe\bec\bc builtin command. An interactive shell does not
exit if e\bex\bxe\bec\bc fails.
e\bex\bxp\bpa\ban\bnd\bd_\b_a\bal\bli\bia\bas\bse\bes\bs
- If set, aliases are expanded as described above under
+ If set, aliases are expanded as described above under
A\bAL\bLI\bIA\bAS\bSE\bES\bS. This option is enabled by default for interac-
tive shells.
e\bex\bxt\btd\bde\beb\bbu\bug\bg
- If set at shell invocation, or in a shell startup file,
+ If set at shell invocation, or in a shell startup file,
arrange to execute the debugger profile before the shell
- starts, identical to the -\b--\b-d\bde\beb\bbu\bug\bgg\bge\ber\br option. If set af-
- ter invocation, behavior intended for use by debuggers
+ starts, identical to the -\b--\b-d\bde\beb\bbu\bug\bgg\bge\ber\br option. If set af-
+ ter invocation, behavior intended for use by debuggers
is enabled:
1\b1.\b. The -\b-F\bF option to the d\bde\bec\bcl\bla\bar\bre\be builtin displays the
source file name and line number corresponding to
each function name supplied as an argument.
- 2\b2.\b. If the command run by the D\bDE\bEB\bBU\bUG\bG trap returns a
- non-zero value, the next command is skipped and
+ 2\b2.\b. If the command run by the D\bDE\bEB\bBU\bUG\bG trap returns a
+ non-zero value, the next command is skipped and
not executed.
- 3\b3.\b. If the command run by the D\bDE\bEB\bBU\bUG\bG trap returns a
- value of 2, and the shell is executing in a sub-
- routine (a shell function or a shell script exe-
- cuted by the .\b. or s\bso\bou\bur\brc\bce\be builtins), the shell
+ 3\b3.\b. If the command run by the D\bDE\bEB\bBU\bUG\bG trap returns a
+ value of 2, and the shell is executing in a sub-
+ routine (a shell function or a shell script exe-
+ cuted by the .\b. or s\bso\bou\bur\brc\bce\be builtins), the shell
simulates a call to r\bre\bet\btu\bur\brn\bn.
- 4\b4.\b. B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGC\bC and B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGV\bV are updated as described
+ 4\b4.\b. B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGC\bC and B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGV\bV are updated as described
in their descriptions above).
- 5\b5.\b. Function tracing is enabled: command substitu-
+ 5\b5.\b. Function tracing is enabled: command substitu-
tion, shell functions, and subshells invoked with
(\b( _\bc_\bo_\bm_\bm_\ba_\bn_\bd )\b) inherit the D\bDE\bEB\bBU\bUG\bG and R\bRE\bET\bTU\bUR\bRN\bN traps.
- 6\b6.\b. Error tracing is enabled: command substitution,
- shell functions, and subshells invoked with (\b(
+ 6\b6.\b. Error tracing is enabled: command substitution,
+ shell functions, and subshells invoked with (\b(
_\bc_\bo_\bm_\bm_\ba_\bn_\bd )\b) inherit the E\bER\bRR\bR trap.
e\bex\bxt\btg\bgl\blo\bob\bb If set, 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
- If set, $\b$'_\bs_\bt_\br_\bi_\bn_\bg' and $\b$"_\bs_\bt_\br_\bi_\bn_\bg" quoting is performed
- within $\b${\b{_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br}\b} expansions enclosed in double
+ If set, $\b$'_\bs_\bt_\br_\bi_\bn_\bg' and $\b$"_\bs_\bt_\br_\bi_\bn_\bg" quoting is performed
+ within $\b${\b{_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br}\b} expansions enclosed in double
quotes. This option is enabled by default.
f\bfa\bai\bil\blg\bgl\blo\bob\bb
- If set, patterns which fail to match filenames during
+ If set, patterns which fail to match filenames during
pathname expansion result in an expansion error.
f\bfo\bor\brc\bce\be_\b_f\bfi\big\bgn\bno\bor\bre\be
- If set, the suffixes specified by the F\bFI\bIG\bGN\bNO\bOR\bRE\bE shell
- variable cause words to be ignored when performing word
+ If set, the suffixes specified by the F\bFI\bIG\bGN\bNO\bOR\bRE\bE shell
+ variable cause words to be ignored when performing word
completion even if the ignored words are the only possi-
- ble completions. See S\bSH\bHE\bEL\bLL\bL V\bVA\bAR\bRI\bIA\bAB\bBL\bLE\bES\bS above for a de-
- scription of F\bFI\bIG\bGN\bNO\bOR\bRE\bE. This option is enabled by de-
+ ble completions. See S\bSH\bHE\bEL\bLL\bL V\bVA\bAR\bRI\bIA\bAB\bBL\bLE\bES\bS above for a de-
+ scription of F\bFI\bIG\bGN\bNO\bOR\bRE\bE. This option is enabled by de-
fault.
g\bgl\blo\bob\bba\bas\bsc\bci\bii\bir\bra\ban\bng\bge\bes\bs
- If set, range expressions used in pattern matching
- bracket expressions (see P\bPa\bat\btt\bte\ber\brn\bn M\bMa\bat\btc\bch\bhi\bin\bng\bg above) behave
- as if in the traditional C locale when performing com-
- parisons. That is, the current locale's collating se-
- quence is not taken into account, so b\bb will not collate
- between A\bA and B\bB, and upper-case and lower-case ASCII
+ If set, range expressions used in pattern matching
+ bracket expressions (see P\bPa\bat\btt\bte\ber\brn\bn M\bMa\bat\btc\bch\bhi\bin\bng\bg above) behave
+ as if in the traditional C locale when performing com-
+ parisons. That is, the current locale's collating se-
+ quence is not taken into account, so b\bb will not collate
+ between A\bA and B\bB, and upper-case and lower-case ASCII
characters will collate together.
g\bgl\blo\bob\bbs\bsk\bki\bip\bpd\bdo\bot\bts\bs
- If set, pathname expansion will never match the file-
+ If set, pathname expansion will never match the file-
names `\b``\b`.\b.'\b''\b' and `\b``\b`.\b..\b.'\b''\b', even if the pattern begins with
a `\b``\b`.\b.'\b''\b'. This option is enabled by default.
g\bgl\blo\bob\bbs\bst\bta\bar\br
If set, the pattern *\b**\b* used in a pathname expansion con-
- text will match all files and zero or more directories
- and subdirectories. If the pattern is followed by a /\b/,
+ text will match all files and zero or more directories
+ and subdirectories. If the pattern is followed by a /\b/,
only directories and subdirectories match.
g\bgn\bnu\bu_\b_e\ber\brr\brf\bfm\bmt\bt
GNU error message format.
h\bhi\bis\bst\bta\bap\bpp\bpe\ben\bnd\bd
- If set, the history list is appended to the file named
+ If set, the history list is appended to the file named
by the value of the H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE variable when the shell ex-
its, rather than overwriting the file.
h\bhi\bis\bst\btr\bre\bee\bed\bdi\bit\bt
- If set, and r\bre\bea\bad\bdl\bli\bin\bne\be is being used, a user is given the
+ If set, and r\bre\bea\bad\bdl\bli\bin\bne\be is being used, a user is given the
opportunity to re-edit a failed history substitution.
h\bhi\bis\bst\btv\bve\ber\bri\bif\bfy\by
- If set, and r\bre\bea\bad\bdl\bli\bin\bne\be is being used, the results of his-
- tory substitution are not immediately passed to the
- shell parser. Instead, the resulting line is loaded
+ If set, and r\bre\bea\bad\bdl\bli\bin\bne\be is being used, the results of his-
+ tory substitution are not immediately passed to the
+ shell parser. Instead, the resulting line is loaded
into the r\bre\bea\bad\bdl\bli\bin\bne\be editing buffer, allowing further modi-
fication.
h\bho\bos\bst\btc\bco\bom\bmp\bpl\ble\bet\bte\be
If set, and r\bre\bea\bad\bdl\bli\bin\bne\be is being used, b\bba\bas\bsh\bh will attempt to
- perform hostname completion when a word containing a @\b@
- is being completed (see C\bCo\bom\bmp\bpl\ble\bet\bti\bin\bng\bg under R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE
+ perform hostname completion when a word containing a @\b@
+ is being completed (see C\bCo\bom\bmp\bpl\ble\bet\bti\bin\bng\bg under R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE
above). This is enabled by default.
h\bhu\bup\bpo\bon\bne\bex\bxi\bit\bt
active login shell exits.
i\bin\bnh\bhe\ber\bri\bit\bt_\b_e\ber\brr\bre\bex\bxi\bit\bt
- If set, command substitution inherits the value of the
- e\ber\brr\bre\bex\bxi\bit\bt option, instead of unsetting it in the subshell
- environment. This option is enabled when _\bp_\bo_\bs_\bi_\bx _\bm_\bo_\bd_\be is
+ If set, command substitution inherits the value of the
+ e\ber\brr\bre\bex\bxi\bit\bt option, instead of unsetting it in the subshell
+ environment. This option is enabled when _\bp_\bo_\bs_\bi_\bx _\bm_\bo_\bd_\be is
enabled.
i\bin\bnt\bte\ber\bra\bac\bct\bti\biv\bve\be_\b_c\bco\bom\bmm\bme\ben\bnt\bts\bs
If set, allow a word beginning with #\b# to cause that word
- 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 op-
+ 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 op-
tion is enabled by default.
l\bla\bas\bst\btp\bpi\bip\bpe\be
- If set, and job control is not active, the shell runs
+ If set, and job control is not active, the shell runs
the last command of a pipeline not executed in the back-
ground in the current shell environment.
- l\bli\bit\bth\bhi\bis\bst\bt If set, and the c\bcm\bmd\bdh\bhi\bis\bst\bt option is enabled, multi-line
+ l\bli\bit\bth\bhi\bis\bst\bt If set, and the c\bcm\bmd\bdh\bhi\bis\bst\bt option is enabled, multi-line
commands are saved to the history with embedded newlines
rather than using semicolon separators where possible.
tribute is not inherited.
l\blo\boc\bca\bal\blv\bva\bar\br_\b_u\bun\bns\bse\bet\bt
- If set, calling u\bun\bns\bse\bet\bt on local variables in previous
- function scopes marks them so subsequent lookups find
- them unset until that function returns. This is identi-
- cal to the behavior of unsetting local variables at the
+ If set, calling u\bun\bns\bse\bet\bt on local variables in previous
+ function scopes marks them so subsequent lookups find
+ them unset until that function returns. This is identi-
+ cal to the behavior of unsetting local variables at the
current function scope.
l\blo\bog\bgi\bin\bn_\b_s\bsh\bhe\bel\bll\bl
- The shell sets this option if it is started as a login
- shell (see I\bIN\bNV\bVO\bOC\bCA\bAT\bTI\bIO\bON\bN above). The value may not be
+ The shell sets this option if it is started as a login
+ shell (see I\bIN\bNV\bVO\bOC\bCA\bAT\bTI\bIO\bON\bN above). The value may not be
changed.
m\bma\bai\bil\blw\bwa\bar\brn\bn
- If set, and a file that b\bba\bas\bsh\bh is checking for mail has
- been accessed since the last time it was checked, the
- message ``The mail in _\bm_\ba_\bi_\bl_\bf_\bi_\bl_\be has been read'' is dis-
+ If set, and a file that b\bba\bas\bsh\bh is checking for mail has
+ been accessed since the last time it was checked, the
+ message ``The mail in _\bm_\ba_\bi_\bl_\bf_\bi_\bl_\be has been read'' is dis-
played.
n\bno\bo_\b_e\bem\bmp\bpt\bty\by_\b_c\bcm\bmd\bd_\b_c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn
- If set, and r\bre\bea\bad\bdl\bli\bin\bne\be is being used, b\bba\bas\bsh\bh will not at-
- tempt to search the P\bPA\bAT\bTH\bH for possible completions when
+ If set, and r\bre\bea\bad\bdl\bli\bin\bne\be is being used, b\bba\bas\bsh\bh will not at-
+ tempt to search the P\bPA\bAT\bTH\bH for possible completions when
completion is attempted on an empty line.
n\bno\boc\bca\bas\bse\beg\bgl\blo\bob\bb
- If set, b\bba\bas\bsh\bh matches filenames in a case-insensitive
+ If set, b\bba\bas\bsh\bh matches filenames in a case-insensitive
fashion when performing pathname expansion (see P\bPa\bat\bth\bhn\bna\bam\bme\be
E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn above).
n\bno\boc\bca\bas\bse\bem\bma\bat\btc\bch\bh
- If set, b\bba\bas\bsh\bh matches patterns in a case-insensitive
+ If set, b\bba\bas\bsh\bh matches patterns in a case-insensitive
fashion when performing matching while executing c\bca\bas\bse\be or
[\b[[\b[ conditional commands, when performing pattern substi-
- tution word expansions, or when filtering possible com-
+ tution word expansions, or when filtering possible com-
pletions as part of programmable completion.
n\bno\boe\bex\bxp\bpa\ban\bnd\bd_\b_t\btr\bra\ban\bns\bsl\bla\bat\bti\bio\bon\bn
- If set, b\bba\bas\bsh\bh encloses the translated results of $"..."
- quoting in single quotes instead of double quotes. If
+ If set, b\bba\bas\bsh\bh encloses the translated results of $"..."
+ quoting in single quotes instead of double quotes. If
the string is not translated, this has no effect.
n\bnu\bul\bll\blg\bgl\blo\bob\bb
- If set, b\bba\bas\bsh\bh allows patterns which match no files (see
- P\bPa\bat\bth\bhn\bna\bam\bme\be E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn above) to expand to a null string,
+ If set, b\bba\bas\bsh\bh allows patterns which match no files (see
+ P\bPa\bat\bth\bhn\bna\bam\bme\be E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn above) to expand to a null string,
rather than themselves.
p\bpa\bat\bts\bsu\bub\bb_\b_r\bre\bep\bpl\bla\bac\bce\bem\bme\ben\bnt\bt
If set, b\bba\bas\bsh\bh expands occurrences of &\b& in the replacement
- string of pattern substitution to the text matched by
- the pattern, as described under P\bPa\bar\bra\bam\bme\bet\bte\ber\br E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn
+ string of pattern substitution to the text matched by
+ the pattern, as described under P\bPa\bar\bra\bam\bme\bet\bte\ber\br E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn
above. This option is enabled by default.
p\bpr\bro\bog\bgc\bco\bom\bmp\bp
enabled by default.
p\bpr\bro\bog\bgc\bco\bom\bmp\bp_\b_a\bal\bli\bia\bas\bs
- If set, and programmable completion is enabled, b\bba\bas\bsh\bh
- treats a command name that doesn't have any completions
- as a possible alias and attempts alias expansion. If it
- has an alias, b\bba\bas\bsh\bh attempts programmable completion us-
+ If set, and programmable completion is enabled, b\bba\bas\bsh\bh
+ treats a command name that doesn't have any completions
+ as a possible alias and attempts alias expansion. If it
+ has an alias, b\bba\bas\bsh\bh attempts programmable completion us-
ing the command word resulting from the expanded alias.
p\bpr\bro\bom\bmp\bpt\btv\bva\bar\brs\bs
If set, prompt strings undergo parameter expansion, com-
- mand substitution, arithmetic expansion, and quote re-
- moval after being expanded as described in P\bPR\bRO\bOM\bMP\bPT\bTI\bIN\bNG\bG
+ mand substitution, arithmetic expansion, and quote re-
+ moval after being expanded as described in P\bPR\bRO\bOM\bMP\bPT\bTI\bIN\bNG\bG
above. This option is enabled by default.
r\bre\bes\bst\btr\bri\bic\bct\bte\bed\bd_\b_s\bsh\bhe\bel\bll\bl
- The shell sets this option if it is started in re-
- stricted mode (see R\bRE\bES\bST\bTR\bRI\bIC\bCT\bTE\bED\bD S\bSH\bHE\bEL\bLL\bL below). The value
- may not be changed. This is not reset when the startup
- files are executed, allowing the startup files to dis-
+ The shell sets this option if it is started in re-
+ stricted mode (see R\bRE\bES\bST\bTR\bRI\bIC\bCT\bTE\bED\bD S\bSH\bHE\bEL\bLL\bL below). The value
+ may not be changed. This is not reset when the startup
+ files are executed, allowing the startup files to dis-
cover whether or not a shell is restricted.
s\bsh\bhi\bif\bft\bt_\b_v\bve\ber\brb\bbo\bos\bse\be
- If set, the s\bsh\bhi\bif\bft\bt builtin prints an error message when
+ If set, the s\bsh\bhi\bif\bft\bt builtin prints an error message when
the shift count exceeds the number of positional parame-
ters.
s\bso\bou\bur\brc\bce\bep\bpa\bat\bth\bh
If set, the .\b. (s\bso\bou\bur\brc\bce\be) builtin uses the value of P\bPA\bAT\bTH\bH to
- find the directory containing the file supplied as an
+ find the directory containing the file supplied as an
argument. This option is enabled by default.
v\bva\bar\brr\bre\bed\bdi\bir\br_\b_c\bcl\blo\bos\bse\be
- If set, the shell automatically closes file descriptors
+ If set, the shell automatically closes file descriptors
assigned using the _\b{_\bv_\ba_\br_\bn_\ba_\bm_\be_\b} redirection syntax (see R\bRE\bE-\b-
- D\bDI\bIR\bRE\bEC\bCT\bTI\bIO\bON\bN above) instead of leaving them open when the
+ D\bDI\bIR\bRE\bEC\bCT\bTI\bIO\bON\bN above) instead of leaving them open when the
command completes.
x\bxp\bpg\bg_\b_e\bec\bch\bho\bo
- If set, the e\bec\bch\bho\bo builtin expands backslash-escape se-
- quences by default. If the p\bpo\bos\bsi\bix\bx shell option is also
+ If set, the e\bec\bch\bho\bo builtin expands backslash-escape se-
+ quences by default. If the p\bpo\bos\bsi\bix\bx shell option is also
enabled, e\bec\bch\bho\bo does not interpret any options.
s\bsu\bus\bsp\bpe\ben\bnd\bd [-\b-f\bf]
- Suspend the execution of this shell until it receives a S\bSI\bIG\bGC\bCO\bON\bNT\bT
- signal. A login shell, or a shell without job control enabled,
- cannot be suspended; the -\b-f\bf option can be used to override this
- and force the suspension. The return status is 0 unless the
- shell is a login shell or job control is not enabled and -\b-f\bf is
+ Suspend the execution of this shell until it receives a S\bSI\bIG\bGC\bCO\bON\bNT\bT
+ signal. A login shell, or a shell without job control enabled,
+ cannot be suspended; the -\b-f\bf option can be used to override this
+ and force the suspension. The return status is 0 unless the
+ shell is a login shell or job control is not enabled and -\b-f\bf is
not supplied.
t\bte\bes\bst\bt _\be_\bx_\bp_\br
[\b[ _\be_\bx_\bp_\br ]\b]
Return a status of 0 (true) or 1 (false) depending on the evalu-
ation of the conditional expression _\be_\bx_\bp_\br. Each operator and op-
- erand must be a separate argument. Expressions are composed of
- the primaries described above under C\bCO\bON\bND\bDI\bIT\bTI\bIO\bON\bNA\bAL\bL E\bEX\bXP\bPR\bRE\bES\bSS\bSI\bIO\bON\bNS\bS.
- t\bte\bes\bst\bt does not accept any options, nor does it accept and ignore
+ erand must be a separate argument. Expressions are composed of
+ the primaries described above under C\bCO\bON\bND\bDI\bIT\bTI\bIO\bON\bNA\bAL\bL E\bEX\bXP\bPR\bRE\bES\bSS\bSI\bIO\bON\bNS\bS.
+ t\bte\bes\bst\bt does not accept any options, nor does it accept and ignore
an argument of -\b--\b- as signifying the end of options.
- Expressions may be combined using the following operators,
- listed in decreasing order of precedence. The evaluation de-
- pends on the number of arguments; see below. Operator prece-
+ Expressions may be combined using the following operators,
+ listed in decreasing order of precedence. The evaluation de-
+ pends on the number of arguments; see below. 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
+ If the second argument is one of the binary conditional
operators listed above under C\bCO\bON\bND\bDI\bIT\bTI\bIO\bON\bNA\bAL\bL E\bEX\bXP\bPR\bRE\bES\bSS\bSI\bIO\bON\bNS\bS, the
result of the expression is the result of the binary test
- using the first and third arguments as operands. The -\b-a\ba
- and -\b-o\bo operators are considered binary operators when
- there are three arguments. If the first argument is !\b!,
- the value is the negation of the two-argument test using
+ using the first and third arguments as operands. The -\b-a\ba
+ and -\b-o\bo operators are considered binary operators when
+ there are three arguments. If the first argument is !\b!,
+ the value is the negation of the two-argument test using
the second and third arguments. If the first argument is
exactly (\b( and the third argument is exactly )\b), the result
- is the one-argument test of the second argument. Other-
+ is the one-argument test of the second argument. Other-
wise, the expression is false.
4 arguments
The following conditions are applied in the order listed.
If the first argument is !\b!, the result is the negation of
- the three-argument expression composed of the remaining
- arguments. the two-argument test using the second and
- third arguments. If the first argument is exactly (\b( and
- the fourth argument is exactly )\b), the result is the two-
- argument test of the second and third arguments. Other-
+ the three-argument expression composed of the remaining
+ arguments. the two-argument test using the second and
+ third arguments. If the first argument is exactly (\b( and
+ the fourth argument is exactly )\b), the result is the two-
+ argument test of the second and third arguments. Other-
wise, the expression is parsed and evaluated according to
precedence using the rules listed above.
5 or more arguments
- The expression is parsed and evaluated according to
+ The expression is parsed and evaluated according to
precedence using the rules listed above.
If the shell is not in _\bp_\bo_\bs_\bi_\bx _\bm_\bo_\bd_\be, when used with t\bte\bes\bst\bt or [\b[, the
- <\b< and >\b> operators sort lexicographically using ASCII ordering.
- When the shell is in _\bp_\bo_\bs_\bi_\bx _\bm_\bo_\bd_\be, these operators sort using the
+ <\b< and >\b> operators sort lexicographically using ASCII ordering.
+ When the shell is in _\bp_\bo_\bs_\bi_\bx _\bm_\bo_\bd_\be, these operators sort using the
current locale.
- t\bti\bim\bme\bes\bs Print the accumulated user and system times for the shell and
+ t\bti\bim\bme\bes\bs Print the accumulated user and system times for the shell and
for processes run from the shell. The return status is 0.
t\btr\bra\bap\bp [-\b-l\blp\bp] [[_\ba_\bc_\bt_\bi_\bo_\bn] _\bs_\bi_\bg_\bs_\bp_\be_\bc ...]
The _\ba_\bc_\bt_\bi_\bo_\bn is a command that is read and executed when the shell
receives signal(s) _\bs_\bi_\bg_\bs_\bp_\be_\bc. If _\ba_\bc_\bt_\bi_\bo_\bn is absent (and there is a
- single _\bs_\bi_\bg_\bs_\bp_\be_\bc) or -\b-, each specified signal is reset to its
- original disposition (the value it had upon entrance to the
- shell). If _\ba_\bc_\bt_\bi_\bo_\bn is the null string the signal specified by
- each _\bs_\bi_\bg_\bs_\bp_\be_\bc is ignored by the shell and by the commands it in-
+ 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_\bc_\bt_\bi_\bo_\bn is the null string the signal specified by
+ each _\bs_\bi_\bg_\bs_\bp_\be_\bc is ignored by the shell and by the commands it in-
vokes.
- If no arguments are supplied, t\btr\bra\bap\bp displays the actions associ-
+ If no arguments are supplied, t\btr\bra\bap\bp displays the actions associ-
ated with each trapped signal as a set of t\btr\bra\bap\bp commands that can
- be reused as shell input to restore the current signal disposi-
- tions. If -\b-p\bp is given, and _\ba_\bc_\bt_\bi_\bo_\bn is not present, then t\btr\bra\bap\bp
- displays the actions associated with each _\bs_\bi_\bg_\bs_\bp_\be_\bc or, if none
+ be reused as shell input to restore the current signal disposi-
+ tions. If -\b-p\bp is given, and _\ba_\bc_\bt_\bi_\bo_\bn is not present, then t\btr\bra\bap\bp
+ displays the actions associated with each _\bs_\bi_\bg_\bs_\bp_\be_\bc or, if none
are supplied, for all trapped signals, as a set of t\btr\bra\bap\bp commands
- that can be reused as shell input to restore the current signal
- dispositions. The -\b-P\bP option behaves similarly, but displays
- only the actions associated with each _\bs_\bi_\bg_\bs_\bp_\be_\bc argument. -\b-P\bP re-
- quires at least one _\bs_\bi_\bg_\bs_\bp_\be_\bc argument. The -\b-P\bP or -\b-p\bp options to
- t\btr\bra\bap\bp may be used in a subshell environment (e.g., command sub-
- stitution) and, as long as they are used before t\btr\bra\bap\bp is used to
- change a signal's handling, will display the state of its par-
+ that can be reused as shell input to restore the current signal
+ dispositions. The -\b-P\bP option behaves similarly, but displays
+ only the actions associated with each _\bs_\bi_\bg_\bs_\bp_\be_\bc argument. -\b-P\bP re-
+ quires at least one _\bs_\bi_\bg_\bs_\bp_\be_\bc argument. The -\b-P\bP or -\b-p\bp options to
+ t\btr\bra\bap\bp may be used in a subshell environment (e.g., command sub-
+ stitution) and, as long as they are used before t\btr\bra\bap\bp is used to
+ change a signal's handling, will display the state of its par-
ent's traps.
- The -\b-l\bl option causes t\btr\bra\bap\bp to print a list of signal names and
- their corresponding 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
+ The -\b-l\bl option causes t\btr\bra\bap\bp to print a list of signal names and
+ their corresponding 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_\bc_\bt_\bi_\bo_\bn is executed on exit
- from the shell. If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is D\bDE\bEB\bBU\bUG\bG, the command _\ba_\bc_\bt_\bi_\bo_\bn is
+ If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is E\bEX\bXI\bIT\bT (0) the command _\ba_\bc_\bt_\bi_\bo_\bn is executed on exit
+ from the shell. If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is D\bDE\bEB\bBU\bUG\bG, the command _\ba_\bc_\bt_\bi_\bo_\bn is
executed before every _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd, _\bf_\bo_\br command, _\bc_\ba_\bs_\be command,
- _\bs_\be_\bl_\be_\bc_\bt command, (( arithmetic command, [[ conditional command,
+ _\bs_\be_\bl_\be_\bc_\bt command, (( arithmetic command, [[ conditional command,
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 de-
- scription of the e\bex\bxt\btd\bde\beb\bbu\bug\bg option to the s\bsh\bho\bop\bpt\bt builtin for de-
- tails 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_\bc_\bt_\bi_\bo_\bn is executed each time a shell function or a
- script executed with the .\b. or s\bso\bou\bur\brc\bce\be builtins finishes execut-
+ a shell function (see S\bSH\bHE\bEL\bLL\bL G\bGR\bRA\bAM\bMM\bMA\bAR\bR above). Refer to the de-
+ scription of the e\bex\bxt\btd\bde\beb\bbu\bug\bg option to the s\bsh\bho\bop\bpt\bt builtin for de-
+ tails 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_\bc_\bt_\bi_\bo_\bn is executed each time a shell function or a
+ script executed with the .\b. or s\bso\bou\bur\brc\bce\be builtins finishes execut-
ing.
- If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is E\bER\bRR\bR, the command _\ba_\bc_\bt_\bi_\bo_\bn is executed whenever a
+ If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is E\bER\bRR\bR, the command _\ba_\bc_\bt_\bi_\bo_\bn is executed whenever a
pipeline (which may consist of a single simple command), a list,
or a compound command returns a non-zero exit status, subject to
- the following conditions. The E\bER\bRR\bR trap is not executed if the
+ 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,
+ 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 except the command
- following the final &\b&&\b& or |\b||\b|, any command in a pipeline but the
- last, or if the command's return value is being inverted using
+ following the final &\b&&\b& or |\b||\b|, any command in a pipeline but the
+ last, or if the command's return value is being inverted using
!\b!. These are the same conditions obeyed by the e\ber\brr\bre\bex\bxi\bit\bt (-\b-e\be) op-
tion.
When the shell is not interactive, signals ignored upon entry to
the shell cannot be trapped or reset. Interactive shells permit
trapping signals ignored on entry. Trapped signals that are not
- being ignored are reset to their original values in a subshell
- or subshell environment when one is created. The return status
+ being ignored are reset to their original values in a subshell
+ or subshell environment when one is created. The return status
is false if any _\bs_\bi_\bg_\bs_\bp_\be_\bc is invalid; otherwise t\btr\bra\bap\bp returns true.
t\btr\bru\bue\be Does nothing, returns a 0 status.
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 executable disk file, respectively. If the _\bn_\ba_\bm_\be is
- not found, then nothing is printed, and t\bty\byp\bpe\be returns a non-zero
- exit status. If the -\b-p\bp option is used, t\bty\byp\bpe\be either returns the
- name of the executable file that would be found by searching
- $\b$P\bPA\bAT\bTH\bH if _\bn_\ba_\bm_\be were specified 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, even if ``type -t name'' would not
+ string which is one of _\ba_\bl_\bi_\ba_\bs, _\bk_\be_\by_\bw_\bo_\br_\bd, _\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn, _\bb_\bu_\bi_\bl_\bt_\bi_\bn, or
+ _\bf_\bi_\bl_\be if _\bn_\ba_\bm_\be is an alias, shell reserved word, function,
+ builtin, or executable disk file, respectively. If the _\bn_\ba_\bm_\be is
+ not found, then nothing is printed, and t\bty\byp\bpe\be returns a non-zero
+ exit status. If the -\b-p\bp option is used, t\bty\byp\bpe\be either returns the
+ name of the executable file that would be found by searching
+ $\b$P\bPA\bAT\bTH\bH if _\bn_\ba_\bm_\be were specified 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, 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, which is not necessarily the file that appears first in
- P\bPA\bAT\bTH\bH. If the -\b-a\ba option is used, t\bty\byp\bpe\be prints all of the places
- that contain a command named _\bn_\ba_\bm_\be. This includes aliases, re-
- served words, functions, and builtins, but the path search op-
+ value, which is not necessarily the file that appears first in
+ P\bPA\bAT\bTH\bH. If the -\b-a\ba option is used, t\bty\byp\bpe\be prints all of the places
+ that contain a command named _\bn_\ba_\bm_\be. This includes aliases, re-
+ served words, functions, and builtins, but the path search op-
tions (-\b-p\bp and -\b-P\bP) can be supplied to restrict the output to exe-
- cutable files. t\bty\byp\bpe\be does not consult the table of hashed com-
+ cutable files. t\bty\byp\bpe\be does not consult the table of hashed com-
mands when using -\b-a\ba with -\b-p\bp, and only performs a P\bPA\bAT\bTH\bH search for
- _\bn_\ba_\bm_\be. The -\b-f\bf option suppresses shell function lookup, as with
- the c\bco\bom\bmm\bma\ban\bnd\bd builtin. t\bty\byp\bpe\be returns true if all of the arguments
+ _\bn_\ba_\bm_\be. The -\b-f\bf option suppresses shell function 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\bS] -\b-a\ba
u\bul\bli\bim\bmi\bit\bt [-\b-H\bHS\bS] [-\b-b\bbc\bcd\bde\bef\bfi\bik\bkl\blm\bmn\bnp\bpq\bqr\brs\bst\btu\buv\bvx\bxP\bPR\bRT\bT [_\bl_\bi_\bm_\bi_\bt]]
- Provides control over the resources available to the shell and
- 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, re-
- spectively. If _\bl_\bi_\bm_\bi_\bt is omitted, the current value of the soft
+ current hard limit, the current soft limit, and no limit, re-
+ spectively. 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, if appropriate, are printed before the value. Other op-
+ When more than one resource is specified, the limit name and
+ unit, if appropriate, are printed before the value. Other op-
tions are interpreted as follows:
-\b-a\ba All current limits are reported; no limits are set
-\b-b\bb The maximum socket buffer size
-\b-c\bc The maximum size of core files created
-\b-d\bd The maximum size of a process's data segment
-\b-e\be The maximum scheduling priority ("nice")
- -\b-f\bf The maximum size of files written by the shell and its
+ -\b-f\bf The maximum size of files written by the shell and its
children
-\b-i\bi The maximum number of pending signals
-\b-k\bk The maximum number of kqueues that may be allocated
-\b-l\bl The maximum size that may be locked into memory
- -\b-m\bm The maximum resident set size (many systems do not honor
+ -\b-m\bm The maximum resident set size (many systems do not honor
this limit)
-\b-n\bn The maximum number of open file descriptors (most systems
do not allow this value to be set)
-\b-r\br The maximum real-time scheduling priority
-\b-s\bs The maximum stack size
-\b-t\bt The maximum amount of cpu time in seconds
- -\b-u\bu The maximum number of processes available to a single
+ -\b-u\bu The maximum number of processes available to a single
user
- -\b-v\bv The maximum amount of virtual memory available to the
+ -\b-v\bv The maximum amount of virtual memory available to the
shell and, on some systems, to its children
-\b-x\bx The maximum number of file locks
-\b-P\bP The maximum number of pseudoterminals
- -\b-R\bR The maximum time a real-time process can run before
+ -\b-R\bR The maximum time a real-time process can run before
blocking, in microseconds
-\b-T\bT The maximum number of threads
- If _\bl_\bi_\bm_\bi_\bt is given, and the -\b-a\ba option is not used, _\bl_\bi_\bm_\bi_\bt is the
- new value of the specified resource. If no option is given,
- then -\b-f\bf is assumed. Values are in 1024-byte increments, except
- for -\b-t\bt, which is in seconds; -\b-R\bR, which is in microseconds; -\b-p\bp,
- which is in units of 512-byte blocks; -\b-P\bP, -\b-T\bT, -\b-b\bb, -\b-k\bk, -\b-n\bn, and
- -\b-u\bu, which are unscaled values; and, when in posix mode, -\b-c\bc and
- -\b-f\bf, which are in 512-byte increments. The return status is 0
- unless an invalid option or argument is supplied, or an error
+ If _\bl_\bi_\bm_\bi_\bt is given, and the -\b-a\ba option is not used, _\bl_\bi_\bm_\bi_\bt is the
+ new value of the specified resource. If no option is given,
+ then -\b-f\bf is assumed. Values are in 1024-byte increments, except
+ for -\b-t\bt, which is in seconds; -\b-R\bR, which is in microseconds; -\b-p\bp,
+ which is in units of 512-byte blocks; -\b-P\bP, -\b-T\bT, -\b-b\bb, -\b-k\bk, -\b-n\bn, and
+ -\b-u\bu, which are unscaled values; and, when in posix mode, -\b-c\bc and
+ -\b-f\bf, which are in 512-byte increments. The return status is 0
+ unless an invalid 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] [-n\bn] [_\bn_\ba_\bm_\be ...]
- For each _\bn_\ba_\bm_\be, remove the corresponding variable or function.
+ For each _\bn_\ba_\bm_\be, remove the corresponding variable or function.
If the -\b-v\bv option is given, each _\bn_\ba_\bm_\be refers to a shell variable,
- and that variable is removed. 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. If the -\b-n\bn option
- is supplied, and _\bn_\ba_\bm_\be is a variable with the _\bn_\ba_\bm_\be_\br_\be_\bf attribute,
- _\bn_\ba_\bm_\be will be unset rather than the variable it references. -\b-n\bn
- has no effect if the -\b-f\bf option is supplied. If no options are
- supplied, each _\bn_\ba_\bm_\be refers to a variable; if there is no vari-
- able by that name, a function with that name, if any, is unset.
- Each unset variable or function is removed from the environment
- passed to subsequent commands. If any of B\bBA\bAS\bSH\bH_\b_A\bAL\bLI\bIA\bAS\bSE\bES\bS,
+ and that variable is removed. 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. If the -\b-n\bn option
+ is supplied, and _\bn_\ba_\bm_\be is a variable with the _\bn_\ba_\bm_\be_\br_\be_\bf attribute,
+ _\bn_\ba_\bm_\be will be unset rather than the variable it references. -\b-n\bn
+ has no effect if the -\b-f\bf option is supplied. If no options are
+ supplied, each _\bn_\ba_\bm_\be refers to a variable; if there is no vari-
+ able by that name, a function with that name, if any, is unset.
+ Each unset variable or function is removed from the environment
+ passed to subsequent commands. If any of B\bBA\bAS\bSH\bH_\b_A\bAL\bLI\bIA\bAS\bSE\bES\bS,
B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGV\bV0\b0, B\bBA\bAS\bSH\bH_\b_C\bCM\bMD\bDS\bS, B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMM\bMA\bAN\bND\bD, B\bBA\bAS\bSH\bH_\b_S\bSU\bUB\bBS\bSH\bHE\bEL\bLL\bL, B\bBA\bAS\bSH\bHP\bPI\bID\bD,
- C\bCO\bOM\bMP\bP_\b_W\bWO\bOR\bRD\bDB\bBR\bRE\bEA\bAK\bKS\bS, D\bDI\bIR\bRS\bST\bTA\bAC\bCK\bK, E\bEP\bPO\bOC\bCH\bHR\bRE\bEA\bAL\bLT\bTI\bIM\bME\bE, E\bEP\bPO\bOC\bCH\bHS\bSE\bEC\bCO\bON\bND\bDS\bS, F\bFU\bUN\bNC\bC-\b-
- N\bNA\bAM\bME\bE, G\bGR\bRO\bOU\bUP\bPS\bS, H\bHI\bIS\bST\bTC\bCM\bMD\bD, L\bLI\bIN\bNE\bEN\bNO\bO, R\bRA\bAN\bND\bDO\bOM\bM, S\bSE\bEC\bCO\bON\bND\bDS\bS, or S\bSR\bRA\bAN\bND\bDO\bOM\bM are
+ C\bCO\bOM\bMP\bP_\b_W\bWO\bOR\bRD\bDB\bBR\bRE\bEA\bAK\bKS\bS, D\bDI\bIR\bRS\bST\bTA\bAC\bCK\bK, E\bEP\bPO\bOC\bCH\bHR\bRE\bEA\bAL\bLT\bTI\bIM\bME\bE, E\bEP\bPO\bOC\bCH\bHS\bSE\bEC\bCO\bON\bND\bDS\bS, F\bFU\bUN\bNC\bC-\b-
+ N\bNA\bAM\bME\bE, G\bGR\bRO\bOU\bUP\bPS\bS, H\bHI\bIS\bST\bTC\bCM\bMD\bD, L\bLI\bIN\bNE\bEN\bNO\bO, R\bRA\bAN\bND\bDO\bOM\bM, S\bSE\bEC\bCO\bON\bND\bDS\bS, or S\bSR\bRA\bAN\bND\bDO\bOM\bM are
unset, they lose their special properties, even if they are sub-
sequently reset. The exit status is true unless a _\bn_\ba_\bm_\be is read-
only or may not be unset.
w\bwa\bai\bit\bt [-\b-f\bfn\bn] [-\b-p\bp _\bv_\ba_\br_\bn_\ba_\bm_\be] [_\bi_\bd _\b._\b._\b.]
Wait for each specified child process and return its termination
- status. Each _\bi_\bd 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 _\bi_\bd is not given, w\bwa\bai\bit\bt waits for all running
- background jobs and the last-executed process substitution, if
+ status. Each _\bi_\bd 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 _\bi_\bd is not given, w\bwa\bai\bit\bt waits for all running
+ background jobs and the last-executed process substitution, if
its process id is the same as $\b$!\b!, and the return status is zero.
- If the -\b-n\bn option is supplied, w\bwa\bai\bit\bt waits for a single job from
+ If the -\b-n\bn option is supplied, w\bwa\bai\bit\bt waits for a single job from
the list of _\bi_\bds or, if no _\bi_\bds are supplied, any job, to complete
- and returns its exit status. If none of the supplied arguments
+ and returns its exit status. If none of the supplied arguments
is a child of the shell, or if no arguments are supplied and the
- shell has no unwaited-for children, the exit status is 127. If
- the -\b-p\bp option is supplied, the process or job identifier of the
- job for which the exit status is returned is assigned to the
- variable _\bv_\ba_\br_\bn_\ba_\bm_\be named by the option argument. The variable
- will be unset initially, before any assignment. This is useful
- only when the -\b-n\bn option is supplied. Supplying the -\b-f\bf option,
- when job control is enabled, forces w\bwa\bai\bit\bt to wait for _\bi_\bd to ter-
+ shell has no unwaited-for children, the exit status is 127. If
+ the -\b-p\bp option is supplied, the process or job identifier of the
+ job for which the exit status is returned is assigned to the
+ variable _\bv_\ba_\br_\bn_\ba_\bm_\be named by the option argument. The variable
+ will be unset initially, before any assignment. This is useful
+ only when the -\b-n\bn option is supplied. Supplying the -\b-f\bf option,
+ when job control is enabled, forces w\bwa\bai\bit\bt to wait for _\bi_\bd to ter-
minate before returning its status, instead of returning when it
- changes status. If _\bi_\bd specifies a non-existent process or job,
- the return status is 127. If w\bwa\bai\bit\bt is interrupted by a signal,
- the return status will be greater than 128, as described under
- S\bSI\bIG\bGN\bNA\bAL\bLS\bS above. Otherwise, the return status is the exit status
+ changes status. If _\bi_\bd specifies a non-existent process or job,
+ the return status is 127. If w\bwa\bai\bit\bt is interrupted by a signal,
+ the return status will be greater than 128, as described under
+ S\bSI\bIG\bGN\bNA\bAL\bLS\bS above. Otherwise, the return status is the exit status
of the last process or job waited for.
S\bSH\bHE\bEL\bLL\bL C\bCO\bOM\bMP\bPA\bAT\bTI\bIB\bBI\bIL\bLI\bIT\bTY\bY M\bMO\bOD\bDE\bE
- Bash-4.0 introduced the concept of a _\bs_\bh_\be_\bl_\bl _\bc_\bo_\bm_\bp_\ba_\bt_\bi_\bb_\bi_\bl_\bi_\bt_\by _\bl_\be_\bv_\be_\bl, speci-
- fied as a set of options to the shopt builtin ( c\bco\bom\bmp\bpa\bat\bt3\b31\b1, c\bco\bom\bmp\bpa\bat\bt3\b32\b2,
- c\bco\bom\bmp\bpa\bat\bt4\b40\b0, c\bco\bom\bmp\bpa\bat\bt4\b41\b1, and so on). There is only one current compatibil-
- ity level -- each option is mutually exclusive. The compatibility
- level is intended to allow users to select behavior from previous ver-
- sions that is incompatible with newer versions while they migrate
- scripts to use current features and behavior. It's intended to be a
+ Bash-4.0 introduced the concept of a _\bs_\bh_\be_\bl_\bl _\bc_\bo_\bm_\bp_\ba_\bt_\bi_\bb_\bi_\bl_\bi_\bt_\by _\bl_\be_\bv_\be_\bl, speci-
+ fied as a set of options to the shopt builtin ( c\bco\bom\bmp\bpa\bat\bt3\b31\b1, c\bco\bom\bmp\bpa\bat\bt3\b32\b2,
+ c\bco\bom\bmp\bpa\bat\bt4\b40\b0, c\bco\bom\bmp\bpa\bat\bt4\b41\b1, and so on). There is only one current compatibil-
+ ity level -- each option is mutually exclusive. The compatibility
+ level is intended to allow users to select behavior from previous ver-
+ sions that is incompatible with newer versions while they migrate
+ scripts to use current features and behavior. It's intended to be a
temporary solution.
- This section does not mention behavior that is standard for a particu-
- lar version (e.g., setting c\bco\bom\bmp\bpa\bat\bt3\b32\b2 means that quoting the rhs of the
- regexp matching operator quotes special regexp characters in the word,
+ This section does not mention behavior that is standard for a particu-
+ lar version (e.g., setting c\bco\bom\bmp\bpa\bat\bt3\b32\b2 means that quoting the rhs of the
+ regexp matching operator quotes special regexp characters in the word,
which is default behavior in bash-3.2 and subsequent versions).
- If a user enables, say, c\bco\bom\bmp\bpa\bat\bt3\b32\b2, it may affect the behavior of other
- compatibility levels up to and including the current compatibility
- level. The idea is that each compatibility level controls behavior
- that changed in that version of b\bba\bas\bsh\bh, but that behavior may have been
- present in earlier versions. For instance, the change to use locale-
- based comparisons with the [\b[[\b[ command came in bash-4.1, and earlier
+ If a user enables, say, c\bco\bom\bmp\bpa\bat\bt3\b32\b2, it may affect the behavior of other
+ compatibility levels up to and including the current compatibility
+ level. The idea is that each compatibility level controls behavior
+ that changed in that version of b\bba\bas\bsh\bh, but that behavior may have been
+ present in earlier versions. For instance, the change to use locale-
+ based comparisons with the [\b[[\b[ command came in bash-4.1, and earlier
versions used ASCII-based comparisons, so enabling c\bco\bom\bmp\bpa\bat\bt3\b32\b2 will enable
- ASCII-based comparisons as well. That granularity may not be suffi-
- cient for all uses, and as a result users should employ compatibility
- levels carefully. Read the documentation for a particular feature to
+ ASCII-based comparisons as well. That granularity may not be suffi-
+ cient for all uses, and as a result users should employ compatibility
+ levels carefully. Read the documentation for a particular feature to
find out the current behavior.
- Bash-4.3 introduced a new shell variable: B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMP\bPA\bAT\bT. The value as-
+ Bash-4.3 introduced a new shell variable: B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMP\bPA\bAT\bT. The value as-
signed to this variable (a decimal version number like 4.2, or an inte-
- ger corresponding to the c\bco\bom\bmp\bpa\bat\bt_\bN_\bN option, like 42) determines the com-
+ ger corresponding to the c\bco\bom\bmp\bpa\bat\bt_\bN_\bN option, like 42) determines the com-
patibility level.
- Starting with bash-4.4, b\bba\bas\bsh\bh has begun deprecating older compatibility
- levels. Eventually, the options will be removed in favor of B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bM-\b-
+ Starting with bash-4.4, b\bba\bas\bsh\bh has begun deprecating older compatibility
+ levels. Eventually, the options will be removed in favor of B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bM-\b-
P\bPA\bAT\bT.
- Bash-5.0 is the final version for which there will be an individual
- shopt option for the previous version. Users should use B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMP\bPA\bAT\bT on
+ Bash-5.0 is the final version for which there will be an individual
+ shopt option for the previous version. Users should use B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMP\bPA\bAT\bT on
bash-5.0 and later versions.
- The following table describes the behavior changes controlled by each
+ The following table describes the behavior changes controlled by each
compatibility level setting. The c\bco\bom\bmp\bpa\bat\bt_\bN_\bN tag is used as shorthand for
setting the compatibility level to _\bN_\bN using one of the following mecha-
- nisms. For versions prior to bash-5.0, the compatibility level may be
- set using the corresponding c\bco\bom\bmp\bpa\bat\bt_\bN_\bN shopt option. For bash-4.3 and
- later versions, the B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMP\bPA\bAT\bT variable is preferred, and it is re-
+ nisms. For versions prior to bash-5.0, the compatibility level may be
+ set using the corresponding c\bco\bom\bmp\bpa\bat\bt_\bN_\bN shopt option. For bash-4.3 and
+ later versions, the B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMP\bPA\bAT\bT variable is preferred, and it is re-
quired for bash-5.1 and later versions.
c\bco\bom\bmp\bpa\bat\bt3\b31\b1
ator (=~) has no special effect
c\bco\bom\bmp\bpa\bat\bt3\b32\b2
- +\bo interrupting a command list such as "a ; b ; c" causes
- the execution of the next command in the list (in
- bash-4.0 and later versions, the shell acts as if it re-
- ceived the interrupt, so interrupting one command in a
+ +\bo interrupting a command list such as "a ; b ; c" causes
+ the execution of the next command in the list (in
+ bash-4.0 and later versions, the shell acts as if it re-
+ ceived the interrupt, so interrupting one command in a
list aborts the execution of the entire list)
c\bco\bom\bmp\bpa\bat\bt4\b40\b0
- +\bo the <\b< and >\b> operators to the [\b[[\b[ command do not consider
+ +\bo the <\b< and >\b> operators to the [\b[[\b[ command do not consider
the current locale when comparing strings; they use ASCII
ordering. B\bBa\bas\bsh\bh versions prior to bash-4.1 use ASCII col-
- lation and _\bs_\bt_\br_\bc_\bm_\bp(3); bash-4.1 and later use the current
+ lation and _\bs_\bt_\br_\bc_\bm_\bp(3); bash-4.1 and later use the current
locale's collation sequence and _\bs_\bt_\br_\bc_\bo_\bl_\bl(3).
c\bco\bom\bmp\bpa\bat\bt4\b41\b1
- +\bo in _\bp_\bo_\bs_\bi_\bx mode, t\bti\bim\bme\be may be followed by options and still
+ +\bo in _\bp_\bo_\bs_\bi_\bx mode, t\bti\bim\bme\be may be followed by options and still
be recognized as a reserved word (this is POSIX interpre-
tation 267)
+\bo in _\bp_\bo_\bs_\bi_\bx mode, the parser requires that an even number of
- single quotes occur in the _\bw_\bo_\br_\bd portion of a double-
- quoted parameter expansion and treats them specially, so
- that characters within the single quotes are considered
+ single quotes occur in the _\bw_\bo_\br_\bd portion of a double-
+ quoted parameter expansion and treats them specially, so
+ that characters within the single quotes are considered
quoted (this is POSIX interpretation 221)
c\bco\bom\bmp\bpa\bat\bt4\b42\b2
+\bo the replacement string in double-quoted pattern substitu-
- tion does not undergo quote removal, as it does in ver-
+ tion does not undergo quote removal, as it does in ver-
sions after bash-4.2
- +\bo in posix mode, single quotes are considered special when
- expanding the _\bw_\bo_\br_\bd portion of a double-quoted parameter
- expansion and can be used to quote a closing brace or
- other special character (this is part of POSIX interpre-
- tation 221); in later versions, single quotes are not
+ +\bo in posix mode, single quotes are considered special when
+ expanding the _\bw_\bo_\br_\bd portion of a double-quoted parameter
+ expansion and can be used to quote a closing brace or
+ other special character (this is part of POSIX interpre-
+ tation 221); in later versions, single quotes are not
special within double-quoted word expansions
c\bco\bom\bmp\bpa\bat\bt4\b43\b3
- +\bo the shell does not print a warning message if an attempt
- is made to use a quoted compound assignment as an argu-
- ment to declare (e.g., declare -a foo='(1 2)'). Later
+ +\bo the shell does not print a warning message if an attempt
+ is made to use a quoted compound assignment as an argu-
+ ment to declare (e.g., declare -a foo='(1 2)'). Later
versions warn that this usage is deprecated
- +\bo word expansion errors are considered non-fatal errors
- that cause the current command to fail, even in posix
- mode (the default behavior is to make them fatal errors
+ +\bo word expansion errors are considered non-fatal errors
+ that cause the current command to fail, even in posix
+ mode (the default behavior is to make them fatal errors
that cause the shell to exit)
- +\bo when executing a shell function, the loop state
+ +\bo when executing a shell function, the loop state
(while/until/etc.) is not reset, so b\bbr\bre\bea\bak\bk or c\bco\bon\bnt\bti\bin\bnu\bue\be in
that function will break or continue loops in the calling
- context. Bash-4.4 and later reset the loop state to pre-
+ context. Bash-4.4 and later reset the loop state to pre-
vent this
c\bco\bom\bmp\bpa\bat\bt4\b44\b4
- +\bo the shell sets up the values used by B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGV\bV and
- B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGC\bC so they can expand to the shell's positional
+ +\bo the shell sets up the values used by B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGV\bV and
+ B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGC\bC so they can expand to the shell's positional
parameters even if extended debugging mode is not enabled
- +\bo a subshell inherits loops from its parent context, so
- b\bbr\bre\bea\bak\bk or c\bco\bon\bnt\bti\bin\bnu\bue\be will cause the subshell to exit.
- Bash-5.0 and later reset the loop state to prevent the
+ +\bo a subshell inherits loops from its parent context, so
+ b\bbr\bre\bea\bak\bk or c\bco\bon\bnt\bti\bin\bnu\bue\be will cause the subshell to exit.
+ Bash-5.0 and later reset the loop state to prevent the
exit
- +\bo variable assignments preceding builtins like e\bex\bxp\bpo\bor\brt\bt and
+ +\bo variable assignments preceding builtins like e\bex\bxp\bpo\bor\brt\bt and
r\bre\bea\bad\bdo\bon\bnl\bly\by that set attributes continue to affect variables
with the same name in the calling environment even if the
shell is not in posix mode
c\bco\bom\bmp\bpa\bat\bt5\b50\b0
- +\bo Bash-5.1 changed the way $\b$R\bRA\bAN\bND\bDO\bOM\bM is generated to intro-
+ +\bo Bash-5.1 changed the way $\b$R\bRA\bAN\bND\bDO\bOM\bM is generated to intro-
duce slightly more randomness. If the shell compatibility
- level is set to 50 or lower, it reverts to the method
- from bash-5.0 and previous versions, so seeding the ran-
- dom number generator by assigning a value to R\bRA\bAN\bND\bDO\bOM\bM will
+ level is set to 50 or lower, it reverts to the method
+ from bash-5.0 and previous versions, so seeding the ran-
+ dom number generator by assigning a value to R\bRA\bAN\bND\bDO\bOM\bM will
produce the same sequence as in bash-5.0
- +\bo If the command hash table is empty, bash versions prior
- to bash-5.1 printed an informational message to that ef-
- fect, even when producing output that can be reused as
- input. Bash-5.1 suppresses that message when the -\b-l\bl op-
+ +\bo If the command hash table is empty, bash versions prior
+ to bash-5.1 printed an informational message to that ef-
+ fect, even when producing output that can be reused as
+ input. Bash-5.1 suppresses that message when the -\b-l\bl op-
tion is supplied.
c\bco\bom\bmp\bpa\bat\bt5\b51\b1
- +\bo The u\bun\bns\bse\bet\bt builtin treats attempts to unset array sub-
- scripts @\b@ and *\b* differently depending on whether the ar-
- ray is indexed or associative, and differently than in
+ +\bo The u\bun\bns\bse\bet\bt builtin treats attempts to unset array sub-
+ scripts @\b@ and *\b* differently depending on whether the ar-
+ ray is indexed or associative, and differently than in
previous versions.
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 setting or unsetting the values of S\bSH\bHE\bEL\bLL\bL, P\bPA\bAT\bTH\bH, H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE, E\bEN\bNV\bV,
+ +\bo setting or unsetting the values of S\bSH\bHE\bEL\bLL\bL, P\bPA\bAT\bTH\bH, H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE, E\bEN\bNV\bV,
or B\bBA\bAS\bSH\bH_\b_E\bEN\bNV\bV
+\bo specifying command names containing /\b/
- +\bo specifying a filename containing a /\b/ as an argument to the .\b.
+ +\bo specifying a filename containing a /\b/ as an argument to the .\b.
builtin command
- +\bo specifying a filename containing a slash as an argument to the
+ +\bo specifying a filename containing a slash as an argument to the
h\bhi\bis\bst\bto\bor\bry\by builtin command
- +\bo specifying a filename containing a slash as an argument to the
+ +\bo specifying a filename containing a slash as an argument to the
-\b-p\bp option to the h\bha\bas\bsh\bh builtin command
- +\bo importing function definitions from the shell environment at
+ +\bo importing function definitions from the shell environment at
startup
- +\bo parsing the 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
- +\bo turning off restricted mode with s\bse\bet\bt +\b+r\br or s\bsh\bho\bop\bpt\bt -\b-u\bu r\bre\be-\b-
+ +\bo turning off restricted mode with s\bse\bet\bt +\b+r\br or s\bsh\bho\bop\bpt\bt -\b-u\bu r\bre\be-\b-
s\bst\btr\bri\bic\bct\bte\bed\bd_\b_s\bsh\bhe\bel\bll\bl.
These restrictions are enforced after any startup files are read.
When a command that is found to be a shell script is executed (see C\bCO\bOM\bM-\b-
- M\bMA\bAN\bND\bD E\bEX\bXE\bEC\bCU\bUT\bTI\bIO\bON\bN above), r\brb\bba\bas\bsh\bh turns off any restrictions in the shell
+ M\bMA\bAN\bND\bD E\bEX\bXE\bEC\bCU\bUT\bTI\bIO\bON\bN above), r\brb\bba\bas\bsh\bh turns off any restrictions in the shell
spawned to execute the script.
S\bSE\bEE\bE A\bAL\bLS\bSO\bO
_\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 --
http://pubs.opengroup.org/onlinepubs/9699919799/
http://tiswww.case.edu/~chet/bash/POSIX -- a description of posix mode
_\b~_\b/_\b._\bb_\ba_\bs_\bh_\br_\bc
The individual per-interactive-shell startup file
_\b~_\b/_\b._\bb_\ba_\bs_\bh_\b__\bl_\bo_\bg_\bo_\bu_\bt
- The individual login shell cleanup file, executed when a login
+ The individual login shell cleanup file, executed when a login
shell exits
_\b~_\b/_\b._\bb_\ba_\bs_\bh_\b__\bh_\bi_\bs_\bt_\bo_\br_\by
- The default value of H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE, the file in which bash saves the
+ The default value of H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE, the file in which bash saves the
command history
_\b~_\b/_\b._\bi_\bn_\bp_\bu_\bt_\br_\bc
Individual _\br_\be_\ba_\bd_\bl_\bi_\bn_\be initialization file
B\bBU\bUG\bG R\bRE\bEP\bPO\bOR\bRT\bTS\bS
If you find a bug in b\bba\bas\bsh\bh,\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
+ make sure that it really is a bug, and that it appears in the latest
+ version of b\bba\bas\bsh\bh. The latest version is always available from
_\bf_\bt_\bp_\b:_\b/_\b/_\bf_\bt_\bp_\b._\bg_\bn_\bu_\b._\bo_\br_\bg_\b/_\bp_\bu_\bb_\b/_\bg_\bn_\bu_\b/_\bb_\ba_\bs_\bh_\b/ and _\bh_\bt_\bt_\bp_\b:_\b/_\b/_\bg_\bi_\bt_\b._\bs_\ba_\bv_\ba_\bn_\b-
_\bn_\ba_\bh_\b._\bg_\bn_\bu_\b._\bo_\br_\bg_\b/_\bc_\bg_\bi_\bt_\b/_\bb_\ba_\bs_\bh_\b._\bg_\bi_\bt_\b/_\bs_\bn_\ba_\bp_\bs_\bh_\bo_\bt_\b/_\bb_\ba_\bs_\bh_\b-_\bm_\ba_\bs_\bt_\be_\br_\b._\bt_\ba_\br_\b._\bg_\bz.
- Once you have determined that a bug actually exists, use the _\bb_\ba_\bs_\bh_\bb_\bu_\bg
- command to submit a bug report. If you have a fix, you are encouraged
- 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
+ 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 5.3 2023 August 31 BASH(1)
+GNU Bash 5.3 2023 September 13 BASH(1)
.\" Case Western Reserve University
.\" chet.ramey@case.edu
.\"
-.\" Last Change: Thu Aug 31 15:47:46 EDT 2023
+.\" Last Change: Wed Sep 13 15:39:24 EDT 2023
.\"
.\" bash_builtins, strip all but Built-Ins section
.\" avoid a warning about an undefined register
.\" .if !rzY .nr zY 0
.if \n(zZ=1 .ig zZ
.if \n(zY=1 .ig zY
-.TH BASH 1 "2023 August 31" "GNU Bash 5.3"
+.TH BASH 1 "2023 September 13" "GNU Bash 5.3"
.\"
.\" There's some problem with having a `@'
.\" in a tagged paragraph with the BSD man macros.
and remembered. Any previously-remembered pathname is discarded.
If the
.B \-p
-option is supplied, no path search is performed, and
+option is supplied, \fBhash\fP uses
.I filename
-is used as the full filename of the command.
+as the full filename of the command.
The
.B \-r
option causes the shell to forget all
option causes output to be displayed in a format that may be reused as input.
If no arguments are given, or if only \fB\-l\fP is supplied,
information about remembered commands is printed.
+The \fB\-t\fP, \fB\-d\fP, and \fB\-p\fP options (the options that
+act on the \fIname\fP arguments) are mutually exclusive.
+Only one will be active.
+If more than one is supplied, \fB\-t\fP has higher priority than
+\fB\-p\fP, and both are higher priority than \fB\-d\fP.
The return status is true unless a
.I name
is not found or an invalid option is supplied.
This is bash.info, produced by makeinfo version 6.8 from bashref.texi.
This text is a brief description of the features that are present in the
-Bash shell (version 5.3, 31 August 2023).
+Bash shell (version 5.3, 13 September 2023).
- This is Edition 5.3, last updated 31 August 2023, of 'The GNU Bash
+ This is Edition 5.3, last updated 13 September 2023, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.3.
Copyright (C) 1988-2023 Free Software Foundation, Inc.
*************
This text is a brief description of the features that are present in the
-Bash shell (version 5.3, 31 August 2023). The Bash home page is
+Bash shell (version 5.3, 13 September 2023). The Bash home page is
<http://www.gnu.org/software/bash/>.
- This is Edition 5.3, last updated 31 August 2023, of 'The GNU Bash
+ This is Edition 5.3, last updated 13 September 2023, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.3.
Bash contains features that appear in other popular shells, and some
before the hashed full pathname. The '-l' option causes output to
be displayed in a format that may be reused as input. If no
arguments are given, or if only '-l' is supplied, information about
- remembered commands is printed. The return status is zero unless a
- NAME is not found or an invalid option is supplied.
+ remembered commands is printed. The '-t', '-d', and '-p' options
+ (the options that act on the NAME arguments) are mutually
+ exclusive. Only one will be active. If more than one is supplied,
+ '-t' has higher priority than '-p', and both are higher priority
+ than '-d'. The return status is zero unless a NAME is not found or
+ an invalid option is supplied.
'pwd'
pwd [-LP]
* :: Bourne Shell Builtins.
(line 11)
* [: Bourne Shell Builtins.
- (line 281)
+ (line 285)
* alias: Bash Builtins. (line 11)
* bg: Job Control Builtins.
(line 7)
* pushd: Directory Stack Builtins.
(line 69)
* pwd: Bourne Shell Builtins.
- (line 218)
+ (line 222)
* read: Bash Builtins. (line 514)
* readarray: Bash Builtins. (line 617)
* readonly: Bourne Shell Builtins.
- (line 228)
+ (line 232)
* return: Bourne Shell Builtins.
- (line 247)
+ (line 251)
* set: The Set Builtin. (line 11)
* shift: Bourne Shell Builtins.
- (line 268)
+ (line 272)
* shopt: The Shopt Builtin. (line 9)
* source: Bash Builtins. (line 626)
* suspend: Job Control Builtins.
(line 116)
* test: Bourne Shell Builtins.
- (line 281)
+ (line 285)
* times: Bourne Shell Builtins.
- (line 383)
+ (line 387)
* trap: Bourne Shell Builtins.
- (line 389)
+ (line 393)
* true: Bourne Shell Builtins.
- (line 451)
+ (line 455)
* type: Bash Builtins. (line 631)
* typeset: Bash Builtins. (line 669)
* ulimit: Bash Builtins. (line 675)
* umask: Bourne Shell Builtins.
- (line 456)
+ (line 460)
* unalias: Bash Builtins. (line 781)
* unset: Bourne Shell Builtins.
- (line 474)
+ (line 478)
* wait: Job Control Builtins.
(line 76)
\1f
Tag Table:
-Node: Top\7f890
-Node: Introduction\7f2803
-Node: What is Bash?\7f3016
-Node: What is a shell?\7f4127
-Node: Definitions\7f6662
-Node: Basic Shell Features\7f9610
-Node: Shell Syntax\7f10826
-Node: Shell Operation\7f11849
-Node: Quoting\7f13139
-Node: Escape Character\7f14440
-Node: Single Quotes\7f14922
-Node: Double Quotes\7f15267
-Node: ANSI-C Quoting\7f16542
-Node: Locale Translation\7f17851
-Node: Creating Internationalized Scripts\7f19159
-Node: Comments\7f23273
-Node: Shell Commands\7f23888
-Node: Reserved Words\7f24823
-Node: Simple Commands\7f25576
-Node: Pipelines\7f26227
-Node: Lists\7f29210
-Node: Compound Commands\7f31002
-Node: Looping Constructs\7f32011
-Node: Conditional Constructs\7f34503
-Node: Command Grouping\7f48988
-Node: Coprocesses\7f50463
-Node: GNU Parallel\7f53123
-Node: Shell Functions\7f54037
-Node: Shell Parameters\7f61919
-Node: Positional Parameters\7f66304
-Node: Special Parameters\7f67203
-Node: Shell Expansions\7f70414
-Node: Brace Expansion\7f72499
-Node: Tilde Expansion\7f75230
-Node: Shell Parameter Expansion\7f77848
-Node: Command Substitution\7f96438
-Node: Arithmetic Expansion\7f99899
-Node: Process Substitution\7f100864
-Node: Word Splitting\7f101981
-Node: Filename Expansion\7f104026
-Node: Pattern Matching\7f106956
-Node: Quote Removal\7f111955
-Node: Redirections\7f112247
-Node: Executing Commands\7f121937
-Node: Simple Command Expansion\7f122604
-Node: Command Search and Execution\7f124711
-Node: Command Execution Environment\7f127095
-Node: Environment\7f130127
-Node: Exit Status\7f131787
-Node: Signals\7f133568
-Node: Shell Scripts\7f137014
-Node: Shell Builtin Commands\7f140038
-Node: Bourne Shell Builtins\7f142073
-Node: Bash Builtins\7f165206
-Node: Modifying Shell Behavior\7f198142
-Node: The Set Builtin\7f198484
-Node: The Shopt Builtin\7f209455
-Node: Special Builtins\7f225590
-Node: Shell Variables\7f226566
-Node: Bourne Shell Variables\7f227000
-Node: Bash Variables\7f229101
-Node: Bash Features\7f264157
-Node: Invoking Bash\7f265167
-Node: Bash Startup Files\7f271203
-Node: Interactive Shells\7f276331
-Node: What is an Interactive Shell?\7f276739
-Node: Is this Shell Interactive?\7f277385
-Node: Interactive Shell Behavior\7f278197
-Node: Bash Conditional Expressions\7f281823
-Node: Shell Arithmetic\7f286733
-Node: Aliases\7f289691
-Node: Arrays\7f292582
-Node: The Directory Stack\7f299213
-Node: Directory Stack Builtins\7f299994
-Node: Controlling the Prompt\7f304251
-Node: The Restricted Shell\7f307213
-Node: Bash POSIX Mode\7f309820
-Node: Shell Compatibility Mode\7f325978
-Node: Job Control\7f334219
-Node: Job Control Basics\7f334676
-Node: Job Control Builtins\7f339675
-Node: Job Control Variables\7f345467
-Node: Command Line Editing\7f346620
-Node: Introduction and Notation\7f348288
-Node: Readline Interaction\7f349908
-Node: Readline Bare Essentials\7f351096
-Node: Readline Movement Commands\7f352882
-Node: Readline Killing Commands\7f353839
-Node: Readline Arguments\7f355757
-Node: Searching\7f356798
-Node: Readline Init File\7f358981
-Node: Readline Init File Syntax\7f360239
-Node: Conditional Init Constructs\7f384261
-Node: Sample Init File\7f388454
-Node: Bindable Readline Commands\7f391575
-Node: Commands For Moving\7f392776
-Node: Commands For History\7f394824
-Node: Commands For Text\7f399815
-Node: Commands For Killing\7f403790
-Node: Numeric Arguments\7f406491
-Node: Commands For Completion\7f407627
-Node: Keyboard Macros\7f411815
-Node: Miscellaneous Commands\7f412500
-Node: Readline vi Mode\7f418535
-Node: Programmable Completion\7f419439
-Node: Programmable Completion Builtins\7f427216
-Node: A Programmable Completion Example\7f438333
-Node: Using History Interactively\7f443578
-Node: Bash History Facilities\7f444259
-Node: Bash History Builtins\7f447267
-Node: History Interaction\7f452355
-Node: Event Designators\7f456165
-Node: Word Designators\7f457700
-Node: Modifiers\7f459562
-Node: Installing Bash\7f461367
-Node: Basic Installation\7f462501
-Node: Compilers and Options\7f466220
-Node: Compiling For Multiple Architectures\7f466958
-Node: Installation Names\7f468647
-Node: Specifying the System Type\7f470753
-Node: Sharing Defaults\7f471467
-Node: Operation Controls\7f472137
-Node: Optional Features\7f473092
-Node: Reporting Bugs\7f484308
-Node: Major Differences From The Bourne Shell\7f485639
-Node: GNU Free Documentation License\7f502494
-Node: Indexes\7f527668
-Node: Builtin Index\7f528119
-Node: Reserved Word Index\7f535217
-Node: Variable Index\7f537662
-Node: Function Index\7f554793
-Node: Concept Index\7f568511
+Node: Top\7f896
+Node: Introduction\7f2815
+Node: What is Bash?\7f3028
+Node: What is a shell?\7f4139
+Node: Definitions\7f6674
+Node: Basic Shell Features\7f9622
+Node: Shell Syntax\7f10838
+Node: Shell Operation\7f11861
+Node: Quoting\7f13151
+Node: Escape Character\7f14452
+Node: Single Quotes\7f14934
+Node: Double Quotes\7f15279
+Node: ANSI-C Quoting\7f16554
+Node: Locale Translation\7f17863
+Node: Creating Internationalized Scripts\7f19171
+Node: Comments\7f23285
+Node: Shell Commands\7f23900
+Node: Reserved Words\7f24835
+Node: Simple Commands\7f25588
+Node: Pipelines\7f26239
+Node: Lists\7f29222
+Node: Compound Commands\7f31014
+Node: Looping Constructs\7f32023
+Node: Conditional Constructs\7f34515
+Node: Command Grouping\7f49000
+Node: Coprocesses\7f50475
+Node: GNU Parallel\7f53135
+Node: Shell Functions\7f54049
+Node: Shell Parameters\7f61931
+Node: Positional Parameters\7f66316
+Node: Special Parameters\7f67215
+Node: Shell Expansions\7f70426
+Node: Brace Expansion\7f72511
+Node: Tilde Expansion\7f75242
+Node: Shell Parameter Expansion\7f77860
+Node: Command Substitution\7f96450
+Node: Arithmetic Expansion\7f99911
+Node: Process Substitution\7f100876
+Node: Word Splitting\7f101993
+Node: Filename Expansion\7f104038
+Node: Pattern Matching\7f106968
+Node: Quote Removal\7f111967
+Node: Redirections\7f112259
+Node: Executing Commands\7f121949
+Node: Simple Command Expansion\7f122616
+Node: Command Search and Execution\7f124723
+Node: Command Execution Environment\7f127107
+Node: Environment\7f130139
+Node: Exit Status\7f131799
+Node: Signals\7f133580
+Node: Shell Scripts\7f137026
+Node: Shell Builtin Commands\7f140050
+Node: Bourne Shell Builtins\7f142085
+Node: Bash Builtins\7f165474
+Node: Modifying Shell Behavior\7f198410
+Node: The Set Builtin\7f198752
+Node: The Shopt Builtin\7f209723
+Node: Special Builtins\7f225858
+Node: Shell Variables\7f226834
+Node: Bourne Shell Variables\7f227268
+Node: Bash Variables\7f229369
+Node: Bash Features\7f264425
+Node: Invoking Bash\7f265435
+Node: Bash Startup Files\7f271471
+Node: Interactive Shells\7f276599
+Node: What is an Interactive Shell?\7f277007
+Node: Is this Shell Interactive?\7f277653
+Node: Interactive Shell Behavior\7f278465
+Node: Bash Conditional Expressions\7f282091
+Node: Shell Arithmetic\7f287001
+Node: Aliases\7f289959
+Node: Arrays\7f292850
+Node: The Directory Stack\7f299481
+Node: Directory Stack Builtins\7f300262
+Node: Controlling the Prompt\7f304519
+Node: The Restricted Shell\7f307481
+Node: Bash POSIX Mode\7f310088
+Node: Shell Compatibility Mode\7f326246
+Node: Job Control\7f334487
+Node: Job Control Basics\7f334944
+Node: Job Control Builtins\7f339943
+Node: Job Control Variables\7f345735
+Node: Command Line Editing\7f346888
+Node: Introduction and Notation\7f348556
+Node: Readline Interaction\7f350176
+Node: Readline Bare Essentials\7f351364
+Node: Readline Movement Commands\7f353150
+Node: Readline Killing Commands\7f354107
+Node: Readline Arguments\7f356025
+Node: Searching\7f357066
+Node: Readline Init File\7f359249
+Node: Readline Init File Syntax\7f360507
+Node: Conditional Init Constructs\7f384529
+Node: Sample Init File\7f388722
+Node: Bindable Readline Commands\7f391843
+Node: Commands For Moving\7f393044
+Node: Commands For History\7f395092
+Node: Commands For Text\7f400083
+Node: Commands For Killing\7f404058
+Node: Numeric Arguments\7f406759
+Node: Commands For Completion\7f407895
+Node: Keyboard Macros\7f412083
+Node: Miscellaneous Commands\7f412768
+Node: Readline vi Mode\7f418803
+Node: Programmable Completion\7f419707
+Node: Programmable Completion Builtins\7f427484
+Node: A Programmable Completion Example\7f438601
+Node: Using History Interactively\7f443846
+Node: Bash History Facilities\7f444527
+Node: Bash History Builtins\7f447535
+Node: History Interaction\7f452623
+Node: Event Designators\7f456433
+Node: Word Designators\7f457968
+Node: Modifiers\7f459830
+Node: Installing Bash\7f461635
+Node: Basic Installation\7f462769
+Node: Compilers and Options\7f466488
+Node: Compiling For Multiple Architectures\7f467226
+Node: Installation Names\7f468915
+Node: Specifying the System Type\7f471021
+Node: Sharing Defaults\7f471735
+Node: Operation Controls\7f472405
+Node: Optional Features\7f473360
+Node: Reporting Bugs\7f484576
+Node: Major Differences From The Bourne Shell\7f485907
+Node: GNU Free Documentation License\7f502762
+Node: Indexes\7f527936
+Node: Builtin Index\7f528387
+Node: Reserved Word Index\7f535485
+Node: Variable Index\7f537930
+Node: Function Index\7f555061
+Node: Concept Index\7f568779
\1f
End Tag Table
@xrdef{The Shopt Builtin-pg}{73}
@xrdef{Special Builtins-title}{Special Builtins}
@xrdef{Special Builtins-snt}{Section@tie 4.4}
-@xrdef{Special Builtins-pg}{79}
+@xrdef{Special Builtins-pg}{80}
@xrdef{Shell Variables-title}{Shell Variables}
@xrdef{Shell Variables-snt}{Chapter@tie 5}
@xrdef{Bourne Shell Variables-title}{Bourne Shell Variables}
\entry{readonly}{53}{\code {readonly}}
\entry{return}{53}{\code {return}}
\entry{shift}{53}{\code {shift}}
-\entry{test}{53}{\code {test}}
-\entry{[}{53}{\code {[}}
+\entry{test}{54}{\code {test}}
+\entry{[}{54}{\code {[}}
\entry{times}{55}{\code {times}}
\entry{trap}{55}{\code {trap}}
\entry{true}{56}{\code {true}}
\initial {:}
\entry{\code {:}}{49}
\initial {[}
-\entry{\code {[}}{53}
+\entry{\code {[}}{54}
\initial {A}
\entry{\code {alias}}{57}
\initial {B}
\entry{\code {source}}{67}
\entry{\code {suspend}}{121}
\initial {T}
-\entry{\code {test}}{53}
+\entry{\code {test}}{54}
\entry{\code {times}}{55}
\entry{\code {trap}}{55}
\entry{\code {true}}{56}
\entry{exit status}{45}{exit status}
\entry{signal handling}{46}{signal handling}
\entry{shell script}{47}{shell script}
-\entry{special builtin}{79}{special builtin}
+\entry{special builtin}{80}{special builtin}
\entry{login shell}{96}{login shell}
\entry{interactive shell}{96}{interactive shell}
\entry{startup files}{96}{startup files}
\entry{shell, interactive}{97}
\entry{signal}{4}
\entry{signal handling}{46}
-\entry{special builtin}{4, 79}
+\entry{special builtin}{4, 80}
\entry{startup files}{96}
\entry{string translations}{7}
\entry{suspending jobs}{118}
bashref.texi.
This text is a brief description of the features that are present in the
-Bash shell (version 5.3, 31 August 2023).
+Bash shell (version 5.3, 13 September 2023).
- This is Edition 5.3, last updated 31 August 2023, of 'The GNU Bash
+ This is Edition 5.3, last updated 13 September 2023, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.3.
Copyright (C) 1988-2023 Free Software Foundation, Inc.
*************
This text is a brief description of the features that are present in the
-Bash shell (version 5.3, 31 August 2023). The Bash home page is
+Bash shell (version 5.3, 13 September 2023). The Bash home page is
<http://www.gnu.org/software/bash/>.
- This is Edition 5.3, last updated 31 August 2023, of 'The GNU Bash
+ This is Edition 5.3, last updated 13 September 2023, of 'The GNU Bash
Reference Manual', for 'Bash', Version 5.3.
Bash contains features that appear in other popular shells, and some
before the hashed full pathname. The '-l' option causes output to
be displayed in a format that may be reused as input. If no
arguments are given, or if only '-l' is supplied, information about
- remembered commands is printed. The return status is zero unless a
- NAME is not found or an invalid option is supplied.
+ remembered commands is printed. The '-t', '-d', and '-p' options
+ (the options that act on the NAME arguments) are mutually
+ exclusive. Only one will be active. If more than one is supplied,
+ '-t' has higher priority than '-p', and both are higher priority
+ than '-d'. The return status is zero unless a NAME is not found or
+ an invalid option is supplied.
'pwd'
pwd [-LP]
* :: Bourne Shell Builtins.
(line 11)
* [: Bourne Shell Builtins.
- (line 281)
+ (line 285)
* alias: Bash Builtins. (line 11)
* bg: Job Control Builtins.
(line 7)
* pushd: Directory Stack Builtins.
(line 69)
* pwd: Bourne Shell Builtins.
- (line 218)
+ (line 222)
* read: Bash Builtins. (line 514)
* readarray: Bash Builtins. (line 617)
* readonly: Bourne Shell Builtins.
- (line 228)
+ (line 232)
* return: Bourne Shell Builtins.
- (line 247)
+ (line 251)
* set: The Set Builtin. (line 11)
* shift: Bourne Shell Builtins.
- (line 268)
+ (line 272)
* shopt: The Shopt Builtin. (line 9)
* source: Bash Builtins. (line 626)
* suspend: Job Control Builtins.
(line 116)
* test: Bourne Shell Builtins.
- (line 281)
+ (line 285)
* times: Bourne Shell Builtins.
- (line 383)
+ (line 387)
* trap: Bourne Shell Builtins.
- (line 389)
+ (line 393)
* true: Bourne Shell Builtins.
- (line 451)
+ (line 455)
* type: Bash Builtins. (line 631)
* typeset: Bash Builtins. (line 669)
* ulimit: Bash Builtins. (line 675)
* umask: Bourne Shell Builtins.
- (line 456)
+ (line 460)
* unalias: Bash Builtins. (line 781)
* unset: Bourne Shell Builtins.
- (line 474)
+ (line 478)
* wait: Job Control Builtins.
(line 76)
\1f
Tag Table:
-Node: Top\7f893
-Node: Introduction\7f2809
-Node: What is Bash?\7f3025
-Node: What is a shell?\7f4139
-Node: Definitions\7f6677
-Node: Basic Shell Features\7f9628
-Node: Shell Syntax\7f10847
-Node: Shell Operation\7f11873
-Node: Quoting\7f13166
-Node: Escape Character\7f14470
-Node: Single Quotes\7f14955
-Node: Double Quotes\7f15303
-Node: ANSI-C Quoting\7f16581
-Node: Locale Translation\7f17893
-Node: Creating Internationalized Scripts\7f19204
-Node: Comments\7f23321
-Node: Shell Commands\7f23939
-Node: Reserved Words\7f24877
-Node: Simple Commands\7f25633
-Node: Pipelines\7f26287
-Node: Lists\7f29273
-Node: Compound Commands\7f31068
-Node: Looping Constructs\7f32080
-Node: Conditional Constructs\7f34575
-Node: Command Grouping\7f49063
-Node: Coprocesses\7f50541
-Node: GNU Parallel\7f53204
-Node: Shell Functions\7f54121
-Node: Shell Parameters\7f62006
-Node: Positional Parameters\7f66394
-Node: Special Parameters\7f67296
-Node: Shell Expansions\7f70510
-Node: Brace Expansion\7f72598
-Node: Tilde Expansion\7f75332
-Node: Shell Parameter Expansion\7f77953
-Node: Command Substitution\7f96546
-Node: Arithmetic Expansion\7f100010
-Node: Process Substitution\7f100978
-Node: Word Splitting\7f102098
-Node: Filename Expansion\7f104146
-Node: Pattern Matching\7f107079
-Node: Quote Removal\7f112081
-Node: Redirections\7f112376
-Node: Executing Commands\7f122069
-Node: Simple Command Expansion\7f122739
-Node: Command Search and Execution\7f124849
-Node: Command Execution Environment\7f127236
-Node: Environment\7f130271
-Node: Exit Status\7f131934
-Node: Signals\7f133718
-Node: Shell Scripts\7f137167
-Node: Shell Builtin Commands\7f140194
-Node: Bourne Shell Builtins\7f142232
-Node: Bash Builtins\7f165368
-Node: Modifying Shell Behavior\7f198307
-Node: The Set Builtin\7f198652
-Node: The Shopt Builtin\7f209626
-Node: Special Builtins\7f225764
-Node: Shell Variables\7f226743
-Node: Bourne Shell Variables\7f227180
-Node: Bash Variables\7f229284
-Node: Bash Features\7f264343
-Node: Invoking Bash\7f265356
-Node: Bash Startup Files\7f271395
-Node: Interactive Shells\7f276526
-Node: What is an Interactive Shell?\7f276937
-Node: Is this Shell Interactive?\7f277586
-Node: Interactive Shell Behavior\7f278401
-Node: Bash Conditional Expressions\7f282030
-Node: Shell Arithmetic\7f286943
-Node: Aliases\7f289904
-Node: Arrays\7f292798
-Node: The Directory Stack\7f299432
-Node: Directory Stack Builtins\7f300216
-Node: Controlling the Prompt\7f304476
-Node: The Restricted Shell\7f307441
-Node: Bash POSIX Mode\7f310051
-Node: Shell Compatibility Mode\7f326212
-Node: Job Control\7f334456
-Node: Job Control Basics\7f334916
-Node: Job Control Builtins\7f339918
-Node: Job Control Variables\7f345713
-Node: Command Line Editing\7f346869
-Node: Introduction and Notation\7f348540
-Node: Readline Interaction\7f350163
-Node: Readline Bare Essentials\7f351354
-Node: Readline Movement Commands\7f353143
-Node: Readline Killing Commands\7f354103
-Node: Readline Arguments\7f356024
-Node: Searching\7f357068
-Node: Readline Init File\7f359254
-Node: Readline Init File Syntax\7f360515
-Node: Conditional Init Constructs\7f384540
-Node: Sample Init File\7f388736
-Node: Bindable Readline Commands\7f391860
-Node: Commands For Moving\7f393064
-Node: Commands For History\7f395115
-Node: Commands For Text\7f400109
-Node: Commands For Killing\7f404087
-Node: Numeric Arguments\7f406791
-Node: Commands For Completion\7f407930
-Node: Keyboard Macros\7f412121
-Node: Miscellaneous Commands\7f412809
-Node: Readline vi Mode\7f418847
-Node: Programmable Completion\7f419754
-Node: Programmable Completion Builtins\7f427534
-Node: A Programmable Completion Example\7f438654
-Node: Using History Interactively\7f443902
-Node: Bash History Facilities\7f444586
-Node: Bash History Builtins\7f447597
-Node: History Interaction\7f452688
-Node: Event Designators\7f456501
-Node: Word Designators\7f458039
-Node: Modifiers\7f459904
-Node: Installing Bash\7f461712
-Node: Basic Installation\7f462849
-Node: Compilers and Options\7f466571
-Node: Compiling For Multiple Architectures\7f467312
-Node: Installation Names\7f469004
-Node: Specifying the System Type\7f471113
-Node: Sharing Defaults\7f471830
-Node: Operation Controls\7f472503
-Node: Optional Features\7f473461
-Node: Reporting Bugs\7f484680
-Node: Major Differences From The Bourne Shell\7f486014
-Node: GNU Free Documentation License\7f502872
-Node: Indexes\7f528049
-Node: Builtin Index\7f528503
-Node: Reserved Word Index\7f535604
-Node: Variable Index\7f538052
-Node: Function Index\7f555186
-Node: Concept Index\7f568907
+Node: Top\7f899
+Node: Introduction\7f2821
+Node: What is Bash?\7f3037
+Node: What is a shell?\7f4151
+Node: Definitions\7f6689
+Node: Basic Shell Features\7f9640
+Node: Shell Syntax\7f10859
+Node: Shell Operation\7f11885
+Node: Quoting\7f13178
+Node: Escape Character\7f14482
+Node: Single Quotes\7f14967
+Node: Double Quotes\7f15315
+Node: ANSI-C Quoting\7f16593
+Node: Locale Translation\7f17905
+Node: Creating Internationalized Scripts\7f19216
+Node: Comments\7f23333
+Node: Shell Commands\7f23951
+Node: Reserved Words\7f24889
+Node: Simple Commands\7f25645
+Node: Pipelines\7f26299
+Node: Lists\7f29285
+Node: Compound Commands\7f31080
+Node: Looping Constructs\7f32092
+Node: Conditional Constructs\7f34587
+Node: Command Grouping\7f49075
+Node: Coprocesses\7f50553
+Node: GNU Parallel\7f53216
+Node: Shell Functions\7f54133
+Node: Shell Parameters\7f62018
+Node: Positional Parameters\7f66406
+Node: Special Parameters\7f67308
+Node: Shell Expansions\7f70522
+Node: Brace Expansion\7f72610
+Node: Tilde Expansion\7f75344
+Node: Shell Parameter Expansion\7f77965
+Node: Command Substitution\7f96558
+Node: Arithmetic Expansion\7f100022
+Node: Process Substitution\7f100990
+Node: Word Splitting\7f102110
+Node: Filename Expansion\7f104158
+Node: Pattern Matching\7f107091
+Node: Quote Removal\7f112093
+Node: Redirections\7f112388
+Node: Executing Commands\7f122081
+Node: Simple Command Expansion\7f122751
+Node: Command Search and Execution\7f124861
+Node: Command Execution Environment\7f127248
+Node: Environment\7f130283
+Node: Exit Status\7f131946
+Node: Signals\7f133730
+Node: Shell Scripts\7f137179
+Node: Shell Builtin Commands\7f140206
+Node: Bourne Shell Builtins\7f142244
+Node: Bash Builtins\7f165636
+Node: Modifying Shell Behavior\7f198575
+Node: The Set Builtin\7f198920
+Node: The Shopt Builtin\7f209894
+Node: Special Builtins\7f226032
+Node: Shell Variables\7f227011
+Node: Bourne Shell Variables\7f227448
+Node: Bash Variables\7f229552
+Node: Bash Features\7f264611
+Node: Invoking Bash\7f265624
+Node: Bash Startup Files\7f271663
+Node: Interactive Shells\7f276794
+Node: What is an Interactive Shell?\7f277205
+Node: Is this Shell Interactive?\7f277854
+Node: Interactive Shell Behavior\7f278669
+Node: Bash Conditional Expressions\7f282298
+Node: Shell Arithmetic\7f287211
+Node: Aliases\7f290172
+Node: Arrays\7f293066
+Node: The Directory Stack\7f299700
+Node: Directory Stack Builtins\7f300484
+Node: Controlling the Prompt\7f304744
+Node: The Restricted Shell\7f307709
+Node: Bash POSIX Mode\7f310319
+Node: Shell Compatibility Mode\7f326480
+Node: Job Control\7f334724
+Node: Job Control Basics\7f335184
+Node: Job Control Builtins\7f340186
+Node: Job Control Variables\7f345981
+Node: Command Line Editing\7f347137
+Node: Introduction and Notation\7f348808
+Node: Readline Interaction\7f350431
+Node: Readline Bare Essentials\7f351622
+Node: Readline Movement Commands\7f353411
+Node: Readline Killing Commands\7f354371
+Node: Readline Arguments\7f356292
+Node: Searching\7f357336
+Node: Readline Init File\7f359522
+Node: Readline Init File Syntax\7f360783
+Node: Conditional Init Constructs\7f384808
+Node: Sample Init File\7f389004
+Node: Bindable Readline Commands\7f392128
+Node: Commands For Moving\7f393332
+Node: Commands For History\7f395383
+Node: Commands For Text\7f400377
+Node: Commands For Killing\7f404355
+Node: Numeric Arguments\7f407059
+Node: Commands For Completion\7f408198
+Node: Keyboard Macros\7f412389
+Node: Miscellaneous Commands\7f413077
+Node: Readline vi Mode\7f419115
+Node: Programmable Completion\7f420022
+Node: Programmable Completion Builtins\7f427802
+Node: A Programmable Completion Example\7f438922
+Node: Using History Interactively\7f444170
+Node: Bash History Facilities\7f444854
+Node: Bash History Builtins\7f447865
+Node: History Interaction\7f452956
+Node: Event Designators\7f456769
+Node: Word Designators\7f458307
+Node: Modifiers\7f460172
+Node: Installing Bash\7f461980
+Node: Basic Installation\7f463117
+Node: Compilers and Options\7f466839
+Node: Compiling For Multiple Architectures\7f467580
+Node: Installation Names\7f469272
+Node: Specifying the System Type\7f471381
+Node: Sharing Defaults\7f472098
+Node: Operation Controls\7f472771
+Node: Optional Features\7f473729
+Node: Reporting Bugs\7f484948
+Node: Major Differences From The Bourne Shell\7f486282
+Node: GNU Free Documentation License\7f503140
+Node: Indexes\7f528317
+Node: Builtin Index\7f528771
+Node: Reserved Word Index\7f535872
+Node: Variable Index\7f538320
+Node: Function Index\7f555454
+Node: Concept Index\7f569175
\1f
End Tag Table
-This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021/MacPorts 2021.58693_0) (preloaded format=pdfetex 2021.8.30) 10 SEP 2023 17:14
+This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021/MacPorts 2021.58693_0) (preloaded format=pdfetex 2021.8.30) 13 SEP 2023 15:40
entering extended mode
restricted \write18 enabled.
file:line:error style messages enabled.
%&-line parsing enabled.
-**\input /usr/local/src/bash/bash-20230907/doc/bashref.texi
-(/usr/local/src/bash/bash-20230907/doc/bashref.texi
-(/usr/local/src/bash/bash-20230907/doc/texinfo.tex
+**\input /usr/local/src/bash/bash-20230911/doc/bashref.texi \input /usr/local/s
+rc/bash/bash-20230911/doc/bashref.texi
+(/usr/local/src/bash/bash-20230911/doc/bashref.texi
+(/usr/local/src/bash/bash-20230911/doc/texinfo.tex
Loading texinfo [version 2015-11-22.14]:
\outerhsize=\dimen16
\outervsize=\dimen17
texinfo.tex: doing @include of version.texi
-(/usr/local/src/bash/bash-20230907/doc/version.texi) [1{/opt/local/var/db/texmf
+(/usr/local/src/bash/bash-20230911/doc/version.texi) [1{/opt/local/var/db/texmf
/fonts/map/pdftex/updmap/pdftex.map}] [2]
-(/usr/local/build/bash/bash-20230907/doc/bashref.toc [-1] [-2] [-3]) [-4]
-(/usr/local/build/bash/bash-20230907/doc/bashref.toc)
-(/usr/local/build/bash/bash-20230907/doc/bashref.toc) Chapter 1
+(/usr/local/build/bash/bash-20230911/doc/bashref.toc [-1] [-2] [-3]) [-4]
+(/usr/local/build/bash/bash-20230911/doc/bashref.toc)
+(/usr/local/build/bash/bash-20230911/doc/bashref.toc) Chapter 1
\openout0 = `bashref.toc'.
-(/usr/local/build/bash/bash-20230907/doc/bashref.aux)
+(/usr/local/build/bash/bash-20230911/doc/bashref.aux)
\openout1 = `bashref.aux'.
Chapter 2 [1] [2]
[49] [50] [51]
[52] [53] [54] [55] [56] [57] [58] [59] [60] [61] [62] [63] [64] [65] [66]
[67] [68]
-Overfull \hbox (38.26585pt too wide) in paragraph at lines 5407--5407
+Overfull \hbox (38.26585pt too wide) in paragraph at lines 5412--5412
[]@texttt set [-abefhkmnptuvxBCEHPT] [-o @textttsl option-name@texttt ] [--] [
-] [@textttsl ar-gu-ment []@texttt ][]
.etc.
-Overfull \hbox (38.26585pt too wide) in paragraph at lines 5408--5408
+Overfull \hbox (38.26585pt too wide) in paragraph at lines 5413--5413
[]@texttt set [+abefhkmnptuvxBCEHPT] [+o @textttsl option-name@texttt ] [--] [
-] [@textttsl ar-gu-ment []@texttt ][]
[119] [120]
texinfo.tex: doing @include of rluser.texi
- (/usr/local/src/bash/bash-20230907/lib/readline/doc/rluser.texi
+ (/usr/local/src/bash/bash-20230911/lib/readline/doc/rluser.texi
Chapter 8 [121] [122] [123] [124] [125] [126] [127] [128] [129] [130] [131]
[132]
Underfull \hbox (badness 7540) in paragraph at lines 878--884
texinfo.tex: doing @include of hsuser.texi
-(/usr/local/src/bash/bash-20230907/lib/readline/doc/hsuser.texi Chapter 9
+(/usr/local/src/bash/bash-20230911/lib/readline/doc/hsuser.texi Chapter 9
[158] [159] [160] [161] [162] [163]) Chapter 10 [164] [165] [166] [167]
[168]
-Underfull \hbox (badness 10000) in paragraph at lines 9743--9752
+Underfull \hbox (badness 10000) in paragraph at lines 9748--9757
[]@textrm All of the fol-low-ing op-tions ex-cept for `@texttt alt-array-implem
entation[]@textrm '[],
.etc.
-Underfull \hbox (badness 10000) in paragraph at lines 9743--9752
+Underfull \hbox (badness 10000) in paragraph at lines 9748--9757
@textrm `@texttt disabled-builtins[]@textrm '[], `@texttt direxpand-default[]@t
extrm '[], `@texttt strict-posix-default[]@textrm '[], and
[178] [179] Appendix C [180]
texinfo.tex: doing @include of fdl.texi
- (/usr/local/src/bash/bash-20230907/doc/fdl.texi
+ (/usr/local/src/bash/bash-20230911/doc/fdl.texi
[181] [182] [183] [184] [185] [186] [187]) Appendix D [188] [189] [190]
[191] [192] [193] [194] [195] [196] [197] )
Here is how much of TeX's memory you used:
4104 strings out of 497086
47614 string characters out of 6206517
- 142215 words of memory out of 5000000
+ 142185 words of memory out of 5000000
4869 multiletter control sequences out of 15000+600000
34315 words of font info for 116 fonts, out of 8000000 for 9000
51 hyphenation exceptions out of 8191
- 16i,6n,16p,331b,983s stack positions out of 5000i,500n,10000p,200000b,80000s
+ 16i,6n,16p,389b,983s stack positions out of 5000i,500n,10000p,200000b,80000s
{/opt/local/share/texmf-texlive/font
s/enc/dvips/cm-super/cm-super-t1.enc}</opt/local/share/texmf-texlive/fonts/type
1/public/amsfonts/cm/cmbx12.pfb></opt/local/share/texmf-texlive/fonts/type1/pub
ve/fonts/type1/public/amsfonts/cm/cmtt9.pfb></opt/local/share/texmf-texlive/fon
ts/type1/public/cm-super/sfrm1095.pfb></opt/local/share/texmf-texlive/fonts/typ
e1/public/cm-super/sfrm1440.pfb>
-Output written on bashref.pdf (203 pages, 813794 bytes).
+Output written on bashref.pdf (203 pages, 813912 bytes).
PDF statistics:
- 2825 PDF objects out of 2984 (max. 8388607)
- 2575 compressed objects within 26 object streams
+ 2824 PDF objects out of 2984 (max. 8388607)
+ 2574 compressed objects within 26 object streams
331 named destinations out of 1000 (max. 500000)
1157 words of extra memory for PDF output out of 10000 (max. 10000000)
that may be reused as input.
If no arguments are given, or if only @option{-l} is supplied,
information about remembered commands is printed.
+The @option{-t}, @option{-d}, and @option{-p} options (the options that
+act on the @var{name} arguments) are mutually exclusive.
+Only one will be active.
+If more than one is supplied, @option{-t} has higher priority than
+@option{-p}, and both are higher priority than @option{-d}.
The return status is zero unless a @var{name} is not found or an invalid
option is supplied.
@numsecentry{Modifying Shell Behavior}{4.3}{Modifying Shell Behavior}{69}
@numsubsecentry{The Set Builtin}{4.3.1}{The Set Builtin}{69}
@numsubsecentry{The Shopt Builtin}{4.3.2}{The Shopt Builtin}{73}
-@numsecentry{Special Builtins}{4.4}{Special Builtins}{79}
+@numsecentry{Special Builtins}{4.4}{Special Builtins}{80}
@numchapentry{Shell Variables}{5}{Shell Variables}{81}
@numsecentry{Bourne Shell Variables}{5.1}{Bourne Shell Variables}{81}
@numsecentry{Bash Variables}{5.2}{Bash Variables}{81}
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 filename of the command. The -\b-r\br option
- causes the shell to forget all remembered locations. Assigning
- to the P\bPA\bAT\bTH\bH variable also clears all hashed filenames. The -\b-d\bd
- option causes the shell to forget the 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.
+ -\b-p\bp option is supplied, h\bha\bas\bsh\bh uses _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be as the full filename
+ of the command. The -\b-r\br option causes the shell to forget all
+ remembered locations. Assigning to the P\bPA\bAT\bTH\bH variable also
+ clears all hashed filenames. The -\b-d\bd option causes the shell to
+ forget the 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 format 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 -\b-t\bt, -\b-d\bd,
+ and -\b-p\bp options (the options that act on the _\bn_\ba_\bm_\be arguments) are
+ mutually exclusive. Only one will be active. If more than one
+ is supplied, -\b-t\bt has higher priority than -\b-p\bp, and both are higher
+ priority than -\b-d\bd. 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. If _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be is not supplied and
- H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE is unset or null, the -\b-a\ba,\b, -\b-n\bn,\b, -\b-r\br,\b, and -\b-w\bw options have
+ _\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. If _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be is not supplied and
+ H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE is unset or null, the -\b-a\ba,\b, -\b-n\bn,\b, -\b-r\br,\b, and -\b-w\bw options have
no effect. Options, if supplied, have the following meanings:
-\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. If _\bo_\bf_\bf_\bs_\be_\bt
+ Delete the history entry at position _\bo_\bf_\bf_\bs_\be_\bt. If _\bo_\bf_\bf_\bs_\be_\bt
is negative, it is interpreted as relative to one greater
than the last history position, so negative indices count
- back from the end of the history, and an index of -1
+ back from the end of the history, and an index of -1
refers to the current h\bhi\bis\bst\bto\bor\bry\by -\b-d\bd command.
-\b-d\bd _\bs_\bt_\ba_\br_\bt-_\be_\bn_\bd
- Delete the range of history entries between positions
- _\bs_\bt_\ba_\br_\bt and _\be_\bn_\bd, inclusive. Positive and negative values
+ Delete the range of history entries between positions
+ _\bs_\bt_\ba_\br_\bt and _\be_\bn_\bd, inclusive. Positive and negative values
for _\bs_\bt_\ba_\br_\bt and _\be_\bn_\bd are interpreted as described above.
- -\b-a\ba Append the ``new'' history lines to the history file.
- These are history lines entered since the beginning of
+ -\b-a\ba Append the ``new'' history lines to the history file.
+ These are history lines entered since the beginning of
the current b\bba\bas\bsh\bh session, but not already appended to the
history file.
- -\b-n\bn Read the history lines not already read from the history
- file into the current history list. These are lines ap-
- pended 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 ap-
+ pended 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 append them to
+ -\b-r\br Read the contents of the history file and append them to
the current history list.
-\b-w\bw Write the current history list to the history file, over-
writing 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 following history entry. The return value is
0 unless an invalid option is encountered, an error occurs while
- reading or writing the history file, an invalid _\bo_\bf_\bf_\bs_\be_\bt or range
- is supplied as an argument to -\b-d\bd, or the history expansion sup-
+ reading or writing the history file, an invalid _\bo_\bf_\bf_\bs_\be_\bt or range
+ is supplied as an argument to -\b-d\bd, or the history expansion sup-
plied as an argument to -\b-p\bp fails.
j\bjo\bob\bbs\bs [-\b-l\bln\bnp\bpr\brs\bs] [ _\bj_\bo_\bb_\bs_\bp_\be_\bc ... ]
The first form lists the active jobs. The options have the fol-
lowing meanings:
-\b-l\bl List process IDs in addition to the normal information.
- -\b-n\bn Display information only about jobs that have changed
+ -\b-n\bn Display information only about jobs that have changed
status since the user was last notified of their status.
- -\b-p\bp List only the process ID of the job's process group
+ -\b-p\bp List only the process ID of the job's process group
leader.
-\b-r\br Display only running jobs.
-\b-s\bs Display only stopped jobs.
- If _\bj_\bo_\bb_\bs_\bp_\be_\bc is 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
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|-\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. The -\b-L\bL option is
- equivalent to -\b-l\bl. k\bki\bil\bll\bl returns true if at least one signal was
+ -\b-l\bl is a number specifying either a signal number or the exit
+ status of a process terminated by a signal. The -\b-L\bL option is
+ equivalent to -\b-l\bl. k\bki\bil\bll\bl returns true if at least one signal was
successfully sent, or false if an error occurs or an invalid op-
tion 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 in _\bb_\ba_\bs_\bh_\b(_\b1_\b)). If the last _\ba_\br_\bg evaluates to 0,
+ M\bME\bET\bTI\bIC\bC E\bEV\bVA\bAL\bLU\bUA\bAT\bTI\bIO\bON\bN in _\bb_\ba_\bs_\bh_\b(_\b1_\b)). 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-
- tion and its children. If _\bn_\ba_\bm_\be is -, the set of shell options
- is made local to the function in which l\blo\boc\bca\bal\bl is invoked: shell
- options changed using the s\bse\bet\bt builtin inside the function after
+ variable _\bn_\ba_\bm_\be to have a visible scope restricted to that func-
+ tion and its children. If _\bn_\ba_\bm_\be is -, the set of shell options
+ is made local to the function in which l\blo\boc\bca\bal\bl is invoked: shell
+ options changed using the s\bse\bet\bt builtin inside the function after
the call to l\blo\boc\bca\bal\bl are restored to their original values when the
function returns. The restore is effected as if a series of s\bse\bet\bt
- commands were executed to restore the values that were in place
- before the function. With no operands, l\blo\boc\bca\bal\bl writes a list of
- local variables to the standard output. It is an error to use
+ commands were executed to restore the values that were in place
+ before the function. With no operands, l\blo\boc\bca\bal\bl writes a list of
+ local variables to the 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-d\bd _\bd_\be_\bl_\bi_\bm] [-\b-n\bn _\bc_\bo_\bu_\bn_\bt] [-\b-O\bO _\bo_\br_\bi_\bg_\bi_\bn] [-\b-s\bs _\bc_\bo_\bu_\bn_\bt] [-\b-t\bt] [-\b-u\bu _\bf_\bd] [-\b-C\bC
+ m\bma\bap\bpf\bfi\bil\ble\be [-\b-d\bd _\bd_\be_\bl_\bi_\bm] [-\b-n\bn _\bc_\bo_\bu_\bn_\bt] [-\b-O\bO _\bo_\br_\bi_\bg_\bi_\bn] [-\b-s\bs _\bc_\bo_\bu_\bn_\bt] [-\b-t\bt] [-\b-u\bu _\bf_\bd] [-\b-C\bC
_\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk] [-\b-c\bc _\bq_\bu_\ba_\bn_\bt_\bu_\bm] [_\ba_\br_\br_\ba_\by]
r\bre\bea\bad\bda\bar\brr\bra\bay\by [-\b-d\bd _\bd_\be_\bl_\bi_\bm] [-\b-n\bn _\bc_\bo_\bu_\bn_\bt] [-\b-O\bO _\bo_\br_\bi_\bg_\bi_\bn] [-\b-s\bs _\bc_\bo_\bu_\bn_\bt] [-\b-t\bt] [-\b-u\bu _\bf_\bd] [-\b-C\bC
_\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk] [-\b-c\bc _\bq_\bu_\ba_\bn_\bt_\bu_\bm] [_\ba_\br_\br_\ba_\by]
- Read lines from the standard input 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-d\bd The first character of _\bd_\be_\bl_\bi_\bm is used to terminate each
- input line, rather than newline. If _\bd_\be_\bl_\bi_\bm is the empty
+ -\b-d\bd The first character of _\bd_\be_\bl_\bi_\bm is used to terminate each
+ input line, rather than newline. If _\bd_\be_\bl_\bi_\bm is the empty
string, m\bma\bap\bpf\bfi\bil\ble\be will terminate a line when it reads a NUL
character.
- -\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 _\bd_\be_\bl_\bi_\bm (default newline) from each line
+ -\b-t\bt Remove a trailing _\bd_\be_\bl_\bi_\bm (default newline) from each line
read.
- -\b-u\bu Read lines from file descriptor _\bf_\bd instead of the stan-
+ -\b-u\bu Read lines from file descriptor _\bf_\bd instead of the stan-
dard input.
- -\b-C\bC Evaluate _\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk each time _\bq_\bu_\ba_\bn_\bt_\bu_\bm lines are read. The
+ -\b-C\bC Evaluate _\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk each time _\bq_\bu_\ba_\bn_\bt_\bu_\bm lines are read. The
-\b-c\bc option specifies _\bq_\bu_\ba_\bn_\bt_\bu_\bm.
- -\b-c\bc Specify the number of lines read between each call to
+ -\b-c\bc Specify the number of lines read between each call to
_\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk.
- If -\b-C\bC is specified without -\b-c\bc, the default quantum is 5000.
+ If -\b-C\bC is specified without -\b-c\bc, the default quantum is 5000.
When _\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk is evaluated, it is supplied the index of the next
array element to be assigned and the line to be assigned to that
- element as additional arguments. _\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk is evaluated after
+ element as additional arguments. _\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk is evaluated after
the line is read but before the array element is assigned.
- If not supplied with an explicit origin, m\bma\bap\bpf\bfi\bil\ble\be will clear _\ba_\br_\b-
+ If not supplied with an explicit origin, m\bma\bap\bpf\bfi\bil\ble\be will clear _\ba_\br_\b-
_\br_\ba_\by before assigning to it.
- m\bma\bap\bpf\bfi\bil\ble\be returns 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. The elements are num-
- bered from 0 starting at the first directory listed by d\bdi\bir\brs\bs.
- With no arguments, p\bpo\bop\bpd\bd removes the top directory from the
+ bered from 0 starting at the first directory listed by d\bdi\bir\brs\bs.
+ With no arguments, p\bpo\bop\bpd\bd removes the top directory from the
stack, and changes to the new top directory. Arguments, if sup-
plied, have the following meanings:
- -\b-n\bn Suppresses the normal change of directory when removing
+ -\b-n\bn Suppresses the normal change of directory when removing
directories from the stack, so that only the stack is ma-
nipulated.
- +\b+_\bn Removes the _\bnth entry counting from the left of the list
- shown by d\bdi\bir\brs\bs, starting with zero, from the stack. For
- example: ``popd +0'' removes the first directory, ``popd
+ +\b+_\bn Removes the _\bnth entry counting from the left of the list
+ shown by d\bdi\bir\brs\bs, starting with zero, from the stack. For
+ example: ``popd +0'' removes the first directory, ``popd
+1'' the second.
-\b-_\bn 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 top element of the directory stack is modified, and the
- _\b-_\bn option was not supplied, p\bpo\bop\bpd\bd uses the c\bcd\bd builtin to change
+ If the top element of the directory stack is modified, and the
+ _\b-_\bn option was not supplied, p\bpo\bop\bpd\bd uses the c\bcd\bd builtin to change
to the directory at the top of the stack. If the c\bcd\bd fails, p\bpo\bop\bpd\bd
returns a non-zero value.
- Otherwise, p\bpo\bop\bpd\bd returns false if an invalid option is encoun-
+ Otherwise, p\bpo\bop\bpd\bd returns false if an invalid option is encoun-
tered, the directory stack is empty, or a non-existent directory
stack entry is specified.
- If the p\bpo\bop\bpd\bd command is successful, bash runs d\bdi\bir\brs\bs to show the
- final contents of the directory stack, and the return status is
+ If the p\bpo\bop\bpd\bd command is successful, bash runs d\bdi\bir\brs\bs to show the
+ final contents of the directory stack, and the return status is
0.
p\bpr\bri\bin\bnt\btf\bf [-\b-v\bv _\bv_\ba_\br] _\bf_\bo_\br_\bm_\ba_\bt [_\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs]
- Write the formatted _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs to the standard output under the
- control of the _\bf_\bo_\br_\bm_\ba_\bt. The -\b-v\bv option causes the output to be
- assigned to the variable _\bv_\ba_\br rather than being printed to the
+ Write the formatted _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs to the standard output under the
+ control of the _\bf_\bo_\br_\bm_\ba_\bt. The -\b-v\bv option 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
+ The _\bf_\bo_\br_\bm_\ba_\bt is a character string which contains three types of
+ objects: plain characters, which are simply copied to standard
+ output, character escape sequences, which are converted and
+ copied to the standard output, and format specifications, each
+ of which causes printing of the next successive _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt. In
addition to the standard _\bp_\br_\bi_\bn_\bt_\bf(3) format characters c\bcs\bsn\bnd\bdi\bio\bou\bux\bxX\bXe\be-\b-
E\bEf\bfF\bFg\bgG\bGa\baA\bA, p\bpr\bri\bin\bnt\btf\bf interprets the following additional format spec-
ifiers:
%\b%b\bb causes p\bpr\bri\bin\bnt\btf\bf to expand backslash escape sequences in the
corresponding _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt in the same way as e\bec\bch\bho\bo -\b-e\be.
- %\b%q\bq causes p\bpr\bri\bin\bnt\btf\bf to output the corresponding _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt in a
- format that can be reused as shell input. %\b%q\bq and %\b%Q\bQ use
- the $\b$'\b''\b' quoting style if any characters in the argument
- string require it, and backslash quoting otherwise. If
- the format string uses the _\bp_\br_\bi_\bn_\bt_\bf alternate form, these
+ %\b%q\bq causes p\bpr\bri\bin\bnt\btf\bf to output the corresponding _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt in a
+ format that can be reused as shell input. %\b%q\bq and %\b%Q\bQ use
+ the $\b$'\b''\b' quoting style if any characters in the argument
+ string require it, and backslash quoting otherwise. If
+ the format string uses the _\bp_\br_\bi_\bn_\bt_\bf alternate form, these
two formats quote the argument string using single
quotes.
- %\b%Q\bQ like %\b%q\bq, but applies any supplied precision to the _\ba_\br_\bg_\bu_\b-
+ %\b%Q\bQ like %\b%q\bq, but applies any supplied precision to the _\ba_\br_\bg_\bu_\b-
_\bm_\be_\bn_\bt before quoting it.
%\b%(\b(_\bd_\ba_\bt_\be_\bf_\bm_\bt)\b)T\bT
- causes p\bpr\bri\bin\bnt\btf\bf to output the date-time string resulting
- from using _\bd_\ba_\bt_\be_\bf_\bm_\bt as a format string for _\bs_\bt_\br_\bf_\bt_\bi_\bm_\be(3).
+ causes p\bpr\bri\bin\bnt\btf\bf to output the date-time string resulting
+ from using _\bd_\ba_\bt_\be_\bf_\bm_\bt as a format string for _\bs_\bt_\br_\bf_\bt_\bi_\bm_\be(3).
The corresponding _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt is an integer representing the
- number of seconds since the epoch. Two special argument
- values may be used: -1 represents the current time, and
- -2 represents the time the shell was invoked. If no ar-
+ 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. If no ar-
gument is specified, conversion behaves as if -1 had been
- given. This is an exception to the usual p\bpr\bri\bin\bnt\btf\bf behav-
+ given. This is an exception to the usual p\bpr\bri\bin\bnt\btf\bf behav-
ior.
The %b, %q, and %T format specifiers all use the field width and
precision arguments from the format specification and write that
- many bytes from (or use that wide a field for) the expanded ar-
- gument, which usually contains more characters than the origi-
+ many bytes from (or use that wide a field for) the expanded ar-
+ gument, which usually contains more characters than the origi-
nal.
The %n format specifier accepts a corresponding argument that is
treated as a shell variable name.
- The %s and %c format specifiers accept an l (long) modifier,
+ The %s and %c format specifiers accept an l (long) modifier,
which forces them to convert the argument string to a wide-char-
acter string and apply any supplied field width and precision in
terms of characters, not bytes.
- Arguments to non-string format specifiers are treated as C con-
+ Arguments to non-string format specifiers are treated as C con-
stants, except that a leading plus or minus sign is allowed, and
- if the leading character is a single or double quote, the value
+ 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-
+ The _\bf_\bo_\br_\bm_\ba_\bt is reused as necessary to consume all of the _\ba_\br_\bg_\bu_\b-
_\bm_\be_\bn_\bt_\bs. If the _\bf_\bo_\br_\bm_\ba_\bt requires more _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs than are supplied,
- the extra format specifications behave as if a zero value or
- null string, as appropriate, had been supplied. The return
- value is zero on success, non-zero if an invalid option is sup-
+ the extra format specifications behave as if a zero value or
+ null string, as appropriate, had been supplied. The return
+ value is zero on success, non-zero if an invalid option is sup-
plied or a write or assignment error occurs.
p\bpu\bus\bsh\bhd\bd [-\b-n\bn] [+_\bn] [-_\bn]
p\bpu\bus\bsh\bhd\bd [-\b-n\bn] [_\bd_\bi_\br]
- Adds a directory to the top of the directory stack, or rotates
- the stack, making the new top of the stack the current working
- directory. With no arguments, p\bpu\bus\bsh\bhd\bd exchanges the top two ele-
- ments of the directory stack. Arguments, if supplied, have the
+ Adds a directory to the top of the directory stack, or rotates
+ the stack, making the new top of the stack the current working
+ directory. With no arguments, p\bpu\bus\bsh\bhd\bd exchanges the top two ele-
+ ments of the directory stack. Arguments, if supplied, have the
following meanings:
- -\b-n\bn Suppresses the normal change of directory when rotating
- or adding directories to the stack, so that only the
+ -\b-n\bn Suppresses the normal change of directory when rotating
+ or adding directories to the stack, so that only the
stack is manipulated.
- +\b+_\bn Rotates the stack so that the _\bnth directory (counting
- from the left of the list shown by d\bdi\bir\brs\bs, starting with
+ +\b+_\bn Rotates the stack so that the _\bnth directory (counting
+ from the left of the list shown by d\bdi\bir\brs\bs, starting with
zero) is at the top.
- -\b-_\bn Rotates the stack so that the _\bnth directory (counting
- from the right of the list shown by d\bdi\bir\brs\bs, starting with
+ -\b-_\bn Rotates the stack so that the _\bnth directory (counting
+ from the right of the list shown by d\bdi\bir\brs\bs, starting with
zero) is at the top.
_\bd_\bi_\br Adds _\bd_\bi_\br to the directory stack at the top
After the stack has been modified, if the -\b-n\bn option was not sup-
- plied, p\bpu\bus\bsh\bhd\bd uses the c\bcd\bd builtin to change to the directory at
+ plied, p\bpu\bus\bsh\bhd\bd uses the c\bcd\bd builtin to change to the directory at
the top of the stack. If the c\bcd\bd fails, p\bpu\bus\bsh\bhd\bd returns a non-zero
value.
- Otherwise, if no arguments are supplied, p\bpu\bus\bsh\bhd\bd returns 0 unless
- the directory stack is empty. When rotating the directory
- stack, p\bpu\bus\bsh\bhd\bd returns 0 unless the directory stack is empty or a
+ Otherwise, if no arguments are supplied, p\bpu\bus\bsh\bhd\bd returns 0 unless
+ the directory stack is empty. When rotating the directory
+ stack, p\bpu\bus\bsh\bhd\bd returns 0 unless the directory stack is empty or a
non-existent directory stack element is specified.
- If the p\bpu\bus\bsh\bhd\bd command is successful, bash runs d\bdi\bir\brs\bs to show the
+ If the p\bpu\bus\bsh\bhd\bd command is successful, bash runs d\bdi\bir\brs\bs to show the
final contents of the directory stack.
p\bpw\bwd\bd [-\b-L\bLP\bP]
- Print the absolute pathname of the current working directory.
+ Print the absolute pathname of the current working directory.
The pathname printed contains no symbolic links if the -\b-P\bP option
is supplied or the -\b-o\bo p\bph\bhy\bys\bsi\bic\bca\bal\bl option to the s\bse\bet\bt builtin command
- is enabled. If the -\b-L\bL option is used, the pathname printed may
- contain symbolic links. The return status is 0 unless an error
+ is enabled. If the -\b-L\bL option is used, the pathname printed may
+ contain symbolic links. The return status is 0 unless an error
occurs while reading the name of the current directory or an in-
valid option is supplied.
- r\bre\bea\bad\bd [-\b-E\bEe\ber\brs\bs] [-\b-a\ba _\ba_\bn_\ba_\bm_\be] [-\b-d\bd _\bd_\be_\bl_\bi_\bm] [-\b-i\bi _\bt_\be_\bx_\bt] [-\b-n\bn _\bn_\bc_\bh_\ba_\br_\bs] [-\b-N\bN _\bn_\bc_\bh_\ba_\br_\bs]
+ r\bre\bea\bad\bd [-\b-E\bEe\ber\brs\bs] [-\b-a\ba _\ba_\bn_\ba_\bm_\be] [-\b-d\bd _\bd_\be_\bl_\bi_\bm] [-\b-i\bi _\bt_\be_\bx_\bt] [-\b-n\bn _\bn_\bc_\bh_\ba_\br_\bs] [-\b-N\bN _\bn_\bc_\bh_\ba_\br_\bs]
[-\b-p\bp _\bp_\br_\bo_\bm_\bp_\bt] [-\b-t\bt _\bt_\bi_\bm_\be_\bo_\bu_\bt] [-\b-u\bu _\bf_\bd] [_\bn_\ba_\bm_\be ...]
- One line is read from the standard input, or from the file de-
+ One line is read from the standard input, or from the file de-
scriptor _\bf_\bd supplied as an argument to the -\b-u\bu option, split into
- words as described in _\bb_\ba_\bs_\bh_\b(_\b1_\b) under W\bWo\bor\brd\bd S\bSp\bpl\bli\bit\btt\bti\bin\bng\bg, and the
+ words as described in _\bb_\ba_\bs_\bh_\b(_\b1_\b) under W\bWo\bor\brd\bd S\bSp\bpl\bli\bit\btt\bti\bin\bng\bg, and the
first word is assigned to the first _\bn_\ba_\bm_\be, the second word to the
second _\bn_\ba_\bm_\be, and so on. If there are more words than names, the
remaining words and their intervening delimiters are assigned to
- the last _\bn_\ba_\bm_\be. If there are fewer words read from the input
- stream than names, the remaining names are assigned empty val-
- ues. The characters in I\bIF\bFS\bS are used to split the line into
- words using the same rules the shell uses for expansion (de-
+ the last _\bn_\ba_\bm_\be. If there are fewer words read from the input
+ stream than names, the remaining names are assigned empty val-
+ ues. The characters in I\bIF\bFS\bS are used to split the line into
+ words using the same rules the shell uses for expansion (de-
scribed in _\bb_\ba_\bs_\bh_\b(_\b1_\b) under W\bWo\bor\brd\bd S\bSp\bpl\bli\bit\btt\bti\bin\bng\bg). The backslash charac-
- ter (\\b\) may be used to remove any special meaning for the next
+ ter (\\b\) may be used to remove any special meaning for the next
character read and for line continuation. Options, if supplied,
have the following meanings:
-\b-a\ba _\ba_\bn_\ba_\bm_\be
The words are assigned to sequential indices of the array
variable _\ba_\bn_\ba_\bm_\be, starting at 0. _\ba_\bn_\ba_\bm_\be is unset before any
- new values are assigned. Other _\bn_\ba_\bm_\be arguments are ig-
+ new values are assigned. Other _\bn_\ba_\bm_\be arguments are ig-
nored.
-\b-d\bd _\bd_\be_\bl_\bi_\bm
The first character of _\bd_\be_\bl_\bi_\bm is used to terminate the in-
- put line, rather than newline. If _\bd_\be_\bl_\bi_\bm is the empty
- string, r\bre\bea\bad\bd will terminate a line when it reads a NUL
+ put line, rather than newline. If _\bd_\be_\bl_\bi_\bm is the empty
+ string, r\bre\bea\bad\bd will terminate a line when it reads a NUL
character.
- -\b-e\be If the standard input is coming from a terminal, r\bre\bea\bad\bd
- uses r\bre\bea\bad\bdl\bli\bin\bne\be (see R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE in _\bb_\ba_\bs_\bh_\b(_\b1_\b)) to obtain the
- line. Readline uses the current (or default, if line
- editing was not previously active) editing settings, but
+ -\b-e\be If the standard input is coming from a terminal, r\bre\bea\bad\bd
+ uses r\bre\bea\bad\bdl\bli\bin\bne\be (see R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE in _\bb_\ba_\bs_\bh_\b(_\b1_\b)) to obtain the
+ line. Readline uses the current (or default, if line
+ editing was not previously active) editing settings, but
uses readline's default filename completion.
- -\b-E\bE If the standard input is coming from a terminal, r\bre\bea\bad\bd
- uses r\bre\bea\bad\bdl\bli\bin\bne\be (see R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE in _\bb_\ba_\bs_\bh_\b(_\b1_\b)) to obtain the
- line. Readline uses the current (or default, if line
- editing was not previously active) editing settings, but
- uses bash's default completion, including programmable
+ -\b-E\bE If the standard input is coming from a terminal, r\bre\bea\bad\bd
+ uses r\bre\bea\bad\bdl\bli\bin\bne\be (see R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE in _\bb_\ba_\bs_\bh_\b(_\b1_\b)) to obtain the
+ line. Readline uses the current (or default, if line
+ editing was not previously active) editing settings, but
+ uses bash's default completion, including programmable
completion.
-\b-i\bi _\bt_\be_\bx_\bt
- If r\bre\bea\bad\bdl\bli\bin\bne\be is being used to read the line, _\bt_\be_\bx_\bt is
+ If r\bre\bea\bad\bdl\bli\bin\bne\be is being used to read the line, _\bt_\be_\bx_\bt is
placed into the editing buffer before editing begins.
-\b-n\bn _\bn_\bc_\bh_\ba_\br_\bs
- r\bre\bea\bad\bd returns after reading _\bn_\bc_\bh_\ba_\br_\bs characters rather than
+ r\bre\bea\bad\bd returns after reading _\bn_\bc_\bh_\ba_\br_\bs characters rather than
waiting for a complete line of input, but honors a delim-
- iter if fewer than _\bn_\bc_\bh_\ba_\br_\bs characters are read before the
+ iter if fewer than _\bn_\bc_\bh_\ba_\br_\bs characters are read before the
delimiter.
-\b-N\bN _\bn_\bc_\bh_\ba_\br_\bs
- r\bre\bea\bad\bd returns after reading exactly _\bn_\bc_\bh_\ba_\br_\bs characters
- rather than waiting for a complete line of input, unless
- EOF is encountered or r\bre\bea\bad\bd times out. Delimiter charac-
- ters encountered in the input are not treated specially
- and do not cause r\bre\bea\bad\bd to return until _\bn_\bc_\bh_\ba_\br_\bs characters
- are read. The result is not split on the characters in
- I\bIF\bFS\bS; the intent is that the variable is assigned exactly
+ r\bre\bea\bad\bd returns after reading exactly _\bn_\bc_\bh_\ba_\br_\bs characters
+ rather than waiting for a complete line of input, unless
+ EOF is encountered or r\bre\bea\bad\bd times out. Delimiter charac-
+ ters encountered in the input are not treated specially
+ and do not cause r\bre\bea\bad\bd to return until _\bn_\bc_\bh_\ba_\br_\bs characters
+ are read. The result is not split on the characters in
+ I\bIF\bFS\bS; the intent is that the variable is assigned exactly
the characters read (with the exception of backslash; see
the -\b-r\br option below).
-\b-p\bp _\bp_\br_\bo_\bm_\bp_\bt
line, before attempting to read any input. The prompt is
displayed only if input is coming from a terminal.
-\b-r\br Backslash does not act as an escape character. The back-
- slash is considered to be part of the line. In particu-
- lar, a backslash-newline pair may not then be used as a
+ slash is considered to be part of the line. In particu-
+ lar, a backslash-newline pair may not then be used as a
line continuation.
-\b-s\bs Silent mode. If input is coming from a terminal, charac-
ters are not echoed.
-\b-t\bt _\bt_\bi_\bm_\be_\bo_\bu_\bt
- Cause r\bre\bea\bad\bd to time out and return failure if a complete
- line of input (or a specified number of characters) is
- not read within _\bt_\bi_\bm_\be_\bo_\bu_\bt seconds. _\bt_\bi_\bm_\be_\bo_\bu_\bt may be a deci-
- mal number with a fractional portion following the deci-
- mal point. This option is only effective if r\bre\bea\bad\bd is
- reading input from a terminal, pipe, or other special
- file; it has no effect when reading from regular files.
+ Cause r\bre\bea\bad\bd to time out and return failure if a complete
+ line of input (or a specified number of characters) is
+ not read within _\bt_\bi_\bm_\be_\bo_\bu_\bt seconds. _\bt_\bi_\bm_\be_\bo_\bu_\bt may be a deci-
+ mal number with a fractional portion following the deci-
+ mal point. This option is only effective if r\bre\bea\bad\bd is
+ reading input from a terminal, pipe, or other special
+ file; it has no effect when reading from regular files.
If r\bre\bea\bad\bd times out, r\bre\bea\bad\bd saves any partial input read into
- the specified variable _\bn_\ba_\bm_\be. If _\bt_\bi_\bm_\be_\bo_\bu_\bt is 0, r\bre\bea\bad\bd re-
- turns immediately, without trying to read any data. The
- exit status is 0 if input is available on the specified
- file descriptor, or the read will return EOF, non-zero
- otherwise. The exit status is greater than 128 if the
+ the specified variable _\bn_\ba_\bm_\be. If _\bt_\bi_\bm_\be_\bo_\bu_\bt is 0, r\bre\bea\bad\bd re-
+ turns immediately, without trying to read any data. The
+ exit status is 0 if input is available on the specified
+ file descriptor, or the read will return EOF, non-zero
+ otherwise. The exit status is greater than 128 if the
timeout is exceeded.
-\b-u\bu _\bf_\bd Read input from file descriptor _\bf_\bd.
- If no _\bn_\ba_\bm_\be_\bs are supplied, the line read, without the ending de-
- limiter but otherwise unmodified, is assigned to the variable
- R\bRE\bEP\bPL\bLY\bY. The exit status is zero, unless end-of-file is encoun-
- tered, r\bre\bea\bad\bd times out (in which case the status is greater than
- 128), a variable assignment error (such as assigning to a read-
+ If no _\bn_\ba_\bm_\be_\bs are supplied, the line read, without the ending de-
+ limiter but otherwise unmodified, is assigned to the variable
+ R\bRE\bEP\bPL\bLY\bY. The exit status is zero, unless end-of-file is encoun-
+ tered, r\bre\bea\bad\bd times out (in which case the status is greater than
+ 128), a variable assignment error (such as assigning to a read-
only variable) occurs, or an invalid file descriptor is supplied
as the argument to -\b-u\bu.
r\bre\bea\bad\bdo\bon\bnl\bly\by [-\b-a\baA\bAf\bf] [-\b-p\bp] [_\bn_\ba_\bm_\be[=_\bw_\bo_\br_\bd] ...]
- The given _\bn_\ba_\bm_\be_\bs are marked readonly; the values of these _\bn_\ba_\bm_\be_\bs
- may not be changed by subsequent assignment. If the -\b-f\bf option
- is supplied, the functions corresponding to the _\bn_\ba_\bm_\be_\bs are so
- marked. The -\b-a\ba option restricts the variables to indexed ar-
- rays; the -\b-A\bA option restricts the variables to associative ar-
+ The given _\bn_\ba_\bm_\be_\bs are marked readonly; the values of these _\bn_\ba_\bm_\be_\bs
+ may not be changed by subsequent assignment. If the -\b-f\bf option
+ is supplied, the functions corresponding to the _\bn_\ba_\bm_\be_\bs are so
+ marked. The -\b-a\ba option restricts the variables to indexed ar-
+ rays; the -\b-A\bA option restricts the variables to associative ar-
rays. If both options are supplied, -\b-A\bA takes precedence. If no
- _\bn_\ba_\bm_\be arguments are given, or if the -\b-p\bp option is supplied, a
+ _\bn_\ba_\bm_\be arguments are given, or if the -\b-p\bp option is supplied, a
list of all readonly names is printed. The other options may be
- used to restrict the output to a subset of the set of readonly
- names. The -\b-p\bp option causes output to be displayed in a format
- that may be reused as input. If a variable name is followed by
- =_\bw_\bo_\br_\bd, the value of the variable is set to _\bw_\bo_\br_\bd. The return
- status is 0 unless an invalid option is encountered, one of the
+ used to restrict the output to a subset of the set of readonly
+ names. The -\b-p\bp option causes output to be displayed in a format
+ that may be reused as input. If a variable name is followed by
+ =_\bw_\bo_\br_\bd, the value of the variable is set to _\bw_\bo_\br_\bd. The return
+ status is 0 unless an invalid option is encountered, one of the
_\bn_\ba_\bm_\be_\bs is not a valid shell variable name, or -\b-f\bf is supplied with
a _\bn_\ba_\bm_\be that is not a function.
r\bre\bet\btu\bur\brn\bn [_\bn]
- Causes a function to stop executing and return the value speci-
- fied by _\bn to its caller. If _\bn is omitted, the return status is
- that of the last command executed in the function body. If r\bre\be-\b-
+ Causes a function to stop executing and return the value speci-
+ fied by _\bn to its caller. If _\bn is omitted, the return status is
+ that of the last command executed in the function body. If r\bre\be-\b-
t\btu\bur\brn\bn is executed by a trap handler, the last command used to de-
- termine the status is the last command executed before the trap
- handler. If r\bre\bet\btu\bur\brn\bn is executed during a D\bDE\bEB\bBU\bUG\bG trap, the last
- command used to determine the status is the last command exe-
- cuted by the trap handler before r\bre\bet\btu\bur\brn\bn was invoked. If r\bre\bet\btu\bur\brn\bn
- is used outside a function, but during execution of a script by
- the .\b. (s\bso\bou\bur\brc\bce\be) command, it causes the shell to stop executing
- that script and return either _\bn or the exit status of the last
- command executed within the script as the exit status of the
+ termine the status is the last command executed before the trap
+ handler. If r\bre\bet\btu\bur\brn\bn is executed during a D\bDE\bEB\bBU\bUG\bG trap, the last
+ command used to determine the status is the last command exe-
+ cuted by the trap handler before r\bre\bet\btu\bur\brn\bn was invoked. If r\bre\bet\btu\bur\brn\bn
+ is used outside a function, but during execution of a script by
+ the .\b. (s\bso\bou\bur\brc\bce\be) command, it causes the shell to stop executing
+ that script and return either _\bn or the exit status of the last
+ command executed within the script as the exit status of the
script. If _\bn is supplied, the return value is its least signif-
- icant 8 bits. The return status is non-zero if r\bre\bet\btu\bur\brn\bn is sup-
- plied a non-numeric argument, or is used outside a function and
- not during execution of a script by .\b. or s\bso\bou\bur\brc\bce\be. Any command
+ icant 8 bits. The return status is non-zero if r\bre\bet\btu\bur\brn\bn is sup-
+ plied a non-numeric argument, or is used outside a function and
+ not during execution of a script by .\b. or s\bso\bou\bur\brc\bce\be. Any command
associated with the R\bRE\bET\bTU\bUR\bRN\bN trap is executed before execution re-
sumes after the function or script.
s\bse\bet\bt [-\b-a\bab\bbe\bef\bfh\bhk\bkm\bmn\bnp\bpt\btu\buv\bvx\bxB\bBC\bCE\bEH\bHP\bPT\bT] [-\b-o\bo _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be] [-\b--\b-] [-\b-] [_\ba_\br_\bg ...]
s\bse\bet\bt [+\b+a\bab\bbe\bef\bfh\bhk\bkm\bmn\bnp\bpt\btu\buv\bvx\bxB\bBC\bCE\bEH\bHP\bPT\bT] [+\b+o\bo _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be] [-\b--\b-] [-\b-] [_\ba_\br_\bg ...]
s\bse\bet\bt -\b-o\bo
- s\bse\bet\bt +\b+o\bo Without options, display the name and value of each shell vari-
- able in a format that can be reused as input for setting or re-
+ s\bse\bet\bt +\b+o\bo Without options, display the name and value of each shell vari-
+ able in a format that can be reused as input for setting or re-
setting the currently-set variables. Read-only variables cannot
- be reset. In _\bp_\bo_\bs_\bi_\bx _\bm_\bo_\bd_\be, only shell variables are listed. The
- output is sorted according to the current locale. When options
- are specified, they set or unset shell attributes. Any argu-
- ments remaining after option processing are treated as values
+ be reset. In _\bp_\bo_\bs_\bi_\bx _\bm_\bo_\bd_\be, only shell variables are listed. The
+ output is sorted according to the current locale. When options
+ are specified, they set or unset shell attributes. Any argu-
+ ments remaining after option processing are treated as values
for the positional parameters and are assigned, in order, to $\b$1\b1,
- $\b$2\b2, .\b..\b..\b. $\b$_\bn. Options, if specified, have the following mean-
+ $\b$2\b2, .\b..\b..\b. $\b$_\bn. Options, if specified, have the following mean-
ings:
-\b-a\ba Each variable or function that is created or modified is
- given the export attribute and marked for export to the
+ given the export attribute and marked for export to the
environment of subsequent commands.
- -\b-b\bb Report the status of terminated background jobs immedi-
+ -\b-b\bb Report the status of terminated background jobs immedi-
ately, rather than before the next primary prompt. This
is effective only when job control is enabled.
- -\b-e\be Exit immediately if a _\bp_\bi_\bp_\be_\bl_\bi_\bn_\be (which may consist of a
- single _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd), a _\bl_\bi_\bs_\bt, or a _\bc_\bo_\bm_\bp_\bo_\bu_\bn_\bd _\bc_\bo_\bm_\bm_\ba_\bn_\bd
- (see S\bSH\bHE\bEL\bLL\bL G\bGR\bRA\bAM\bMM\bMA\bAR\bR in _\bb_\ba_\bs_\bh_\b(_\b1_\b)), exits with a non-zero
- status. The shell does not exit if the command that
- fails is part of the command list immediately following
+ -\b-e\be Exit immediately if a _\bp_\bi_\bp_\be_\bl_\bi_\bn_\be (which may consist of a
+ single _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd), a _\bl_\bi_\bs_\bt, or a _\bc_\bo_\bm_\bp_\bo_\bu_\bn_\bd _\bc_\bo_\bm_\bm_\ba_\bn_\bd
+ (see S\bSH\bHE\bEL\bLL\bL G\bGR\bRA\bAM\bMM\bMA\bAR\bR in _\bb_\ba_\bs_\bh_\b(_\b1_\b)), exits with a non-zero
+ status. The shell does not exit if the command that
+ fails is part of the command list immediately following
a w\bwh\bhi\bil\ble\be or u\bun\bnt\bti\bil\bl keyword, part of the test following the
- i\bif\bf or e\bel\bli\bif\bf reserved words, part of any command executed
- in a &\b&&\b& or |\b||\b| list except the command following the fi-
+ i\bif\bf or e\bel\bli\bif\bf reserved words, part of any command executed
+ in a &\b&&\b& or |\b||\b| list except the command following the fi-
nal &\b&&\b& or |\b||\b|, any command in a pipeline but the last, or
- if the command's return value is being inverted with !\b!.
- If a compound command other than a subshell returns a
- non-zero status because a command failed while -\b-e\be was
- being ignored, the shell does not exit. A trap on E\bER\bRR\bR,
+ if the command's return value is being inverted with !\b!.
+ If a compound command other than a subshell returns a
+ non-zero status because a command failed while -\b-e\be was
+ being ignored, the shell does not exit. A trap on E\bER\bRR\bR,
if set, is executed before the shell exits. This option
applies to the shell environment and each subshell envi-
ronment separately (see C\bCO\bOM\bMM\bMA\bAN\bND\bD E\bEX\bXE\bEC\bCU\bUT\bTI\bIO\bON\bN E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT in
_\bb_\ba_\bs_\bh_\b(_\b1_\b)), and may cause subshells to exit before execut-
ing all the commands in the subshell.
- If a compound command or shell function executes in a
- context where -\b-e\be is being ignored, none of the commands
- executed within the compound command or function body
- will be affected by the -\b-e\be setting, even if -\b-e\be is set
- and a command returns a failure status. If a compound
- command or shell function sets -\b-e\be while executing in a
- context where -\b-e\be is ignored, that setting will not have
- any effect until the compound command or the command
+ If a compound command or shell function executes in a
+ context where -\b-e\be is being ignored, none of the commands
+ executed within the compound command or function body
+ will be affected by the -\b-e\be setting, even if -\b-e\be is set
+ and a command returns a failure status. If a compound
+ command or shell function sets -\b-e\be while executing in a
+ context where -\b-e\be is ignored, that setting will not have
+ any effect until the compound command or the command
containing the function call completes.
-\b-f\bf Disable pathname expansion.
- -\b-h\bh Remember the location of commands as they are looked up
+ -\b-h\bh Remember the location of commands as they are looked up
for execution. This is enabled by default.
- -\b-k\bk All arguments in the form of assignment statements are
- placed in the environment for a command, not just those
+ -\b-k\bk All arguments in the form of assignment statements are
+ placed in the environment for a command, not just those
that precede the command name.
- -\b-m\bm Monitor mode. Job control is enabled. This option is
- on by default for interactive shells on systems that
- support it (see J\bJO\bOB\bB C\bCO\bON\bNT\bTR\bRO\bOL\bL in _\bb_\ba_\bs_\bh_\b(_\b1_\b)). All processes
- run in a separate process group. When a background job
- completes, the shell prints a line containing its exit
+ -\b-m\bm Monitor mode. Job control is enabled. This option is
+ on by default for interactive shells on systems that
+ support it (see J\bJO\bOB\bB C\bCO\bON\bNT\bTR\bRO\bOL\bL in _\bb_\ba_\bs_\bh_\b(_\b1_\b)). All processes
+ run in a separate process group. When a background job
+ completes, the shell prints a line containing its exit
status.
-\b-n\bn Read commands but do not execute them. This may be used
- to check a shell script for syntax errors. This is ig-
+ to check a shell script for syntax errors. This is ig-
nored by interactive shells.
-\b-o\bo _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be
The _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be can be one of the following:
Same as -\b-a\ba.
b\bbr\bra\bac\bce\bee\bex\bxp\bpa\ban\bnd\bd
Same as -\b-B\bB.
- e\bem\bma\bac\bcs\bs Use an emacs-style command line editing inter-
+ e\bem\bma\bac\bcs\bs Use an emacs-style command line editing inter-
face. This is enabled by default when the shell
is interactive, unless the shell is started with
- the -\b--\b-n\bno\boe\bed\bdi\bit\bti\bin\bng\bg option. This also affects the
+ the -\b--\b-n\bno\boe\bed\bdi\bit\bti\bin\bng\bg option. This also affects the
editing interface used for r\bre\bea\bad\bd -\b-e\be.
e\ber\brr\bre\bex\bxi\bit\bt Same as -\b-e\be.
e\ber\brr\brt\btr\bra\bac\bce\be
h\bha\bas\bsh\bha\bal\bll\bl Same as -\b-h\bh.
h\bhi\bis\bst\bte\bex\bxp\bpa\ban\bnd\bd
Same as -\b-H\bH.
- h\bhi\bis\bst\bto\bor\bry\by Enable command history, as described in _\bb_\ba_\bs_\bh_\b(_\b1_\b)
- under H\bHI\bIS\bST\bTO\bOR\bRY\bY. This option is on by default in
+ h\bhi\bis\bst\bto\bor\bry\by Enable command history, as described in _\bb_\ba_\bs_\bh_\b(_\b1_\b)
+ under H\bHI\bIS\bST\bTO\bOR\bRY\bY. This option is on by default in
interactive shells.
i\big\bgn\bno\bor\bre\bee\beo\bof\bf
- The effect is as if the shell command ``IG-
- NOREEOF=10'' had been executed (see S\bSh\bhe\bel\bll\bl V\bVa\bar\bri\bi-\b-
+ The effect is as if the shell command ``IG-
+ NOREEOF=10'' had been executed (see S\bSh\bhe\bel\bll\bl V\bVa\bar\bri\bi-\b-
a\bab\bbl\ble\bes\bs in _\bb_\ba_\bs_\bh_\b(_\b1_\b)).
k\bke\bey\byw\bwo\bor\brd\bd Same as -\b-k\bk.
m\bmo\bon\bni\bit\bto\bor\br Same as -\b-m\bm.
p\bph\bhy\bys\bsi\bic\bca\bal\bl
Same as -\b-P\bP.
p\bpi\bip\bpe\bef\bfa\bai\bil\bl
- If set, the return value of a pipeline is the
- value of the last (rightmost) command to exit
- with a non-zero status, or zero if all commands
- in the pipeline exit successfully. This option
+ If set, the return value of a pipeline is the
+ value of the last (rightmost) command to exit
+ with a non-zero status, or zero if all commands
+ in the pipeline exit successfully. This option
is disabled by default.
- p\bpo\bos\bsi\bix\bx 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). See S\bSE\bEE\bE A\bAL\bLS\bSO\bO
- in _\bb_\ba_\bs_\bh_\b(_\b1_\b) for a reference to a document that
+ p\bpo\bos\bsi\bix\bx 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). See S\bSE\bEE\bE A\bAL\bLS\bSO\bO
+ in _\bb_\ba_\bs_\bh_\b(_\b1_\b) for a reference to a document that
details how posix mode affects bash's behavior.
p\bpr\bri\biv\bvi\bil\ble\beg\bge\bed\bd
Same as -\b-p\bp.
v\bve\ber\brb\bbo\bos\bse\be Same as -\b-v\bv.
- v\bvi\bi Use a vi-style command line editing interface.
+ v\bvi\bi Use a vi-style command line editing interface.
This also affects the editing interface used for
r\bre\bea\bad\bd -\b-e\be.
x\bxt\btr\bra\bac\bce\be Same as -\b-x\bx.
- If -\b-o\bo is supplied with no _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be, s\bse\bet\bt prints the
- current shell option settings. If +\b+o\bo is supplied with
- no _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be, s\bse\bet\bt prints a series of s\bse\bet\bt commands to
- recreate the current option settings on the standard
+ If -\b-o\bo is supplied with no _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be, s\bse\bet\bt prints the
+ current shell option settings. If +\b+o\bo is supplied with
+ no _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be, s\bse\bet\bt prints a series of s\bse\bet\bt commands to
+ recreate the current option settings on the standard
output.
- -\b-p\bp Turn on _\bp_\br_\bi_\bv_\bi_\bl_\be_\bg_\be_\bd mode. In this mode, the $\b$E\bEN\bNV\bV and
- $\b$B\bBA\bAS\bSH\bH_\b_E\bEN\bNV\bV files are not processed, shell functions are
- not inherited from the environment, and 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 ap-
- pear in the environment, are ignored. If the shell is
- started with the effective user (group) id not equal to
- the real user (group) id, and the -\b-p\bp option is not sup-
+ -\b-p\bp Turn on _\bp_\br_\bi_\bv_\bi_\bl_\be_\bg_\be_\bd mode. In this mode, the $\b$E\bEN\bNV\bV and
+ $\b$B\bBA\bAS\bSH\bH_\b_E\bEN\bNV\bV files are not processed, shell functions are
+ not inherited from the environment, and 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 ap-
+ pear in the environment, are ignored. If the shell is
+ started with the effective user (group) id not equal to
+ the real user (group) id, and the -\b-p\bp option is not sup-
plied, these actions are taken and the effective user id
- is set to the real user id. If the -\b-p\bp option is sup-
- plied at startup, the effective user id is not reset.
- Turning this option off causes the effective user and
+ is set to the real user id. If the -\b-p\bp option is sup-
+ plied at startup, the effective user id is not reset.
+ Turning this option off causes the effective user and
group ids to be set to the real user and group ids.
-\b-r\br Enable restricted shell mode. This option cannot be un-
set once it has been set.
-\b-t\bt Exit after reading and executing one command.
-\b-u\bu Treat unset variables and parameters other than the spe-
- cial parameters "@" and "*", or array variables sub-
- scripted with "@" or "*", as an error when performing
- parameter expansion. If expansion is attempted on an
- unset variable or parameter, the shell prints an error
- message, and, if not interactive, exits with a non-zero
+ cial parameters "@" and "*", or array variables sub-
+ scripted with "@" or "*", as an error when performing
+ parameter expansion. If expansion is attempted on an
+ unset variable or parameter, the shell prints an error
+ message, and, if not interactive, exits with a non-zero
status.
-\b-v\bv Print shell input lines as they are read.
- -\b-x\bx After expanding each _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd, f\bfo\bor\br command, c\bca\bas\bse\be
+ -\b-x\bx After expanding each _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd, f\bfo\bor\br command, c\bca\bas\bse\be
command, s\bse\bel\ble\bec\bct\bt command, or arithmetic f\bfo\bor\br command, dis-
- play the expanded value of P\bPS\bS4\b4, followed by the command
- and its expanded arguments or associated word list, to
+ play the expanded value of P\bPS\bS4\b4, followed by the command
+ and its expanded arguments or associated word list, to
standard error.
- -\b-B\bB The shell performs brace expansion (see B\bBr\bra\bac\bce\be E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn
+ -\b-B\bB The shell performs brace expansion (see B\bBr\bra\bac\bce\be E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn
in _\bb_\ba_\bs_\bh_\b(_\b1_\b)). This is on by default.
- -\b-C\bC If set, b\bba\bas\bsh\bh does not overwrite an existing file with
- the >\b>, >\b>&\b&, and <\b<>\b> redirection operators. This may be
+ -\b-C\bC If set, b\bba\bas\bsh\bh does not overwrite an existing file with
+ the >\b>, >\b>&\b&, and <\b<>\b> redirection operators. This may be
overridden when creating output files by using the redi-
rection operator >\b>|\b| instead of >\b>.
-\b-E\bE If set, any trap on E\bER\bRR\bR is inherited by shell functions,
- command substitutions, and commands executed in a sub-
- shell environment. The E\bER\bRR\bR trap is normally not inher-
+ command substitutions, and commands executed in a sub-
+ shell environment. The E\bER\bRR\bR trap is normally not inher-
ited in such cases.
-\b-H\bH Enable !\b! style history substitution. This option is on
by default when the shell is interactive.
- -\b-P\bP If set, the shell does not resolve symbolic links when
- executing commands such as c\bcd\bd that change the current
+ -\b-P\bP If set, the shell does not resolve symbolic links when
+ executing commands such as c\bcd\bd that change the current
working directory. It uses the physical directory
structure instead. By default, b\bba\bas\bsh\bh follows the logical
- chain of directories when performing commands which
+ chain of directories when performing commands which
change the current directory.
- -\b-T\bT If set, any traps on D\bDE\bEB\bBU\bUG\bG and R\bRE\bET\bTU\bUR\bRN\bN are inherited by
+ -\b-T\bT If set, any traps on D\bDE\bEB\bBU\bUG\bG and R\bRE\bET\bTU\bUR\bRN\bN are inherited by
shell functions, command substitutions, and commands ex-
- ecuted in a subshell environment. The D\bDE\bEB\bBU\bUG\bG and R\bRE\bET\bTU\bUR\bRN\bN
+ ecuted in a subshell environment. The D\bDE\bEB\bBU\bUG\bG and R\bRE\bET\bTU\bUR\bRN\bN
traps are normally not inherited in such cases.
- -\b--\b- If no arguments follow this option, then the positional
+ -\b--\b- If no arguments follow this option, then the positional
parameters are unset. Otherwise, the positional parame-
- ters are set to the _\ba_\br_\bgs, even if some of them begin
+ ters are set to the _\ba_\br_\bgs, even if some of them begin
with a -\b-.
- -\b- Signal the end of options, cause all remaining _\ba_\br_\bgs to
+ -\b- Signal the end of options, cause all remaining _\ba_\br_\bgs to
be assigned to the positional parameters. The -\b-x\bx and -\b-v\bv
options are turned off. If there are no _\ba_\br_\bgs, the posi-
tional parameters remain unchanged.
- The options are off by default unless otherwise noted. Using +
- rather than - causes these options to be turned off. The op-
+ The options are off by default unless otherwise noted. Using +
+ rather than - causes these options to be turned off. The op-
tions can also be specified as arguments to an invocation of the
- shell. The current set of options may be found in $\b$-\b-. The re-
- turn status is always true unless an invalid option is encoun-
+ shell. The current set of options may be found in $\b$-\b-. The re-
+ turn status is always true unless an invalid option is encoun-
tered.
s\bsh\bhi\bif\bft\bt [_\bn]
- The positional parameters from _\bn+1 ... are renamed to $\b$1\b1 .\b..\b..\b..\b.
- Parameters represented by the numbers $\b$#\b# down to $\b$#\b#-_\bn+1 are un-
- set. _\bn must be a non-negative number less than or equal to $\b$#\b#.
- If _\bn is 0, no parameters are changed. If _\bn is not given, it is
+ The positional parameters from _\bn+1 ... are renamed to $\b$1\b1 .\b..\b..\b..\b.
+ Parameters represented by the numbers $\b$#\b# down to $\b$#\b#-_\bn+1 are un-
+ set. _\bn must be a non-negative number less than or equal to $\b$#\b#.
+ If _\bn is 0, no parameters are changed. If _\bn is not given, it is
assumed to be 1. If _\bn is greater than $\b$#\b#, the positional param-
- eters are not changed. The return status is greater than zero
+ eters are not changed. The return status is greater than zero
if _\bn is greater than $\b$#\b# or less than zero; otherwise 0.
s\bsh\bho\bop\bpt\bt [-\b-p\bpq\bqs\bsu\bu] [-\b-o\bo] [_\bo_\bp_\bt_\bn_\ba_\bm_\be ...]
- Toggle the values of settings controlling optional shell behav-
- ior. The settings can be either those listed below, or, if the
+ Toggle the values of settings controlling optional shell behav-
+ ior. The settings can be either those listed below, or, if the
-\b-o\bo option is used, those available with the -\b-o\bo option to the s\bse\bet\bt
builtin command. With no options, or with the -\b-p\bp option, a list
- of all settable options is displayed, with an indication of
+ of all settable options is displayed, with an indication of
whether or not each is set; if _\bo_\bp_\bt_\bn_\ba_\bm_\be_\bs are supplied, the output
- is restricted to those options. The -\b-p\bp option causes output to
- be displayed in a form that may be reused as input. Other op-
+ is restricted to those options. The -\b-p\bp option causes output to
+ be displayed in a form that may be reused as input. Other op-
tions have the following meanings:
-\b-s\bs Enable (set) each _\bo_\bp_\bt_\bn_\ba_\bm_\be.
-\b-u\bu Disable (unset) each _\bo_\bp_\bt_\bn_\ba_\bm_\be.
- -\b-q\bq Suppresses normal output (quiet mode); the return status
+ -\b-q\bq Suppresses normal output (quiet mode); the return status
indicates whether the _\bo_\bp_\bt_\bn_\ba_\bm_\be is set or unset. If multi-
- ple _\bo_\bp_\bt_\bn_\ba_\bm_\be arguments are given with -\b-q\bq, the return sta-
- tus is zero if all _\bo_\bp_\bt_\bn_\ba_\bm_\be_\bs are enabled; non-zero other-
+ ple _\bo_\bp_\bt_\bn_\ba_\bm_\be arguments are given with -\b-q\bq, the return sta-
+ tus is zero if all _\bo_\bp_\bt_\bn_\ba_\bm_\be_\bs are enabled; non-zero other-
wise.
- -\b-o\bo Restricts the values of _\bo_\bp_\bt_\bn_\ba_\bm_\be to be those defined for
+ -\b-o\bo Restricts the values of _\bo_\bp_\bt_\bn_\ba_\bm_\be to be those defined for
the -\b-o\bo option to the s\bse\bet\bt builtin.
- If either -\b-s\bs or -\b-u\bu is used with no _\bo_\bp_\bt_\bn_\ba_\bm_\be arguments, s\bsh\bho\bop\bpt\bt
- shows only those options which are set or unset, respectively.
- Unless otherwise noted, the s\bsh\bho\bop\bpt\bt options are disabled (unset)
+ If either -\b-s\bs or -\b-u\bu is used with no _\bo_\bp_\bt_\bn_\ba_\bm_\be arguments, s\bsh\bho\bop\bpt\bt
+ shows only those options which are set or unset, respectively.
+ Unless otherwise noted, the s\bsh\bho\bop\bpt\bt options are disabled (unset)
by default.
- The return status when listing options is zero if all _\bo_\bp_\bt_\bn_\ba_\bm_\be_\bs
- are enabled, non-zero otherwise. When setting or unsetting op-
- tions, the return status is zero unless an _\bo_\bp_\bt_\bn_\ba_\bm_\be is not a
+ The return status when listing options is zero if all _\bo_\bp_\bt_\bn_\ba_\bm_\be_\bs
+ are enabled, non-zero otherwise. When setting or unsetting op-
+ tions, the return status is zero unless an _\bo_\bp_\bt_\bn_\ba_\bm_\be is not a
valid shell option.
The list of s\bsh\bho\bop\bpt\bt options is:
a\bar\brr\bra\bay\by_\b_e\bex\bxp\bpa\ban\bnd\bd_\b_o\bon\bnc\bce\be
- If set, the shell suppresses multiple evaluation of as-
+ If set, the shell suppresses multiple evaluation of as-
sociative and indexed array subscripts during arithmetic
expression evaluation, while executing builtins that can
- perform variable assignments, and while executing
+ perform variable assignments, and while executing
builtins that perform array dereferencing.
a\bas\bss\bso\boc\bc_\b_e\bex\bxp\bpa\ban\bnd\bd_\b_o\bon\bnc\bce\be
Deprecated; a synonym for a\bar\brr\bra\bay\by_\b_e\bex\bxp\bpa\ban\bnd\bd_\b_o\bon\bnc\bce\be.
- a\bau\but\bto\boc\bcd\bd If set, a command name that is the name of a directory
- is executed as if it were the argument to the c\bcd\bd com-
+ a\bau\but\bto\boc\bcd\bd If set, a command name that is the name of a directory
+ is executed as if it were the argument to the c\bcd\bd com-
mand. This option is only used by interactive shells.
c\bcd\bda\bab\bbl\ble\be_\b_v\bva\bar\brs\bs
- If set, an argument to the c\bcd\bd builtin command that is
- not a directory is assumed to be the name of a variable
+ If set, an argument to the c\bcd\bd builtin command that is
+ not a directory is assumed to be the name of a variable
whose value is the directory to change to.
c\bcd\bds\bsp\bpe\bel\bll\bl If set, minor errors in the spelling of a directory com-
- ponent in a c\bcd\bd command will be corrected. The errors
+ ponent in a c\bcd\bd command will be corrected. The errors
checked for are transposed characters, a missing charac-
- ter, and one character too many. If a correction is
- found, the corrected filename is printed, and the com-
- mand proceeds. This option is only used by interactive
+ ter, and one character too many. If a correction is
+ found, the corrected filename is printed, and the com-
+ mand proceeds. This option is only used by interactive
shells.
c\bch\bhe\bec\bck\bkh\bha\bas\bsh\bh
If set, b\bba\bas\bsh\bh checks that a command found in the hash ta-
- ble exists before trying to execute it. If a hashed
- command no longer exists, a normal path search is per-
+ ble exists before trying to execute it. If a hashed
+ command no longer exists, a normal path search is per-
formed.
c\bch\bhe\bec\bck\bkj\bjo\bob\bbs\bs
If set, b\bba\bas\bsh\bh lists the status of any stopped and running
- jobs before exiting an interactive shell. If any jobs
+ jobs before exiting an interactive shell. If any jobs
are running, this causes the exit to be deferred until a
- second exit is attempted without an intervening command
- (see J\bJO\bOB\bB C\bCO\bON\bNT\bTR\bRO\bOL\bL in _\bb_\ba_\bs_\bh_\b(_\b1_\b)). The shell always post-
+ second exit is attempted without an intervening command
+ (see J\bJO\bOB\bB C\bCO\bON\bNT\bTR\bRO\bOL\bL in _\bb_\ba_\bs_\bh_\b(_\b1_\b)). The shell always post-
pones exiting if any jobs are stopped.
c\bch\bhe\bec\bck\bkw\bwi\bin\bns\bsi\biz\bze\be
- If set, b\bba\bas\bsh\bh checks the window size after each external
- (non-builtin) command and, if necessary, updates the
- values of L\bLI\bIN\bNE\bES\bS and C\bCO\bOL\bLU\bUM\bMN\bNS\bS. This option is enabled by
+ If set, b\bba\bas\bsh\bh checks the window size after each external
+ (non-builtin) command and, if necessary, updates the
+ values of L\bLI\bIN\bNE\bES\bS and C\bCO\bOL\bLU\bUM\bMN\bNS\bS. This option is enabled by
default.
- c\bcm\bmd\bdh\bhi\bis\bst\bt If set, b\bba\bas\bsh\bh attempts to save all lines of a multiple-
- line command in the same history entry. This allows
- easy re-editing of multi-line commands. This option is
- enabled by default, but only has an effect if command
- history is enabled, as described in _\bb_\ba_\bs_\bh_\b(_\b1_\b) under H\bHI\bIS\bS-\b-
+ c\bcm\bmd\bdh\bhi\bis\bst\bt If set, b\bba\bas\bsh\bh attempts to save all lines of a multiple-
+ line command in the same history entry. This allows
+ easy re-editing of multi-line commands. This option is
+ enabled by default, but only has an effect if command
+ history is enabled, as described in _\bb_\ba_\bs_\bh_\b(_\b1_\b) under H\bHI\bIS\bS-\b-
T\bTO\bOR\bRY\bY.
c\bco\bom\bmp\bpa\bat\bt3\b31\b1
c\bco\bom\bmp\bpa\bat\bt3\b32\b2
c\bco\bom\bmp\bpa\bat\bt4\b43\b3
c\bco\bom\bmp\bpa\bat\bt4\b44\b4
c\bco\bom\bmp\bpa\bat\bt5\b50\b0
- These control aspects of the shell's compatibility mode
+ These control aspects of the shell's compatibility mode
(see S\bSH\bHE\bEL\bLL\bL C\bCO\bOM\bMP\bPA\bAT\bTI\bIB\bBI\bIL\bLI\bIT\bTY\bY M\bMO\bOD\bDE\bE in _\bb_\ba_\bs_\bh_\b(_\b1_\b)).
c\bco\bom\bmp\bpl\ble\bet\bte\be_\b_f\bfu\bul\bll\blq\bqu\buo\bot\bte\be
- If set, b\bba\bas\bsh\bh quotes all shell metacharacters in file-
- names and directory names when performing completion.
+ If set, b\bba\bas\bsh\bh quotes all shell metacharacters in file-
+ names and directory names when performing completion.
If not set, b\bba\bas\bsh\bh removes metacharacters such as the dol-
- lar sign from the set of characters that will be quoted
- in completed filenames when these metacharacters appear
- in shell variable references in words to be completed.
- This means that dollar signs in variable names that ex-
- pand to directories will not be quoted; however, any
- dollar signs appearing in filenames will not be quoted,
- either. This is active only when bash is using back-
- slashes to quote completed filenames. This variable is
- set by default, which is the default bash behavior in
+ lar sign from the set of characters that will be quoted
+ in completed filenames when these metacharacters appear
+ in shell variable references in words to be completed.
+ This means that dollar signs in variable names that ex-
+ pand to directories will not be quoted; however, any
+ dollar signs appearing in filenames will not be quoted,
+ either. This is active only when bash is using back-
+ slashes to quote completed filenames. This variable is
+ set by default, which is the default bash behavior in
versions through 4.2.
d\bdi\bir\bre\bex\bxp\bpa\ban\bnd\bd
- If set, b\bba\bas\bsh\bh replaces directory names with the results
- of word expansion when performing filename completion.
- This changes the contents of the readline editing buf-
- fer. If not set, b\bba\bas\bsh\bh attempts to preserve what the
+ If set, b\bba\bas\bsh\bh replaces directory names with the results
+ of word expansion when performing filename completion.
+ This changes the contents of the readline editing buf-
+ fer. If not set, b\bba\bas\bsh\bh attempts to preserve what the
user typed.
d\bdi\bir\brs\bsp\bpe\bel\bll\bl
- If set, b\bba\bas\bsh\bh attempts spelling correction on directory
- names during word completion if the directory name ini-
+ If set, b\bba\bas\bsh\bh attempts spelling correction on directory
+ names during word completion if the directory name ini-
tially supplied does not exist.
- d\bdo\bot\btg\bgl\blo\bob\bb If set, b\bba\bas\bsh\bh includes filenames beginning with a `.' in
- the results of pathname expansion. The filenames `\b``\b`.\b.'\b''\b'
- and `\b``\b`.\b..\b.'\b''\b' must always be matched explicitly, even if
+ d\bdo\bot\btg\bgl\blo\bob\bb If set, b\bba\bas\bsh\bh includes filenames beginning with a `.' in
+ the results of pathname expansion. The filenames `\b``\b`.\b.'\b''\b'
+ and `\b``\b`.\b..\b.'\b''\b' must always be matched explicitly, even if
d\bdo\bot\btg\bgl\blo\bob\bb is set.
e\bex\bxe\bec\bcf\bfa\bai\bil\bl
If set, a non-interactive shell will not exit if it can-
- not execute the file specified as an argument to the
- e\bex\bxe\bec\bc builtin command. An interactive shell does not
+ not execute the file specified as an argument to the
+ e\bex\bxe\bec\bc builtin command. An interactive shell does not
exit if e\bex\bxe\bec\bc fails.
e\bex\bxp\bpa\ban\bnd\bd_\b_a\bal\bli\bia\bas\bse\bes\bs
If set, aliases are expanded as described in _\bb_\ba_\bs_\bh_\b(_\b1_\b) un-
- der A\bAL\bLI\bIA\bAS\bSE\bES\bS. This option is enabled by default for in-
+ der A\bAL\bLI\bIA\bAS\bSE\bES\bS. This option is enabled by default for in-
teractive shells.
e\bex\bxt\btd\bde\beb\bbu\bug\bg
- If set at shell invocation, or in a shell startup file,
+ If set at shell invocation, or in a shell startup file,
arrange to execute the debugger profile before the shell
- starts, identical to the -\b--\b-d\bde\beb\bbu\bug\bgg\bge\ber\br option. If set af-
- ter invocation, behavior intended for use by debuggers
+ starts, identical to the -\b--\b-d\bde\beb\bbu\bug\bgg\bge\ber\br option. If set af-
+ ter invocation, behavior intended for use by debuggers
is enabled:
1\b1.\b. The -\b-F\bF option to the d\bde\bec\bcl\bla\bar\bre\be builtin displays the
source file name and line number corresponding to
each function name supplied as an argument.
- 2\b2.\b. If the command run by the D\bDE\bEB\bBU\bUG\bG trap returns a
- non-zero value, the next command is skipped and
+ 2\b2.\b. If the command run by the D\bDE\bEB\bBU\bUG\bG trap returns a
+ non-zero value, the next command is skipped and
not executed.
- 3\b3.\b. If the command run by the D\bDE\bEB\bBU\bUG\bG trap returns a
- value of 2, and the shell is executing in a sub-
- routine (a shell function or a shell script exe-
- cuted by the .\b. or s\bso\bou\bur\brc\bce\be builtins), the shell
+ 3\b3.\b. If the command run by the D\bDE\bEB\bBU\bUG\bG trap returns a
+ value of 2, and the shell is executing in a sub-
+ routine (a shell function or a shell script exe-
+ cuted by the .\b. or s\bso\bou\bur\brc\bce\be builtins), the shell
simulates a call to r\bre\bet\btu\bur\brn\bn.
- 4\b4.\b. B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGC\bC and B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGV\bV are updated as described
+ 4\b4.\b. B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGC\bC and B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGV\bV are updated as described
in their descriptions in _\bb_\ba_\bs_\bh_\b(_\b1_\b)).
- 5\b5.\b. Function tracing is enabled: command substitu-
+ 5\b5.\b. Function tracing is enabled: command substitu-
tion, shell functions, and subshells invoked with
(\b( _\bc_\bo_\bm_\bm_\ba_\bn_\bd )\b) inherit the D\bDE\bEB\bBU\bUG\bG and R\bRE\bET\bTU\bUR\bRN\bN traps.
- 6\b6.\b. Error tracing is enabled: command substitution,
- shell functions, and subshells invoked with (\b(
+ 6\b6.\b. Error tracing is enabled: command substitution,
+ shell functions, and subshells invoked with (\b(
_\bc_\bo_\bm_\bm_\ba_\bn_\bd )\b) inherit the E\bER\bRR\bR trap.
e\bex\bxt\btg\bgl\blo\bob\bb If set, the extended pattern matching features described
in _\bb_\ba_\bs_\bh_\b(_\b1_\b) 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
- If set, $\b$'_\bs_\bt_\br_\bi_\bn_\bg' and $\b$"_\bs_\bt_\br_\bi_\bn_\bg" quoting is performed
- within $\b${\b{_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br}\b} expansions enclosed in double
+ If set, $\b$'_\bs_\bt_\br_\bi_\bn_\bg' and $\b$"_\bs_\bt_\br_\bi_\bn_\bg" quoting is performed
+ within $\b${\b{_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br}\b} expansions enclosed in double
quotes. This option is enabled by default.
f\bfa\bai\bil\blg\bgl\blo\bob\bb
- If set, patterns which fail to match filenames during
+ If set, patterns which fail to match filenames during
pathname expansion result in an expansion error.
f\bfo\bor\brc\bce\be_\b_f\bfi\big\bgn\bno\bor\bre\be
- If set, the suffixes specified by the F\bFI\bIG\bGN\bNO\bOR\bRE\bE shell
- variable cause words to be ignored when performing word
+ If set, the suffixes specified by the F\bFI\bIG\bGN\bNO\bOR\bRE\bE shell
+ variable cause words to be ignored when performing word
completion even if the ignored words are the only possi-
- ble completions. See S\bSH\bHE\bEL\bLL\bL V\bVA\bAR\bRI\bIA\bAB\bBL\bLE\bES\bS in _\bb_\ba_\bs_\bh_\b(_\b1_\b) for a
- description of F\bFI\bIG\bGN\bNO\bOR\bRE\bE. This option is enabled by de-
+ ble completions. See S\bSH\bHE\bEL\bLL\bL V\bVA\bAR\bRI\bIA\bAB\bBL\bLE\bES\bS in _\bb_\ba_\bs_\bh_\b(_\b1_\b) for a
+ description of F\bFI\bIG\bGN\bNO\bOR\bRE\bE. This option is enabled by de-
fault.
g\bgl\blo\bob\bba\bas\bsc\bci\bii\bir\bra\ban\bng\bge\bes\bs
- If set, range expressions used in pattern matching
- bracket expressions (see P\bPa\bat\btt\bte\ber\brn\bn M\bMa\bat\btc\bch\bhi\bin\bng\bg in _\bb_\ba_\bs_\bh_\b(_\b1_\b))
+ If set, range expressions used in pattern matching
+ bracket expressions (see P\bPa\bat\btt\bte\ber\brn\bn M\bMa\bat\btc\bch\bhi\bin\bng\bg in _\bb_\ba_\bs_\bh_\b(_\b1_\b))
behave as if in the traditional C locale when performing
- comparisons. That is, the current locale's collating
- sequence is not taken into account, so b\bb will not col-
- late between A\bA and B\bB, and upper-case and lower-case
+ comparisons. That is, the current locale's collating
+ sequence is not taken into account, so b\bb will not col-
+ late between A\bA and B\bB, and upper-case and lower-case
ASCII characters will collate together.
g\bgl\blo\bob\bbs\bsk\bki\bip\bpd\bdo\bot\bts\bs
- If set, pathname expansion will never match the file-
+ If set, pathname expansion will never match the file-
names `\b``\b`.\b.'\b''\b' and `\b``\b`.\b..\b.'\b''\b', even if the pattern begins with
a `\b``\b`.\b.'\b''\b'. This option is enabled by default.
g\bgl\blo\bob\bbs\bst\bta\bar\br
If set, the pattern *\b**\b* used in a pathname expansion con-
- text will match all files and zero or more directories
- and subdirectories. If the pattern is followed by a /\b/,
+ text will match all files and zero or more directories
+ and subdirectories. If the pattern is followed by a /\b/,
only directories and subdirectories match.
g\bgn\bnu\bu_\b_e\ber\brr\brf\bfm\bmt\bt
GNU error message format.
h\bhi\bis\bst\bta\bap\bpp\bpe\ben\bnd\bd
- If set, the history list is appended to the file named
+ If set, the history list is appended to the file named
by the value of the H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE variable when the shell ex-
its, rather than overwriting the file.
h\bhi\bis\bst\btr\bre\bee\bed\bdi\bit\bt
- If set, and r\bre\bea\bad\bdl\bli\bin\bne\be is being used, a user is given the
+ If set, and r\bre\bea\bad\bdl\bli\bin\bne\be is being used, a user is given the
opportunity to re-edit a failed history substitution.
h\bhi\bis\bst\btv\bve\ber\bri\bif\bfy\by
- If set, and r\bre\bea\bad\bdl\bli\bin\bne\be is being used, the results of his-
- tory substitution are not immediately passed to the
- shell parser. Instead, the resulting line is loaded
+ If set, and r\bre\bea\bad\bdl\bli\bin\bne\be is being used, the results of his-
+ tory substitution are not immediately passed to the
+ shell parser. Instead, the resulting line is loaded
into the r\bre\bea\bad\bdl\bli\bin\bne\be editing buffer, allowing further modi-
fication.
h\bho\bos\bst\btc\bco\bom\bmp\bpl\ble\bet\bte\be
If set, and r\bre\bea\bad\bdl\bli\bin\bne\be is being used, b\bba\bas\bsh\bh will attempt to
- perform hostname completion when a word containing a @\b@
- is being completed (see C\bCo\bom\bmp\bpl\ble\bet\bti\bin\bng\bg under R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE in
+ perform hostname completion when a word containing a @\b@
+ is being completed (see C\bCo\bom\bmp\bpl\ble\bet\bti\bin\bng\bg under R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE in
_\bb_\ba_\bs_\bh_\b(_\b1_\b)). This is enabled by default.
h\bhu\bup\bpo\bon\bne\bex\bxi\bit\bt
active login shell exits.
i\bin\bnh\bhe\ber\bri\bit\bt_\b_e\ber\brr\bre\bex\bxi\bit\bt
- If set, command substitution inherits the value of the
- e\ber\brr\bre\bex\bxi\bit\bt option, instead of unsetting it in the subshell
- environment. This option is enabled when _\bp_\bo_\bs_\bi_\bx _\bm_\bo_\bd_\be is
+ If set, command substitution inherits the value of the
+ e\ber\brr\bre\bex\bxi\bit\bt option, instead of unsetting it in the subshell
+ environment. This option is enabled when _\bp_\bo_\bs_\bi_\bx _\bm_\bo_\bd_\be is
enabled.
i\bin\bnt\bte\ber\bra\bac\bct\bti\biv\bve\be_\b_c\bco\bom\bmm\bme\ben\bnt\bts\bs
If set, allow a word beginning with #\b# to cause that word
- and all remaining characters on that line to be ignored
+ and all remaining characters on that line to be ignored
in an interactive shell (see C\bCO\bOM\bMM\bME\bEN\bNT\bTS\bS in _\bb_\ba_\bs_\bh_\b(_\b1_\b)). This
option is enabled by default.
l\bla\bas\bst\btp\bpi\bip\bpe\be
- If set, and job control is not active, the shell runs
+ If set, and job control is not active, the shell runs
the last command of a pipeline not executed in the back-
ground in the current shell environment.
- l\bli\bit\bth\bhi\bis\bst\bt If set, and the c\bcm\bmd\bdh\bhi\bis\bst\bt option is enabled, multi-line
+ l\bli\bit\bth\bhi\bis\bst\bt If set, and the c\bcm\bmd\bdh\bhi\bis\bst\bt option is enabled, multi-line
commands are saved to the history with embedded newlines
rather than using semicolon separators where possible.
tribute is not inherited.
l\blo\boc\bca\bal\blv\bva\bar\br_\b_u\bun\bns\bse\bet\bt
- If set, calling u\bun\bns\bse\bet\bt on local variables in previous
- function scopes marks them so subsequent lookups find
- them unset until that function returns. This is identi-
- cal to the behavior of unsetting local variables at the
+ If set, calling u\bun\bns\bse\bet\bt on local variables in previous
+ function scopes marks them so subsequent lookups find
+ them unset until that function returns. This is identi-
+ cal to the behavior of unsetting local variables at the
current function scope.
l\blo\bog\bgi\bin\bn_\b_s\bsh\bhe\bel\bll\bl
- The shell sets this option if it is started as a login
+ The shell sets this option if it is started as a login
shell (see I\bIN\bNV\bVO\bOC\bCA\bAT\bTI\bIO\bON\bN in _\bb_\ba_\bs_\bh_\b(_\b1_\b)). The value may not be
changed.
m\bma\bai\bil\blw\bwa\bar\brn\bn
- If set, and a file that b\bba\bas\bsh\bh is checking for mail has
- been accessed since the last time it was checked, the
- message ``The mail in _\bm_\ba_\bi_\bl_\bf_\bi_\bl_\be has been read'' is dis-
+ If set, and a file that b\bba\bas\bsh\bh is checking for mail has
+ been accessed since the last time it was checked, the
+ message ``The mail in _\bm_\ba_\bi_\bl_\bf_\bi_\bl_\be has been read'' is dis-
played.
n\bno\bo_\b_e\bem\bmp\bpt\bty\by_\b_c\bcm\bmd\bd_\b_c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn
- If set, and r\bre\bea\bad\bdl\bli\bin\bne\be is being used, b\bba\bas\bsh\bh will not at-
- tempt to search the P\bPA\bAT\bTH\bH for possible completions when
+ If set, and r\bre\bea\bad\bdl\bli\bin\bne\be is being used, b\bba\bas\bsh\bh will not at-
+ tempt to search the P\bPA\bAT\bTH\bH for possible completions when
completion is attempted on an empty line.
n\bno\boc\bca\bas\bse\beg\bgl\blo\bob\bb
- If set, b\bba\bas\bsh\bh matches filenames in a case-insensitive
+ If set, b\bba\bas\bsh\bh matches filenames in a case-insensitive
fashion when performing pathname expansion (see P\bPa\bat\bth\bhn\bna\bam\bme\be
E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn in _\bb_\ba_\bs_\bh_\b(_\b1_\b)).
n\bno\boc\bca\bas\bse\bem\bma\bat\btc\bch\bh
- If set, b\bba\bas\bsh\bh matches patterns in a case-insensitive
+ If set, b\bba\bas\bsh\bh matches patterns in a case-insensitive
fashion when performing matching while executing c\bca\bas\bse\be or
[\b[[\b[ conditional commands, when performing pattern substi-
- tution word expansions, or when filtering possible com-
+ tution word expansions, or when filtering possible com-
pletions as part of programmable completion.
n\bno\boe\bex\bxp\bpa\ban\bnd\bd_\b_t\btr\bra\ban\bns\bsl\bla\bat\bti\bio\bon\bn
- If set, b\bba\bas\bsh\bh encloses the translated results of $"..."
- quoting in single quotes instead of double quotes. If
+ If set, b\bba\bas\bsh\bh encloses the translated results of $"..."
+ quoting in single quotes instead of double quotes. If
the string is not translated, this has no effect.
n\bnu\bul\bll\blg\bgl\blo\bob\bb
- If set, b\bba\bas\bsh\bh allows patterns which match no files (see
- P\bPa\bat\bth\bhn\bna\bam\bme\be E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn in _\bb_\ba_\bs_\bh_\b(_\b1_\b)) to expand to a null
+ If set, b\bba\bas\bsh\bh allows patterns which match no files (see
+ P\bPa\bat\bth\bhn\bna\bam\bme\be E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn in _\bb_\ba_\bs_\bh_\b(_\b1_\b)) to expand to a null
string, rather than themselves.
p\bpa\bat\bts\bsu\bub\bb_\b_r\bre\bep\bpl\bla\bac\bce\bem\bme\ben\bnt\bt
If set, b\bba\bas\bsh\bh expands occurrences of &\b& in the replacement
- string of pattern substitution to the text matched by
- the pattern, as described under P\bPa\bar\bra\bam\bme\bet\bte\ber\br E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn in
+ string of pattern substitution to the text matched by
+ the pattern, as described under P\bPa\bar\bra\bam\bme\bet\bte\ber\br E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn in
_\bb_\ba_\bs_\bh_\b(_\b1_\b). This option is enabled by default.
p\bpr\bro\bog\bgc\bco\bom\bmp\bp
If set, the programmable completion facilities (see 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 in _\bb_\ba_\bs_\bh_\b(_\b1_\b)) are enabled. This op-
+ g\bgr\bra\bam\bmm\bma\bab\bbl\ble\be C\bCo\bom\bmp\bpl\ble\bet\bti\bio\bon\bn in _\bb_\ba_\bs_\bh_\b(_\b1_\b)) are enabled. This op-
tion is enabled by default.
p\bpr\bro\bog\bgc\bco\bom\bmp\bp_\b_a\bal\bli\bia\bas\bs
- If set, and programmable completion is enabled, b\bba\bas\bsh\bh
- treats a command name that doesn't have any completions
- as a possible alias and attempts alias expansion. If it
- has an alias, b\bba\bas\bsh\bh attempts programmable completion us-
+ If set, and programmable completion is enabled, b\bba\bas\bsh\bh
+ treats a command name that doesn't have any completions
+ as a possible alias and attempts alias expansion. If it
+ has an alias, b\bba\bas\bsh\bh attempts programmable completion us-
ing the command word resulting from the expanded alias.
p\bpr\bro\bom\bmp\bpt\btv\bva\bar\brs\bs
If set, prompt strings undergo parameter expansion, com-
- mand substitution, arithmetic expansion, and quote re-
- moval after being expanded as described in P\bPR\bRO\bOM\bMP\bPT\bTI\bIN\bNG\bG in
+ mand substitution, arithmetic expansion, and quote re-
+ moval after being expanded as described in P\bPR\bRO\bOM\bMP\bPT\bTI\bIN\bNG\bG in
_\bb_\ba_\bs_\bh_\b(_\b1_\b). This option is enabled by default.
r\bre\bes\bst\btr\bri\bic\bct\bte\bed\bd_\b_s\bsh\bhe\bel\bll\bl
- The shell sets this option if it is started in re-
- stricted mode (see R\bRE\bES\bST\bTR\bRI\bIC\bCT\bTE\bED\bD S\bSH\bHE\bEL\bLL\bL in _\bb_\ba_\bs_\bh_\b(_\b1_\b)). The
- value may not be changed. This is not reset when the
- startup files are executed, allowing the startup files
+ The shell sets this option if it is started in re-
+ stricted mode (see R\bRE\bES\bST\bTR\bRI\bIC\bCT\bTE\bED\bD S\bSH\bHE\bEL\bLL\bL in _\bb_\ba_\bs_\bh_\b(_\b1_\b)). The
+ value may not be changed. This is not reset when the
+ startup files are executed, allowing the startup files
to discover whether or not a shell is restricted.
s\bsh\bhi\bif\bft\bt_\b_v\bve\ber\brb\bbo\bos\bse\be
- If set, the s\bsh\bhi\bif\bft\bt builtin prints an error message when
+ If set, the s\bsh\bhi\bif\bft\bt builtin prints an error message when
the shift count exceeds the number of positional parame-
ters.
s\bso\bou\bur\brc\bce\bep\bpa\bat\bth\bh
If set, the .\b. (s\bso\bou\bur\brc\bce\be) builtin uses the value of P\bPA\bAT\bTH\bH to
- find the directory containing the file supplied as an
+ find the directory containing the file supplied as an
argument. This option is enabled by default.
v\bva\bar\brr\bre\bed\bdi\bir\br_\b_c\bcl\blo\bos\bse\be
- If set, the shell automatically closes file descriptors
+ If set, the shell automatically closes file descriptors
assigned using the _\b{_\bv_\ba_\br_\bn_\ba_\bm_\be_\b} redirection syntax (see R\bRE\bE-\b-
- D\bDI\bIR\bRE\bEC\bCT\bTI\bIO\bON\bN in _\bb_\ba_\bs_\bh_\b(_\b1_\b)) instead of leaving them open when
+ D\bDI\bIR\bRE\bEC\bCT\bTI\bIO\bON\bN in _\bb_\ba_\bs_\bh_\b(_\b1_\b)) instead of leaving them open when
the command completes.
x\bxp\bpg\bg_\b_e\bec\bch\bho\bo
- If set, the e\bec\bch\bho\bo builtin expands backslash-escape se-
- quences by default. If the p\bpo\bos\bsi\bix\bx shell option is also
+ If set, the e\bec\bch\bho\bo builtin expands backslash-escape se-
+ quences by default. If the p\bpo\bos\bsi\bix\bx shell option is also
enabled, e\bec\bch\bho\bo does not interpret any options.
s\bsu\bus\bsp\bpe\ben\bnd\bd [-\b-f\bf]
- Suspend the execution of this shell until it receives a S\bSI\bIG\bGC\bCO\bON\bNT\bT
- signal. A login shell, or a shell without job control enabled,
- cannot be suspended; the -\b-f\bf option can be used to override this
- and force the suspension. The return status is 0 unless the
- shell is a login shell or job control is not enabled and -\b-f\bf is
+ Suspend the execution of this shell until it receives a S\bSI\bIG\bGC\bCO\bON\bNT\bT
+ signal. A login shell, or a shell without job control enabled,
+ cannot be suspended; the -\b-f\bf option can be used to override this
+ and force the suspension. The return status is 0 unless the
+ shell is a login shell or job control is not enabled and -\b-f\bf is
not supplied.
t\bte\bes\bst\bt _\be_\bx_\bp_\br
[\b[ _\be_\bx_\bp_\br ]\b]
Return a status of 0 (true) or 1 (false) depending on the evalu-
ation of the conditional expression _\be_\bx_\bp_\br. Each operator and op-
- erand must be a separate argument. Expressions are composed of
- the primaries described in _\bb_\ba_\bs_\bh_\b(_\b1_\b) under C\bCO\bON\bND\bDI\bIT\bTI\bIO\bON\bNA\bAL\bL E\bEX\bXP\bPR\bRE\bES\bS-\b-
+ erand must be a separate argument. Expressions are composed of
+ the primaries described in _\bb_\ba_\bs_\bh_\b(_\b1_\b) under C\bCO\bON\bND\bDI\bIT\bTI\bIO\bON\bNA\bAL\bL E\bEX\bXP\bPR\bRE\bES\bS-\b-
S\bSI\bIO\bON\bNS\bS. t\bte\bes\bst\bt does not accept any options, nor does it accept and
ignore an argument of -\b--\b- as signifying the end of options.
- Expressions may be combined using the following operators,
- listed in decreasing order of precedence. The evaluation de-
- pends on the number of arguments; see below. Operator prece-
+ Expressions may be combined using the following operators,
+ listed in decreasing order of precedence. The evaluation de-
+ pends on the number of arguments; see below. 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 in
- _\bb_\ba_\bs_\bh_\b(_\b1_\b) 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 in
+ _\bb_\ba_\bs_\bh_\b(_\b1_\b) 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 in _\bb_\ba_\bs_\bh_\b(_\b1_\b) under C\bCO\bON\bND\bDI\bIT\bTI\bIO\bON\bNA\bAL\bL E\bEX\bXP\bPR\bRE\bES\bS-\b-
- S\bSI\bIO\bON\bNS\bS, the result of the expression is the result of the
- binary test using the first and third arguments as oper-
- ands. The -\b-a\ba and -\b-o\bo operators are considered binary op-
+ If the second argument is one of the binary conditional
+ operators listed in _\bb_\ba_\bs_\bh_\b(_\b1_\b) under C\bCO\bON\bND\bDI\bIT\bTI\bIO\bON\bNA\bAL\bL E\bEX\bXP\bPR\bRE\bES\bS-\b-
+ S\bSI\bIO\bON\bNS\bS, the result of the expression is the result of the
+ binary test using the first and third arguments as oper-
+ ands. The -\b-a\ba and -\b-o\bo operators are considered binary op-
erators when there are three arguments. If the first ar-
- gument is !\b!, the value is the negation of the two-argu-
- ment test using the second and third arguments. If the
+ gument is !\b!, the value is the negation of the two-argu-
+ ment test using the second and third arguments. If the
first argument is exactly (\b( and the third argument is ex-
- actly )\b), the result is the one-argument test of the sec-
+ actly )\b), the result is the one-argument test of the sec-
ond argument. Otherwise, the expression is false.
4 arguments
The following conditions are applied in the order listed.
If the first argument is !\b!, the result is the negation of
- the three-argument expression composed of the remaining
- arguments. the two-argument test using the second and
- third arguments. If the first argument is exactly (\b( and
- the fourth argument is exactly )\b), the result is the two-
- argument test of the second and third arguments. Other-
+ the three-argument expression composed of the remaining
+ arguments. the two-argument test using the second and
+ third arguments. If the first argument is exactly (\b( and
+ the fourth argument is exactly )\b), the result is the two-
+ argument test of the second and third arguments. Other-
wise, the expression is parsed and evaluated according to
precedence using the rules listed above.
5 or more arguments
- The expression is parsed and evaluated according to
+ The expression is parsed and evaluated according to
precedence using the rules listed above.
If the shell is not in _\bp_\bo_\bs_\bi_\bx _\bm_\bo_\bd_\be, when used with t\bte\bes\bst\bt or [\b[, the
- <\b< and >\b> operators sort lexicographically using ASCII ordering.
- When the shell is in _\bp_\bo_\bs_\bi_\bx _\bm_\bo_\bd_\be, these operators sort using the
+ <\b< and >\b> operators sort lexicographically using ASCII ordering.
+ When the shell is in _\bp_\bo_\bs_\bi_\bx _\bm_\bo_\bd_\be, these operators sort using the
current locale.
- t\bti\bim\bme\bes\bs Print the accumulated user and system times for the shell and
+ t\bti\bim\bme\bes\bs Print the accumulated user and system times for the shell and
for processes run from the shell. The return status is 0.
t\btr\bra\bap\bp [-\b-l\blp\bp] [[_\ba_\bc_\bt_\bi_\bo_\bn] _\bs_\bi_\bg_\bs_\bp_\be_\bc ...]
The _\ba_\bc_\bt_\bi_\bo_\bn is a command that is read and executed when the shell
receives signal(s) _\bs_\bi_\bg_\bs_\bp_\be_\bc. If _\ba_\bc_\bt_\bi_\bo_\bn is absent (and there is a
- single _\bs_\bi_\bg_\bs_\bp_\be_\bc) or -\b-, each specified signal is reset to its
- original disposition (the value it had upon entrance to the
- shell). If _\ba_\bc_\bt_\bi_\bo_\bn is the null string the signal specified by
- each _\bs_\bi_\bg_\bs_\bp_\be_\bc is ignored by the shell and by the commands it in-
+ 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_\bc_\bt_\bi_\bo_\bn is the null string the signal specified by
+ each _\bs_\bi_\bg_\bs_\bp_\be_\bc is ignored by the shell and by the commands it in-
vokes.
- If no arguments are supplied, t\btr\bra\bap\bp displays the actions associ-
+ If no arguments are supplied, t\btr\bra\bap\bp displays the actions associ-
ated with each trapped signal as a set of t\btr\bra\bap\bp commands that can
- be reused as shell input to restore the current signal disposi-
- tions. If -\b-p\bp is given, and _\ba_\bc_\bt_\bi_\bo_\bn is not present, then t\btr\bra\bap\bp
- displays the actions associated with each _\bs_\bi_\bg_\bs_\bp_\be_\bc or, if none
+ be reused as shell input to restore the current signal disposi-
+ tions. If -\b-p\bp is given, and _\ba_\bc_\bt_\bi_\bo_\bn is not present, then t\btr\bra\bap\bp
+ displays the actions associated with each _\bs_\bi_\bg_\bs_\bp_\be_\bc or, if none
are supplied, for all trapped signals, as a set of t\btr\bra\bap\bp commands
- that can be reused as shell input to restore the current signal
- dispositions. The -\b-P\bP option behaves similarly, but displays
- only the actions associated with each _\bs_\bi_\bg_\bs_\bp_\be_\bc argument. -\b-P\bP re-
- quires at least one _\bs_\bi_\bg_\bs_\bp_\be_\bc argument. The -\b-P\bP or -\b-p\bp options to
- t\btr\bra\bap\bp may be used in a subshell environment (e.g., command sub-
- stitution) and, as long as they are used before t\btr\bra\bap\bp is used to
- change a signal's handling, will display the state of its par-
+ that can be reused as shell input to restore the current signal
+ dispositions. The -\b-P\bP option behaves similarly, but displays
+ only the actions associated with each _\bs_\bi_\bg_\bs_\bp_\be_\bc argument. -\b-P\bP re-
+ quires at least one _\bs_\bi_\bg_\bs_\bp_\be_\bc argument. The -\b-P\bP or -\b-p\bp options to
+ t\btr\bra\bap\bp may be used in a subshell environment (e.g., command sub-
+ stitution) and, as long as they are used before t\btr\bra\bap\bp is used to
+ change a signal's handling, will display the state of its par-
ent's traps.
- The -\b-l\bl option causes t\btr\bra\bap\bp to print a list of signal names and
- their corresponding 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
+ The -\b-l\bl option causes t\btr\bra\bap\bp to print a list of signal names and
+ their corresponding 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_\bc_\bt_\bi_\bo_\bn is executed on exit
- from the shell. If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is D\bDE\bEB\bBU\bUG\bG, the command _\ba_\bc_\bt_\bi_\bo_\bn is
+ If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is E\bEX\bXI\bIT\bT (0) the command _\ba_\bc_\bt_\bi_\bo_\bn is executed on exit
+ from the shell. If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is D\bDE\bEB\bBU\bUG\bG, the command _\ba_\bc_\bt_\bi_\bo_\bn is
executed before every _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd, _\bf_\bo_\br command, _\bc_\ba_\bs_\be command,
- _\bs_\be_\bl_\be_\bc_\bt command, (( arithmetic command, [[ conditional command,
+ _\bs_\be_\bl_\be_\bc_\bt command, (( arithmetic command, [[ conditional command,
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 in _\bb_\ba_\bs_\bh_\b(_\b1_\b)). 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 de-
- tails 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_\bc_\bt_\bi_\bo_\bn is executed each time a shell function or a
- script executed with the .\b. or s\bso\bou\bur\brc\bce\be builtins finishes execut-
+ a shell function (see S\bSH\bHE\bEL\bLL\bL G\bGR\bRA\bAM\bMM\bMA\bAR\bR in _\bb_\ba_\bs_\bh_\b(_\b1_\b)). 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 de-
+ tails 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_\bc_\bt_\bi_\bo_\bn is executed each time a shell function or a
+ script executed with the .\b. or s\bso\bou\bur\brc\bce\be builtins finishes execut-
ing.
- If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is E\bER\bRR\bR, the command _\ba_\bc_\bt_\bi_\bo_\bn is executed whenever a
+ If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is E\bER\bRR\bR, the command _\ba_\bc_\bt_\bi_\bo_\bn is executed whenever a
pipeline (which may consist of a single simple command), a list,
or a compound command returns a non-zero exit status, subject to
- the following conditions. The E\bER\bRR\bR trap is not executed if the
+ 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,
+ 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 except the command
- following the final &\b&&\b& or |\b||\b|, any command in a pipeline but the
- last, or if the command's return value is being inverted using
+ following the final &\b&&\b& or |\b||\b|, any command in a pipeline but the
+ last, or if the command's return value is being inverted using
!\b!. These are the same conditions obeyed by the e\ber\brr\bre\bex\bxi\bit\bt (-\b-e\be) op-
tion.
When the shell is not interactive, signals ignored upon entry to
the shell cannot be trapped or reset. Interactive shells permit
trapping signals ignored on entry. Trapped signals that are not
- being ignored are reset to their original values in a subshell
- or subshell environment when one is created. The return status
+ being ignored are reset to their original values in a subshell
+ or subshell environment when one is created. The return status
is false if any _\bs_\bi_\bg_\bs_\bp_\be_\bc is invalid; otherwise t\btr\bra\bap\bp returns true.
t\btr\bru\bue\be Does nothing, returns a 0 status.
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 executable disk file, respectively. If the _\bn_\ba_\bm_\be is
- not found, then nothing is printed, and t\bty\byp\bpe\be returns a non-zero
- exit status. If the -\b-p\bp option is used, t\bty\byp\bpe\be either returns the
- name of the executable file that would be found by searching
- $\b$P\bPA\bAT\bTH\bH if _\bn_\ba_\bm_\be were specified 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, even if ``type -t name'' would not
+ string which is one of _\ba_\bl_\bi_\ba_\bs, _\bk_\be_\by_\bw_\bo_\br_\bd, _\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn, _\bb_\bu_\bi_\bl_\bt_\bi_\bn, or
+ _\bf_\bi_\bl_\be if _\bn_\ba_\bm_\be is an alias, shell reserved word, function,
+ builtin, or executable disk file, respectively. If the _\bn_\ba_\bm_\be is
+ not found, then nothing is printed, and t\bty\byp\bpe\be returns a non-zero
+ exit status. If the -\b-p\bp option is used, t\bty\byp\bpe\be either returns the
+ name of the executable file that would be found by searching
+ $\b$P\bPA\bAT\bTH\bH if _\bn_\ba_\bm_\be were specified 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, 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, which is not necessarily the file that appears first in
- P\bPA\bAT\bTH\bH. If the -\b-a\ba option is used, t\bty\byp\bpe\be prints all of the places
- that contain a command named _\bn_\ba_\bm_\be. This includes aliases, re-
- served words, functions, and builtins, but the path search op-
+ value, which is not necessarily the file that appears first in
+ P\bPA\bAT\bTH\bH. If the -\b-a\ba option is used, t\bty\byp\bpe\be prints all of the places
+ that contain a command named _\bn_\ba_\bm_\be. This includes aliases, re-
+ served words, functions, and builtins, but the path search op-
tions (-\b-p\bp and -\b-P\bP) can be supplied to restrict the output to exe-
- cutable files. t\bty\byp\bpe\be does not consult the table of hashed com-
+ cutable files. t\bty\byp\bpe\be does not consult the table of hashed com-
mands when using -\b-a\ba with -\b-p\bp, and only performs a P\bPA\bAT\bTH\bH search for
- _\bn_\ba_\bm_\be. The -\b-f\bf option suppresses shell function lookup, as with
- the c\bco\bom\bmm\bma\ban\bnd\bd builtin. t\bty\byp\bpe\be returns true if all of the arguments
+ _\bn_\ba_\bm_\be. The -\b-f\bf option suppresses shell function 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\bS] -\b-a\ba
u\bul\bli\bim\bmi\bit\bt [-\b-H\bHS\bS] [-\b-b\bbc\bcd\bde\bef\bfi\bik\bkl\blm\bmn\bnp\bpq\bqr\brs\bst\btu\buv\bvx\bxP\bPR\bRT\bT [_\bl_\bi_\bm_\bi_\bt]]
- Provides control over the resources available to the shell and
- 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, re-
- spectively. If _\bl_\bi_\bm_\bi_\bt is omitted, the current value of the soft
+ current hard limit, the current soft limit, and no limit, re-
+ spectively. 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, if appropriate, are printed before the value. Other op-
+ When more than one resource is specified, the limit name and
+ unit, if appropriate, are printed before the value. Other op-
tions are interpreted as follows:
-\b-a\ba All current limits are reported; no limits are set
-\b-b\bb The maximum socket buffer size
-\b-c\bc The maximum size of core files created
-\b-d\bd The maximum size of a process's data segment
-\b-e\be The maximum scheduling priority ("nice")
- -\b-f\bf The maximum size of files written by the shell and its
+ -\b-f\bf The maximum size of files written by the shell and its
children
-\b-i\bi The maximum number of pending signals
-\b-k\bk The maximum number of kqueues that may be allocated
-\b-l\bl The maximum size that may be locked into memory
- -\b-m\bm The maximum resident set size (many systems do not honor
+ -\b-m\bm The maximum resident set size (many systems do not honor
this limit)
-\b-n\bn The maximum number of open file descriptors (most systems
do not allow this value to be set)
-\b-r\br The maximum real-time scheduling priority
-\b-s\bs The maximum stack size
-\b-t\bt The maximum amount of cpu time in seconds
- -\b-u\bu The maximum number of processes available to a single
+ -\b-u\bu The maximum number of processes available to a single
user
- -\b-v\bv The maximum amount of virtual memory available to the
+ -\b-v\bv The maximum amount of virtual memory available to the
shell and, on some systems, to its children
-\b-x\bx The maximum number of file locks
-\b-P\bP The maximum number of pseudoterminals
- -\b-R\bR The maximum time a real-time process can run before
+ -\b-R\bR The maximum time a real-time process can run before
blocking, in microseconds
-\b-T\bT The maximum number of threads
- If _\bl_\bi_\bm_\bi_\bt is given, and the -\b-a\ba option is not used, _\bl_\bi_\bm_\bi_\bt is the
- new value of the specified resource. If no option is given,
- then -\b-f\bf is assumed. Values are in 1024-byte increments, except
- for -\b-t\bt, which is in seconds; -\b-R\bR, which is in microseconds; -\b-p\bp,
- which is in units of 512-byte blocks; -\b-P\bP, -\b-T\bT, -\b-b\bb, -\b-k\bk, -\b-n\bn, and
- -\b-u\bu, which are unscaled values; and, when in posix mode, -\b-c\bc and
- -\b-f\bf, which are in 512-byte increments. The return status is 0
- unless an invalid option or argument is supplied, or an error
+ If _\bl_\bi_\bm_\bi_\bt is given, and the -\b-a\ba option is not used, _\bl_\bi_\bm_\bi_\bt is the
+ new value of the specified resource. If no option is given,
+ then -\b-f\bf is assumed. Values are in 1024-byte increments, except
+ for -\b-t\bt, which is in seconds; -\b-R\bR, which is in microseconds; -\b-p\bp,
+ which is in units of 512-byte blocks; -\b-P\bP, -\b-T\bT, -\b-b\bb, -\b-k\bk, -\b-n\bn, and
+ -\b-u\bu, which are unscaled values; and, when in posix mode, -\b-c\bc and
+ -\b-f\bf, which are in 512-byte increments. The return status is 0
+ unless an invalid 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] [-n\bn] [_\bn_\ba_\bm_\be ...]
- For each _\bn_\ba_\bm_\be, remove the corresponding variable or function.
+ For each _\bn_\ba_\bm_\be, remove the corresponding variable or function.
If the -\b-v\bv option is given, each _\bn_\ba_\bm_\be refers to a shell variable,
- and that variable is removed. 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. If the -\b-n\bn option
- is supplied, and _\bn_\ba_\bm_\be is a variable with the _\bn_\ba_\bm_\be_\br_\be_\bf attribute,
- _\bn_\ba_\bm_\be will be unset rather than the variable it references. -\b-n\bn
- has no effect if the -\b-f\bf option is supplied. If no options are
- supplied, each _\bn_\ba_\bm_\be refers to a variable; if there is no vari-
- able by that name, a function with that name, if any, is unset.
- Each unset variable or function is removed from the environment
- passed to subsequent commands. If any of B\bBA\bAS\bSH\bH_\b_A\bAL\bLI\bIA\bAS\bSE\bES\bS,
+ and that variable is removed. 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. If the -\b-n\bn option
+ is supplied, and _\bn_\ba_\bm_\be is a variable with the _\bn_\ba_\bm_\be_\br_\be_\bf attribute,
+ _\bn_\ba_\bm_\be will be unset rather than the variable it references. -\b-n\bn
+ has no effect if the -\b-f\bf option is supplied. If no options are
+ supplied, each _\bn_\ba_\bm_\be refers to a variable; if there is no vari-
+ able by that name, a function with that name, if any, is unset.
+ Each unset variable or function is removed from the environment
+ passed to subsequent commands. If any of B\bBA\bAS\bSH\bH_\b_A\bAL\bLI\bIA\bAS\bSE\bES\bS,
B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGV\bV0\b0, B\bBA\bAS\bSH\bH_\b_C\bCM\bMD\bDS\bS, B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMM\bMA\bAN\bND\bD, B\bBA\bAS\bSH\bH_\b_S\bSU\bUB\bBS\bSH\bHE\bEL\bLL\bL, B\bBA\bAS\bSH\bHP\bPI\bID\bD,
- C\bCO\bOM\bMP\bP_\b_W\bWO\bOR\bRD\bDB\bBR\bRE\bEA\bAK\bKS\bS, D\bDI\bIR\bRS\bST\bTA\bAC\bCK\bK, E\bEP\bPO\bOC\bCH\bHR\bRE\bEA\bAL\bLT\bTI\bIM\bME\bE, E\bEP\bPO\bOC\bCH\bHS\bSE\bEC\bCO\bON\bND\bDS\bS, F\bFU\bUN\bNC\bC-\b-
- N\bNA\bAM\bME\bE, G\bGR\bRO\bOU\bUP\bPS\bS, H\bHI\bIS\bST\bTC\bCM\bMD\bD, L\bLI\bIN\bNE\bEN\bNO\bO, R\bRA\bAN\bND\bDO\bOM\bM, S\bSE\bEC\bCO\bON\bND\bDS\bS, or S\bSR\bRA\bAN\bND\bDO\bOM\bM are
+ C\bCO\bOM\bMP\bP_\b_W\bWO\bOR\bRD\bDB\bBR\bRE\bEA\bAK\bKS\bS, D\bDI\bIR\bRS\bST\bTA\bAC\bCK\bK, E\bEP\bPO\bOC\bCH\bHR\bRE\bEA\bAL\bLT\bTI\bIM\bME\bE, E\bEP\bPO\bOC\bCH\bHS\bSE\bEC\bCO\bON\bND\bDS\bS, F\bFU\bUN\bNC\bC-\b-
+ N\bNA\bAM\bME\bE, G\bGR\bRO\bOU\bUP\bPS\bS, H\bHI\bIS\bST\bTC\bCM\bMD\bD, L\bLI\bIN\bNE\bEN\bNO\bO, R\bRA\bAN\bND\bDO\bOM\bM, S\bSE\bEC\bCO\bON\bND\bDS\bS, or S\bSR\bRA\bAN\bND\bDO\bOM\bM are
unset, they lose their special properties, even if they are sub-
sequently reset. The exit status is true unless a _\bn_\ba_\bm_\be is read-
only or may not be unset.
w\bwa\bai\bit\bt [-\b-f\bfn\bn] [-\b-p\bp _\bv_\ba_\br_\bn_\ba_\bm_\be] [_\bi_\bd _\b._\b._\b.]
Wait for each specified child process and return its termination
- status. Each _\bi_\bd 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 _\bi_\bd is not given, w\bwa\bai\bit\bt waits for all running
- background jobs and the last-executed process substitution, if
+ status. Each _\bi_\bd 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 _\bi_\bd is not given, w\bwa\bai\bit\bt waits for all running
+ background jobs and the last-executed process substitution, if
its process id is the same as $\b$!\b!, and the return status is zero.
- If the -\b-n\bn option is supplied, w\bwa\bai\bit\bt waits for a single job from
+ If the -\b-n\bn option is supplied, w\bwa\bai\bit\bt waits for a single job from
the list of _\bi_\bds or, if no _\bi_\bds are supplied, any job, to complete
- and returns its exit status. If none of the supplied arguments
+ and returns its exit status. If none of the supplied arguments
is a child of the shell, or if no arguments are supplied and the
- shell has no unwaited-for children, the exit status is 127. If
- the -\b-p\bp option is supplied, the process or job identifier of the
- job for which the exit status is returned is assigned to the
- variable _\bv_\ba_\br_\bn_\ba_\bm_\be named by the option argument. The variable
- will be unset initially, before any assignment. This is useful
- only when the -\b-n\bn option is supplied. Supplying the -\b-f\bf option,
- when job control is enabled, forces w\bwa\bai\bit\bt to wait for _\bi_\bd to ter-
+ shell has no unwaited-for children, the exit status is 127. If
+ the -\b-p\bp option is supplied, the process or job identifier of the
+ job for which the exit status is returned is assigned to the
+ variable _\bv_\ba_\br_\bn_\ba_\bm_\be named by the option argument. The variable
+ will be unset initially, before any assignment. This is useful
+ only when the -\b-n\bn option is supplied. Supplying the -\b-f\bf option,
+ when job control is enabled, forces w\bwa\bai\bit\bt to wait for _\bi_\bd to ter-
minate before returning its status, instead of returning when it
- changes status. If _\bi_\bd specifies a non-existent process or job,
- the return status is 127. If w\bwa\bai\bit\bt is interrupted by a signal,
- the return status will be greater than 128, as described under
- S\bSI\bIG\bGN\bNA\bAL\bLS\bS in _\bb_\ba_\bs_\bh_\b(_\b1_\b). Otherwise, the return status is the exit
+ changes status. If _\bi_\bd specifies a non-existent process or job,
+ the return status is 127. If w\bwa\bai\bit\bt is interrupted by a signal,
+ the return status will be greater than 128, as described under
+ S\bSI\bIG\bGN\bNA\bAL\bLS\bS in _\bb_\ba_\bs_\bh_\b(_\b1_\b). Otherwise, the return status is the exit
status of the last process or job waited for.
S\bSH\bHE\bEL\bLL\bL C\bCO\bOM\bMP\bPA\bAT\bTI\bIB\bBI\bIL\bLI\bIT\bTY\bY M\bMO\bOD\bDE\bE
- Bash-4.0 introduced the concept of a _\bs_\bh_\be_\bl_\bl _\bc_\bo_\bm_\bp_\ba_\bt_\bi_\bb_\bi_\bl_\bi_\bt_\by _\bl_\be_\bv_\be_\bl, speci-
- fied as a set of options to the shopt builtin ( c\bco\bom\bmp\bpa\bat\bt3\b31\b1, c\bco\bom\bmp\bpa\bat\bt3\b32\b2,
- c\bco\bom\bmp\bpa\bat\bt4\b40\b0, c\bco\bom\bmp\bpa\bat\bt4\b41\b1, and so on). There is only one current compatibil-
- ity level -- each option is mutually exclusive. The compatibility
- level is intended to allow users to select behavior from previous ver-
- sions that is incompatible with newer versions while they migrate
- scripts to use current features and behavior. It's intended to be a
+ Bash-4.0 introduced the concept of a _\bs_\bh_\be_\bl_\bl _\bc_\bo_\bm_\bp_\ba_\bt_\bi_\bb_\bi_\bl_\bi_\bt_\by _\bl_\be_\bv_\be_\bl, speci-
+ fied as a set of options to the shopt builtin ( c\bco\bom\bmp\bpa\bat\bt3\b31\b1, c\bco\bom\bmp\bpa\bat\bt3\b32\b2,
+ c\bco\bom\bmp\bpa\bat\bt4\b40\b0, c\bco\bom\bmp\bpa\bat\bt4\b41\b1, and so on). There is only one current compatibil-
+ ity level -- each option is mutually exclusive. The compatibility
+ level is intended to allow users to select behavior from previous ver-
+ sions that is incompatible with newer versions while they migrate
+ scripts to use current features and behavior. It's intended to be a
temporary solution.
- This section does not mention behavior that is standard for a particu-
- lar version (e.g., setting c\bco\bom\bmp\bpa\bat\bt3\b32\b2 means that quoting the rhs of the
- regexp matching operator quotes special regexp characters in the word,
+ This section does not mention behavior that is standard for a particu-
+ lar version (e.g., setting c\bco\bom\bmp\bpa\bat\bt3\b32\b2 means that quoting the rhs of the
+ regexp matching operator quotes special regexp characters in the word,
which is default behavior in bash-3.2 and subsequent versions).
- If a user enables, say, c\bco\bom\bmp\bpa\bat\bt3\b32\b2, it may affect the behavior of other
- compatibility levels up to and including the current compatibility
- level. The idea is that each compatibility level controls behavior
- that changed in that version of b\bba\bas\bsh\bh, but that behavior may have been
- present in earlier versions. For instance, the change to use locale-
- based comparisons with the [\b[[\b[ command came in bash-4.1, and earlier
+ If a user enables, say, c\bco\bom\bmp\bpa\bat\bt3\b32\b2, it may affect the behavior of other
+ compatibility levels up to and including the current compatibility
+ level. The idea is that each compatibility level controls behavior
+ that changed in that version of b\bba\bas\bsh\bh, but that behavior may have been
+ present in earlier versions. For instance, the change to use locale-
+ based comparisons with the [\b[[\b[ command came in bash-4.1, and earlier
versions used ASCII-based comparisons, so enabling c\bco\bom\bmp\bpa\bat\bt3\b32\b2 will enable
- ASCII-based comparisons as well. That granularity may not be suffi-
- cient for all uses, and as a result users should employ compatibility
- levels carefully. Read the documentation for a particular feature to
+ ASCII-based comparisons as well. That granularity may not be suffi-
+ cient for all uses, and as a result users should employ compatibility
+ levels carefully. Read the documentation for a particular feature to
find out the current behavior.
- Bash-4.3 introduced a new shell variable: B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMP\bPA\bAT\bT. The value as-
+ Bash-4.3 introduced a new shell variable: B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMP\bPA\bAT\bT. The value as-
signed to this variable (a decimal version number like 4.2, or an inte-
- ger corresponding to the c\bco\bom\bmp\bpa\bat\bt_\bN_\bN option, like 42) determines the com-
+ ger corresponding to the c\bco\bom\bmp\bpa\bat\bt_\bN_\bN option, like 42) determines the com-
patibility level.
- Starting with bash-4.4, b\bba\bas\bsh\bh has begun deprecating older compatibility
- levels. Eventually, the options will be removed in favor of B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bM-\b-
+ Starting with bash-4.4, b\bba\bas\bsh\bh has begun deprecating older compatibility
+ levels. Eventually, the options will be removed in favor of B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bM-\b-
P\bPA\bAT\bT.
- Bash-5.0 is the final version for which there will be an individual
- shopt option for the previous version. Users should use B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMP\bPA\bAT\bT on
+ Bash-5.0 is the final version for which there will be an individual
+ shopt option for the previous version. Users should use B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMP\bPA\bAT\bT on
bash-5.0 and later versions.
- The following table describes the behavior changes controlled by each
+ The following table describes the behavior changes controlled by each
compatibility level setting. The c\bco\bom\bmp\bpa\bat\bt_\bN_\bN tag is used as shorthand for
setting the compatibility level to _\bN_\bN using one of the following mecha-
- nisms. For versions prior to bash-5.0, the compatibility level may be
- set using the corresponding c\bco\bom\bmp\bpa\bat\bt_\bN_\bN shopt option. For bash-4.3 and
- later versions, the B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMP\bPA\bAT\bT variable is preferred, and it is re-
+ nisms. For versions prior to bash-5.0, the compatibility level may be
+ set using the corresponding c\bco\bom\bmp\bpa\bat\bt_\bN_\bN shopt option. For bash-4.3 and
+ later versions, the B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMP\bPA\bAT\bT variable is preferred, and it is re-
quired for bash-5.1 and later versions.
c\bco\bom\bmp\bpa\bat\bt3\b31\b1
ator (=~) has no special effect
c\bco\bom\bmp\bpa\bat\bt3\b32\b2
- +\bo interrupting a command list such as "a ; b ; c" causes
- the execution of the next command in the list (in
- bash-4.0 and later versions, the shell acts as if it re-
- ceived the interrupt, so interrupting one command in a
+ +\bo interrupting a command list such as "a ; b ; c" causes
+ the execution of the next command in the list (in
+ bash-4.0 and later versions, the shell acts as if it re-
+ ceived the interrupt, so interrupting one command in a
list aborts the execution of the entire list)
c\bco\bom\bmp\bpa\bat\bt4\b40\b0
- +\bo the <\b< and >\b> operators to the [\b[[\b[ command do not consider
+ +\bo the <\b< and >\b> operators to the [\b[[\b[ command do not consider
the current locale when comparing strings; they use ASCII
ordering. B\bBa\bas\bsh\bh versions prior to bash-4.1 use ASCII col-
- lation and _\bs_\bt_\br_\bc_\bm_\bp(3); bash-4.1 and later use the current
+ lation and _\bs_\bt_\br_\bc_\bm_\bp(3); bash-4.1 and later use the current
locale's collation sequence and _\bs_\bt_\br_\bc_\bo_\bl_\bl(3).
c\bco\bom\bmp\bpa\bat\bt4\b41\b1
- +\bo in _\bp_\bo_\bs_\bi_\bx mode, t\bti\bim\bme\be may be followed by options and still
+ +\bo in _\bp_\bo_\bs_\bi_\bx mode, t\bti\bim\bme\be may be followed by options and still
be recognized as a reserved word (this is POSIX interpre-
tation 267)
+\bo in _\bp_\bo_\bs_\bi_\bx mode, the parser requires that an even number of
- single quotes occur in the _\bw_\bo_\br_\bd portion of a double-
- quoted parameter expansion and treats them specially, so
- that characters within the single quotes are considered
+ single quotes occur in the _\bw_\bo_\br_\bd portion of a double-
+ quoted parameter expansion and treats them specially, so
+ that characters within the single quotes are considered
quoted (this is POSIX interpretation 221)
c\bco\bom\bmp\bpa\bat\bt4\b42\b2
+\bo the replacement string in double-quoted pattern substitu-
- tion does not undergo quote removal, as it does in ver-
+ tion does not undergo quote removal, as it does in ver-
sions after bash-4.2
- +\bo in posix mode, single quotes are considered special when
- expanding the _\bw_\bo_\br_\bd portion of a double-quoted parameter
- expansion and can be used to quote a closing brace or
- other special character (this is part of POSIX interpre-
- tation 221); in later versions, single quotes are not
+ +\bo in posix mode, single quotes are considered special when
+ expanding the _\bw_\bo_\br_\bd portion of a double-quoted parameter
+ expansion and can be used to quote a closing brace or
+ other special character (this is part of POSIX interpre-
+ tation 221); in later versions, single quotes are not
special within double-quoted word expansions
c\bco\bom\bmp\bpa\bat\bt4\b43\b3
- +\bo the shell does not print a warning message if an attempt
- is made to use a quoted compound assignment as an argu-
- ment to declare (e.g., declare -a foo='(1 2)'). Later
+ +\bo the shell does not print a warning message if an attempt
+ is made to use a quoted compound assignment as an argu-
+ ment to declare (e.g., declare -a foo='(1 2)'). Later
versions warn that this usage is deprecated
- +\bo word expansion errors are considered non-fatal errors
- that cause the current command to fail, even in posix
- mode (the default behavior is to make them fatal errors
+ +\bo word expansion errors are considered non-fatal errors
+ that cause the current command to fail, even in posix
+ mode (the default behavior is to make them fatal errors
that cause the shell to exit)
- +\bo when executing a shell function, the loop state
+ +\bo when executing a shell function, the loop state
(while/until/etc.) is not reset, so b\bbr\bre\bea\bak\bk or c\bco\bon\bnt\bti\bin\bnu\bue\be in
that function will break or continue loops in the calling
- context. Bash-4.4 and later reset the loop state to pre-
+ context. Bash-4.4 and later reset the loop state to pre-
vent this
c\bco\bom\bmp\bpa\bat\bt4\b44\b4
- +\bo the shell sets up the values used by B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGV\bV and
- B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGC\bC so they can expand to the shell's positional
+ +\bo the shell sets up the values used by B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGV\bV and
+ B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGC\bC so they can expand to the shell's positional
parameters even if extended debugging mode is not enabled
- +\bo a subshell inherits loops from its parent context, so
- b\bbr\bre\bea\bak\bk or c\bco\bon\bnt\bti\bin\bnu\bue\be will cause the subshell to exit.
- Bash-5.0 and later reset the loop state to prevent the
+ +\bo a subshell inherits loops from its parent context, so
+ b\bbr\bre\bea\bak\bk or c\bco\bon\bnt\bti\bin\bnu\bue\be will cause the subshell to exit.
+ Bash-5.0 and later reset the loop state to prevent the
exit
- +\bo variable assignments preceding builtins like e\bex\bxp\bpo\bor\brt\bt and
+ +\bo variable assignments preceding builtins like e\bex\bxp\bpo\bor\brt\bt and
r\bre\bea\bad\bdo\bon\bnl\bly\by that set attributes continue to affect variables
with the same name in the calling environment even if the
shell is not in posix mode
c\bco\bom\bmp\bpa\bat\bt5\b50\b0
- +\bo Bash-5.1 changed the way $\b$R\bRA\bAN\bND\bDO\bOM\bM is generated to intro-
+ +\bo Bash-5.1 changed the way $\b$R\bRA\bAN\bND\bDO\bOM\bM is generated to intro-
duce slightly more randomness. If the shell compatibility
- level is set to 50 or lower, it reverts to the method
- from bash-5.0 and previous versions, so seeding the ran-
- dom number generator by assigning a value to R\bRA\bAN\bND\bDO\bOM\bM will
+ level is set to 50 or lower, it reverts to the method
+ from bash-5.0 and previous versions, so seeding the ran-
+ dom number generator by assigning a value to R\bRA\bAN\bND\bDO\bOM\bM will
produce the same sequence as in bash-5.0
- +\bo If the command hash table is empty, bash versions prior
- to bash-5.1 printed an informational message to that ef-
- fect, even when producing output that can be reused as
- input. Bash-5.1 suppresses that message when the -\b-l\bl op-
+ +\bo If the command hash table is empty, bash versions prior
+ to bash-5.1 printed an informational message to that ef-
+ fect, even when producing output that can be reused as
+ input. Bash-5.1 suppresses that message when the -\b-l\bl op-
tion is supplied.
c\bco\bom\bmp\bpa\bat\bt5\b51\b1
- +\bo The u\bun\bns\bse\bet\bt builtin treats attempts to unset array sub-
- scripts @\b@ and *\b* differently depending on whether the ar-
- ray is indexed or associative, and differently than in
+ +\bo The u\bun\bns\bse\bet\bt builtin treats attempts to unset array sub-
+ scripts @\b@ and *\b* differently depending on whether the ar-
+ ray is indexed or associative, and differently than in
previous versions.
S\bSE\bEE\bE A\bAL\bLS\bSO\bO
Copyright (C) 1988-2023 Free Software Foundation, Inc.
@end ignore
-@set LASTCHANGE Thu Aug 31 15:48:06 EDT 2023
+@set LASTCHANGE Wed Sep 13 15:38:31 EDT 2023
@set EDITION 5.3
@set VERSION 5.3
-@set UPDATED 31 August 2023
-@set UPDATED-MONTH August 2023
+@set UPDATED 13 September 2023
+@set UPDATED-MONTH September 2023
if (varop)
oa = set_expand_once (0, 0); /* no-op for compatibility levels <= 51 */
#endif
- result = unary_test (cond->op->word, arg1, varflag) ? EXECUTION_SUCCESS : EXECUTION_FAILURE;
+ result = cond_test (cond->op->word, arg1, NULL, varflag);
#if defined (ARRAY_VARS)
if (varop)
array_expand_once = oa;
#endif /* COND_REGEXP */
{
extended_glob = 1;
- result = binary_test (cond->op->word, arg1, arg2, TEST_PATMATCH|TEST_ARITHEXP|TEST_LOCALE)
- ? EXECUTION_SUCCESS
- : EXECUTION_FAILURE;
+ result = cond_test (cond->op->word, arg1, arg2, TEST_PATMATCH|TEST_ARITHEXP|TEST_LOCALE);
extended_glob = extglob_flag;
}
if (arg1 != nullstr)
{
register BUCKET_CONTENTS *item;
- if (hashing_enabled == 0 || hashed_filenames == 0)
+ if (hashing_enabled == 0)
return 0;
+ if (hashed_filenames == 0)
+ return 1;
+
item = hash_remove (filename, hashed_filenames, 0);
if (item)
{
static void beyond (void) __attribute__((__noreturn__));
static void integer_expected_error (char *) __attribute__((__noreturn__));
+static int unary_test (char *, char *, int);
+static int binary_test (char *, char *, char *, int);
+
static int unary_operator (void);
static int binary_operator (void);
static int two_arguments (void);
return ((op == EQ) ? (m == 0) : (m != 0));
}
-int
+static int
binary_test (char *op, char *arg1, char *arg2, int flags)
{
int patmatch;
return (unary_test (op, argv[pos - 1], 0));
}
-int
+static int
unary_test (char *op, char *arg, int flags)
{
intmax_t r;
return (value);
}
+#if defined (COND_COMMAND)
+int
+cond_test (char *op, char *arg1, char *arg2, int flags)
+{
+ int code, ret;
+
+ code = setjmp_nosigs (test_exit_buf);
+
+ if (code)
+ return (test_error_return);
+
+ ret = arg2 ? binary_test (op, arg1, arg2, flags) : unary_test (op, arg1, flags);
+
+ return (ret ? EXECUTION_SUCCESS : EXECUTION_FAILURE);
+}
+#endif
+
/*
* [:
* '[' expr ']'
extern int test_unop (char *);
extern int test_binop (char *);
-extern int unary_test (char *, char *, int);
-extern int binary_test (char *, char *, char *, int);
+extern int cond_test (char *, char *, char *, int);
extern int test_command (int, char **);
returns: 0
returns: 1
returns: 0
+./cond.tests: line 65: [[: X: integer expected
+returns: 2
returns: 0
returns: 1
returns: 1
returns: 1
returns: 1
returns: 0
-./cond.tests: line 122: [[: 4+: arithmetic syntax error: operand expected (error token is "+")
+./cond.tests: line 126: [[: 4+: arithmetic syntax error: operand expected (error token is "+")
returns: 1
returns: 0
returns: 0
[[ -z $UNSET ]]
echo returns: $?
+# need to handle test syntax errors and longjmp
+[[ -t X ]]
+echo returns: $?
+
# the ==/= and != operators do pattern matching
[[ $TDIR == /usr/homes/* ]]
echo returns: $?