c\bca\bal\bll\ble\ber\br [_\be_\bx_\bp_\br]
Returns the context of any active subroutine call (a shell func-
- tion or a script executed with the .\b. or s\bso\bou\bur\brc\bce\be builtins. With-
+ tion or a script executed with the .\b. or s\bso\bou\bur\brc\bce\be builtins). With-
out _\be_\bx_\bp_\br, c\bca\bal\bll\ble\ber\br displays the line number and source filename of
the current subroutine call. If a non-negative integer is sup-
plied as _\be_\bx_\bp_\br, c\bca\bal\bll\ble\ber\br displays the line number, subroutine name,
routine call or _\be_\bx_\bp_\br does not correspond to a valid position in
the call stack.
- c\bcd\bd [-\b-L\bL|\b|-\b-P\bP] [_\bd_\bi_\br]
+ c\bcd\bd [-\b-L\bL|[-\b-P\bP [-\b-e\be]]] [_\bd_\bi_\br]
Change the current directory to _\bd_\bi_\br. The variable H\bHO\bOM\bME\bE is the
default _\bd_\bi_\br. The variable C\bCD\bDP\bPA\bAT\bTH\bH defines the search path for
the directory containing _\bd_\bi_\br. Alternative directory names in
option says to use the physical directory structure instead of
following symbolic links (see also the -\b-P\bP option to the s\bse\bet\bt
builtin command); the -\b-L\bL option forces symbolic links to be fol-
- lowed. An argument of -\b- is equivalent to $\b$O\bOL\bLD\bDP\bPW\bWD\bD. If a non-
- empty directory name from C\bCD\bDP\bPA\bAT\bTH\bH is used, or if -\b- is the first
- argument, and the directory change is successful, the absolute
- pathname of the new working directory is written to the standard
- output. The return value is true if the directory was success-
+ lowed. If the -\b-e\be option is supplied with -\b-P\bP, and the current
+ working directory cannot be successfully determined after a suc-
+ cessful directory change, c\bcd\bd will return an unsuccessful status.
+ An argument of -\b- is equivalent to $\b$O\bOL\bLD\bDP\bPW\bWD\bD. If a non-empty
+ directory name from C\bCD\bDP\bPA\bAT\bTH\bH is used, or if -\b- is the first argu-
+ ment, and the directory change is successful, the absolute path-
+ name of the new working directory is written to the standard
+ output. The return value is true if the directory was success-
fully changed; false otherwise.
c\bco\bom\bmm\bma\ban\bnd\bd [-\b-p\bpV\bVv\bv] _\bc_\bo_\bm_\bm_\ba_\bn_\bd [_\ba_\br_\bg ...]
- Run _\bc_\bo_\bm_\bm_\ba_\bn_\bd with _\ba_\br_\bg_\bs suppressing the normal shell function
- lookup. Only builtin commands or commands found in the P\bPA\bAT\bTH\bH are
- executed. If the -\b-p\bp option is given, the search for _\bc_\bo_\bm_\bm_\ba_\bn_\bd is
- performed using a default value for P\bPA\bAT\bTH\bH that is guaranteed to
- find all of the standard utilities. If either the -\b-V\bV or -\b-v\bv
+ Run _\bc_\bo_\bm_\bm_\ba_\bn_\bd with _\ba_\br_\bg_\bs suppressing the normal shell function
+ lookup. Only builtin commands or commands found in the P\bPA\bAT\bTH\bH are
+ executed. If the -\b-p\bp option is given, the search for _\bc_\bo_\bm_\bm_\ba_\bn_\bd is
+ performed using a default value for P\bPA\bAT\bTH\bH that is guaranteed to
+ find all of the standard utilities. If either the -\b-V\bV or -\b-v\bv
option is supplied, a description of _\bc_\bo_\bm_\bm_\ba_\bn_\bd is printed. The -\b-v\bv
- option causes a single word indicating the command or file name
+ option causes a single word indicating the command or file name
used to invoke _\bc_\bo_\bm_\bm_\ba_\bn_\bd to be displayed; the -\b-V\bV option produces a
- more verbose description. If the -\b-V\bV or -\b-v\bv option is supplied,
- the exit status is 0 if _\bc_\bo_\bm_\bm_\ba_\bn_\bd was found, and 1 if not. If
+ more verbose description. If the -\b-V\bV or -\b-v\bv option is supplied,
+ the exit status is 0 if _\bc_\bo_\bm_\bm_\ba_\bn_\bd was found, and 1 if not. If
neither option is supplied and an error occurred or _\bc_\bo_\bm_\bm_\ba_\bn_\bd can-
- not be found, the exit status is 127. Otherwise, the exit sta-
+ not be found, the exit status is 127. Otherwise, the exit sta-
tus of the c\bco\bom\bmm\bma\ban\bnd\bd builtin is the exit status of _\bc_\bo_\bm_\bm_\ba_\bn_\bd.
c\bco\bom\bmp\bpg\bge\ben\bn [_\bo_\bp_\bt_\bi_\bo_\bn] [_\bw_\bo_\br_\bd]
- Generate possible completion matches for _\bw_\bo_\br_\bd according to the
- _\bo_\bp_\bt_\bi_\bo_\bns, which may be any option accepted by the c\bco\bom\bmp\bpl\ble\bet\bte\be
- builtin with the exception of -\b-p\bp and -\b-r\br, and write the matches
- to the standard output. When using the -\b-F\bF or -\b-C\bC options, the
- various shell variables set by the programmable completion
+ Generate possible completion matches for _\bw_\bo_\br_\bd according to the
+ _\bo_\bp_\bt_\bi_\bo_\bns, which may be any option accepted by the c\bco\bom\bmp\bpl\ble\bet\bte\be
+ builtin with the exception of -\b-p\bp and -\b-r\br, and write the matches
+ to the standard output. When using the -\b-F\bF or -\b-C\bC options, the
+ various shell variables set by the programmable completion
facilities, while available, will not have useful values.
- The matches will be generated in the same way as if the pro-
- grammable completion code had generated them directly from a
+ The matches will be generated in the same way as if the pro-
+ grammable completion code had generated them directly from a
completion specification with the same flags. If _\bw_\bo_\br_\bd is speci-
fied, only those completions matching _\bw_\bo_\br_\bd will be displayed.
- The return value is true unless an invalid option is supplied,
+ The return value is true unless an invalid option is supplied,
or no matches were generated.
- c\bco\bom\bmp\bpl\ble\bet\bte\be [-\b-a\bab\bbc\bcd\bde\bef\bfg\bgj\bjk\bks\bsu\buv\bv] [-\b-o\bo _\bc_\bo_\bm_\bp_\b-_\bo_\bp_\bt_\bi_\bo_\bn] [-\b-D\bDE\bE] [-\b-A\bA _\ba_\bc_\bt_\bi_\bo_\bn] [-\b-G\bG _\bg_\bl_\bo_\bb_\b-
+ c\bco\bom\bmp\bpl\ble\bet\bte\be [-\b-a\bab\bbc\bcd\bde\bef\bfg\bgj\bjk\bks\bsu\buv\bv] [-\b-o\bo _\bc_\bo_\bm_\bp_\b-_\bo_\bp_\bt_\bi_\bo_\bn] [-\b-D\bDE\bE] [-\b-A\bA _\ba_\bc_\bt_\bi_\bo_\bn] [-\b-G\bG _\bg_\bl_\bo_\bb_\b-
_\bp_\ba_\bt] [-\b-W\bW _\bw_\bo_\br_\bd_\bl_\bi_\bs_\bt] [-\b-F\bF _\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn] [-\b-C\bC _\bc_\bo_\bm_\bm_\ba_\bn_\bd]
[-\b-X\bX _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt] [-\b-P\bP _\bp_\br_\be_\bf_\bi_\bx] [-\b-S\bS _\bs_\bu_\bf_\bf_\bi_\bx] _\bn_\ba_\bm_\be [_\bn_\ba_\bm_\be _\b._\b._\b.]
c\bco\bom\bmp\bpl\ble\bet\bte\be -\b-p\bpr\br [-\b-D\bDE\bE] [_\bn_\ba_\bm_\be ...]
- Specify how arguments to each _\bn_\ba_\bm_\be should be completed. If the
- -\b-p\bp option is supplied, or if no options are supplied, existing
- completion specifications are printed in a way that allows them
+ Specify how arguments to each _\bn_\ba_\bm_\be should be completed. If the
+ -\b-p\bp option is supplied, or if no options are supplied, existing
+ completion specifications are printed in a way that allows them
to be reused as input. The -\b-r\br option removes a completion spec-
- ification for each _\bn_\ba_\bm_\be, or, if no _\bn_\ba_\bm_\bes are supplied, all com-
+ ification for each _\bn_\ba_\bm_\be, or, if no _\bn_\ba_\bm_\bes are supplied, all com-
pletion specifications. The -\b-D\bD option indicates that the
- remaining options and actions should apply to the ``default''
- command completion; that is, completion attempted on a command
- for which no completion has previously been defined. The -\b-E\bE
- option indicates that the remaining options and actions should
- apply to ``empty'' command completion; that is, completion
+ remaining options and actions should apply to the ``default''
+ command completion; that is, completion attempted on a command
+ for which no completion has previously been defined. The -\b-E\bE
+ option indicates that the remaining options and actions should
+ apply to ``empty'' command completion; that is, completion
attempted on a blank line.
- The process of applying these completion specifications when
- word completion is attempted is described above under P\bPr\bro\bo-\b-
+ The process of applying these completion specifications when
+ word completion is attempted is described above under P\bPr\bro\bo-\b-
g\bgr\bra\bam\bmm\bma\bab\bbl\ble\be C\bCo\bom\bmp\bpl\ble\bet\bti\bio\bon\bn.
- Other options, if specified, have the following meanings. The
- arguments to the -\b-G\bG, -\b-W\bW, and -\b-X\bX options (and, if necessary, the
- -\b-P\bP and -\b-S\bS options) should be quoted to protect them from expan-
+ Other options, if specified, have the following meanings. The
+ arguments to the -\b-G\bG, -\b-W\bW, and -\b-X\bX options (and, if necessary, the
+ -\b-P\bP and -\b-S\bS options) should be quoted to protect them from expan-
sion before the c\bco\bom\bmp\bpl\ble\bet\bte\be builtin is invoked.
-\b-o\bo _\bc_\bo_\bm_\bp_\b-_\bo_\bp_\bt_\bi_\bo_\bn
- The _\bc_\bo_\bm_\bp_\b-_\bo_\bp_\bt_\bi_\bo_\bn controls several aspects of the comp-
- spec's behavior beyond the simple generation of comple-
+ The _\bc_\bo_\bm_\bp_\b-_\bo_\bp_\bt_\bi_\bo_\bn controls several aspects of the comp-
+ spec's behavior beyond the simple generation of comple-
tions. _\bc_\bo_\bm_\bp_\b-_\bo_\bp_\bt_\bi_\bo_\bn may be one of:
b\bba\bas\bsh\bhd\bde\bef\bfa\bau\bul\blt\bt
Perform the rest of the default b\bba\bas\bsh\bh completions
if the compspec generates no matches.
- d\bde\bef\bfa\bau\bul\blt\bt Use readline's default filename completion if
+ d\bde\bef\bfa\bau\bul\blt\bt Use readline's default filename completion if
the compspec generates no matches.
d\bdi\bir\brn\bna\bam\bme\bes\bs
- Perform directory name completion if the comp-
+ Perform directory name completion if the comp-
spec generates no matches.
f\bfi\bil\ble\ben\bna\bam\bme\bes\bs
- Tell readline that the compspec generates file-
- names, so it can perform any filename-specific
- processing (like adding a slash to directory
- names, quoting special characters, or suppress-
- ing trailing spaces). Intended to be used with
+ Tell readline that the compspec generates file-
+ names, so it can perform any filename-specific
+ processing (like adding a slash to directory
+ names, quoting special characters, or suppress-
+ ing trailing spaces). Intended to be used with
shell functions.
- n\bno\bos\bsp\bpa\bac\bce\be Tell readline not to append a space (the
- default) to words completed at the end of the
+ n\bno\bos\bsp\bpa\bac\bce\be Tell readline not to append a space (the
+ default) to words completed at the end of the
line.
p\bpl\blu\bus\bsd\bdi\bir\brs\bs
- After any matches defined by the compspec are
- generated, directory name completion is
- attempted and any matches are added to the
+ After any matches defined by the compspec are
+ generated, directory name completion is
+ attempted and any matches are added to the
results of the other actions.
-\b-A\bA _\ba_\bc_\bt_\bi_\bo_\bn
- The _\ba_\bc_\bt_\bi_\bo_\bn may be one of the following to generate a
+ The _\ba_\bc_\bt_\bi_\bo_\bn may be one of the following to generate a
list of possible completions:
a\bal\bli\bia\bas\bs Alias names. May also be specified as -\b-a\ba.
a\bar\brr\bra\bay\byv\bva\bar\br
Array variable names.
b\bbi\bin\bnd\bdi\bin\bng\bg R\bRe\bea\bad\bdl\bli\bin\bne\be key binding names.
- b\bbu\bui\bil\blt\bti\bin\bn Names of shell builtin commands. May also be
+ b\bbu\bui\bil\blt\bti\bin\bn Names of shell builtin commands. May also be
specified as -\b-b\bb.
c\bco\bom\bmm\bma\ban\bnd\bd Command names. May also be specified as -\b-c\bc.
d\bdi\bir\bre\bec\bct\bto\bor\bry\by
d\bdi\bis\bsa\bab\bbl\ble\bed\bd
Names of disabled shell builtins.
e\ben\bna\bab\bbl\ble\bed\bd Names of enabled shell builtins.
- e\bex\bxp\bpo\bor\brt\bt Names of exported shell variables. May also be
+ e\bex\bxp\bpo\bor\brt\bt Names of exported shell variables. May also be
specified as -\b-e\be.
f\bfi\bil\ble\be File names. May also be specified as -\b-f\bf.
f\bfu\bun\bnc\bct\bti\bio\bon\bn
h\bhe\bel\blp\bpt\bto\bop\bpi\bic\bc
Help topics as accepted by the h\bhe\bel\blp\bp builtin.
h\bho\bos\bst\btn\bna\bam\bme\be
- Hostnames, as taken from the file specified by
+ Hostnames, as taken from the file specified by
the H\bHO\bOS\bST\bTF\bFI\bIL\bLE\bE shell variable.
- j\bjo\bob\bb Job names, if job control is active. May also
+ j\bjo\bob\bb Job names, if job control is active. May also
be specified as -\b-j\bj.
- k\bke\bey\byw\bwo\bor\brd\bd Shell reserved words. May also be specified as
+ k\bke\bey\byw\bwo\bor\brd\bd Shell reserved words. May also be specified as
-\b-k\bk.
r\bru\bun\bnn\bni\bin\bng\bg Names of running jobs, if job control is active.
s\bse\ber\brv\bvi\bic\bce\be Service names. May also be specified as -\b-s\bs.
- s\bse\bet\bto\bop\bpt\bt Valid arguments for the -\b-o\bo option to the s\bse\bet\bt
+ s\bse\bet\bto\bop\bpt\bt Valid arguments for the -\b-o\bo option to the s\bse\bet\bt
builtin.
- s\bsh\bho\bop\bpt\bt Shell option names as accepted by the s\bsh\bho\bop\bpt\bt
+ s\bsh\bho\bop\bpt\bt Shell option names as accepted by the s\bsh\bho\bop\bpt\bt
builtin.
s\bsi\big\bgn\bna\bal\bl Signal names.
s\bst\bto\bop\bpp\bpe\bed\bd Names of stopped jobs, if job control is active.
v\bva\bar\bri\bia\bab\bbl\ble\be
Names of all shell variables. May also be spec-
ified as -\b-v\bv.
- -\b-G\bG _\bg_\bl_\bo_\bb_\bp_\ba_\bt
- The pathname expansion pattern _\bg_\bl_\bo_\bb_\bp_\ba_\bt is expanded to
- generate the possible completions.
- -\b-W\bW _\bw_\bo_\br_\bd_\bl_\bi_\bs_\bt
- The _\bw_\bo_\br_\bd_\bl_\bi_\bs_\bt is split using the characters in the I\bIF\bFS\bS
- special variable as delimiters, and each resultant word
- is expanded. The possible completions are the members
- of the resultant list which match the word being com-
- pleted.
-\b-C\bC _\bc_\bo_\bm_\bm_\ba_\bn_\bd
_\bc_\bo_\bm_\bm_\ba_\bn_\bd is executed in a subshell environment, and its
output is used as the possible completions.
shell environment. When it finishes, the possible com-
pletions are retrieved from the value of the C\bCO\bOM\bMP\bPR\bRE\bEP\bPL\bLY\bY
array variable.
- -\b-X\bX _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt
- _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt is a pattern as used for pathname expansion.
- It is applied to the list of possible completions gener-
- ated by the preceding options and arguments, and each
- completion matching _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt is removed from the list.
- A leading !\b! in _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt negates the pattern; in this
- case, any completion not matching _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt is removed.
+ -\b-G\bG _\bg_\bl_\bo_\bb_\bp_\ba_\bt
+ The pathname expansion pattern _\bg_\bl_\bo_\bb_\bp_\ba_\bt is expanded to
+ generate the possible completions.
-\b-P\bP _\bp_\br_\be_\bf_\bi_\bx
- _\bp_\br_\be_\bf_\bi_\bx is added at the beginning of each possible com-
+ _\bp_\br_\be_\bf_\bi_\bx is added at the beginning of each possible com-
pletion after all other options have been applied.
-\b-S\bS _\bs_\bu_\bf_\bf_\bi_\bx
_\bs_\bu_\bf_\bf_\bi_\bx is appended to each possible completion after all
other options have been applied.
-
- The return value is true unless an invalid option is supplied,
- an option other than -\b-p\bp or -\b-r\br is supplied without a _\bn_\ba_\bm_\be argu-
- ment, an attempt is made to remove a completion specification
+ -\b-W\bW _\bw_\bo_\br_\bd_\bl_\bi_\bs_\bt
+ The _\bw_\bo_\br_\bd_\bl_\bi_\bs_\bt is split using the characters in the I\bIF\bFS\bS
+ special variable as delimiters, and each resultant word
+ is expanded. The possible completions are the members
+ of the resultant list which match the word being com-
+ pleted.
+ -\b-X\bX _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt
+ _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt is a pattern as used for pathname expansion.
+ It is applied to the list of possible completions gener-
+ ated by the preceding options and arguments, and each
+ completion matching _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt is removed from the list.
+ A leading !\b! in _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt negates the pattern; in this
+ case, any completion not matching _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt is removed.
+
+ The return value is true unless an invalid option is supplied,
+ an option other than -\b-p\bp or -\b-r\br is supplied without a _\bn_\ba_\bm_\be argu-
+ ment, an attempt is made to remove a completion specification
for a _\bn_\ba_\bm_\be for which no specification exists, or an error occurs
adding a completion specification.
c\bco\bom\bmp\bpo\bop\bpt\bt [-\b-o\bo _\bo_\bp_\bt_\bi_\bo_\bn] [-\b-D\bDE\bE] [+\b+o\bo _\bo_\bp_\bt_\bi_\bo_\bn] [_\bn_\ba_\bm_\be]
Modify completion options for each _\bn_\ba_\bm_\be according to the
- _\bo_\bp_\bt_\bi_\bo_\bns, or for the currently-execution completion if no _\bn_\ba_\bm_\bes
- are supplied. If no _\bo_\bp_\bt_\bi_\bo_\bns are given, display the completion
- options for each _\bn_\ba_\bm_\be or the current completion. The possible
- values of _\bo_\bp_\bt_\bi_\bo_\bn are those valid for the c\bco\bom\bmp\bpl\ble\bet\bte\be builtin
- described above. The -\b-D\bD option indicates that the remaining
+ _\bo_\bp_\bt_\bi_\bo_\bns, or for the currently-executing completion if no _\bn_\ba_\bm_\bes
+ are supplied. If no _\bo_\bp_\bt_\bi_\bo_\bns are given, display the completion
+ options for each _\bn_\ba_\bm_\be or the current completion. The possible
+ values of _\bo_\bp_\bt_\bi_\bo_\bn are those valid for the c\bco\bom\bmp\bpl\ble\bet\bte\be builtin
+ described above. The -\b-D\bD option indicates that the remaining
options should apply to the ``default'' command completion; that
- is, completion attempted on a command for which no completion
- has previously been defined. The -\b-E\bE option indicates that the
- remaining options should apply to ``empty'' command completion;
+ is, completion attempted on a command for which no completion
+ has previously been defined. The -\b-E\bE option indicates that the
+ remaining options should apply to ``empty'' command completion;
that is, completion attempted on a blank line.
- The return value is true unless an invalid option is supplied, an
- attempt is made to modify the options for a _\bn_\ba_\bm_\be for which no comple-
- tion specification exists, or an output error occurs.
+ The return value is true unless an invalid option is supplied,
+ an attempt is made to modify the options for a _\bn_\ba_\bm_\be for which no
+ completion specification exists, or an output error occurs.
c\bco\bon\bnt\bti\bin\bnu\bue\be [_\bn]
Resume the next iteration of the enclosing f\bfo\bor\br, w\bwh\bhi\bil\ble\be, u\bun\bnt\bti\bil\bl, or
- s\bse\bel\ble\bec\bct\bt loop. If _\bn is specified, resume at the _\bnth enclosing
- loop. _\bn must be >= 1. If _\bn is greater than the number of
- enclosing loops, the last enclosing loop (the ``top-level''
+ s\bse\bel\ble\bec\bct\bt loop. If _\bn is specified, resume at the _\bnth enclosing
+ loop. _\bn must be >= 1. If _\bn is greater than the number of
+ enclosing loops, the last enclosing loop (the ``top-level''
loop) is resumed. The return value is 0 unless _\bn is not greater
than or equal to 1.
- d\bde\bec\bcl\bla\bar\bre\be [-\b-a\baA\bAf\bfF\bFi\bil\blr\brt\btu\bux\bx] [-\b-p\bp] [_\bn_\ba_\bm_\be[=_\bv_\ba_\bl_\bu_\be] ...]
- t\bty\byp\bpe\bes\bse\bet\bt [-\b-a\baA\bAf\bfF\bFi\bil\blr\brt\btu\bux\bx] [-\b-p\bp] [_\bn_\ba_\bm_\be[=_\bv_\ba_\bl_\bu_\be] ...]
- Declare variables and/or give them attributes. If no _\bn_\ba_\bm_\bes are
- given then display the values of variables. The -\b-p\bp option will
+ d\bde\bec\bcl\bla\bar\bre\be [-\b-a\baA\bAf\bfF\bFg\bgi\bil\blr\brt\btu\bux\bx] [-\b-p\bp] [_\bn_\ba_\bm_\be[=_\bv_\ba_\bl_\bu_\be] ...]
+ t\bty\byp\bpe\bes\bse\bet\bt [-\b-a\baA\bAf\bfF\bFg\bgi\bil\blr\brt\btu\bux\bx] [-\b-p\bp] [_\bn_\ba_\bm_\be[=_\bv_\ba_\bl_\bu_\be] ...]
+ Declare variables and/or give them attributes. If no _\bn_\ba_\bm_\bes are
+ given then display the values of variables. The -\b-p\bp option will
display the attributes and values of each _\bn_\ba_\bm_\be. When -\b-p\bp is used
with _\bn_\ba_\bm_\be arguments, additional options are ignored. When -\b-p\bp is
- supplied without _\bn_\ba_\bm_\be arguments, it will display the attributes
- and values of all variables having the attributes specified by
- the additional options. If no other options are supplied with
- -\b-p\bp, d\bde\bec\bcl\bla\bar\bre\be will display the attributes and values of all shell
- variables. The -\b-f\bf option will restrict the display to shell
+ supplied without _\bn_\ba_\bm_\be arguments, it will display the attributes
+ and values of all variables having the attributes specified by
+ the additional options. If no other options are supplied with
+ -\b-p\bp, d\bde\bec\bcl\bla\bar\bre\be will display the attributes and values of all shell
+ variables. The -\b-f\bf option will restrict the display to shell
functions. The -\b-F\bF option inhibits the display of function defi-
- nitions; only the function name and attributes are printed. If
- the e\bex\bxt\btd\bde\beb\bbu\bug\bg shell option is enabled using s\bsh\bho\bop\bpt\bt, the source
+ nitions; only the function name and attributes are printed. If
+ the e\bex\bxt\btd\bde\beb\bbu\bug\bg shell option is enabled using s\bsh\bho\bop\bpt\bt, the source
file name and line number where the function is defined are dis-
- played as well. The -\b-F\bF option implies -\b-f\bf. The following
- options can be used to restrict output to variables with the
- specified attribute or to give variables attributes:
+ played as well. The -\b-F\bF option implies -\b-f\bf. The -\b-g\bg option forces
+ variables to be created or modified at the global scope, even
+ when d\bde\bec\bcl\bla\bar\bre\be is executed in a shell function. It is ignored in
+ all other cases. The following options can be used to restrict
+ output to variables with the specified attribute or to give
+ variables attributes:
-\b-a\ba Each _\bn_\ba_\bm_\be is an indexed array variable (see A\bAr\brr\bra\bay\bys\bs
above).
-\b-A\bA Each _\bn_\ba_\bm_\be is an associative array variable (see A\bAr\brr\bra\bay\bys\bs
Using `+' instead of `-' turns off the attribute instead, with
the exceptions that +\b+a\ba may not be used to destroy an array vari-
able and +\b+r\br will not remove the readonly attribute. When used
- in a function, makes each _\bn_\ba_\bm_\be local, as with the l\blo\boc\bca\bal\bl command.
- If a variable name is followed by =_\bv_\ba_\bl_\bu_\be, the value of the vari-
- able is set to _\bv_\ba_\bl_\bu_\be. The return value is 0 unless an invalid
- option is encountered, an attempt is made to define a function
- using ``-f foo=bar'', an attempt is made to assign a value to a
- readonly variable, an attempt is made to assign a value to an
- array variable without using the compound assignment syntax (see
- A\bAr\brr\bra\bay\bys\bs above), one of the _\bn_\ba_\bm_\be_\bs is not a valid shell variable
- name, an attempt is made to turn off readonly status for a read-
- only variable, an attempt is made to turn off array status for
- an array variable, or an attempt is made to display a non-exis-
- tent function with -\b-f\bf.
-
- d\bdi\bir\brs\bs [\b[+\b+_\bn]\b] [\b[-\b-_\bn]\b] [\b[-\b-c\bcp\bpl\blv\bv]\b]
+ in a function, makes each _\bn_\ba_\bm_\be local, as with the l\blo\boc\bca\bal\bl command,
+ unless the -\b-g\bgP\bP o\bop\bpt\bti\bio\bon\bn i\bis\bs s\bsu\bup\bpp\bpl\bli\bie\bed\bd,\b, I\bIf\bf a\ba v\bva\bar\bri\bia\bab\bbl\ble\be n\bna\bam\bme\be i\bis\bs f\bfo\bol\bl-\b-
+ l\blo\bow\bwe\bed\bd b\bby\by =\b=_\bv_\ba_\bl_\bu_\be,\b, t\bth\bhe\be v\bva\bal\blu\bue\be o\bof\bf t\bth\bhe\be v\bva\bar\bri\bia\bab\bbl\ble\be i\bis\bs s\bse\bet\bt t\bto\bo _\bv_\ba_\bl_\bu_\be.\b. T\bTh\bhe\be
+ r\bre\bet\btu\bur\brn\bn v\bva\bal\blu\bue\be i\bis\bs 0\b0 u\bun\bnl\ble\bes\bss\bs a\ban\bn i\bin\bnv\bva\bal\bli\bid\bd o\bop\bpt\bti\bio\bon\bn i\bis\bs e\ben\bnc\bco\bou\bun\bnt\bte\ber\bre\bed\bd,\b, a\ban\bn
+ a\bat\btt\bte\bem\bmp\bpt\bt i\bis\bs m\bma\bad\bde\be t\bto\bo d\bde\bef\bfi\bin\bne\be a\ba f\bfu\bun\bnc\bct\bti\bio\bon\bn u\bus\bsi\bin\bng\bg `\b``\b`-\b-f\bf f\bfo\boo\bo=\b=b\bba\bar\br'\b''\b',\b, a\ban\bn
+ a\bat\btt\bte\bem\bmp\bpt\bt i\bis\bs m\bma\bad\bde\be t\bto\bo a\bas\bss\bsi\big\bgn\bn a\ba v\bva\bal\blu\bue\be t\bto\bo a\ba r\bre\bea\bad\bdo\bon\bnl\bly\by v\bva\bar\bri\bia\bab\bbl\ble\be,\b, a\ban\bn
+ a\bat\btt\bte\bem\bmp\bpt\bt i\bis\bs m\bma\bad\bde\be t\bto\bo a\bas\bss\bsi\big\bgn\bn a\ba v\bva\bal\blu\bue\be t\bto\bo a\ban\bn a\bar\brr\bra\bay\by v\bva\bar\bri\bia\bab\bbl\ble\be w\bwi\bit\bth\bho\bou\but\bt
+ u\bus\bsi\bin\bng\bg t\bth\bhe\be c\bco\bom\bmp\bpo\bou\bun\bnd\bd a\bas\bss\bsi\big\bgn\bnm\bme\ben\bnt\bt s\bsy\byn\bnt\bta\bax\bx (\b(s\bse\bee\be A\bAr\brr\bra\bay\bys\bs above), one of
+ the _\bn_\ba_\bm_\be_\bs is not a valid shell variable name, an attempt is made
+ to turn off readonly status for a readonly variable, an attempt
+ is made to turn off array status for an array variable, or an
+ attempt is made to display a non-existent function with -\b-f\bf.
+
+ d\bdi\bir\brs\bs [\b[+\b+_\bn]\b] [\b[-\b-_\bn]\b] [\b[-\b-c\bcl\blp\bpv\bv]\b]
Without options, displays the list of currently remembered
directories. The default display is on a single line with
directory names separated by spaces. Directories are added to
\\b\a\ba alert (bell)
\\b\b\bb backspace
\\b\c\bc suppress further output
- \\b\e\be an escape character
+ \\b\e\be
+ \\b\E\bE an escape character
\\b\f\bf form feed
\\b\n\bn new line
\\b\r\br carriage return
_\bn_\bn_\bn (zero to three octal digits)
\\b\x\bx_\bH_\bH the eight-bit character whose value is the hexadecimal
value _\bH_\bH (one or two hex digits)
+ \\b\u\bu_\bH_\bH_\bH_\bH the Unicode (ISO/IEC 10646) character whose value is the
+ hexadecimal value _\bH_\bH_\bH_\bH (one to four hex digits)
+ \\b\U\bU_\bH_\bH_\bH_\bH_\bH_\bH_\bH_\bH
+ the Unicode (ISO/IEC 10646) character whose value is the
+ hexadecimal value _\bH_\bH_\bH_\bH_\bH_\bH_\bH_\bH (one to eight hex digits)
e\ben\bna\bab\bbl\ble\be [-\b-a\ba] [-\b-d\bdn\bnp\bps\bs] [-\b-f\bf _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be] [_\bn_\ba_\bm_\be ...]
Enable and disable builtin shell commands. Disabling a builtin
When the end of options is encountered, g\bge\bet\bto\bop\bpt\bts\bs exits with a
return value greater than zero. O\bOP\bPT\bTI\bIN\bND\bD is set to the index of
- the first non-option argument, and n\bna\bam\bme\be is set to ?.
+ the first non-option argument, and _\bn_\ba_\bm_\be is set to ?.
g\bge\bet\bto\bop\bpt\bts\bs normally parses the positional parameters, but if more
arguments are given in _\ba_\br_\bg_\bs, g\bge\bet\bto\bop\bpt\bts\bs parses those instead.
an error occurs.
h\bha\bas\bsh\bh [-\b-l\blr\br] [-\b-p\bp _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be] [-\b-d\bdt\bt] [_\bn_\ba_\bm_\be]
- For each _\bn_\ba_\bm_\be, the full file name of the command is determined
- by searching the directories in $\b$P\bPA\bAT\bTH\bH and remembered. If the -\b-p\bp
- option is supplied, no path search is performed, and _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be is
- used as the full file name of the command. The -\b-r\br option causes
- the shell to forget all remembered locations. The -\b-d\bd option
- causes the shell to forget the remembered location of each _\bn_\ba_\bm_\be.
- If the -\b-t\bt option is supplied, the full pathname to which each
- _\bn_\ba_\bm_\be corresponds is printed. If multiple _\bn_\ba_\bm_\be arguments are
- supplied with -\b-t\bt, the _\bn_\ba_\bm_\be is printed before the hashed full
- pathname. The -\b-l\bl option causes output to be displayed in a for-
- mat that may be reused as input. If no arguments are given, or
- if only -\b-l\bl is supplied, information about remembered commands is
- printed. The return status is true unless a _\bn_\ba_\bm_\be is not found
- or an invalid option is supplied.
+ Each time h\bha\bas\bsh\bh is invoked, the full pathname of the command _\bn_\ba_\bm_\be
+ is determined by searching the directories in $\b$P\bPA\bAT\bTH\bH and remem-
+ bered. Any previously-remembered pathname is discarded. If the
+ -\b-p\bp option is supplied, no path search is performed, and _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
+ is used as the full file name of the command. The -\b-r\br option
+ causes the shell to forget all remembered locations. The -\b-d\bd
+ option causes the shell to forget the remembered location of
+ each _\bn_\ba_\bm_\be. If the -\b-t\bt option is supplied, the full pathname to
+ which each _\bn_\ba_\bm_\be corresponds is printed. If multiple _\bn_\ba_\bm_\be argu-
+ ments are supplied with -\b-t\bt, the _\bn_\ba_\bm_\be is printed before the
+ hashed full pathname. The -\b-l\bl option causes output to be dis-
+ played in a format that may be reused as input. If no arguments
+ are given, or if only -\b-l\bl is supplied, information about remem-
+ bered commands is printed. The return status is true unless a
+ _\bn_\ba_\bm_\be is not found or an invalid option is supplied.
h\bhe\bel\blp\bp [-\b-d\bdm\bms\bs] [_\bp_\ba_\bt_\bt_\be_\br_\bn]
- Display helpful information about builtin commands. If _\bp_\ba_\bt_\bt_\be_\br_\bn
- is specified, h\bhe\bel\blp\bp gives detailed help on all commands matching
- _\bp_\ba_\bt_\bt_\be_\br_\bn; otherwise help for all the builtins and shell control
+ Display helpful information about builtin commands. If _\bp_\ba_\bt_\bt_\be_\br_\bn
+ is specified, h\bhe\bel\blp\bp gives detailed help on all commands matching
+ _\bp_\ba_\bt_\bt_\be_\br_\bn; otherwise help for all the builtins and shell control
structures is printed.
-\b-d\bd Display a short description of each _\bp_\ba_\bt_\bt_\be_\br_\bn
-\b-m\bm Display the description of each _\bp_\ba_\bt_\bt_\be_\br_\bn in a manpage-like
h\bhi\bis\bst\bto\bor\bry\by -\b-s\bs _\ba_\br_\bg [_\ba_\br_\bg _\b._\b._\b.]
With no options, display the command history list with line num-
bers. Lines listed with a *\b* have been modified. An argument of
- _\bn lists only the last _\bn lines. If the shell variable H\bHI\bIS\bST\bTT\bTI\bIM\bME\bE-\b-
- F\bFO\bOR\bRM\bMA\bAT\bT is set and not null, it is used as a format string for
- _\bs_\bt_\br_\bf_\bt_\bi_\bm_\be(3) to display the time stamp associated with each dis-
- played history entry. No intervening blank is printed between
- the formatted time stamp and the history line. If _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be is
- supplied, it is used as the name of the history file; if not,
- the value of H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE is used. Options, if supplied, have the
+ _\bn lists only the last _\bn lines. If the shell variable H\bHI\bIS\bST\bTT\bTI\bIM\bME\bE-\b-
+ F\bFO\bOR\bRM\bMA\bAT\bT is set and not null, it is used as a format string for
+ _\bs_\bt_\br_\bf_\bt_\bi_\bm_\be(3) to display the time stamp associated with each dis-
+ played history entry. No intervening blank is printed between
+ the formatted time stamp and the history line. If _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be is
+ supplied, it is used as the name of the history file; if not,
+ the value of H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE is used. Options, if supplied, have the
following meanings:
-\b-c\bc Clear the history list by deleting all the entries.
-\b-d\bd _\bo_\bf_\bf_\bs_\be_\bt
Delete the history entry at position _\bo_\bf_\bf_\bs_\be_\bt.
- -\b-a\ba Append the ``new'' history lines (history lines entered
- since the beginning of the current b\bba\bas\bsh\bh session) to the
+ -\b-a\ba Append the ``new'' history lines (history lines entered
+ since the beginning of the current b\bba\bas\bsh\bh session) to the
history file.
- -\b-n\bn Read the history lines not already read from the history
- file into the current history list. These are lines
- appended to the history file since the beginning of the
+ -\b-n\bn Read the history lines not already read from the history
+ file into the current history list. These are lines
+ appended to the history file since the beginning of the
current b\bba\bas\bsh\bh session.
-\b-r\br Read the contents of the history file and use them as the
current history.
- -\b-w\bw Write the current history to the history file, overwrit-
+ -\b-w\bw Write the current history to the history file, overwrit-
ing the history file's contents.
- -\b-p\bp Perform history substitution on the following _\ba_\br_\bg_\bs and
- display the result on the standard output. Does not
- store the results in the history list. Each _\ba_\br_\bg must be
+ -\b-p\bp Perform history substitution on the following _\ba_\br_\bg_\bs and
+ display the result on the standard output. Does not
+ store the results in the history list. Each _\ba_\br_\bg must be
quoted to disable normal history expansion.
- -\b-s\bs Store the _\ba_\br_\bg_\bs in the history list as a single entry.
- The last command in the history list is removed before
+ -\b-s\bs Store the _\ba_\br_\bg_\bs in the history list as a single entry.
+ The last command in the history list is removed before
the _\ba_\br_\bg_\bs are added.
- If the H\bHI\bIS\bST\bTT\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT variable is set, the time stamp informa-
- tion associated with each history entry is written to the his-
- tory file, marked with the history comment character. When the
- history file is read, lines beginning with the history comment
- character followed immediately by a digit are interpreted as
+ If the H\bHI\bIS\bST\bTT\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT variable is set, the time stamp informa-
+ tion associated with each history entry is written to the his-
+ tory file, marked with the history comment character. When the
+ history file is read, lines beginning with the history comment
+ character followed immediately by a digit are interpreted as
timestamps for the previous history line. The return value is 0
- unless an invalid option is encountered, an error occurs while
- reading or writing the history file, an invalid _\bo_\bf_\bf_\bs_\be_\bt is sup-
+ unless an invalid option is encountered, an error occurs while
+ reading or writing the history file, an invalid _\bo_\bf_\bf_\bs_\be_\bt is sup-
plied as an argument to -\b-d\bd, or the history expansion supplied as
an argument to -\b-p\bp fails.
The first form lists the active jobs. The options have the fol-
lowing meanings:
-\b-l\bl List process IDs in addition to the normal information.
- -\b-p\bp List only the process ID of the job's process group
- leader.
-\b-n\bn Display information only about jobs that have changed
status since the user was last notified of their status.
+ -\b-p\bp List only the process ID of the job's process group
+ leader.
-\b-r\br Restrict output to running jobs.
-\b-s\bs Restrict output to stopped jobs.
- If _\bj_\bo_\bb_\bs_\bp_\be_\bc is given, output is restricted to information about
- that job. The return status is 0 unless an invalid option is
+ If _\bj_\bo_\bb_\bs_\bp_\be_\bc is given, output is restricted to information about
+ that job. The return status is 0 unless an invalid option is
encountered or an invalid _\bj_\bo_\bb_\bs_\bp_\be_\bc is supplied.
If the -\b-x\bx option is supplied, j\bjo\bob\bbs\bs replaces any _\bj_\bo_\bb_\bs_\bp_\be_\bc found in
- _\bc_\bo_\bm_\bm_\ba_\bn_\bd or _\ba_\br_\bg_\bs with the corresponding process group ID, and
+ _\bc_\bo_\bm_\bm_\ba_\bn_\bd or _\ba_\br_\bg_\bs with the corresponding process group ID, and
executes _\bc_\bo_\bm_\bm_\ba_\bn_\bd passing it _\ba_\br_\bg_\bs, returning its exit status.
k\bki\bil\bll\bl [-\b-s\bs _\bs_\bi_\bg_\bs_\bp_\be_\bc | -\b-n\bn _\bs_\bi_\bg_\bn_\bu_\bm | -\b-_\bs_\bi_\bg_\bs_\bp_\be_\bc] [_\bp_\bi_\bd | _\bj_\bo_\bb_\bs_\bp_\be_\bc] ...
k\bki\bil\bll\bl -\b-l\bl [_\bs_\bi_\bg_\bs_\bp_\be_\bc | _\be_\bx_\bi_\bt_\b__\bs_\bt_\ba_\bt_\bu_\bs]
- Send the signal named by _\bs_\bi_\bg_\bs_\bp_\be_\bc or _\bs_\bi_\bg_\bn_\bu_\bm to the processes
- named by _\bp_\bi_\bd or _\bj_\bo_\bb_\bs_\bp_\be_\bc. _\bs_\bi_\bg_\bs_\bp_\be_\bc is either a case-insensitive
- signal name such as S\bSI\bIG\bGK\bKI\bIL\bLL\bL (with or without the S\bSI\bIG\bG prefix) or
- a signal number; _\bs_\bi_\bg_\bn_\bu_\bm is a signal number. If _\bs_\bi_\bg_\bs_\bp_\be_\bc is not
- present, then S\bSI\bIG\bGT\bTE\bER\bRM\bM is assumed. An argument of -\b-l\bl lists the
- signal names. If any arguments are supplied when -\b-l\bl is given,
- the names of the signals corresponding to the arguments are
+ Send the signal named by _\bs_\bi_\bg_\bs_\bp_\be_\bc or _\bs_\bi_\bg_\bn_\bu_\bm to the processes
+ named by _\bp_\bi_\bd or _\bj_\bo_\bb_\bs_\bp_\be_\bc. _\bs_\bi_\bg_\bs_\bp_\be_\bc is either a case-insensitive
+ signal name such as S\bSI\bIG\bGK\bKI\bIL\bLL\bL (with or without the S\bSI\bIG\bG prefix) or
+ a signal number; _\bs_\bi_\bg_\bn_\bu_\bm is a signal number. If _\bs_\bi_\bg_\bs_\bp_\be_\bc is not
+ present, then S\bSI\bIG\bGT\bTE\bER\bRM\bM is assumed. An argument of -\b-l\bl lists the
+ signal names. If any arguments are supplied when -\b-l\bl is given,
+ the names of the signals corresponding to the arguments are
listed, and the return status is 0. The _\be_\bx_\bi_\bt_\b__\bs_\bt_\ba_\bt_\bu_\bs argument to
- -\b-l\bl is a number specifying either a signal number or the exit
- status of a process terminated by a signal. k\bki\bil\bll\bl returns true
- if at least one signal was successfully sent, or false if an
+ -\b-l\bl is a number specifying either a signal number or the exit
+ status of a process terminated by a signal. k\bki\bil\bll\bl returns true
+ if at least one signal was successfully sent, or false if an
error occurs or an invalid option is encountered.
l\ble\bet\bt _\ba_\br_\bg [_\ba_\br_\bg ...]
Each _\ba_\br_\bg is an arithmetic expression to be evaluated (see A\bAR\bRI\bIT\bTH\bH-\b-
- M\bME\bET\bTI\bIC\bC E\bEV\bVA\bAL\bLU\bUA\bAT\bTI\bIO\bON\bN above). If the last _\ba_\br_\bg evaluates to 0, l\ble\bet\bt
+ M\bME\bET\bTI\bIC\bC E\bEV\bVA\bAL\bLU\bUA\bAT\bTI\bIO\bON\bN above). If the last _\ba_\br_\bg evaluates to 0, l\ble\bet\bt
returns 1; 0 is returned otherwise.
l\blo\boc\bca\bal\bl [_\bo_\bp_\bt_\bi_\bo_\bn] [_\bn_\ba_\bm_\be[=_\bv_\ba_\bl_\bu_\be] ...]
- For each argument, a local variable named _\bn_\ba_\bm_\be is created, and
- assigned _\bv_\ba_\bl_\bu_\be. The _\bo_\bp_\bt_\bi_\bo_\bn can be any of the options accepted
+ For each argument, a local variable named _\bn_\ba_\bm_\be is created, and
+ assigned _\bv_\ba_\bl_\bu_\be. The _\bo_\bp_\bt_\bi_\bo_\bn can be any of the options accepted
by d\bde\bec\bcl\bla\bar\bre\be. When l\blo\boc\bca\bal\bl is used within a function, it causes the
- variable _\bn_\ba_\bm_\be to have a visible scope restricted to that func-
+ variable _\bn_\ba_\bm_\be to have a visible scope restricted to that func-
tion and its children. With no operands, l\blo\boc\bca\bal\bl writes a list of
- local variables to the standard output. It is an error to use
+ local variables to the standard output. It is an error to use
l\blo\boc\bca\bal\bl when not within a function. The return status is 0 unless
- l\blo\boc\bca\bal\bl is used outside a function, an invalid _\bn_\ba_\bm_\be is supplied,
+ l\blo\boc\bca\bal\bl is used outside a function, an invalid _\bn_\ba_\bm_\be is supplied,
or _\bn_\ba_\bm_\be is a readonly variable.
l\blo\bog\bgo\bou\but\bt Exit a login shell.
- m\bma\bap\bpf\bfi\bil\ble\be [-\b-n\bn _\bc_\bo_\bu_\bn_\bt] [-\b-O\bO _\bo_\br_\bi_\bg_\bi_\bn] [-\b-s\bs _\bc_\bo_\bu_\bn_\bt] [-\b-t\bt] [-\b-u\bu _\bf_\bd] [-\b-C\bC _\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk]
+ m\bma\bap\bpf\bfi\bil\ble\be [-\b-n\bn _\bc_\bo_\bu_\bn_\bt] [-\b-O\bO _\bo_\br_\bi_\bg_\bi_\bn] [-\b-s\bs _\bc_\bo_\bu_\bn_\bt] [-\b-t\bt] [-\b-u\bu _\bf_\bd] [-\b-C\bC _\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk]
[-\b-c\bc _\bq_\bu_\ba_\bn_\bt_\bu_\bm] [_\ba_\br_\br_\ba_\by]
- r\bre\bea\bad\bda\bar\brr\bra\bay\by [-\b-n\bn _\bc_\bo_\bu_\bn_\bt] [-\b-O\bO _\bo_\br_\bi_\bg_\bi_\bn] [-\b-s\bs _\bc_\bo_\bu_\bn_\bt] [-\b-t\bt] [-\b-u\bu _\bf_\bd] [-\b-C\bC _\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk]
+ r\bre\bea\bad\bda\bar\brr\bra\bay\by [-\b-n\bn _\bc_\bo_\bu_\bn_\bt] [-\b-O\bO _\bo_\br_\bi_\bg_\bi_\bn] [-\b-s\bs _\bc_\bo_\bu_\bn_\bt] [-\b-t\bt] [-\b-u\bu _\bf_\bd] [-\b-C\bC _\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk]
[-\b-c\bc _\bq_\bu_\ba_\bn_\bt_\bu_\bm] [_\ba_\br_\br_\ba_\by]
- Read lines from the standard input into the indexed array vari-
- able _\ba_\br_\br_\ba_\by, or from file descriptor _\bf_\bd if the -\b-u\bu option is sup-
- plied. The variable M\bMA\bAP\bPF\bFI\bIL\bLE\bE is the default _\ba_\br_\br_\ba_\by. Options, if
+ Read lines from the standard input into the indexed array vari-
+ able _\ba_\br_\br_\ba_\by, or from file descriptor _\bf_\bd if the -\b-u\bu option is sup-
+ plied. The variable M\bMA\bAP\bPF\bFI\bIL\bLE\bE is the default _\ba_\br_\br_\ba_\by. Options, if
supplied, have the following meanings:
- -\b-n\bn Copy at most _\bc_\bo_\bu_\bn_\bt lines. If _\bc_\bo_\bu_\bn_\bt is 0, all lines are
+ -\b-n\bn Copy at most _\bc_\bo_\bu_\bn_\bt lines. If _\bc_\bo_\bu_\bn_\bt is 0, all lines are
copied.
- -\b-O\bO Begin assigning to _\ba_\br_\br_\ba_\by at index _\bo_\br_\bi_\bg_\bi_\bn. The default
+ -\b-O\bO Begin assigning to _\ba_\br_\br_\ba_\by at index _\bo_\br_\bi_\bg_\bi_\bn. The default
index is 0.
-\b-s\bs Discard the first _\bc_\bo_\bu_\bn_\bt lines read.
-\b-t\bt Remove a trailing newline from each line read.
- -\b-u\bu Read lines from file descriptor _\bf_\bd instead of the stan-
+ -\b-u\bu Read lines from file descriptor _\bf_\bd instead of the stan-
dard input.
- -\b-C\bC Evaluate _\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk each time _\bq_\bu_\ba_\bn_\bt_\bu_\bm lines are read. The
+ -\b-C\bC Evaluate _\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk each time _\bq_\bu_\ba_\bn_\bt_\bu_\bm lines are read. The
-\b-c\bc option specifies _\bq_\bu_\ba_\bn_\bt_\bu_\bm.
- -\b-c\bc Specify the number of lines read between each call to
+ -\b-c\bc Specify the number of lines read between each call to
_\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk.
- If -\b-C\bC is specified without -\b-c\bc, the default quantum is 5000.
+ If -\b-C\bC is specified without -\b-c\bc, the default quantum is 5000.
When _\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk is evaluated, it is supplied the index of the next
- array element to be assigned as an additional argument. _\bc_\ba_\bl_\bl_\b-
- _\bb_\ba_\bc_\bk is evaluated after the line is read but before the array
- element is assigned.
+ array element to be assigned and the line to be assigned to that
+ element as additional arguments. _\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk is evaluated after
+ the line is read but before the array element is assigned.
- If not supplied with an explicit origin, m\bma\bap\bpf\bfi\bil\ble\be will clear
+ If not supplied with an explicit origin, m\bma\bap\bpf\bfi\bil\ble\be will clear
_\ba_\br_\br_\ba_\by before assigning to it.
- m\bma\bap\bpf\bfi\bil\ble\be returns successfully unless an invalid option or option
- argument is supplied, _\ba_\br_\br_\ba_\by is invalid or unassignable, or if
+ m\bma\bap\bpf\bfi\bil\ble\be returns successfully unless an invalid option or option
+ argument is supplied, _\ba_\br_\br_\ba_\by is invalid or unassignable, or if
_\ba_\br_\br_\ba_\by is not an indexed array.
p\bpo\bop\bpd\bd [-n\bn] [+_\bn] [-_\bn]
- Removes entries from the directory stack. With no arguments,
- removes the top directory from the stack, and performs a c\bcd\bd to
+ Removes entries from the directory stack. With no arguments,
+ removes the top directory from the stack, and performs a c\bcd\bd to
the new top directory. Arguments, if supplied, have the follow-
ing meanings:
- -\b-n\bn Suppresses the normal change of directory when removing
- directories from the stack, so that only the stack is
+ -\b-n\bn Suppresses the normal change of directory when removing
+ directories from the stack, so that only the stack is
manipulated.
- +\b+_\bn Removes the _\bnth entry counting from the left of the list
- shown by d\bdi\bir\brs\bs, starting with zero. For example: ``popd
+ +\b+_\bn Removes the _\bnth entry counting from the left of the list
+ shown by d\bdi\bir\brs\bs, starting with zero. For example: ``popd
+0'' removes the first directory, ``popd +1'' the second.
-\b-_\bn Removes the _\bnth entry counting from the right of the list
- shown by d\bdi\bir\brs\bs, starting with zero. For example: ``popd
- -0'' removes the last directory, ``popd -1'' the next to
+ shown by d\bdi\bir\brs\bs, starting with zero. For example: ``popd
+ -0'' removes the last directory, ``popd -1'' the next to
last.
- If the p\bpo\bop\bpd\bd command is successful, a d\bdi\bir\brs\bs is performed as well,
- and the return status is 0. p\bpo\bop\bpd\bd returns false if an invalid
+ If the p\bpo\bop\bpd\bd command is successful, a d\bdi\bir\brs\bs is performed as well,
+ and the return status is 0. p\bpo\bop\bpd\bd returns false if an invalid
option is encountered, the directory stack is empty, a non-exis-
tent directory stack entry is specified, or the directory change
fails.
p\bpr\bri\bin\bnt\btf\bf [-\b-v\bv _\bv_\ba_\br] _\bf_\bo_\br_\bm_\ba_\bt [_\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs]
- Write the formatted _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs to the standard output under the
- control of the _\bf_\bo_\br_\bm_\ba_\bt. The _\bf_\bo_\br_\bm_\ba_\bt is a character string which
- contains three types of objects: plain characters, which are
- simply copied to standard output, character escape sequences,
- which are converted and copied to the standard output, and for-
- mat specifications, each of which causes printing of the next
- successive _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt. In addition to the standard _\bp_\br_\bi_\bn_\bt_\bf(1) for-
- mats, %\b%b\bb causes p\bpr\bri\bin\bnt\btf\bf to expand backslash escape sequences in
- the corresponding _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt (except that \\b\c\bc terminates output,
- backslashes in \\b\'\b', \\b\"\b", and \\b\?\b? are not removed, and octal escapes
- beginning with \\b\0\b0 may contain up to four digits), and %\b%q\bq causes
- p\bpr\bri\bin\bnt\btf\bf to output the corresponding _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt in a format that can
- be reused as shell input.
-
- The -\b-v\bv option causes the output to be assigned to the variable
- _\bv_\ba_\br rather than being printed to the standard output.
+ Write the formatted _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs to the standard output under the
+ control of the _\bf_\bo_\br_\bm_\ba_\bt. The -\b-v\bv option causes the output to be
+ assigned to the variable _\bv_\ba_\br rather than being printed to the
+ standard output.
+
+ The _\bf_\bo_\br_\bm_\ba_\bt is a character string which contains three types of
+ objects: plain characters, which are simply copied to standard
+ output, character escape sequences, which are converted and
+ copied to the standard output, and format specifications, each
+ of which causes printing of the next successive _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt. In
+ addition to the standard _\bp_\br_\bi_\bn_\bt_\bf(1) format specifications, p\bpr\bri\bin\bnt\btf\bf
+ interprets the following extensions:
+ %\b%b\bb causes p\bpr\bri\bin\bnt\btf\bf to expand backslash escape sequences in the
+ corresponding _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt (except that \\b\c\bc terminates output,
+ backslashes in \\b\'\b', \\b\"\b", and \\b\?\b? are not removed, and octal
+ escapes beginning with \\b\0\b0 may contain up to four digits).
+ %\b%q\bq causes p\bpr\bri\bin\bnt\btf\bf to output the corresponding _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt in a
+ format that can be reused as shell input.
+ %\b%(\b(_\bd_\ba_\bt_\be_\bf_\bm_\bt)\b)T\bT
+ causes p\bpr\bri\bin\bnt\btf\bf to output the date-time string resulting
+ from using _\bd_\ba_\bt_\be_\bf_\bm_\bt as a format string for _\bs_\bt_\br_\bf_\bt_\bi_\bm_\be(3).
+ The corresponding _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt is an integer representing the
+ number of seconds since the epoch. Two special argument
+ values may be used: -1 represents the current time, and
+ -2 represents the time the shell was invoked.
+
+ Arguments to non-string format specifiers are treated as C con-
+ stants, except that a leading plus or minus sign is allowed, and
+ if the leading character is a single or double quote, the value
+ is the ASCII value of the following character.
The _\bf_\bo_\br_\bm_\ba_\bt is reused as necessary to consume all of the _\ba_\br_\bg_\bu_\b-
_\bm_\be_\bn_\bt_\bs. If the _\bf_\bo_\br_\bm_\ba_\bt requires more _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs than are supplied,
status is false. Any command associated with the R\bRE\bET\bTU\bUR\bRN\bN trap is
executed before execution resumes after the function or script.
- s\bse\bet\bt [-\b--\b-a\bab\bbe\bef\bfh\bhk\bkm\bmn\bnp\bpt\btu\buv\bvx\bxB\bBC\bCE\bEH\bHP\bPT\bT] [-\b-o\bo _\bo_\bp_\bt_\bi_\bo_\bn] [_\ba_\br_\bg ...]
- s\bse\bet\bt [+\b+a\bab\bbe\bef\bfh\bhk\bkm\bmn\bnp\bpt\btu\buv\bvx\bxB\bBC\bCE\bEH\bHP\bPT\bT] [+\b+o\bo _\bo_\bp_\bt_\bi_\bo_\bn] [_\ba_\br_\bg ...]
+ s\bse\bet\bt [-\b--\b-a\bab\bbe\bef\bfh\bhk\bkm\bmn\bnp\bpt\btu\buv\bvx\bxB\bBC\bCE\bEH\bHP\bPT\bT] [-\b-o\bo _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be] [_\ba_\br_\bg ...]
+ s\bse\bet\bt [+\b+a\bab\bbe\bef\bfh\bhk\bkm\bmn\bnp\bpt\btu\buv\bvx\bxB\bBC\bCE\bEH\bHP\bPT\bT] [+\b+o\bo _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be] [_\ba_\br_\bg ...]
Without options, the name and value of each shell variable are
displayed in a format that can be reused as input for setting or
resetting the currently-set variables. Read-only variables can-
easy re-editing of multi-line commands.
c\bco\bom\bmp\bpa\bat\bt3\b31\b1
If set, b\bba\bas\bsh\bh changes its behavior to that of version 3.1
- with respect to quoted arguments to the conditional com-
- mand's =~ operator.
+ with respect to quoted arguments to the [\b[[\b[ conditional
+ command's =\b=~\b~ operator.
c\bco\bom\bmp\bpa\bat\bt3\b32\b2
If set, b\bba\bas\bsh\bh changes its behavior to that of version 3.2
with respect to locale-specific string comparison when
- using the conditional command's < and > operators.
+ using the [\b[[\b[ conditional command's <\b< and >\b> operators.
+ Bash versions prior to bash-4.1 use ASCII collation and
+ _\bs_\bt_\br_\bc_\bm_\bp(3); bash-4.1 and later use the current locale's
+ collation sequence and _\bs_\bt_\br_\bc_\bo_\bl_\bl(3).
c\bco\bom\bmp\bpa\bat\bt4\b40\b0
If set, b\bba\bas\bsh\bh changes its behavior to that of version 4.0
- with respect to locale-specific string comparison when
- using the conditional command's < and > operators and
- the effect of interrupting a command list.
+ with respect to locale-specific string comparison when
+ using the [\b[[\b[ conditional command's <\b< and >\b> operators
+ (see previous item) and the effect of interrupting a
+ command list.
+ c\bco\bom\bmp\bpa\bat\bt4\b41\b1
+ @item compat41 If set, b\bba\bas\bsh\bh, when in posix mode, treats
+ a single quote in a double-quoted parameter expansion as
+ a special character. The single quotes must match (an
+ even number) and the characters between the single
+ quotes are considered quoted. This is the behavior of
+ posix mode through version 4.1. The default bash behav-
+ ior remains as in previous versions.
d\bdi\bir\brs\bsp\bpe\bel\bll\bl
If set, b\bba\bas\bsh\bh attempts spelling correction on directory
names during word completion if the directory name ini-
(\b( _\bc_\bo_\bm_\bm_\ba_\bn_\bd )\b) inherit the D\bDE\bEB\bBU\bUG\bG and R\bRE\bET\bTU\bUR\bRN\bN traps.
6\b6.\b. Error tracing is enabled: command substitution,
shell functions, and subshells invoked with (\b(
- _\bc_\bo_\bm_\bm_\ba_\bn_\bd )\b) inherit the E\bER\bRR\bRO\bOR\bR trap.
+ _\bc_\bo_\bm_\bm_\ba_\bn_\bd )\b) inherit the E\bER\bRR\bR trap.
e\bex\bxt\btg\bgl\blo\bob\bb If set, the extended pattern matching features described
above under P\bPa\bat\bth\bhn\bna\bam\bme\be E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn are enabled.
e\bex\bxt\btq\bqu\buo\bot\bte\be
and all remaining characters on that line to be ignored
in an interactive shell (see C\bCO\bOM\bMM\bME\bEN\bNT\bTS\bS above). This
option is enabled by default.
+ l\bla\bas\bst\btp\bpi\bip\bpe\be
+ If set, and job control is not active, the shell runs
+ the last command of a pipeline not executed in the back-
+ ground in the current shell environment.
l\bli\bit\bth\bhi\bis\bst\bt If set, and the c\bcm\bmd\bdh\bhi\bis\bst\bt option is enabled, multi-line
commands are saved to the history with embedded newlines
rather than using semicolon separators where possible.
Expressions may be combined using the following operators,
listed in decreasing order of precedence. The evaluation
- depends on the number of arguments; see below.
+ depends on the number of arguments; see below. Operator prece-
+ dence is used when there are five or more arguments.
!\b! _\be_\bx_\bp_\br True if _\be_\bx_\bp_\br is false.
(\b( _\be_\bx_\bp_\br )\b)
- Returns the value of _\be_\bx_\bp_\br. This may be used to override
+ Returns the value of _\be_\bx_\bp_\br. This may be used to override
the normal precedence of operators.
_\be_\bx_\bp_\br_\b1 -a\ba _\be_\bx_\bp_\br_\b2
True if both _\be_\bx_\bp_\br_\b1 and _\be_\bx_\bp_\br_\b2 are true.
null.
2 arguments
If the first argument is !\b!, the expression is true if and
- only if the second argument is null. If the first argu-
- ment is one of the unary conditional operators listed
- above under C\bCO\bON\bND\bDI\bIT\bTI\bIO\bON\bNA\bAL\bL E\bEX\bXP\bPR\bRE\bES\bSS\bSI\bIO\bON\bNS\bS, the expression is
+ only if the second argument is null. If the first argu-
+ ment is one of the unary conditional operators listed
+ above under C\bCO\bON\bND\bDI\bIT\bTI\bIO\bON\bNA\bAL\bL E\bEX\bXP\bPR\bRE\bES\bSS\bSI\bIO\bON\bNS\bS, the expression is
true if the unary test is true. If the first argument is
not a valid unary conditional operator, the expression is
false.
3 arguments
+ The following conditions are applied in the order listed.
If the second argument is one of the binary conditional
operators listed above under C\bCO\bON\bND\bDI\bIT\bTI\bIO\bON\bNA\bAL\bL E\bEX\bXP\bPR\bRE\bES\bSS\bSI\bIO\bON\bNS\bS, the
result of the expression is the result of the binary test
The expression is parsed and evaluated according to
precedence using the rules listed above.
- t\bti\bim\bme\bes\bs Print the accumulated user and system times for the shell and
+ When used with t\bte\bes\bst\bt or [\b[, the <\b< and >\b> operators sort lexico-
+ graphically using ASCII ordering.
+
+ t\bti\bim\bme\bes\bs Print the accumulated user and system times for the shell and
for processes run from the shell. The return status is 0.
t\btr\bra\bap\bp [-\b-l\blp\bp] [[_\ba_\br_\bg] _\bs_\bi_\bg_\bs_\bp_\be_\bc ...]
- The command _\ba_\br_\bg is to be read and executed when the shell
- receives signal(s) _\bs_\bi_\bg_\bs_\bp_\be_\bc. If _\ba_\br_\bg is absent (and there is a
- single _\bs_\bi_\bg_\bs_\bp_\be_\bc) or -\b-, each specified signal is reset to its
- original disposition (the value it had upon entrance to the
- shell). If _\ba_\br_\bg is the null string the signal specified by each
- _\bs_\bi_\bg_\bs_\bp_\be_\bc is ignored by the shell and by the commands it invokes.
- If _\ba_\br_\bg is not present and -\b-p\bp has been supplied, then the trap
- commands associated with each _\bs_\bi_\bg_\bs_\bp_\be_\bc are displayed. If no
- arguments are supplied or if only -\b-p\bp is given, t\btr\bra\bap\bp prints the
- list of commands associated with each signal. The -\b-l\bl option
- causes the shell to print a list of signal names and their cor-
- responding numbers. Each _\bs_\bi_\bg_\bs_\bp_\be_\bc is either a signal name
- defined in <_\bs_\bi_\bg_\bn_\ba_\bl_\b._\bh>, or a signal number. Signal names are
- case insensitive and the SIG prefix is optional.
-
- If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is E\bEX\bXI\bIT\bT (0) the command _\ba_\br_\bg is executed on exit
- from the shell. If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is D\bDE\bEB\bBU\bUG\bG, the command _\ba_\br_\bg is exe-
- cuted before every _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd, _\bf_\bo_\br command, _\bc_\ba_\bs_\be command,
- _\bs_\be_\bl_\be_\bc_\bt command, every arithmetic _\bf_\bo_\br command, and before the
- first command executes in a shell function (see S\bSH\bHE\bEL\bLL\bL G\bGR\bRA\bAM\bMM\bMA\bAR\bR
- above). Refer to the description of the e\bex\bxt\btd\bde\beb\bbu\bug\bg option to the
+ The command _\ba_\br_\bg is to be read and executed when the shell
+ receives signal(s) _\bs_\bi_\bg_\bs_\bp_\be_\bc. If _\ba_\br_\bg is absent (and there is a
+ single _\bs_\bi_\bg_\bs_\bp_\be_\bc) or -\b-, each specified signal is reset to its
+ original disposition (the value it had upon entrance to the
+ shell). If _\ba_\br_\bg is the null string the signal specified by each
+ _\bs_\bi_\bg_\bs_\bp_\be_\bc is ignored by the shell and by the commands it invokes.
+ If _\ba_\br_\bg is not present and -\b-p\bp has been supplied, then the trap
+ commands associated with each _\bs_\bi_\bg_\bs_\bp_\be_\bc are displayed. If no
+ arguments are supplied or if only -\b-p\bp is given, t\btr\bra\bap\bp prints the
+ list of commands associated with each signal. The -\b-l\bl option
+ causes the shell to print a list of signal names and their cor-
+ responding numbers. Each _\bs_\bi_\bg_\bs_\bp_\be_\bc is either a signal name
+ defined in <_\bs_\bi_\bg_\bn_\ba_\bl_\b._\bh>, or a signal number. Signal names are
+ case insensitive and the S\bSI\bIG\bG prefix is optional.
+
+ If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is E\bEX\bXI\bIT\bT (0) the command _\ba_\br_\bg is executed on exit
+ from the shell. If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is D\bDE\bEB\bBU\bUG\bG, the command _\ba_\br_\bg is exe-
+ cuted before every _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd, _\bf_\bo_\br command, _\bc_\ba_\bs_\be command,
+ _\bs_\be_\bl_\be_\bc_\bt command, every arithmetic _\bf_\bo_\br command, and before the
+ first command executes in a shell function (see S\bSH\bHE\bEL\bLL\bL G\bGR\bRA\bAM\bMM\bMA\bAR\bR
+ above). Refer to the description of the e\bex\bxt\btd\bde\beb\bbu\bug\bg option to the
s\bsh\bho\bop\bpt\bt builtin for details of its effect on the D\bDE\bEB\bBU\bUG\bG trap. If a
_\bs_\bi_\bg_\bs_\bp_\be_\bc is R\bRE\bET\bTU\bUR\bRN\bN, the command _\ba_\br_\bg is executed each time a shell
function or a script executed with the .\b. or s\bso\bou\bur\brc\bce\be builtins fin-
If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is E\bER\bRR\bR, the command _\ba_\br_\bg is executed whenever a sim-
ple command has a non-zero exit status, subject to the following
- conditions. The E\bER\bRR\bR trap is not executed if the failed command
- is part of the command list immediately following a w\bwh\bhi\bil\ble\be or
- u\bun\bnt\bti\bil\bl keyword, part of the test in an _\bi_\bf statement, part of a
- command executed in a &\b&&\b& or |\b||\b| list, or if the command's return
- value is being inverted via !\b!. These are the same conditions
+ conditions. The E\bER\bRR\bR trap is not executed if the failed command
+ is part of the command list immediately following a w\bwh\bhi\bil\ble\be or
+ u\bun\bnt\bti\bil\bl keyword, part of the test in an _\bi_\bf statement, part of a
+ command executed in a &\b&&\b& or |\b||\b| list, or if the command's return
+ value is being inverted via !\b!. These are the same conditions
obeyed by the e\ber\brr\bre\bex\bxi\bit\bt option.
- Signals ignored upon entry to the shell cannot be trapped or
- reset. Trapped signals that are not being ignored are reset to
+ Signals ignored upon entry to the shell cannot be trapped or
+ reset. Trapped signals that are not being ignored are reset to
their original values in a subshell or subshell environment when
- one is created. The return status is false if any _\bs_\bi_\bg_\bs_\bp_\be_\bc is
+ one is created. The return status is false if any _\bs_\bi_\bg_\bs_\bp_\be_\bc is
invalid; otherwise t\btr\bra\bap\bp returns true.
t\bty\byp\bpe\be [-\b-a\baf\bft\btp\bpP\bP] _\bn_\ba_\bm_\be [_\bn_\ba_\bm_\be ...]
- With no options, indicate how each _\bn_\ba_\bm_\be would be interpreted if
+ With no options, indicate how each _\bn_\ba_\bm_\be would be interpreted if
used as a command name. If the -\b-t\bt option is used, t\bty\byp\bpe\be prints a
- string which is one of _\ba_\bl_\bi_\ba_\bs, _\bk_\be_\by_\bw_\bo_\br_\bd, _\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn, _\bb_\bu_\bi_\bl_\bt_\bi_\bn, or
- _\bf_\bi_\bl_\be if _\bn_\ba_\bm_\be is an alias, shell reserved word, function,
- builtin, or disk file, respectively. If the _\bn_\ba_\bm_\be is not found,
- then nothing is printed, and an exit status of false is
- returned. If the -\b-p\bp option is used, t\bty\byp\bpe\be either returns the
+ string which is one of _\ba_\bl_\bi_\ba_\bs, _\bk_\be_\by_\bw_\bo_\br_\bd, _\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn, _\bb_\bu_\bi_\bl_\bt_\bi_\bn, or
+ _\bf_\bi_\bl_\be if _\bn_\ba_\bm_\be is an alias, shell reserved word, function,
+ builtin, or disk file, respectively. If the _\bn_\ba_\bm_\be is not found,
+ then nothing is printed, and an exit status of false is
+ returned. If the -\b-p\bp option is used, t\bty\byp\bpe\be either returns the
name of the disk file that would be executed if _\bn_\ba_\bm_\be were speci-
fied as a command name, or nothing if ``type -t name'' would not
- return _\bf_\bi_\bl_\be. The -\b-P\bP option forces a P\bPA\bAT\bTH\bH search for each _\bn_\ba_\bm_\be,
+ return _\bf_\bi_\bl_\be. The -\b-P\bP option forces a P\bPA\bAT\bTH\bH search for each _\bn_\ba_\bm_\be,
even if ``type -t name'' would not return _\bf_\bi_\bl_\be. If a command is
- hashed, -\b-p\bp and -\b-P\bP print the hashed value, not necessarily the
+ hashed, -\b-p\bp and -\b-P\bP print the hashed value, not necessarily the
file that appears first in P\bPA\bAT\bTH\bH. If the -\b-a\ba option is used, t\bty\byp\bpe\be
- prints all of the places that contain an executable named _\bn_\ba_\bm_\be.
- This includes aliases and functions, if and only if the -\b-p\bp
- option is not also used. The table of hashed commands is not
- consulted when using -\b-a\ba. The -\b-f\bf option suppresses shell func-
- tion lookup, as with the c\bco\bom\bmm\bma\ban\bnd\bd builtin. t\bty\byp\bpe\be returns true if
+ prints all of the places that contain an executable named _\bn_\ba_\bm_\be.
+ This includes aliases and functions, if and only if the -\b-p\bp
+ option is not also used. The table of hashed commands is not
+ consulted when using -\b-a\ba. The -\b-f\bf option suppresses shell func-
+ tion lookup, as with the c\bco\bom\bmm\bma\ban\bnd\bd builtin. t\bty\byp\bpe\be returns true if
all of the arguments are found, false if any are not found.
u\bul\bli\bim\bmi\bit\bt [-\b-H\bHS\bST\bTa\bab\bbc\bcd\bde\bef\bfi\bil\blm\bmn\bnp\bpq\bqr\brs\bst\btu\buv\bvx\bx [_\bl_\bi_\bm_\bi_\bt]]
- Provides control over the resources available to the shell and
- to processes started by it, on systems that allow such control.
+ Provides control over the resources available to the shell and
+ to processes started by it, on systems that allow such control.
The -\b-H\bH and -\b-S\bS options specify that the hard or soft limit is set
- for the given resource. A hard limit cannot be increased by a
- non-root user once it is set; a soft limit may be increased up
- to the value of the hard limit. If neither -\b-H\bH nor -\b-S\bS is speci-
+ for the given resource. A hard limit cannot be increased by a
+ non-root user once it is set; a soft limit may be increased up
+ to the value of the hard limit. If neither -\b-H\bH nor -\b-S\bS is speci-
fied, both the soft and hard limits are set. The value of _\bl_\bi_\bm_\bi_\bt
can be a number in the unit specified for the resource or one of
the special values h\bha\bar\brd\bd, s\bso\bof\bft\bt, or u\bun\bnl\bli\bim\bmi\bit\bte\bed\bd, which stand for the
- current hard limit, the current soft limit, and no limit,
- respectively. If _\bl_\bi_\bm_\bi_\bt is omitted, the current value of the
- soft limit of the resource is printed, unless the -\b-H\bH option is
+ current hard limit, the current soft limit, and no limit,
+ respectively. If _\bl_\bi_\bm_\bi_\bt is omitted, the current value of the
+ soft limit of the resource is printed, unless the -\b-H\bH option is
given. When more than one resource is specified, the limit name
and unit are printed before the value. Other options are inter-
preted as follows:
-\b-c\bc The maximum size of core files created
-\b-d\bd The maximum size of a process's data segment
-\b-e\be The maximum scheduling priority ("nice")
- -\b-f\bf The maximum size of files written by the shell and its
+ -\b-f\bf The maximum size of files written by the shell and its
children
-\b-i\bi The maximum number of pending signals
-\b-l\bl The maximum size that may be locked into memory
- -\b-m\bm The maximum resident set size (many systems do not honor
+ -\b-m\bm The maximum resident set size (many systems do not honor
this limit)
-\b-n\bn The maximum number of open file descriptors (most systems
do not allow this value to be set)
-\b-r\br The maximum real-time scheduling priority
-\b-s\bs The maximum stack size
-\b-t\bt The maximum amount of cpu time in seconds
- -\b-u\bu The maximum number of processes available to a single
+ -\b-u\bu The maximum number of processes available to a single
user
- -\b-v\bv The maximum amount of virtual memory available to the
- shell
+ -\b-v\bv The maximum amount of virtual memory available to the
+ shell and, on some systems, to its children
-\b-x\bx The maximum number of file locks
-\b-T\bT The maximum number of threads
If _\bl_\bi_\bm_\bi_\bt is given, it is the new value of the specified resource
(the -\b-a\ba option is display only). If no option is given, then -\b-f\bf
- is assumed. Values are in 1024-byte increments, except for -\b-t\bt,
- which is in seconds, -\b-p\bp, which is in units of 512-byte blocks,
- and -\b-T\bT, -\b-b\bb, -\b-n\bn, and -\b-u\bu, which are unscaled values. The return
+ is assumed. Values are in 1024-byte increments, except for -\b-t\bt,
+ which is in seconds, -\b-p\bp, which is in units of 512-byte blocks,
+ and -\b-T\bT, -\b-b\bb, -\b-n\bn, and -\b-u\bu, which are unscaled values. The return
status is 0 unless an invalid option or argument is supplied, or
an error occurs while setting a new limit.
u\bum\bma\bas\bsk\bk [-\b-p\bp] [-\b-S\bS] [_\bm_\bo_\bd_\be]
The user file-creation mask is set to _\bm_\bo_\bd_\be. If _\bm_\bo_\bd_\be begins with
- a digit, it is interpreted as an octal number; otherwise it is
- interpreted as a symbolic mode mask similar to that accepted by
- _\bc_\bh_\bm_\bo_\bd(1). If _\bm_\bo_\bd_\be is omitted, the current value of the mask is
- printed. The -\b-S\bS option causes the mask to be printed in sym-
- bolic form; the default output is an octal number. If the -\b-p\bp
+ a digit, it is interpreted as an octal number; otherwise it is
+ interpreted as a symbolic mode mask similar to that accepted by
+ _\bc_\bh_\bm_\bo_\bd(1). If _\bm_\bo_\bd_\be is omitted, the current value of the mask is
+ printed. The -\b-S\bS option causes the mask to be printed in sym-
+ bolic form; the default output is an octal number. If the -\b-p\bp
option is supplied, and _\bm_\bo_\bd_\be is omitted, the output is in a form
that may be reused as input. The return status is 0 if the mode
- was successfully changed or if no _\bm_\bo_\bd_\be argument was supplied,
+ was successfully changed or if no _\bm_\bo_\bd_\be argument was supplied,
and false otherwise.
u\bun\bna\bal\bli\bia\bas\bs [-a\ba] [_\bn_\ba_\bm_\be ...]
- Remove each _\bn_\ba_\bm_\be from the list of defined aliases. If -\b-a\ba is
- supplied, all alias definitions are removed. The return value
+ Remove each _\bn_\ba_\bm_\be from the list of defined aliases. If -\b-a\ba is
+ supplied, all alias definitions are removed. The return value
is true unless a supplied _\bn_\ba_\bm_\be is not a defined alias.
u\bun\bns\bse\bet\bt [-f\bfv\bv] [_\bn_\ba_\bm_\be ...]
- For each _\bn_\ba_\bm_\be, remove the corresponding variable or function.
+ For each _\bn_\ba_\bm_\be, remove the corresponding variable or function.
If no options are supplied, or the -\b-v\bv option is given, each _\bn_\ba_\bm_\be
- refers to a shell variable. Read-only variables may not be
- unset. If -\b-f\bf is specified, each _\bn_\ba_\bm_\be refers to a shell func-
- tion, and the function definition is removed. Each unset vari-
- able or function is removed from the environment passed to sub-
- sequent commands. If any of C\bCO\bOM\bMP\bP_\b_W\bWO\bOR\bRD\bDB\bBR\bRE\bEA\bAK\bKS\bS, R\bRA\bAN\bND\bDO\bOM\bM, S\bSE\bEC\bCO\bON\bND\bDS\bS,
- L\bLI\bIN\bNE\bEN\bNO\bO, H\bHI\bIS\bST\bTC\bCM\bMD\bD, F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE, G\bGR\bRO\bOU\bUP\bPS\bS, or D\bDI\bIR\bRS\bST\bTA\bAC\bCK\bK are unset, they
- lose their special properties, even if they are subsequently
+ refers to a shell variable. Read-only variables may not be
+ unset. If -\b-f\bf is specified, each _\bn_\ba_\bm_\be refers to a shell func-
+ tion, and the function definition is removed. Each unset vari-
+ able or function is removed from the environment passed to sub-
+ sequent commands. If any of C\bCO\bOM\bMP\bP_\b_W\bWO\bOR\bRD\bDB\bBR\bRE\bEA\bAK\bKS\bS, R\bRA\bAN\bND\bDO\bOM\bM, S\bSE\bEC\bCO\bON\bND\bDS\bS,
+ L\bLI\bIN\bNE\bEN\bNO\bO, H\bHI\bIS\bST\bTC\bCM\bMD\bD, F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE, G\bGR\bRO\bOU\bUP\bPS\bS, or D\bDI\bIR\bRS\bST\bTA\bAC\bCK\bK are unset, they
+ lose their special properties, even if they are subsequently
reset. The exit status is true unless a _\bn_\ba_\bm_\be is readonly.
w\bwa\bai\bit\bt [_\bn _\b._\b._\b.]
- Wait for each specified process and return its termination sta-
- tus. Each _\bn may be a process ID or a job specification; if a
- job spec is given, all processes in that job's pipeline are
- waited for. If _\bn is not given, all currently active child pro-
- cesses are waited for, and the return status is zero. If _\bn
- specifies a non-existent process or job, the return status is
- 127. Otherwise, the return status is the exit status of the
+ Wait for each specified process and return its termination sta-
+ tus. Each _\bn may be a process ID or a job specification; if a
+ job spec is given, all processes in that job's pipeline are
+ waited for. If _\bn is not given, all currently active child pro-
+ cesses are waited for, and the return status is zero. If _\bn
+ specifies a non-existent process or job, the return status is
+ 127. Otherwise, the return status is the exit status of the
last process or job waited for.
S\bSE\bEE\bE A\bAL\bLS\bSO\bO