No specific user configuration
[platform/upstream/bash.git] / doc / bash.0
1 BASH(1)                                                                BASH(1)
2
3
4
5 N\bNA\bAM\bME\bE
6        bash - GNU Bourne-Again SHell
7
8 S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
9        b\bba\bas\bsh\bh [options] [command_string | file]
10
11 C\bCO\bOP\bPY\bYR\bRI\bIG\bGH\bHT\bT
12        Bash is Copyright (C) 1989-2013 by the Free Software Foundation, Inc.
13
14 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
15        B\bBa\bas\bsh\bh  is  an  s\bsh\bh-compatible  command language interpreter that executes
16        commands read from the standard input or from a file.  B\bBa\bas\bsh\bh also incor-
17        porates useful features from the _\bK_\bo_\br_\bn and _\bC shells (k\bks\bsh\bh and c\bcs\bsh\bh).
18
19        B\bBa\bas\bsh\bh  is  intended  to  be a conformant implementation of the Shell and
20        Utilities portion  of  the  IEEE  POSIX  specification  (IEEE  Standard
21        1003.1).  B\bBa\bas\bsh\bh can be configured to be POSIX-conformant by default.
22
23 O\bOP\bPT\bTI\bIO\bON\bNS\bS
24        All  of  the  single-character shell options documented in the descrip-
25        tion of the s\bse\bet\bt builtin command can be used as options when  the  shell
26        is invoked.  In addition, b\bba\bas\bsh\bh interprets the following options when it
27        is invoked:
28
29        -\b-c\bc        If the -\b-c\bc option is present, then commands are read from  the
30                  first non-option argument _\bc_\bo_\bm_\bm_\ba_\bn_\bd_\b__\bs_\bt_\br_\bi_\bn_\bg.  If there are argu-
31                  ments after the _\bc_\bo_\bm_\bm_\ba_\bn_\bd_\b__\bs_\bt_\br_\bi_\bn_\bg,  they  are  assigned  to  the
32                  positional parameters, starting with $\b$0\b0.
33        -\b-i\bi        If the -\b-i\bi option is present, the shell is _\bi_\bn_\bt_\be_\br_\ba_\bc_\bt_\bi_\bv_\be.
34        -\b-l\bl        Make b\bba\bas\bsh\bh act as if it had been invoked as a login shell (see
35                  I\bIN\bNV\bVO\bOC\bCA\bAT\bTI\bIO\bON\bN below).
36        -\b-r\br        If the -\b-r\br option is present,  the  shell  becomes  _\br_\be_\bs_\bt_\br_\bi_\bc_\bt_\be_\bd
37                  (see R\bRE\bES\bST\bTR\bRI\bIC\bCT\bTE\bED\bD S\bSH\bHE\bEL\bLL\bL below).
38        -\b-s\bs        If  the -\b-s\bs option is present, or if no arguments remain after
39                  option processing, then commands are read from  the  standard
40                  input.   This  option  allows the positional parameters to be
41                  set when invoking an interactive shell.
42        -\b-D\bD        A list of all double-quoted strings preceded by $\b$ is  printed
43                  on  the standard output.  These are the strings that are sub-
44                  ject to language translation when the current locale is not C\bC
45                  or  P\bPO\bOS\bSI\bIX\bX.   This  implies the -\b-n\bn option; no commands will be
46                  executed.
47        [\b[-\b-+\b+]\b]O\bO [\b[_\bs_\bh_\bo_\bp_\bt_\b__\bo_\bp_\bt_\bi_\bo_\bn]\b]
48                  _\bs_\bh_\bo_\bp_\bt_\b__\bo_\bp_\bt_\bi_\bo_\bn is one of the  shell  options  accepted  by  the
49                  s\bsh\bho\bop\bpt\bt   builtin  (see  S\bSH\bHE\bEL\bLL\bL  B\bBU\bUI\bIL\bLT\bTI\bIN\bN  C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS  below).   If
50                  _\bs_\bh_\bo_\bp_\bt_\b__\bo_\bp_\bt_\bi_\bo_\bn is present, -\b-O\bO sets the value of that option; +\b+O\bO
51                  unsets  it.   If  _\bs_\bh_\bo_\bp_\bt_\b__\bo_\bp_\bt_\bi_\bo_\bn is not supplied, the names and
52                  values of the shell options accepted by s\bsh\bho\bop\bpt\bt are printed  on
53                  the  standard  output.   If  the invocation option is +\b+O\bO, the
54                  output is displayed in a format that may be reused as  input.
55        -\b--\b-        A  -\b--\b-  signals the end of options and disables further option
56                  processing.  Any arguments after the -\b--\b- are treated as  file-
57                  names and arguments.  An argument of -\b- is equivalent to -\b--\b-.
58
59        B\bBa\bas\bsh\bh  also  interprets  a  number  of  multi-character  options.  These
60        options must appear on the command  line  before  the  single-character
61        options to be recognized.
62
63        -\b--\b-d\bde\beb\bbu\bug\bgg\bge\ber\br
64               Arrange for the debugger profile to be executed before the shell
65               starts.  Turns on extended debugging mode (see  the  description
66               of the e\bex\bxt\btd\bde\beb\bbu\bug\bg option to the s\bsh\bho\bop\bpt\bt builtin below).
67        -\b--\b-d\bdu\bum\bmp\bp-\b-p\bpo\bo-\b-s\bst\btr\bri\bin\bng\bgs\bs
68               Equivalent  to -\b-D\bD, but the output is in the GNU _\bg_\be_\bt_\bt_\be_\bx_\bt p\bpo\bo (por-
69               table object) file format.
70        -\b--\b-d\bdu\bum\bmp\bp-\b-s\bst\btr\bri\bin\bng\bgs\bs
71               Equivalent to -\b-D\bD.
72        -\b--\b-h\bhe\bel\blp\bp Display a usage message on standard  output  and  exit  success-
73               fully.
74        -\b--\b-i\bin\bni\bit\bt-\b-f\bfi\bil\ble\be _\bf_\bi_\bl_\be
75        -\b--\b-r\brc\bcf\bfi\bil\ble\be _\bf_\bi_\bl_\be
76               Execute commands from _\bf_\bi_\bl_\be instead of the standard personal ini-
77               tialization file _\b~_\b/_\b._\bb_\ba_\bs_\bh_\br_\bc if  the  shell  is  interactive  (see
78               I\bIN\bNV\bVO\bOC\bCA\bAT\bTI\bIO\bON\bN below).
79
80        -\b--\b-l\blo\bog\bgi\bin\bn
81               Equivalent to -\b-l\bl.
82
83        -\b--\b-n\bno\boe\bed\bdi\bit\bti\bin\bng\bg
84               Do  not  use the GNU r\bre\bea\bad\bdl\bli\bin\bne\be library to read command lines when
85               the shell is interactive.
86
87        -\b--\b-n\bno\bop\bpr\bro\bof\bfi\bil\ble\be
88               Do not read either the system-wide startup file _\b/_\be_\bt_\bc_\b/_\bp_\br_\bo_\bf_\bi_\bl_\be  or
89               any   of  the  personal  initialization  files  _\b~_\b/_\b._\bb_\ba_\bs_\bh_\b__\bp_\br_\bo_\bf_\bi_\bl_\be,
90               _\b~_\b/_\b._\bb_\ba_\bs_\bh_\b__\bl_\bo_\bg_\bi_\bn, or _\b~_\b/_\b._\bp_\br_\bo_\bf_\bi_\bl_\be.   By  default,  b\bba\bas\bsh\bh  reads  these
91               files  when  it  is  invoked  as  a  login shell (see I\bIN\bNV\bVO\bOC\bCA\bAT\bTI\bIO\bON\bN
92               below).
93
94        -\b--\b-n\bno\bor\brc\bc Do  not  read  and  execute  the  personal  initialization  file
95               _\b~_\b/_\b._\bb_\ba_\bs_\bh_\br_\bc  if  the  shell  is interactive.  This option is on by
96               default if the shell is invoked as s\bsh\bh.
97
98        -\b--\b-p\bpo\bos\bsi\bix\bx
99               Change the behavior of b\bba\bas\bsh\bh where the default operation  differs
100               from the POSIX standard to match the standard (_\bp_\bo_\bs_\bi_\bx _\bm_\bo_\bd_\be).  See
101               S\bSE\bEE\bE A\bAL\bLS\bSO\bO below for a reference to a document  that  details  how
102               posix mode affects bash's behavior.
103
104        -\b--\b-r\bre\bes\bst\btr\bri\bic\bct\bte\bed\bd
105               The shell becomes restricted (see R\bRE\bES\bST\bTR\bRI\bIC\bCT\bTE\bED\bD S\bSH\bHE\bEL\bLL\bL below).
106
107        -\b--\b-v\bve\ber\brb\bbo\bos\bse\be
108               Equivalent to  -\b-v\bv.
109
110        -\b--\b-v\bve\ber\brs\bsi\bio\bon\bn
111               Show  version information for this instance of b\bba\bas\bsh\bh on the stan-
112               dard output and exit successfully.
113
114 A\bAR\bRG\bGU\bUM\bME\bEN\bNT\bTS\bS
115        If arguments remain after option processing, and neither the -\b-c\bc nor the
116        -\b-s\bs  option  has  been supplied, the first argument is assumed to be the
117        name of a file containing shell commands.  If b\bba\bas\bsh\bh is invoked  in  this
118        fashion,  $\b$0\b0 is set to the name of the file, and the positional parame-
119        ters are set to the remaining arguments.  B\bBa\bas\bsh\bh reads and executes  com-
120        mands  from this file, then exits.  B\bBa\bas\bsh\bh's exit status is the exit sta-
121        tus of the last command executed in the script.   If  no  commands  are
122        executed,  the  exit status is 0.  An attempt is first made to open the
123        file in the current directory, and, if no file is found, then the shell
124        searches the directories in P\bPA\bAT\bTH\bH for the script.
125
126 I\bIN\bNV\bVO\bOC\bCA\bAT\bTI\bIO\bON\bN
127        A  _\bl_\bo_\bg_\bi_\bn _\bs_\bh_\be_\bl_\bl is one whose first character of argument zero is a -\b-, or
128        one started with the -\b--\b-l\blo\bog\bgi\bin\bn option.
129
130        An _\bi_\bn_\bt_\be_\br_\ba_\bc_\bt_\bi_\bv_\be shell is one started without  non-option  arguments  and
131        without the -\b-c\bc option whose standard input and error are both connected
132        to terminals (as determined by _\bi_\bs_\ba_\bt_\bt_\by(3)), or one started with  the  -\b-i\bi
133        option.   P\bPS\bS1\b1 is set and $\b$-\b- includes i\bi if b\bba\bas\bsh\bh is interactive, allowing
134        a shell script or a startup file to test this state.
135
136        The following paragraphs describe how b\bba\bas\bsh\bh executes its startup  files.
137        If  any  of  the files exist but cannot be read, b\bba\bas\bsh\bh reports an error.
138        Tildes are expanded in filenames as described below under T\bTi\bil\bld\bde\be  E\bEx\bxp\bpa\ban\bn-\b-
139        s\bsi\bio\bon\bn in the E\bEX\bXP\bPA\bAN\bNS\bSI\bIO\bON\bN section.
140
141        When  b\bba\bas\bsh\bh is invoked as an interactive login shell, or as a non-inter-
142        active shell with the -\b--\b-l\blo\bog\bgi\bin\bn option, it first reads and executes  com-
143        mands  from  the file _\b/_\be_\bt_\bc_\b/_\bp_\br_\bo_\bf_\bi_\bl_\be, if that file exists.  After reading
144        that file, it looks for _\b~_\b/_\b._\bb_\ba_\bs_\bh_\b__\bp_\br_\bo_\bf_\bi_\bl_\be, _\b~_\b/_\b._\bb_\ba_\bs_\bh_\b__\bl_\bo_\bg_\bi_\bn, and _\b~_\b/_\b._\bp_\br_\bo_\bf_\bi_\bl_\be,
145        in  that order, and reads and executes commands from the first one that
146        exists and is readable.  The -\b--\b-n\bno\bop\bpr\bro\bof\bfi\bil\ble\be option may be  used  when  the
147        shell is started to inhibit this behavior.
148
149        When  a  login  shell  exits, b\bba\bas\bsh\bh reads and executes commands from the
150        file _\b~_\b/_\b._\bb_\ba_\bs_\bh_\b__\bl_\bo_\bg_\bo_\bu_\bt, if it exists.
151
152        When an interactive shell that is not a login shell  is  started,  b\bba\bas\bsh\bh
153        reads  and executes commands from _\b~_\b/_\b._\bb_\ba_\bs_\bh_\br_\bc, if that file exists.  This
154        may be inhibited by using the -\b--\b-n\bno\bor\brc\bc option.  The -\b--\b-r\brc\bcf\bfi\bil\ble\be _\bf_\bi_\bl_\be  option
155        will  force  b\bba\bas\bsh\bh  to  read  and  execute commands from _\bf_\bi_\bl_\be instead of
156        _\b~_\b/_\b._\bb_\ba_\bs_\bh_\br_\bc.
157
158        When b\bba\bas\bsh\bh is started non-interactively, to  run  a  shell  script,  for
159        example, it looks for the variable B\bBA\bAS\bSH\bH_\b_E\bEN\bNV\bV in the environment, expands
160        its value if it appears there, and uses the expanded value as the  name
161        of  a  file to read and execute.  B\bBa\bas\bsh\bh behaves as if the following com-
162        mand were executed:
163               if [ -n "$BASH_ENV" ]; then . "$BASH_ENV"; fi
164        but the value of the P\bPA\bAT\bTH\bH variable is not used to search for the  file-
165        name.
166
167        If  b\bba\bas\bsh\bh  is  invoked  with  the name s\bsh\bh, it tries to mimic the startup
168        behavior of historical versions of s\bsh\bh as  closely  as  possible,  while
169        conforming  to the POSIX standard as well.  When invoked as an interac-
170        tive login shell, or a non-interactive shell with the  -\b--\b-l\blo\bog\bgi\bin\bn  option,
171        it  first  attempts  to read and execute commands from _\b/_\be_\bt_\bc_\b/_\bp_\br_\bo_\bf_\bi_\bl_\be and
172        _\b~_\b/_\b._\bp_\br_\bo_\bf_\bi_\bl_\be, in that order.  The  -\b--\b-n\bno\bop\bpr\bro\bof\bfi\bil\ble\be  option  may  be  used  to
173        inhibit  this  behavior.  When invoked as an interactive shell with the
174        name s\bsh\bh, b\bba\bas\bsh\bh looks for the variable E\bEN\bNV\bV, expands its value  if  it  is
175        defined,  and uses the expanded value as the name of a file to read and
176        execute.  Since a shell invoked as s\bsh\bh does not attempt to read and exe-
177        cute  commands from any other startup files, the -\b--\b-r\brc\bcf\bfi\bil\ble\be option has no
178        effect.  A non-interactive shell invoked with  the  name  s\bsh\bh  does  not
179        attempt  to  read  any  other  startup files.  When invoked as s\bsh\bh, b\bba\bas\bsh\bh
180        enters _\bp_\bo_\bs_\bi_\bx mode after the startup files are read.
181
182        When b\bba\bas\bsh\bh is started in _\bp_\bo_\bs_\bi_\bx mode, as with the  -\b--\b-p\bpo\bos\bsi\bix\bx  command  line
183        option, it follows the POSIX standard for startup files.  In this mode,
184        interactive shells expand the E\bEN\bNV\bV variable and commands  are  read  and
185        executed  from  the  file  whose  name is the expanded value.  No other
186        startup files are read.
187
188        B\bBa\bas\bsh\bh attempts to determine when it is being run with its standard input
189        connected to a network connection, as when executed by the remote shell
190        daemon, usually _\br_\bs_\bh_\bd, or the secure shell daemon _\bs_\bs_\bh_\bd.  If b\bba\bas\bsh\bh  deter-
191        mines  it  is being run in this fashion, it reads and executes commands
192        from _\b~_\b/_\b._\bb_\ba_\bs_\bh_\br_\bc, if that file exists and is readable.  It  will  not  do
193        this  if  invoked as s\bsh\bh.  The -\b--\b-n\bno\bor\brc\bc option may be used to inhibit this
194        behavior, and the -\b--\b-r\brc\bcf\bfi\bil\ble\be option may be used to force another file  to
195        be  read,  but  neither  _\br_\bs_\bh_\bd  nor _\bs_\bs_\bh_\bd generally invoke the shell with
196        those options or allow them to be specified.
197
198        If the shell is started with the effective user (group) id not equal to
199        the real user (group) id, and the -\b-p\bp option is not supplied, no startup
200        files are read, shell functions are not inherited from the environment,
201        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
202        appear in the environment, are ignored, and the effective  user  id  is
203        set  to  the real user id.  If the -\b-p\bp option is supplied at invocation,
204        the startup behavior is the same, but the  effective  user  id  is  not
205        reset.
206
207 D\bDE\bEF\bFI\bIN\bNI\bIT\bTI\bIO\bON\bNS\bS
208        The  following  definitions  are used throughout the rest of this docu-
209        ment.
210        b\bbl\bla\ban\bnk\bk  A space or tab.
211        w\bwo\bor\brd\bd   A sequence of characters considered as  a  single  unit  by  the
212               shell.  Also known as a t\bto\bok\bke\ben\bn.
213        n\bna\bam\bme\be   A  _\bw_\bo_\br_\bd  consisting  only  of alphanumeric characters and under-
214               scores, and beginning with an alphabetic character or an  under-
215               score.  Also referred to as an i\bid\bde\ben\bnt\bti\bif\bfi\bie\ber\br.
216        m\bme\bet\bta\bac\bch\bha\bar\bra\bac\bct\bte\ber\br
217               A  character  that,  when unquoted, separates words.  One of the
218               following:
219               |\b|  &\b& ;\b; (\b( )\b) <\b< >\b> s\bsp\bpa\bac\bce\be t\bta\bab\bb
220        c\bco\bon\bnt\btr\bro\bol\bl o\bop\bpe\ber\bra\bat\bto\bor\br
221               A _\bt_\bo_\bk_\be_\bn that performs a control function.  It is one of the fol-
222               lowing symbols:
223               |\b||\b| &\b& &\b&&\b& ;\b; ;\b;;\b; (\b( )\b) |\b| |\b|&\b& <\b<n\bne\bew\bwl\bli\bin\bne\be>\b>
224
225 R\bRE\bES\bSE\bER\bRV\bVE\bED\bD W\bWO\bOR\bRD\bDS\bS
226        _\bR_\be_\bs_\be_\br_\bv_\be_\bd _\bw_\bo_\br_\bd_\bs are words that have a special meaning to the shell.  The
227        following words are recognized as reserved when unquoted and either the
228        first  word  of a simple command (see S\bSH\bHE\bEL\bLL\bL G\bGR\bRA\bAM\bMM\bMA\bAR\bR below) or the third
229        word of a c\bca\bas\bse\be or f\bfo\bor\br command:
230
231        !\b! c\bca\bas\bse\be  c\bco\bop\bpr\bro\boc\bc  d\bdo\bo d\bdo\bon\bne\be e\bel\bli\bif\bf e\bel\bls\bse\be e\bes\bsa\bac\bc f\bfi\bi f\bfo\bor\br  f\bfu\bun\bnc\bct\bti\bio\bon\bn  i\bif\bf  i\bin\bn  s\bse\bel\ble\bec\bct\bt
232        t\bth\bhe\ben\bn u\bun\bnt\bti\bil\bl w\bwh\bhi\bil\ble\be {\b{ }\b} t\bti\bim\bme\be [\b[[\b[ ]\b]]\b]
233
234 S\bSH\bHE\bEL\bLL\bL G\bGR\bRA\bAM\bMM\bMA\bAR\bR
235    S\bSi\bim\bmp\bpl\ble\be C\bCo\bom\bmm\bma\ban\bnd\bds\bs
236        A  _\bs_\bi_\bm_\bp_\bl_\be  _\bc_\bo_\bm_\bm_\ba_\bn_\bd  is a sequence of optional variable assignments fol-
237        lowed by b\bbl\bla\ban\bnk\bk-separated words and redirections, and  terminated  by  a
238        _\bc_\bo_\bn_\bt_\br_\bo_\bl _\bo_\bp_\be_\br_\ba_\bt_\bo_\br.  The first word specifies the command to be executed,
239        and is passed as argument zero.  The  remaining  words  are  passed  as
240        arguments to the invoked command.
241
242        The  return  value  of a _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd is its exit status, or 128+_\bn if
243        the command is terminated by signal _\bn.
244
245    P\bPi\bip\bpe\bel\bli\bin\bne\bes\bs
246        A _\bp_\bi_\bp_\be_\bl_\bi_\bn_\be is a sequence of one or more commands separated  by  one  of
247        the control operators |\b| or |\b|&\b&.  The format for a pipeline is:
248
249               [t\bti\bim\bme\be [-\b-p\bp]] [ ! ] _\bc_\bo_\bm_\bm_\ba_\bn_\bd [ [|\b|||\b|&\b&] _\bc_\bo_\bm_\bm_\ba_\bn_\bd_\b2 ... ]
250
251        The  standard output of _\bc_\bo_\bm_\bm_\ba_\bn_\bd is connected via a pipe to the standard
252        input of _\bc_\bo_\bm_\bm_\ba_\bn_\bd_\b2.  This connection is performed  before  any  redirec-
253        tions specified by the command (see R\bRE\bED\bDI\bIR\bRE\bEC\bCT\bTI\bIO\bON\bN below).  If |\b|&\b& is used,
254        _\bc_\bo_\bm_\bm_\ba_\bn_\bd's standard error, in addition to its standard output,  is  con-
255        nected  to  _\bc_\bo_\bm_\bm_\ba_\bn_\bd_\b2's standard input through the pipe; it is shorthand
256        for 2\b2>\b>&\b&1\b1 |\b|.  This implicit redirection of the  standard  error  to  the
257        standard  output  is  performed after any redirections specified by the
258        command.
259
260        The return status of a pipeline is the exit status of the last command,
261        unless  the  p\bpi\bip\bpe\bef\bfa\bai\bil\bl  option  is enabled.  If p\bpi\bip\bpe\bef\bfa\bai\bil\bl is enabled, the
262        pipeline's return status is the value of the last  (rightmost)  command
263        to  exit  with a non-zero status, or zero if all commands exit success-
264        fully.  If the reserved word !\b!  precedes a pipeline, the exit status of
265        that  pipeline  is the logical negation of the exit status as described
266        above.  The shell waits for all commands in the pipeline  to  terminate
267        before returning a value.
268
269        If  the  t\bti\bim\bme\be reserved word precedes a pipeline, the elapsed as well as
270        user and system time consumed by its execution are  reported  when  the
271        pipeline  terminates.   The -\b-p\bp option changes the output format to that
272        specified by POSIX.  When the shell is in _\bp_\bo_\bs_\bi_\bx _\bm_\bo_\bd_\be, it does not  rec-
273        ognize  t\bti\bim\bme\be  as  a  reserved word if the next token begins with a `-'.
274        The T\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT variable may be set to a format  string  that  specifies
275        how  the timing information should be displayed; see the description of
276        T\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT under S\bSh\bhe\bel\bll\bl V\bVa\bar\bri\bia\bab\bbl\ble\bes\bs below.
277
278        When the shell is in _\bp_\bo_\bs_\bi_\bx _\bm_\bo_\bd_\be, t\bti\bim\bme\be may be followed by a newline.  In
279        this  case,  the shell displays the total user and system time consumed
280        by the shell and its children.  The T\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT variable may be used  to
281        specify the format of the time information.
282
283        Each  command in a pipeline is executed as a separate process (i.e., in
284        a subshell).
285
286    L\bLi\bis\bst\bts\bs
287        A _\bl_\bi_\bs_\bt is a sequence of one or more pipelines separated by one  of  the
288        operators ;\b;, &\b&, &\b&&\b&, or |\b||\b|, and optionally terminated by one of ;\b;, &\b&, or
289        <\b<n\bne\bew\bwl\bli\bin\bne\be>\b>.
290
291        Of these list operators, &\b&&\b& and |\b||\b| have equal precedence, followed by ;\b;
292        and &\b&, which have equal precedence.
293
294        A  sequence  of  one or more newlines may appear in a _\bl_\bi_\bs_\bt instead of a
295        semicolon to delimit commands.
296
297        If a command is terminated by the control operator &\b&,  the  shell  exe-
298        cutes  the command in the _\bb_\ba_\bc_\bk_\bg_\br_\bo_\bu_\bn_\bd in a subshell.  The shell does not
299        wait for the command to finish, and the return status is  0.   Commands
300        separated  by  a  ;\b; are executed sequentially; the shell waits for each
301        command to terminate in turn.  The return status is the exit status  of
302        the last command executed.
303
304        AND  and  OR  lists are sequences of one of more pipelines separated by
305        the &\b&&\b& and |\b||\b| control operators, respectively.  AND and  OR  lists  are
306        executed with left associativity.  An AND list has the form
307
308               _\bc_\bo_\bm_\bm_\ba_\bn_\bd_\b1 &\b&&\b& _\bc_\bo_\bm_\bm_\ba_\bn_\bd_\b2
309
310        _\bc_\bo_\bm_\bm_\ba_\bn_\bd_\b2  is  executed if, and only if, _\bc_\bo_\bm_\bm_\ba_\bn_\bd_\b1 returns an exit status
311        of zero.
312
313        An OR list has the form
314
315               _\bc_\bo_\bm_\bm_\ba_\bn_\bd_\b1 |\b||\b| _\bc_\bo_\bm_\bm_\ba_\bn_\bd_\b2
316
317
318        _\bc_\bo_\bm_\bm_\ba_\bn_\bd_\b2 is executed if and only if _\bc_\bo_\bm_\bm_\ba_\bn_\bd_\b1 returns  a  non-zero  exit
319        status.   The  return  status of AND and OR lists is the exit status of
320        the last command executed in the list.
321
322    C\bCo\bom\bmp\bpo\bou\bun\bnd\bd C\bCo\bom\bmm\bma\ban\bnd\bds\bs
323        A _\bc_\bo_\bm_\bp_\bo_\bu_\bn_\bd _\bc_\bo_\bm_\bm_\ba_\bn_\bd is one of the following.  In most cases a _\bl_\bi_\bs_\bt in  a
324        command's  description may be separated from the rest of the command by
325        one or more newlines, and may be followed by a newline in  place  of  a
326        semicolon.
327
328        (_\bl_\bi_\bs_\bt) _\bl_\bi_\bs_\bt  is  executed in a subshell environment (see C\bCO\bOM\bMM\bMA\bAN\bND\bD E\bEX\bXE\bEC\bCU\bU-\b-
329               T\bTI\bIO\bON\bN E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT below).  Variable assignments and builtin  com-
330               mands  that  affect  the  shell's  environment  do not remain in
331               effect after the command completes.  The return  status  is  the
332               exit status of _\bl_\bi_\bs_\bt.
333
334        { _\bl_\bi_\bs_\bt; }
335               _\bl_\bi_\bs_\bt  is simply executed in the current shell environment.  _\bl_\bi_\bs_\bt
336               must be terminated with a newline or semicolon.  This  is  known
337               as  a  _\bg_\br_\bo_\bu_\bp  _\bc_\bo_\bm_\bm_\ba_\bn_\bd.   The return status is the exit status of
338               _\bl_\bi_\bs_\bt.  Note that unlike the metacharacters (\b( and )\b), {\b{ and }\b}  are
339               _\br_\be_\bs_\be_\br_\bv_\be_\bd _\bw_\bo_\br_\bd_\bs and must occur where a reserved word is permitted
340               to be recognized.  Since they do not cause a  word  break,  they
341               must  be  separated  from  _\bl_\bi_\bs_\bt  by  whitespace or another shell
342               metacharacter.
343
344        ((_\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn))
345               The _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn is evaluated according  to  the  rules  described
346               below  under A\bAR\bRI\bIT\bTH\bHM\bME\bET\bTI\bIC\bC E\bEV\bVA\bAL\bLU\bUA\bAT\bTI\bIO\bON\bN.  If the value of the expres-
347               sion is non-zero, the return status is 0; otherwise  the  return
348               status is 1.  This is exactly equivalent to l\ble\bet\bt "\b"_\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn"\b".
349
350        [\b[[\b[ _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn ]\b]]\b]
351               Return  a  status  of  0 or 1 depending on the evaluation of the
352               conditional expression _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn.  Expressions are composed  of
353               the  primaries  described  below  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.
354               Word splitting and pathname expansion are not performed  on  the
355               words  between  the  [\b[[\b[  and  ]\b]]\b]; tilde expansion, parameter and
356               variable expansion, arithmetic expansion, command  substitution,
357               process  substitution,  and quote removal are performed.  Condi-
358               tional operators such as -\b-f\bf must be unquoted to be recognized as
359               primaries.
360
361               When  used with [\b[[\b[, the <\b< and >\b> operators sort lexicographically
362               using the current locale.
363
364               When the =\b==\b= and !\b!=\b= operators are used, the string to  the  right
365               of the operator is considered a pattern and matched according to
366               the rules described below under P\bPa\bat\btt\bte\ber\brn\bn M\bMa\bat\btc\bch\bhi\bin\bng\bg, as if the e\bex\bxt\bt-\b-
367               g\bgl\blo\bob\bb shell option were enabled.  The =\b= operator is equivalent to
368               =\b==\b=.  If the shell option n\bno\boc\bca\bas\bse\bem\bma\bat\btc\bch\bh is enabled,  the  match  is
369               performed  without  regard to the case of alphabetic characters.
370               The return value is 0 if the string matches  (=\b==\b=)  or  does  not
371               match  (!\b!=\b=)  the pattern, and 1 otherwise.  Any part of the pat-
372               tern may be quoted to force the quoted portion to be matched  as
373               a string.
374
375               An  additional  binary operator, =\b=~\b~, is available, with the same
376               precedence as =\b==\b= and !\b!=\b=.  When it is used,  the  string  to  the
377               right  of the operator is considered an extended regular expres-
378               sion and matched accordingly (as in _\br_\be_\bg_\be_\bx(3)).  The return value
379               is 0 if the string matches the pattern, and 1 otherwise.  If the
380               regular expression is syntactically incorrect,  the  conditional
381               expression's return value is 2.  If the shell option n\bno\boc\bca\bas\bse\bem\bma\bat\btc\bch\bh
382               is enabled, the match is performed without regard to the case of
383               alphabetic characters.  Any part of the pattern may be quoted to
384               force the quoted portion to be matched  as  a  string.   Bracket
385               expressions  in  regular  expressions must be treated carefully,
386               since normal quoting  characters  lose  their  meanings  between
387               brackets.  If the pattern is stored in a shell variable, quoting
388               the variable expansion forces the entire pattern to  be  matched
389               as a string.  Substrings matched by parenthesized subexpressions
390               within the regular expression are saved in  the  array  variable
391               B\bBA\bAS\bSH\bH_\b_R\bRE\bEM\bMA\bAT\bTC\bCH\bH.   The  element of B\bBA\bAS\bSH\bH_\b_R\bRE\bEM\bMA\bAT\bTC\bCH\bH with index 0 is the
392               portion of the string matching the  entire  regular  expression.
393               The  element  of B\bBA\bAS\bSH\bH_\b_R\bRE\bEM\bMA\bAT\bTC\bCH\bH with index _\bn is the portion of the
394               string matching the _\bnth parenthesized subexpression.
395
396               Expressions may  be  combined  using  the  following  operators,
397               listed in decreasing order of precedence:
398
399               (\b( _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn )\b)
400                      Returns  the  value  of  _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn.  This may be used to
401                      override the normal precedence of operators.
402               !\b! _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn
403                      True if _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn is false.
404               _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn_\b1 &\b&&\b& _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn_\b2
405                      True if both _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn_\b1 and _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn_\b2 are true.
406               _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn_\b1 |\b||\b| _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn_\b2
407                      True if either _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn_\b1 or _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn_\b2 is true.
408
409               The &\b&&\b& and |\b||\b| operators do not evaluate _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn_\b2 if the value
410               of  _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn_\b1  is  sufficient to determine the return value of
411               the entire conditional expression.
412
413        f\bfo\bor\br _\bn_\ba_\bm_\be [ [ i\bin\bn [ _\bw_\bo_\br_\bd _\b._\b._\b. ] ] ; ] d\bdo\bo _\bl_\bi_\bs_\bt ; d\bdo\bon\bne\be
414               The list of words following i\bin\bn is expanded, generating a list of
415               items.  The variable _\bn_\ba_\bm_\be is set to each element of this list in
416               turn, and _\bl_\bi_\bs_\bt is executed each time.  If the i\bin\bn _\bw_\bo_\br_\bd  is  omit-
417               ted,  the  f\bfo\bor\br  command  executes  _\bl_\bi_\bs_\bt once for each positional
418               parameter that is set (see P\bPA\bAR\bRA\bAM\bME\bET\bTE\bER\bRS\bS below).  The return status
419               is  the  exit  status of the last command that executes.  If the
420               expansion of the items following i\bin\bn results in an empty list, no
421               commands are executed, and the return status is 0.
422
423        f\bfo\bor\br (( _\be_\bx_\bp_\br_\b1 ; _\be_\bx_\bp_\br_\b2 ; _\be_\bx_\bp_\br_\b3 )) ; d\bdo\bo _\bl_\bi_\bs_\bt ; d\bdo\bon\bne\be
424               First, the arithmetic expression _\be_\bx_\bp_\br_\b1 is evaluated according to
425               the rules described  below  under  A\bAR\bRI\bIT\bTH\bHM\bME\bET\bTI\bIC\bC  E\bEV\bVA\bAL\bLU\bUA\bAT\bTI\bIO\bON\bN.   The
426               arithmetic  expression  _\be_\bx_\bp_\br_\b2 is then evaluated repeatedly until
427               it evaluates to zero.  Each time _\be_\bx_\bp_\br_\b2 evaluates to  a  non-zero
428               value,  _\bl_\bi_\bs_\bt  is executed and the arithmetic expression _\be_\bx_\bp_\br_\b3 is
429               evaluated.  If any expression is omitted, it behaves  as  if  it
430               evaluates to 1.  The return value is the exit status of the last
431               command in _\bl_\bi_\bs_\bt that is executed, or false if any of the expres-
432               sions is invalid.
433
434        s\bse\bel\ble\bec\bct\bt _\bn_\ba_\bm_\be [ i\bin\bn _\bw_\bo_\br_\bd ] ; d\bdo\bo _\bl_\bi_\bs_\bt ; d\bdo\bon\bne\be
435               The list of words following i\bin\bn is expanded, generating a list of
436               items.  The set of expanded words is  printed  on  the  standard
437               error,  each  preceded  by a number.  If the i\bin\bn _\bw_\bo_\br_\bd is omitted,
438               the positional parameters are printed  (see  P\bPA\bAR\bRA\bAM\bME\bET\bTE\bER\bRS\bS  below).
439               The  P\bPS\bS3\b3 prompt is then displayed and a line read from the stan-
440               dard input.  If the line consists of a number  corresponding  to
441               one  of  the  displayed  words, then the value of _\bn_\ba_\bm_\be is set to
442               that word.  If the line is empty, the words and prompt are  dis-
443               played again.  If EOF is read, the command completes.  Any other
444               value read causes _\bn_\ba_\bm_\be to be set to  null.   The  line  read  is
445               saved  in  the  variable R\bRE\bEP\bPL\bLY\bY.  The _\bl_\bi_\bs_\bt is executed after each
446               selection until a b\bbr\bre\bea\bak\bk command is executed.  The exit status of
447               s\bse\bel\ble\bec\bct\bt  is the exit status of the last command executed in _\bl_\bi_\bs_\bt,
448               or zero if no commands were executed.
449
450        c\bca\bas\bse\be _\bw_\bo_\br_\bd i\bin\bn [ [(] _\bp_\ba_\bt_\bt_\be_\br_\bn [ |\b| _\bp_\ba_\bt_\bt_\be_\br_\bn ] ... ) _\bl_\bi_\bs_\bt ;; ] ... e\bes\bsa\bac\bc
451               A c\bca\bas\bse\be command first expands _\bw_\bo_\br_\bd, and tries to match it against
452               each _\bp_\ba_\bt_\bt_\be_\br_\bn in turn, using the same matching rules as for path-
453               name expansion (see P\bPa\bat\bth\bhn\bna\bam\bme\be  E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn  below).   The  _\bw_\bo_\br_\bd  is
454               expanded  using  tilde  expansion, parameter and variable expan-
455               sion, arithmetic  substitution,  command  substitution,  process
456               substitution  and  quote  removal.   Each  _\bp_\ba_\bt_\bt_\be_\br_\bn  examined  is
457               expanded using tilde expansion, parameter  and  variable  expan-
458               sion, arithmetic substitution, command substitution, and process
459               substitution.  If the shell option n\bno\boc\bca\bas\bse\bem\bma\bat\btc\bch\bh is  enabled,  the
460               match  is  performed  without  regard  to the case of alphabetic
461               characters.  When a match is found, the  corresponding  _\bl_\bi_\bs_\bt  is
462               executed.  If the ;\b;;\b; operator is used, no subsequent matches are
463               attempted after the first pattern match.  Using ;\b;&\b& in  place  of
464               ;\b;;\b;  causes  execution  to continue with the _\bl_\bi_\bs_\bt associated with
465               the next set of patterns.  Using ;\b;;\b;&\b& in place of ;\b;;\b;  causes  the
466               shell  to  test  the next pattern list in the statement, if any,
467               and execute any associated _\bl_\bi_\bs_\bt on a successful match.  The exit
468               status is zero if no pattern matches.  Otherwise, it is the exit
469               status of the last command executed in _\bl_\bi_\bs_\bt.
470
471        i\bif\bf _\bl_\bi_\bs_\bt; t\bth\bhe\ben\bn _\bl_\bi_\bs_\bt; [ e\bel\bli\bif\bf _\bl_\bi_\bs_\bt; t\bth\bhe\ben\bn _\bl_\bi_\bs_\bt; ] ... [ e\bel\bls\bse\be _\bl_\bi_\bs_\bt; ] f\bfi\bi
472               The i\bif\bf _\bl_\bi_\bs_\bt is executed.  If its exit status is zero,  the  t\bth\bhe\ben\bn
473               _\bl_\bi_\bs_\bt  is  executed.   Otherwise,  each  e\bel\bli\bif\bf _\bl_\bi_\bs_\bt is executed in
474               turn, and if its exit status is  zero,  the  corresponding  t\bth\bhe\ben\bn
475               _\bl_\bi_\bs_\bt is executed and the command completes.  Otherwise, the e\bel\bls\bse\be
476               _\bl_\bi_\bs_\bt is executed, if present.  The exit status is the exit  sta-
477               tus of the last command executed, or zero if no condition tested
478               true.
479
480        w\bwh\bhi\bil\ble\be _\bl_\bi_\bs_\bt_\b-_\b1; d\bdo\bo _\bl_\bi_\bs_\bt_\b-_\b2; d\bdo\bon\bne\be
481        u\bun\bnt\bti\bil\bl _\bl_\bi_\bs_\bt_\b-_\b1; d\bdo\bo _\bl_\bi_\bs_\bt_\b-_\b2; d\bdo\bon\bne\be
482               The w\bwh\bhi\bil\ble\be command continuously executes the list _\bl_\bi_\bs_\bt_\b-_\b2 as  long
483               as the last command in the list _\bl_\bi_\bs_\bt_\b-_\b1 returns an exit status of
484               zero.  The u\bun\bnt\bti\bil\bl command is  identical  to  the  w\bwh\bhi\bil\ble\be  command,
485               except  that  the test is negated; _\bl_\bi_\bs_\bt_\b-_\b2 is executed as long as
486               the last command in _\bl_\bi_\bs_\bt_\b-_\b1 returns a non-zero exit status.   The
487               exit  status  of the w\bwh\bhi\bil\ble\be and u\bun\bnt\bti\bil\bl commands is the exit status
488               of the last command executed in _\bl_\bi_\bs_\bt_\b-_\b2, or zero if none was exe-
489               cuted.
490
491    C\bCo\bop\bpr\bro\boc\bce\bes\bss\bse\bes\bs
492        A _\bc_\bo_\bp_\br_\bo_\bc_\be_\bs_\bs is a shell command preceded by the c\bco\bop\bpr\bro\boc\bc reserved word.  A
493        coprocess is executed asynchronously in a subshell, as if  the  command
494        had  been  terminated  with the &\b& control operator, with a two-way pipe
495        established between the executing shell and the coprocess.
496
497        The format for a coprocess is:
498
499               c\bco\bop\bpr\bro\boc\bc [_\bN_\bA_\bM_\bE] _\bc_\bo_\bm_\bm_\ba_\bn_\bd [_\br_\be_\bd_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\bs]
500
501        This creates a coprocess named _\bN_\bA_\bM_\bE.  If  _\bN_\bA_\bM_\bE  is  not  supplied,  the
502        default name is C\bCO\bOP\bPR\bRO\bOC\bC.  _\bN_\bA_\bM_\bE must not be supplied if _\bc_\bo_\bm_\bm_\ba_\bn_\bd is a _\bs_\bi_\bm_\b-
503        _\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd (see above); otherwise, it is interpreted as the first word
504        of  the simple command.  When the coprocess is executed, the shell cre-
505        ates an array variable (see A\bAr\brr\bra\bay\bys\bs below) named _\bN_\bA_\bM_\bE in the context  of
506        the executing shell.  The standard output of _\bc_\bo_\bm_\bm_\ba_\bn_\bd is connected via a
507        pipe to a file  descriptor  in  the  executing  shell,  and  that  file
508        descriptor  is  assigned  to _\bN_\bA_\bM_\bE[0].  The standard input of _\bc_\bo_\bm_\bm_\ba_\bn_\bd is
509        connected via a pipe to a file descriptor in the executing  shell,  and
510        that  file descriptor is assigned to _\bN_\bA_\bM_\bE[1].  This pipe is established
511        before any redirections  specified  by  the  command  (see  R\bRE\bED\bDI\bIR\bRE\bEC\bCT\bTI\bIO\bON\bN
512        below).   The  file  descriptors  can be utilized as arguments to shell
513        commands and redirections using standard  word  expansions.   The  file
514        descriptors  are  not  available  in  subshells.  The process ID of the
515        shell spawned to execute the coprocess is available as the value of the
516        variable  _\bN_\bA_\bM_\bE_PID.   The  w\bwa\bai\bit\bt builtin command may be used to wait for
517        the coprocess to terminate.
518
519        Since the coprocess is created as an asynchronous command,  the  c\bco\bop\bpr\bro\boc\bc
520        command  always  returns  success.  The return status of a coprocess is
521        the exit status of _\bc_\bo_\bm_\bm_\ba_\bn_\bd.
522
523    S\bSh\bhe\bel\bll\bl F\bFu\bun\bnc\bct\bti\bio\bon\bn D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bns\bs
524        A shell function is an object that is called like a simple command  and
525        executes  a  compound  command with a new set of positional parameters.
526        Shell functions are declared as follows:
527
528        _\bn_\ba_\bm_\be () _\bc_\bo_\bm_\bp_\bo_\bu_\bn_\bd_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd [_\br_\be_\bd_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn]
529        f\bfu\bun\bnc\bct\bti\bio\bon\bn _\bn_\ba_\bm_\be [()] _\bc_\bo_\bm_\bp_\bo_\bu_\bn_\bd_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd [_\br_\be_\bd_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn]
530               This defines a function named _\bn_\ba_\bm_\be.  The reserved word  f\bfu\bun\bnc\bct\bti\bio\bon\bn
531               is  optional.   If  the  f\bfu\bun\bnc\bct\bti\bio\bon\bn reserved word is supplied, the
532               parentheses are optional.  The _\bb_\bo_\bd_\by of the function is the  com-
533               pound  command  _\bc_\bo_\bm_\bp_\bo_\bu_\bn_\bd_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd  (see C\bCo\bom\bmp\bpo\bou\bun\bnd\bd C\bCo\bom\bmm\bma\ban\bnd\bds\bs above).
534               That command is usually a _\bl_\bi_\bs_\bt of commands between { and },  but
535               may  be  any command listed under C\bCo\bom\bmp\bpo\bou\bun\bnd\bd C\bCo\bom\bmm\bma\ban\bnd\bds\bs above.  _\bc_\bo_\bm_\b-
536               _\bp_\bo_\bu_\bn_\bd_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd is executed whenever _\bn_\ba_\bm_\be is specified as the name
537               of  a  simple  command.  When in _\bp_\bo_\bs_\bi_\bx _\bm_\bo_\bd_\be, _\bn_\ba_\bm_\be may not be the
538               name of one of the POSIX  _\bs_\bp_\be_\bc_\bi_\ba_\bl  _\bb_\bu_\bi_\bl_\bt_\bi_\bn_\bs.   Any  redirections
539               (see R\bRE\bED\bDI\bIR\bRE\bEC\bCT\bTI\bIO\bON\bN below) specified when a function is defined are
540               performed when the function is executed.  The exit status  of  a
541               function  definition  is  zero unless a syntax error occurs or a
542               readonly function with the same name already exists.  When  exe-
543               cuted,  the  exit status of a function is the exit status of the
544               last command executed in the body.  (See F\bFU\bUN\bNC\bCT\bTI\bIO\bON\bNS\bS below.)
545
546 C\bCO\bOM\bMM\bME\bEN\bNT\bTS\bS
547        In a non-interactive shell, or an interactive shell in which the i\bin\bnt\bte\ber\br-\b-
548        a\bac\bct\bti\biv\bve\be_\b_c\bco\bom\bmm\bme\ben\bnt\bts\bs  option  to  the  s\bsh\bho\bop\bpt\bt  builtin  is enabled (see S\bSH\bHE\bEL\bLL\bL
549        B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below), a word beginning with #\b# causes that  word  and
550        all  remaining  characters  on that line to be ignored.  An interactive
551        shell without the i\bin\bnt\bte\ber\bra\bac\bct\bti\biv\bve\be_\b_c\bco\bom\bmm\bme\ben\bnt\bts\bs option enabled  does  not  allow
552        comments.  The i\bin\bnt\bte\ber\bra\bac\bct\bti\biv\bve\be_\b_c\bco\bom\bmm\bme\ben\bnt\bts\bs option is on by default in interac-
553        tive shells.
554
555 Q\bQU\bUO\bOT\bTI\bIN\bNG\bG
556        _\bQ_\bu_\bo_\bt_\bi_\bn_\bg is used to remove the special meaning of certain characters  or
557        words  to  the shell.  Quoting can be used to disable special treatment
558        for special characters, to prevent reserved words from being recognized
559        as such, and to prevent parameter expansion.
560
561        Each  of  the _\bm_\be_\bt_\ba_\bc_\bh_\ba_\br_\ba_\bc_\bt_\be_\br_\bs listed above under D\bDE\bEF\bFI\bIN\bNI\bIT\bTI\bIO\bON\bNS\bS has special
562        meaning to the shell and must be quoted if it is to represent itself.
563
564        When the command history expansion facilities are being used (see  H\bHI\bIS\bS-\b-
565        T\bTO\bOR\bRY\bY E\bEX\bXP\bPA\bAN\bNS\bSI\bIO\bON\bN below), the _\bh_\bi_\bs_\bt_\bo_\br_\by _\be_\bx_\bp_\ba_\bn_\bs_\bi_\bo_\bn character, usually !\b!, must
566        be quoted to prevent history expansion.
567
568        There are  three  quoting  mechanisms:  the  _\be_\bs_\bc_\ba_\bp_\be  _\bc_\bh_\ba_\br_\ba_\bc_\bt_\be_\br,  single
569        quotes, and double quotes.
570
571        A  non-quoted  backslash (\\b\) is the _\be_\bs_\bc_\ba_\bp_\be _\bc_\bh_\ba_\br_\ba_\bc_\bt_\be_\br.  It preserves the
572        literal value of the next character that follows, with the exception of
573        <newline>.   If  a  \\b\<newline>  pair  appears, and the backslash is not
574        itself quoted, the \\b\<newline> is treated as a line  continuation  (that
575        is, it is removed from the input stream and effectively ignored).
576
577        Enclosing  characters  in  single quotes preserves the literal value of
578        each character within the quotes.  A single quote may not occur between
579        single quotes, even when preceded by a backslash.
580
581        Enclosing  characters  in  double quotes preserves the literal value of
582        all characters within the quotes, with the exception of $\b$, `\b`,  \\b\,  and,
583        when  history  expansion  is enabled, !\b!.  The characters $\b$ and `\b` retain
584        their special meaning within double quotes.  The backslash retains  its
585        special  meaning only when followed by one of the following characters:
586        $\b$, `\b`, "\b", \\b\, or <\b<n\bne\bew\bwl\bli\bin\bne\be>\b>.  A double quote may be quoted  within  double
587        quotes by preceding it with a backslash.  If enabled, history expansion
588        will be performed unless an !\b!  appearing in double  quotes  is  escaped
589        using a backslash.  The backslash preceding the !\b!  is not removed.
590
591        The  special  parameters  *\b*  and  @\b@ have special meaning when in double
592        quotes (see P\bPA\bAR\bRA\bAM\bME\bET\bTE\bER\bRS\bS below).
593
594        Words of the form $\b$'_\bs_\bt_\br_\bi_\bn_\bg' are treated specially.  The word expands to
595        _\bs_\bt_\br_\bi_\bn_\bg,  with backslash-escaped characters replaced as specified by the
596        ANSI C standard.  Backslash escape sequences, if present,  are  decoded
597        as follows:
598               \\b\a\ba     alert (bell)
599               \\b\b\bb     backspace
600               \\b\e\be
601               \\b\E\bE     an escape character
602               \\b\f\bf     form feed
603               \\b\n\bn     new line
604               \\b\r\br     carriage return
605               \\b\t\bt     horizontal tab
606               \\b\v\bv     vertical tab
607               \\b\\\b\     backslash
608               \\b\'\b'     single quote
609               \\b\"\b"     double quote
610               \\b\_\bn_\bn_\bn   the  eight-bit  character  whose value is the octal value
611                      _\bn_\bn_\bn (one to three digits)
612               \\b\x\bx_\bH_\bH   the eight-bit character whose value  is  the  hexadecimal
613                      value _\bH_\bH (one or two hex digits)
614               \\b\u\bu_\bH_\bH_\bH_\bH the  Unicode (ISO/IEC 10646) character whose value is the
615                      hexadecimal value _\bH_\bH_\bH_\bH (one to four hex digits)
616               \\b\U\bU_\bH_\bH_\bH_\bH_\bH_\bH_\bH_\bH
617                      the Unicode (ISO/IEC 10646) character whose value is  the
618                      hexadecimal value _\bH_\bH_\bH_\bH_\bH_\bH_\bH_\bH (one to eight hex digits)
619               \\b\c\bc_\bx    a control-_\bx character
620
621        The  expanded  result  is  single-quoted, as if the dollar sign had not
622        been present.
623
624        A double-quoted string preceded by a dollar sign ($\b$"_\bs_\bt_\br_\bi_\bn_\bg") will cause
625        the  string  to  be translated according to the current locale.  If the
626        current locale is C\bC or P\bPO\bOS\bSI\bIX\bX, the  dollar  sign  is  ignored.   If  the
627        string is translated and replaced, the replacement is double-quoted.
628
629 P\bPA\bAR\bRA\bAM\bME\bET\bTE\bER\bRS\bS
630        A  _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is an entity that stores values.  It can be a _\bn_\ba_\bm_\be, a num-
631        ber, or one of the special characters listed below under S\bSp\bpe\bec\bci\bia\bal\bl P\bPa\bar\bra\bam\bm-\b-
632        e\bet\bte\ber\brs\bs.   A _\bv_\ba_\br_\bi_\ba_\bb_\bl_\be is a parameter denoted by a _\bn_\ba_\bm_\be.  A variable has a
633        _\bv_\ba_\bl_\bu_\be and zero or more _\ba_\bt_\bt_\br_\bi_\bb_\bu_\bt_\be_\bs.  Attributes are assigned  using  the
634        d\bde\bec\bcl\bla\bar\bre\be  builtin command (see d\bde\bec\bcl\bla\bar\bre\be below in S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS).
635
636        A parameter is set if it has been assigned a value.  The null string is
637        a  valid  value.  Once a variable is set, it may be unset only by using
638        the u\bun\bns\bse\bet\bt builtin command (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below).
639
640        A _\bv_\ba_\br_\bi_\ba_\bb_\bl_\be may be assigned to by a statement of the form
641
642               _\bn_\ba_\bm_\be=[_\bv_\ba_\bl_\bu_\be]
643
644        If _\bv_\ba_\bl_\bu_\be is not given, the variable is assigned the null  string.   All
645        _\bv_\ba_\bl_\bu_\be_\bs  undergo tilde expansion, parameter and variable expansion, com-
646        mand substitution, arithmetic expansion, and quote removal (see  E\bEX\bXP\bPA\bAN\bN-\b-
647        S\bSI\bIO\bON\bN below).  If the variable has its i\bin\bnt\bte\beg\bge\ber\br attribute set, then _\bv_\ba_\bl_\bu_\be
648        is evaluated as an arithmetic expression even if the $((...)) expansion
649        is  not  used  (see A\bAr\bri\bit\bth\bhm\bme\bet\bti\bic\bc E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn below).  Word splitting is not
650        performed, with the exception of "\b"$\b$@\b@"\b" as explained below under  S\bSp\bpe\bec\bci\bia\bal\bl
651        P\bPa\bar\bra\bam\bme\bet\bte\ber\brs\bs.   Pathname  expansion  is not performed.  Assignment state-
652        ments may also appear as arguments  to  the  a\bal\bli\bia\bas\bs,  d\bde\bec\bcl\bla\bar\bre\be,  t\bty\byp\bpe\bes\bse\bet\bt,
653        e\bex\bxp\bpo\bor\brt\bt,  r\bre\bea\bad\bdo\bon\bnl\bly\by,  and  l\blo\boc\bca\bal\bl  builtin  commands.  When in _\bp_\bo_\bs_\bi_\bx _\bm_\bo_\bd_\be,
654        these builtins may appear in a command after one or more  instances  of
655        the c\bco\bom\bmm\bma\ban\bnd\bd builtin and retain these assignment statement properties.
656
657        In  the context where an assignment statement is assigning a value to a
658        shell variable or array index, the += operator can be used to append to
659        or add to the variable's previous value.  When += is applied to a vari-
660        able for which the _\bi_\bn_\bt_\be_\bg_\be_\br attribute has been set, _\bv_\ba_\bl_\bu_\be  is  evaluated
661        as  an arithmetic expression and added to the variable's current value,
662        which is also evaluated.  When += is applied to an array variable using
663        compound  assignment  (see  A\bAr\brr\bra\bay\bys\bs  below), the variable's value is not
664        unset (as it is when using =), and new values are appended to the array
665        beginning  at  one  greater than the array's maximum index (for indexed
666        arrays) or added as additional key-value pairs in an associative array.
667        When  applied  to  a  string-valued  variable,  _\bv_\ba_\bl_\bu_\be  is  expanded and
668        appended to the variable's value.
669
670        A variable can be assigned the _\bn_\ba_\bm_\be_\br_\be_\bf attribute using the -\b-n\bn option to
671        the  d\bde\bec\bcl\bla\bar\bre\be or l\blo\boc\bca\bal\bl builtin commands (see the descriptions of d\bde\bec\bcl\bla\bar\bre\be
672        and l\blo\boc\bca\bal\bl below) to create a _\bn_\ba_\bm_\be_\br_\be_\bf, or a reference to  another  vari-
673        able.   This  allows  variables to be manipulated indirectly.  Whenever
674        the nameref variable is referenced or assigned  to,  the  operation  is
675        actually  performed on the variable specified by the nameref variable's
676        value.  A nameref is commonly used within shell functions to refer to a
677        variable  whose  name  is  passed  as an argument to the function.  For
678        instance, if a variable name is passed to a shell function as its first
679        argument, running
680               declare -n ref=$1
681        inside  the  function creates a nameref variable r\bre\bef\bf whose value is the
682        variable name passed as the first argument.  References and assignments
683        to  r\bre\bef\bf are treated as references and assignments to the variable whose
684        name was passed as $\b$1\b1.  If the control variable in a f\bfo\bor\br loop  has  the
685        nameref  attribute, the list of words can be a list of shell variables,
686        and a name reference will be established for each word in the list,  in
687        turn,  when  the loop is executed.  Array variables cannot be given the
688        -\b-n\bn attribute.  However, nameref variables can reference array variables
689        and  subscripted  array  variables.  Namerefs can be unset using the -\b-n\bn
690        option to the u\bun\bns\bse\bet\bt builtin.  Otherwise, if u\bun\bns\bse\bet\bt is executed with  the
691        name  of  a nameref variable as an argument, the variable referenced by
692        the nameref variable will be unset.
693
694    P\bPo\bos\bsi\bit\bti\bio\bon\bna\bal\bl P\bPa\bar\bra\bam\bme\bet\bte\ber\brs\bs
695        A _\bp_\bo_\bs_\bi_\bt_\bi_\bo_\bn_\ba_\bl _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is a parameter denoted by one  or  more  digits,
696        other than the single digit 0.  Positional parameters are assigned from
697        the shell's arguments when it is invoked, and may be  reassigned  using
698        the  s\bse\bet\bt builtin command.  Positional parameters may not be assigned to
699        with assignment statements.  The positional parameters are  temporarily
700        replaced when a shell function is executed (see F\bFU\bUN\bNC\bCT\bTI\bIO\bON\bNS\bS below).
701
702        When  a  positional parameter consisting of more than a single digit is
703        expanded, it must be enclosed in braces (see E\bEX\bXP\bPA\bAN\bNS\bSI\bIO\bON\bN below).
704
705    S\bSp\bpe\bec\bci\bia\bal\bl P\bPa\bar\bra\bam\bme\bet\bte\ber\brs\bs
706        The shell treats several parameters specially.   These  parameters  may
707        only be referenced; assignment to them is not allowed.
708        *\b*      Expands  to  the positional parameters, starting from one.  When
709               the expansion is  not  within  double  quotes,  each  positional
710               parameter  expands  to a separate word.  In contexts where it is
711               performed, those words are subject to further word splitting and
712               pathname  expansion.   When  the  expansion occurs within double
713               quotes, it expands to a single  word  with  the  value  of  each
714               parameter  separated  by  the first character of the I\bIF\bFS\bS special
715               variable.  That is, "$\b$*\b*" is equivalent to "$\b$1\b1_\bc$\b$2\b2_\bc.\b..\b..\b.",  where  _\bc
716               is the first character of the value of the I\bIF\bFS\bS variable.  If I\bIF\bFS\bS
717               is unset, the parameters are separated by  spaces.   If  I\bIF\bFS\bS  is
718               null,  the parameters are joined without intervening separators.
719        @\b@      Expands to the positional parameters, starting from  one.   When
720               the  expansion  occurs  within  double  quotes,  each  parameter
721               expands to a separate word.  That is, "$\b$@\b@" is equivalent to "$\b$1\b1"
722               "$\b$2\b2"  ...   If the double-quoted expansion occurs within a word,
723               the expansion of the first parameter is joined with  the  begin-
724               ning  part  of  the original word, and the expansion of the last
725               parameter is joined with the last part  of  the  original  word.
726               When  there  are no positional parameters, "$\b$@\b@" and $\b$@\b@ expand to
727               nothing (i.e., they are removed).
728        #\b#      Expands to the number of positional parameters in decimal.
729        ?\b?      Expands to the exit status of the most recently  executed  fore-
730               ground pipeline.
731        -\b-      Expands  to  the  current option flags as specified upon invoca-
732               tion, by the s\bse\bet\bt builtin command, or  those  set  by  the  shell
733               itself (such as the -\b-i\bi option).
734        $\b$      Expands  to  the  process ID of the shell.  In a () subshell, it
735               expands to the process ID of the current  shell,  not  the  sub-
736               shell.
737        !\b!      Expands  to  the process ID of the job most recently placed into
738               the background, whether executed as an asynchronous  command  or
739               using the b\bbg\bg builtin (see J\bJO\bOB\bB C\bCO\bON\bNT\bTR\bRO\bOL\bL below).
740        0\b0      Expands  to  the name of the shell or shell script.  This is set
741               at shell initialization.  If b\bba\bas\bsh\bh is invoked with a file of com-
742               mands,  $\b$0\b0  is set to the name of that file.  If b\bba\bas\bsh\bh is started
743               with the -\b-c\bc option, then $\b$0\b0 is set to the first  argument  after
744               the  string to be executed, if one is present.  Otherwise, it is
745               set to the filename used to invoke b\bba\bas\bsh\bh, as  given  by  argument
746               zero.
747        _\b_      At  shell  startup,  set to the absolute pathname used to invoke
748               the shell or shell script being executed as passed in the  envi-
749               ronment  or  argument  list.   Subsequently, expands to the last
750               argument to the previous command, after expansion.  Also set  to
751               the  full  pathname  used  to  invoke  each command executed and
752               placed in the environment exported to that command.  When check-
753               ing  mail,  this  parameter holds the name of the mail file cur-
754               rently being checked.
755
756    S\bSh\bhe\bel\bll\bl V\bVa\bar\bri\bia\bab\bbl\ble\bes\bs
757        The following variables are set by the shell:
758
759        B\bBA\bAS\bSH\bH   Expands to the full filename used to  invoke  this  instance  of
760               b\bba\bas\bsh\bh.
761        B\bBA\bAS\bSH\bHO\bOP\bPT\bTS\bS
762               A  colon-separated  list of enabled shell options.  Each word in
763               the list is a valid argument for the  -\b-s\bs  option  to  the  s\bsh\bho\bop\bpt\bt
764               builtin command (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below).  The options
765               appearing in B\bBA\bAS\bSH\bHO\bOP\bPT\bTS\bS are those reported as  _\bo_\bn  by  s\bsh\bho\bop\bpt\bt.   If
766               this  variable  is  in the environment when b\bba\bas\bsh\bh starts up, each
767               shell option in the list will  be  enabled  before  reading  any
768               startup files.  This variable is read-only.
769        B\bBA\bAS\bSH\bHP\bPI\bID\bD
770               Expands  to  the  process  ID of the current b\bba\bas\bsh\bh process.  This
771               differs from $\b$$\b$ under certain circumstances, such  as  subshells
772               that do not require b\bba\bas\bsh\bh to be re-initialized.
773        B\bBA\bAS\bSH\bH_\b_A\bAL\bLI\bIA\bAS\bSE\bES\bS
774               An  associative  array  variable whose members correspond to the
775               internal list of aliases as maintained  by  the  a\bal\bli\bia\bas\bs  builtin.
776               Elements added to this array appear in the alias list; unsetting
777               array elements cause aliases to be removed from the alias  list.
778        B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGC\bC
779               An  array  variable whose values are the number of parameters in
780               each frame of the current b\bba\bas\bsh\bh execution call stack.  The number
781               of  parameters  to  the  current  subroutine  (shell function or
782               script executed with .\b. or s\bso\bou\bur\brc\bce\be) is at the top  of  the  stack.
783               When  a  subroutine is executed, the number of parameters passed
784               is pushed onto B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGC\bC.  The shell sets B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGC\bC only when in
785               extended  debugging  mode  (see  the description of the e\bex\bxt\btd\bde\beb\bbu\bug\bg
786               option to the s\bsh\bho\bop\bpt\bt builtin below)
787        B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGV\bV
788               An array variable containing all of the parameters in  the  cur-
789               rent b\bba\bas\bsh\bh execution call stack.  The final parameter of the last
790               subroutine call is at the top of the stack; the first  parameter
791               of the initial call is at the bottom.  When a subroutine is exe-
792               cuted, the parameters supplied are pushed onto  B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGV\bV.   The
793               shell  sets  B\bBA\bAS\bSH\bH_\b_A\bAR\bRG\bGV\bV only when in extended debugging mode (see
794               the description of the e\bex\bxt\btd\bde\beb\bbu\bug\bg  option  to  the  s\bsh\bho\bop\bpt\bt  builtin
795               below)
796        B\bBA\bAS\bSH\bH_\b_C\bCM\bMD\bDS\bS
797               An  associative  array  variable whose members correspond to the
798               internal hash table  of  commands  as  maintained  by  the  h\bha\bas\bsh\bh
799               builtin.  Elements added to this array appear in the hash table;
800               unsetting array elements cause commands to be removed  from  the
801               hash table.
802        B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMM\bMA\bAN\bND\bD
803               The  command  currently  being executed or about to be executed,
804               unless the shell is executing a command as the result of a trap,
805               in  which  case  it  is the command executing at the time of the
806               trap.
807        B\bBA\bAS\bSH\bH_\b_E\bEX\bXE\bEC\bCU\bUT\bTI\bIO\bON\bN_\b_S\bST\bTR\bRI\bIN\bNG\bG
808               The command argument to the -\b-c\bc invocation option.
809        B\bBA\bAS\bSH\bH_\b_L\bLI\bIN\bNE\bEN\bNO\bO
810               An array variable whose members are the line numbers  in  source
811               files  where  each corresponding member of F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE was invoked.
812               $\b${\b{B\bBA\bAS\bSH\bH_\b_L\bLI\bIN\bNE\bEN\bNO\bO[\b[_\b$_\bi]\b]}\b}  is  the  line  number  in  the  source  file
813               ($\b${\b{B\bBA\bAS\bSH\bH_\b_S\bSO\bOU\bUR\bRC\bCE\bE[\b[_\b$_\bi_\b+_\b1]\b]}\b})  where  $\b${\b{F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE[\b[_\b$_\bi]\b]}\b}  was  called  (or
814               $\b${\b{B\bBA\bAS\bSH\bH_\b_L\bLI\bIN\bNE\bEN\bNO\bO[\b[_\b$_\bi_\b-_\b1]\b]}\b} if referenced within  another  shell  func-
815               tion).  Use L\bLI\bIN\bNE\bEN\bNO\bO to obtain the current line number.
816        B\bBA\bAS\bSH\bH_\b_R\bRE\bEM\bMA\bAT\bTC\bCH\bH
817               An  array  variable  whose members are assigned by the =\b=~\b~ binary
818               operator to the [\b[[\b[ conditional command.  The element with  index
819               0  is  the  portion  of  the  string matching the entire regular
820               expression.  The element with index _\bn  is  the  portion  of  the
821               string matching the _\bnth parenthesized subexpression.  This vari-
822               able is read-only.
823        B\bBA\bAS\bSH\bH_\b_S\bSO\bOU\bUR\bRC\bCE\bE
824               An array variable whose members are the source  filenames  where
825               the  corresponding  shell  function  names in the F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE array
826               variable are defined.  The  shell  function  $\b${\b{F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE[\b[_\b$_\bi]\b]}\b}  is
827               defined   in   the   file  $\b${\b{B\bBA\bAS\bSH\bH_\b_S\bSO\bOU\bUR\bRC\bCE\bE[\b[_\b$_\bi]\b]}\b}  and  called  from
828               $\b${\b{B\bBA\bAS\bSH\bH_\b_S\bSO\bOU\bUR\bRC\bCE\bE[\b[_\b$_\bi_\b+_\b1]\b]}\b}.
829        B\bBA\bAS\bSH\bH_\b_S\bSU\bUB\bBS\bSH\bHE\bEL\bLL\bL
830               Incremented by one within each subshell or subshell  environment
831               when  the  shell begins executing in that environment.  The ini-
832               tial value is 0.
833        B\bBA\bAS\bSH\bH_\b_V\bVE\bER\bRS\bSI\bIN\bNF\bFO\bO
834               A readonly array variable whose members hold version information
835               for  this  instance  of  b\bba\bas\bsh\bh.  The values assigned to the array
836               members are as follows:
837               B\bBA\bAS\bSH\bH_\b_V\bVE\bER\bRS\bSI\bIN\bNF\bFO\bO[\b[0]\b]        The major version number (the  _\br_\be_\bl_\be_\ba_\bs_\be).
838               B\bBA\bAS\bSH\bH_\b_V\bVE\bER\bRS\bSI\bIN\bNF\bFO\bO[\b[1]\b]        The  minor version number (the _\bv_\be_\br_\bs_\bi_\bo_\bn).
839               B\bBA\bAS\bSH\bH_\b_V\bVE\bER\bRS\bSI\bIN\bNF\bFO\bO[\b[2]\b]        The patch level.
840               B\bBA\bAS\bSH\bH_\b_V\bVE\bER\bRS\bSI\bIN\bNF\bFO\bO[\b[3]\b]        The build version.
841               B\bBA\bAS\bSH\bH_\b_V\bVE\bER\bRS\bSI\bIN\bNF\bFO\bO[\b[4]\b]        The release status (e.g., _\bb_\be_\bt_\ba_\b1).
842               B\bBA\bAS\bSH\bH_\b_V\bVE\bER\bRS\bSI\bIN\bNF\bFO\bO[\b[5]\b]        The value of M\bMA\bAC\bCH\bHT\bTY\bYP\bPE\bE.
843        B\bBA\bAS\bSH\bH_\b_V\bVE\bER\bRS\bSI\bIO\bON\bN
844               Expands to a string describing the version of this  instance  of
845               b\bba\bas\bsh\bh.
846        C\bCO\bOM\bMP\bP_\b_C\bCW\bWO\bOR\bRD\bD
847               An  index  into $\b${\b{C\bCO\bOM\bMP\bP_\b_W\bWO\bOR\bRD\bDS\bS}\b} of the word containing the current
848               cursor position.  This variable is available only in shell func-
849               tions  invoked  by  the  programmable completion facilities (see
850               P\bPr\bro\bog\bgr\bra\bam\bmm\bma\bab\bbl\ble\be C\bCo\bom\bmp\bpl\ble\bet\bti\bio\bon\bn below).
851        C\bCO\bOM\bMP\bP_\b_K\bKE\bEY\bY
852               The key (or final key of a key sequence) used to invoke the cur-
853               rent completion function.
854        C\bCO\bOM\bMP\bP_\b_L\bLI\bIN\bNE\bE
855               The  current  command  line.  This variable is available only in
856               shell functions  and  external  commands  invoked  by  the  pro-
857               grammable  completion  facilities  (see  P\bPr\bro\bog\bgr\bra\bam\bmm\bma\bab\bbl\ble\be C\bCo\bom\bmp\bpl\ble\bet\bti\bio\bon\bn
858               below).
859        C\bCO\bOM\bMP\bP_\b_P\bPO\bOI\bIN\bNT\bT
860               The index of the current cursor position relative to the  begin-
861               ning  of the current command.  If the current cursor position is
862               at the end of the current command, the value of this variable is
863               equal  to  $\b${\b{#\b#C\bCO\bOM\bMP\bP_\b_L\bLI\bIN\bNE\bE}\b}.   This  variable  is available only in
864               shell functions  and  external  commands  invoked  by  the  pro-
865               grammable  completion  facilities  (see  P\bPr\bro\bog\bgr\bra\bam\bmm\bma\bab\bbl\ble\be C\bCo\bom\bmp\bpl\ble\bet\bti\bio\bon\bn
866               below).
867        C\bCO\bOM\bMP\bP_\b_T\bTY\bYP\bPE\bE
868               Set to an integer value corresponding to the type of  completion
869               attempted  that  caused a completion function to be called: _\bT_\bA_\bB,
870               for normal completion, _\b?, for listing completions after  succes-
871               sive  tabs,  _\b!, for listing alternatives on partial word comple-
872               tion, _\b@, to list completions if the word is not  unmodified,  or
873               _\b%,  for  menu  completion.   This  variable is available only in
874               shell functions  and  external  commands  invoked  by  the  pro-
875               grammable  completion  facilities  (see  P\bPr\bro\bog\bgr\bra\bam\bmm\bma\bab\bbl\ble\be C\bCo\bom\bmp\bpl\ble\bet\bti\bio\bon\bn
876               below).
877        C\bCO\bOM\bMP\bP_\b_W\bWO\bOR\bRD\bDB\bBR\bRE\bEA\bAK\bKS\bS
878               The set of characters that the r\bre\bea\bad\bdl\bli\bin\bne\be library treats  as  word
879               separators  when performing word completion.  If C\bCO\bOM\bMP\bP_\b_W\bWO\bOR\bRD\bDB\bBR\bRE\bEA\bAK\bKS\bS
880               is unset, it loses its special properties, even if it is  subse-
881               quently reset.
882        C\bCO\bOM\bMP\bP_\b_W\bWO\bOR\bRD\bDS\bS
883               An  array variable (see A\bAr\brr\bra\bay\bys\bs below) consisting of the individ-
884               ual words in the current command line.  The line is  split  into
885               words  as  r\bre\bea\bad\bdl\bli\bin\bne\be  would  split  it,  using C\bCO\bOM\bMP\bP_\b_W\bWO\bOR\bRD\bDB\bBR\bRE\bEA\bAK\bKS\bS as
886               described above.  This variable is available only in shell func-
887               tions  invoked  by  the  programmable completion facilities (see
888               P\bPr\bro\bog\bgr\bra\bam\bmm\bma\bab\bbl\ble\be C\bCo\bom\bmp\bpl\ble\bet\bti\bio\bon\bn below).
889        C\bCO\bOP\bPR\bRO\bOC\bC An array variable (see A\bAr\brr\bra\bay\bys\bs below) created to  hold  the  file
890               descriptors  for  output  from and input to an unnamed coprocess
891               (see C\bCo\bop\bpr\bro\boc\bce\bes\bss\bse\bes\bs above).
892        D\bDI\bIR\bRS\bST\bTA\bAC\bCK\bK
893               An array variable (see A\bAr\brr\bra\bay\bys\bs below) containing the current con-
894               tents  of  the directory stack.  Directories appear in the stack
895               in the order they are displayed by the d\bdi\bir\brs\bs builtin.   Assigning
896               to members of this array variable may be used to modify directo-
897               ries already in the stack, but the p\bpu\bus\bsh\bhd\bd and p\bpo\bop\bpd\bd builtins  must
898               be used to add and remove directories.  Assignment to this vari-
899               able will not change the  current  directory.   If  D\bDI\bIR\bRS\bST\bTA\bAC\bCK\bK  is
900               unset,  it  loses  its  special properties, even if it is subse-
901               quently reset.
902        E\bEU\bUI\bID\bD   Expands to the effective user ID of the current  user,  initial-
903               ized at shell startup.  This variable is readonly.
904        F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE
905               An  array  variable  containing the names of all shell functions
906               currently in the execution call stack.  The element with index 0
907               is the name of any currently-executing shell function.  The bot-
908               tom-most element (the one with the  highest  index)  is  "main".
909               This  variable  exists  only when a shell function is executing.
910               Assignments to F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE have no effect and return an error  sta-
911               tus.   If  F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE  is  unset, it loses its special properties,
912               even if it is subsequently reset.
913
914               This variable can be  used  with  B\bBA\bAS\bSH\bH_\b_L\bLI\bIN\bNE\bEN\bNO\bO  and  B\bBA\bAS\bSH\bH_\b_S\bSO\bOU\bUR\bRC\bCE\bE.
915               Each   element   of   F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE  has  corresponding  elements  in
916               B\bBA\bAS\bSH\bH_\b_L\bLI\bIN\bNE\bEN\bNO\bO and B\bBA\bAS\bSH\bH_\b_S\bSO\bOU\bUR\bRC\bCE\bE to describe  the  call  stack.   For
917               instance,    $\b${\b{F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE[\b[_\b$_\bi]\b]}\b}    was   called   from   the   file
918               $\b${\b{B\bBA\bAS\bSH\bH_\b_S\bSO\bOU\bUR\bRC\bCE\bE[\b[_\b$_\bi_\b+_\b1]\b]}\b} at  line  number  $\b${\b{B\bBA\bAS\bSH\bH_\b_L\bLI\bIN\bNE\bEN\bNO\bO[\b[_\b$_\bi]\b]}\b}.   The
919               c\bca\bal\bll\ble\ber\br builtin displays the current call stack using this infor-
920               mation.
921        G\bGR\bRO\bOU\bUP\bPS\bS An array variable containing the list of  groups  of  which  the
922               current  user is a member.  Assignments to G\bGR\bRO\bOU\bUP\bPS\bS have no effect
923               and return an error status.  If G\bGR\bRO\bOU\bUP\bPS\bS is unset,  it  loses  its
924               special properties, even if it is subsequently reset.
925        H\bHI\bIS\bST\bTC\bCM\bMD\bD
926               The history number, or index in the history list, of the current
927               command.  If H\bHI\bIS\bST\bTC\bCM\bMD\bD is unset, it loses its special  properties,
928               even if it is subsequently reset.
929        H\bHO\bOS\bST\bTN\bNA\bAM\bME\bE
930               Automatically set to the name of the current host.
931        H\bHO\bOS\bST\bTT\bTY\bYP\bPE\bE
932               Automatically  set  to a string that uniquely describes the type
933               of machine on which b\bba\bas\bsh\bh is executing.  The default  is  system-
934               dependent.
935        L\bLI\bIN\bNE\bEN\bNO\bO Each  time this parameter is referenced, the shell substitutes a
936               decimal number representing the current sequential  line  number
937               (starting  with  1)  within a script or function.  When not in a
938               script or function, the value substituted is not  guaranteed  to
939               be meaningful.  If L\bLI\bIN\bNE\bEN\bNO\bO is unset, it loses its special proper-
940               ties, even if it is subsequently reset.
941        M\bMA\bAC\bCH\bHT\bTY\bYP\bPE\bE
942               Automatically set to a string that fully  describes  the  system
943               type  on  which  b\bba\bas\bsh\bh is executing, in the standard GNU _\bc_\bp_\bu_\b-_\bc_\bo_\bm_\b-
944               _\bp_\ba_\bn_\by_\b-_\bs_\by_\bs_\bt_\be_\bm format.  The default is system-dependent.
945        M\bMA\bAP\bPF\bFI\bIL\bLE\bE
946               An array variable (see A\bAr\brr\bra\bay\bys\bs below) created to  hold  the  text
947               read by the m\bma\bap\bpf\bfi\bil\ble\be builtin when no variable name is supplied.
948        O\bOL\bLD\bDP\bPW\bWD\bD The previous working directory as set by the c\bcd\bd command.
949        O\bOP\bPT\bTA\bAR\bRG\bG The  value  of the last option argument processed by the g\bge\bet\bto\bop\bpt\bts\bs
950               builtin command (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below).
951        O\bOP\bPT\bTI\bIN\bND\bD The index of the next argument to be processed  by  the  g\bge\bet\bto\bop\bpt\bts\bs
952               builtin command (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below).
953        O\bOS\bST\bTY\bYP\bPE\bE Automatically  set to a string that describes the operating sys-
954               tem on which b\bba\bas\bsh\bh is executing.  The  default  is  system-depen-
955               dent.
956        P\bPI\bIP\bPE\bES\bST\bTA\bAT\bTU\bUS\bS
957               An  array  variable (see A\bAr\brr\bra\bay\bys\bs below) containing a list of exit
958               status values from the processes in  the  most-recently-executed
959               foreground pipeline (which may contain only a single command).
960        P\bPP\bPI\bID\bD   The  process  ID  of the shell's parent.  This variable is read-
961               only.
962        P\bPW\bWD\bD    The current working directory as set by the c\bcd\bd command.
963        R\bRA\bAN\bND\bDO\bOM\bM Each time this parameter is referenced, a random integer between
964               0 and 32767 is generated.  The sequence of random numbers may be
965               initialized by assigning a value to R\bRA\bAN\bND\bDO\bOM\bM.  If R\bRA\bAN\bND\bDO\bOM\bM is unset,
966               it  loses  its  special  properties,  even if it is subsequently
967               reset.
968        R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE_\b_L\bLI\bIN\bNE\bE
969               The contents of the r\bre\bea\bad\bdl\bli\bin\bne\be line buffer, for use with "bind -x"
970               (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below).
971        R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE_\b_P\bPO\bOI\bIN\bNT\bT
972               The position of the insertion point in the r\bre\bea\bad\bdl\bli\bin\bne\be line buffer,
973               for use with "bind -x" (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below).
974        R\bRE\bEP\bPL\bLY\bY  Set to the line of input read by the r\bre\bea\bad\bd builtin  command  when
975               no arguments are supplied.
976        S\bSE\bEC\bCO\bON\bND\bDS\bS
977               Each  time  this  parameter is referenced, the number of seconds
978               since shell invocation is returned.  If a value is  assigned  to
979               S\bSE\bEC\bCO\bON\bND\bDS\bS,  the  value  returned upon subsequent references is the
980               number of seconds since the assignment plus the value  assigned.
981               If S\bSE\bEC\bCO\bON\bND\bDS\bS is unset, it loses its special properties, even if it
982               is subsequently reset.
983        S\bSH\bHE\bEL\bLL\bLO\bOP\bPT\bTS\bS
984               A colon-separated list of enabled shell options.  Each  word  in
985               the  list  is  a  valid  argument  for  the -\b-o\bo option to the s\bse\bet\bt
986               builtin command (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below).  The options
987               appearing  in  S\bSH\bHE\bEL\bLL\bLO\bOP\bPT\bTS\bS are those reported as _\bo_\bn by s\bse\bet\bt -\b-o\bo.  If
988               this variable is in the environment when b\bba\bas\bsh\bh  starts  up,  each
989               shell  option  in  the  list  will be enabled before reading any
990               startup files.  This variable is read-only.
991        S\bSH\bHL\bLV\bVL\bL  Incremented by one each time an instance of b\bba\bas\bsh\bh is started.
992        U\bUI\bID\bD    Expands to the user ID of the current user, initialized at shell
993               startup.  This variable is readonly.
994
995        The  following  variables  are  used by the shell.  In some cases, b\bba\bas\bsh\bh
996        assigns a default value to a variable; these cases are noted below.
997
998        B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMP\bPA\bAT\bT
999               The value is used to set the shell's compatibility  level.   See
1000               the  description  of the s\bsh\bho\bop\bpt\bt builtin below under S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN
1001               C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS for a description of the various  compatibility  levels
1002               and  their  effects.   The  value may be a decimal number (e.g.,
1003               4.2) or an integer (e.g., 42) corresponding to the desired  com-
1004               patibility  level.   If B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMP\bPA\bAT\bT is unset or set to the empty
1005               string, the compatibility level is set to the  default  for  the
1006               current  version.   If B\bBA\bAS\bSH\bH_\b_C\bCO\bOM\bMP\bPA\bAT\bT is set to a value that is not
1007               one of the valid compatibility levels, the shell prints an error
1008               message  and sets the compatibility level to the default for the
1009               current version.  The valid compatibility levels  correspond  to
1010               the   compatibility   options  accepted  by  the  s\bsh\bho\bop\bpt\bt  builtin
1011               described below (for example, c\bco\bom\bmp\bpa\bat\bt4\b42\b2 means that 4.2 and 42 are
1012               valid values).  The current version is also a valid value.
1013        B\bBA\bAS\bSH\bH_\b_E\bEN\bNV\bV
1014               If  this parameter is set when b\bba\bas\bsh\bh is executing a shell script,
1015               its value is interpreted as a filename  containing  commands  to
1016               initialize the shell, as in _\b~_\b/_\b._\bb_\ba_\bs_\bh_\br_\bc.  The value of B\bBA\bAS\bSH\bH_\b_E\bEN\bNV\bV is
1017               subjected to  parameter  expansion,  command  substitution,  and
1018               arithmetic  expansion  before  being  interpreted as a filename.
1019               P\bPA\bAT\bTH\bH is not used to search for the resultant filename.
1020        B\bBA\bAS\bSH\bH_\b_X\bXT\bTR\bRA\bAC\bCE\bEF\bFD\bD
1021               If set to an integer corresponding to a valid  file  descriptor,
1022               b\bba\bas\bsh\bh  will  write  the  trace  output  generated  when _\bs_\be_\bt _\b-_\bx is
1023               enabled to that file descriptor.  The file descriptor is  closed
1024               when  B\bBA\bAS\bSH\bH_\b_X\bXT\bTR\bRA\bAC\bCE\bEF\bFD\bD is unset or assigned a new value.  Unsetting
1025               B\bBA\bAS\bSH\bH_\b_X\bXT\bTR\bRA\bAC\bCE\bEF\bFD\bD or assigning it the empty string causes the  trace
1026               output  to  be  sent  to  the standard error.  Note that setting
1027               B\bBA\bAS\bSH\bH_\b_X\bXT\bTR\bRA\bAC\bCE\bEF\bFD\bD to 2 (the standard error file descriptor) and then
1028               unsetting it will result in the standard error being closed.
1029        C\bCD\bDP\bPA\bAT\bTH\bH The  search  path for the c\bcd\bd command.  This is a colon-separated
1030               list of directories in which the  shell  looks  for  destination
1031               directories  specified  by  the  c\bcd\bd  command.  A sample value is
1032               ".:~:/usr".
1033        C\bCH\bHI\bIL\bLD\bD_\b_M\bMA\bAX\bX
1034               Set the number of exited child status values for  the  shell  to
1035               remember.   Bash will not allow this value to be decreased below
1036               a POSIX-mandated minimum, and there is  a  maximum  value  (cur-
1037               rently  8192)  that  this  may not exceed.  The minimum value is
1038               system-dependent.
1039        C\bCO\bOL\bLU\bUM\bMN\bNS\bS
1040               Used by the s\bse\bel\ble\bec\bct\bt compound command to  determine  the  terminal
1041               width  when  printing selection lists.  Automatically set if the
1042               c\bch\bhe\bec\bck\bkw\bwi\bin\bns\bsi\biz\bze\be option is enabled or in an interactive  shell  upon
1043               receipt of a S\bSI\bIG\bGW\bWI\bIN\bNC\bCH\bH.
1044        C\bCO\bOM\bMP\bPR\bRE\bEP\bPL\bLY\bY
1045               An array variable from which b\bba\bas\bsh\bh reads the possible completions
1046               generated by a shell function invoked by the  programmable  com-
1047               pletion  facility  (see  P\bPr\bro\bog\bgr\bra\bam\bmm\bma\bab\bbl\ble\be  C\bCo\bom\bmp\bpl\ble\bet\bti\bio\bon\bn  below).  Each
1048               array element contains one possible completion.
1049        E\bEM\bMA\bAC\bCS\bS  If b\bba\bas\bsh\bh finds this variable in the environment  when  the  shell
1050               starts  with  value "t", it assumes that the shell is running in
1051               an Emacs shell buffer and disables line editing.
1052        E\bEN\bNV\bV    Similar to B\bBA\bAS\bSH\bH_\b_E\bEN\bNV\bV; used when the shell  is  invoked  in  POSIX
1053               mode.
1054        F\bFC\bCE\bED\bDI\bIT\bT The default editor for the f\bfc\bc builtin command.
1055        F\bFI\bIG\bGN\bNO\bOR\bRE\bE
1056               A  colon-separated  list  of  suffixes to ignore when performing
1057               filename completion (see R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE below).  A filename whose suf-
1058               fix  matches  one of the entries in F\bFI\bIG\bGN\bNO\bOR\bRE\bE is excluded from the
1059               list of matched filenames.  A sample value is ".o:~".
1060        F\bFU\bUN\bNC\bCN\bNE\bES\bST\bT
1061               If set to a numeric value greater  than  0,  defines  a  maximum
1062               function  nesting  level.  Function invocations that exceed this
1063               nesting level will cause the current command to abort.
1064        G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE
1065               A colon-separated list of patterns defining the set of filenames
1066               to be ignored by pathname expansion.  If a filename matched by a
1067               pathname expansion pattern also matches one of the  patterns  in
1068               G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE, it is removed from the list of matches.
1069        H\bHI\bIS\bST\bTC\bCO\bON\bNT\bTR\bRO\bOL\bL
1070               A  colon-separated  list  of values controlling how commands are
1071               saved on the history list.   If  the  list  of  values  includes
1072               _\bi_\bg_\bn_\bo_\br_\be_\bs_\bp_\ba_\bc_\be,  lines  which  begin with a s\bsp\bpa\bac\bce\be character are not
1073               saved in the history list.  A value of _\bi_\bg_\bn_\bo_\br_\be_\bd_\bu_\bp_\bs  causes  lines
1074               matching the previous history entry to not be saved.  A value of
1075               _\bi_\bg_\bn_\bo_\br_\be_\bb_\bo_\bt_\bh is shorthand for _\bi_\bg_\bn_\bo_\br_\be_\bs_\bp_\ba_\bc_\be and _\bi_\bg_\bn_\bo_\br_\be_\bd_\bu_\bp_\bs.  A value
1076               of _\be_\br_\ba_\bs_\be_\bd_\bu_\bp_\bs causes all previous lines matching the current line
1077               to be removed from the history list before that line  is  saved.
1078               Any  value  not in the above list is ignored.  If H\bHI\bIS\bST\bTC\bCO\bON\bNT\bTR\bRO\bOL\bL is
1079               unset, or does not include a valid value, all lines read by  the
1080               shell parser are saved on the history list, subject to the value
1081               of H\bHI\bIS\bST\bTI\bIG\bGN\bNO\bOR\bRE\bE.  The second and subsequent lines of a  multi-line
1082               compound  command  are  not tested, and are added to the history
1083               regardless of the value of H\bHI\bIS\bST\bTC\bCO\bON\bNT\bTR\bRO\bOL\bL.
1084        H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE
1085               The name of the file in which command history is saved (see H\bHI\bIS\bS-\b-
1086               T\bTO\bOR\bRY\bY  below).   The default value is _\b~_\b/_\b._\bb_\ba_\bs_\bh_\b__\bh_\bi_\bs_\bt_\bo_\br_\by.  If unset,
1087               the command history is not saved when a shell exits.
1088        H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bES\bSI\bIZ\bZE\bE
1089               The maximum number of lines contained in the history file.  When
1090               this  variable  is  assigned  a value, the history file is trun-
1091               cated, if necessary, to contain no  more  than  that  number  of
1092               lines  by removing the oldest entries.  The history file is also
1093               truncated to this size after writing it when a shell exits.   If
1094               the  value  is  0,  the  history file is truncated to zero size.
1095               Non-numeric values and numeric values  less  than  zero  inhibit
1096               truncation.   The  shell  sets the default value to the value of
1097               H\bHI\bIS\bST\bTS\bSI\bIZ\bZE\bE after reading any startup files.
1098        H\bHI\bIS\bST\bTI\bIG\bGN\bNO\bOR\bRE\bE
1099               A colon-separated list of patterns used to decide which  command
1100               lines  should  be  saved  on  the history list.  Each pattern is
1101               anchored at the beginning of the line and must  match  the  com-
1102               plete  line  (no  implicit  `*\b*'  is  appended).  Each pattern is
1103               tested against the line after the checks specified  by  H\bHI\bIS\bST\bTC\bCO\bON\bN-\b-
1104               T\bTR\bRO\bOL\bL  are  applied.   In  addition  to  the normal shell pattern
1105               matching characters, `&\b&' matches the previous history line.  `&\b&'
1106               may  be  escaped  using  a  backslash;  the backslash is removed
1107               before attempting a match.  The second and subsequent lines of a
1108               multi-line compound command are not tested, and are added to the
1109               history regardless of the value of H\bHI\bIS\bST\bTI\bIG\bGN\bNO\bOR\bRE\bE.
1110        H\bHI\bIS\bST\bTS\bSI\bIZ\bZE\bE
1111               The number of commands to remember in the command  history  (see
1112               H\bHI\bIS\bST\bTO\bOR\bRY\bY  below).   If  the value is 0, commands are not saved in
1113               the history list.  Numeric values less than zero result in every
1114               command  being  saved  on  the history list (there is no limit).
1115               The shell sets the  default  value  to  500  after  reading  any
1116               startup files.
1117        H\bHI\bIS\bST\bTT\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT
1118               If  this  variable  is  set and not null, its value is used as a
1119               format string for _\bs_\bt_\br_\bf_\bt_\bi_\bm_\be(3) to print the time stamp associated
1120               with  each  history  entry displayed by the h\bhi\bis\bst\bto\bor\bry\by builtin.  If
1121               this variable is set, time stamps are  written  to  the  history
1122               file  so they may be preserved across shell sessions.  This uses
1123               the history comment character  to  distinguish  timestamps  from
1124               other history lines.
1125        H\bHO\bOM\bME\bE   The home directory of the current user; the default argument for
1126               the c\bcd\bd builtin command.  The value of this variable is also used
1127               when performing tilde expansion.
1128        H\bHO\bOS\bST\bTF\bFI\bIL\bLE\bE
1129               Contains  the  name  of  a file in the same format as _\b/_\be_\bt_\bc_\b/_\bh_\bo_\bs_\bt_\bs
1130               that should be read when the shell needs to complete a hostname.
1131               The  list  of possible hostname completions may be changed while
1132               the shell is running;  the  next  time  hostname  completion  is
1133               attempted  after the value is changed, b\bba\bas\bsh\bh adds the contents of
1134               the new file to the existing list.  If H\bHO\bOS\bST\bTF\bFI\bIL\bLE\bE is set, but  has
1135               no  value,  or  does  not name a readable file, b\bba\bas\bsh\bh attempts to
1136               read _\b/_\be_\bt_\bc_\b/_\bh_\bo_\bs_\bt_\bs to obtain the list of possible hostname  comple-
1137               tions.  When H\bHO\bOS\bST\bTF\bFI\bIL\bLE\bE is unset, the hostname list is cleared.
1138        I\bIF\bFS\bS    The  _\bI_\bn_\bt_\be_\br_\bn_\ba_\bl  _\bF_\bi_\be_\bl_\bd  _\bS_\be_\bp_\ba_\br_\ba_\bt_\bo_\br  that is used for word splitting
1139               after expansion and to split lines  into  words  with  the  r\bre\bea\bad\bd
1140               builtin  command.   The  default  value  is  ``<space><tab><new-
1141               line>''.
1142        I\bIG\bGN\bNO\bOR\bRE\bEE\bEO\bOF\bF
1143               Controls the action of an interactive shell on receipt of an E\bEO\bOF\bF
1144               character as the sole input.  If set, the value is the number of
1145               consecutive E\bEO\bOF\bF characters which must  be  typed  as  the  first
1146               characters  on an input line before b\bba\bas\bsh\bh exits.  If the variable
1147               exists but does not have a numeric value, or has no  value,  the
1148               default  value  is  10.  If it does not exist, E\bEO\bOF\bF signifies the
1149               end of input to the shell.
1150        I\bIN\bNP\bPU\bUT\bTR\bRC\bC
1151               The filename for  the  r\bre\bea\bad\bdl\bli\bin\bne\be  startup  file,  overriding  the
1152               default of _\b~_\b/_\b._\bi_\bn_\bp_\bu_\bt_\br_\bc (see R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE below).
1153        L\bLA\bAN\bNG\bG   Used  to  determine  the  locale  category  for any category not
1154               specifically selected with a variable starting with L\bLC\bC_\b_.
1155        L\bLC\bC_\b_A\bAL\bLL\bL This variable overrides the value of  L\bLA\bAN\bNG\bG  and  any  other  L\bLC\bC_\b_
1156               variable specifying a locale category.
1157        L\bLC\bC_\b_C\bCO\bOL\bLL\bLA\bAT\bTE\bE
1158               This  variable  determines the collation order used when sorting
1159               the results of pathname expansion, and determines  the  behavior
1160               of   range   expressions,  equivalence  classes,  and  collating
1161               sequences within pathname expansion and pattern matching.
1162        L\bLC\bC_\b_C\bCT\bTY\bYP\bPE\bE
1163               This variable determines the interpretation  of  characters  and
1164               the  behavior of character classes within pathname expansion and
1165               pattern matching.
1166        L\bLC\bC_\b_M\bME\bES\bSS\bSA\bAG\bGE\bES\bS
1167               This variable determines the locale used  to  translate  double-
1168               quoted strings preceded by a $\b$.
1169        L\bLC\bC_\b_N\bNU\bUM\bME\bER\bRI\bIC\bC
1170               This  variable  determines  the  locale category used for number
1171               formatting.
1172        L\bLI\bIN\bNE\bES\bS  Used by the s\bse\bel\ble\bec\bct\bt compound  command  to  determine  the  column
1173               length  for  printing selection lists.  Automatically set if the
1174               c\bch\bhe\bec\bck\bkw\bwi\bin\bns\bsi\biz\bze\be option is enabled or in an interactive  shell  upon
1175               receipt of a S\bSI\bIG\bGW\bWI\bIN\bNC\bCH\bH.
1176        M\bMA\bAI\bIL\bL   If  this  parameter  is  set to a file or directory name and the
1177               M\bMA\bAI\bIL\bLP\bPA\bAT\bTH\bH variable is not set,  b\bba\bas\bsh\bh  informs  the  user  of  the
1178               arrival  of  mail in the specified file or Maildir-format direc-
1179               tory.
1180        M\bMA\bAI\bIL\bLC\bCH\bHE\bEC\bCK\bK
1181               Specifies how often (in seconds)  b\bba\bas\bsh\bh  checks  for  mail.   The
1182               default  is  60 seconds.  When it is time to check for mail, the
1183               shell does so before displaying the  primary  prompt.   If  this
1184               variable  is  unset,  or  set  to  a  value that is not a number
1185               greater than or equal to zero, the shell disables mail checking.
1186        M\bMA\bAI\bIL\bLP\bPA\bAT\bTH\bH
1187               A colon-separated list of filenames to be checked for mail.  The
1188               message to be printed when mail arrives in a particular file may
1189               be  specified by separating the filename from the message with a
1190               `?'.  When used in the text of the message, $\b$_\b_  expands  to  the
1191               name of the current mailfile.  Example:
1192               M\bMA\bAI\bIL\bLP\bPA\bAT\bTH\bH='/var/mail/bfox?"You  have  mail":~/shell-mail?"$_  has
1193               mail!"'
1194               B\bBa\bas\bsh\bh supplies a default value for this variable, but  the  loca-
1195               tion  of  the  user  mail files that it uses is system dependent
1196               (e.g., /var/mail/$\b$U\bUS\bSE\bER\bR).
1197        O\bOP\bPT\bTE\bER\bRR\bR If set to the value 1, b\bba\bas\bsh\bh displays error messages generated by
1198               the  g\bge\bet\bto\bop\bpt\bts\bs builtin command (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below).
1199               O\bOP\bPT\bTE\bER\bRR\bR is initialized to 1 each time the shell is invoked  or  a
1200               shell script is executed.
1201        P\bPA\bAT\bTH\bH   The  search  path for commands.  It is a colon-separated list of
1202               directories in which the shell looks for commands  (see  C\bCO\bOM\bMM\bMA\bAN\bND\bD
1203               E\bEX\bXE\bEC\bCU\bUT\bTI\bIO\bON\bN  below).   A  zero-length (null) directory name in the
1204               value of P\bPA\bAT\bTH\bH indicates the current directory.  A null directory
1205               name  may  appear  as  two  adjacent colons, or as an initial or
1206               trailing colon.  The default path is  system-dependent,  and  is
1207               set  by  the administrator who installs b\bba\bas\bsh\bh.  A common value is
1208               ``/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin''.
1209        P\bPO\bOS\bSI\bIX\bXL\bLY\bY_\b_C\bCO\bOR\bRR\bRE\bEC\bCT\bT
1210               If  this  variable  is  in the environment when b\bba\bas\bsh\bh starts, the
1211               shell enters _\bp_\bo_\bs_\bi_\bx _\bm_\bo_\bd_\be before reading the startup files, as  if
1212               the  -\b--\b-p\bpo\bos\bsi\bix\bx  invocation option had been supplied.  If it is set
1213               while the shell is running, b\bba\bas\bsh\bh enables _\bp_\bo_\bs_\bi_\bx _\bm_\bo_\bd_\be, as  if  the
1214               command _\bs_\be_\bt _\b-_\bo _\bp_\bo_\bs_\bi_\bx had been executed.
1215        P\bPR\bRO\bOM\bMP\bPT\bT_\b_C\bCO\bOM\bMM\bMA\bAN\bND\bD
1216               If set, the value is executed as a command prior to issuing each
1217               primary prompt.
1218        P\bPR\bRO\bOM\bMP\bPT\bT_\b_D\bDI\bIR\bRT\bTR\bRI\bIM\bM
1219               If set to a number greater than zero, the value is used  as  the
1220               number of trailing directory components to retain when expanding
1221               the \\b\w\bw and \\b\W\bW  prompt  string  escapes  (see  P\bPR\bRO\bOM\bMP\bPT\bTI\bIN\bNG\bG  below).
1222               Characters removed are replaced with an ellipsis.
1223        P\bPS\bS1\b1    The  value  of  this parameter is expanded (see P\bPR\bRO\bOM\bMP\bPT\bTI\bIN\bNG\bG below)
1224               and used as the primary prompt string.   The  default  value  is
1225               ``\\b\s\bs-\b-\\b\v\bv\\b\$\b$ ''.
1226        P\bPS\bS2\b2    The  value of this parameter is expanded as with P\bPS\bS1\b1 and used as
1227               the secondary prompt string.  The default is ``>\b> ''.
1228        P\bPS\bS3\b3    The value of this parameter is used as the prompt for the s\bse\bel\ble\bec\bct\bt
1229               command (see S\bSH\bHE\bEL\bLL\bL G\bGR\bRA\bAM\bMM\bMA\bAR\bR above).
1230        P\bPS\bS4\b4    The  value  of  this  parameter  is expanded as with P\bPS\bS1\b1 and the
1231               value is printed before each command  b\bba\bas\bsh\bh  displays  during  an
1232               execution  trace.  The first character of P\bPS\bS4\b4 is replicated mul-
1233               tiple times, as necessary, to indicate multiple levels of  indi-
1234               rection.  The default is ``+\b+ ''.
1235        S\bSH\bHE\bEL\bLL\bL  The full pathname to the shell is kept in this environment vari-
1236               able.  If it is not set when the shell starts, b\bba\bas\bsh\bh  assigns  to
1237               it the full pathname of the current user's login shell.
1238        T\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT
1239               The  value of this parameter is used as a format string specify-
1240               ing how the timing information for pipelines prefixed  with  the
1241               t\bti\bim\bme\be  reserved word should be displayed.  The %\b% character intro-
1242               duces an escape sequence that is expanded to  a  time  value  or
1243               other  information.  The escape sequences and their meanings are
1244               as follows; the braces denote optional portions.
1245               %\b%%\b%        A literal %\b%.
1246               %\b%[\b[_\bp]\b][\b[l\bl]\b]R\bR  The elapsed time in seconds.
1247               %\b%[\b[_\bp]\b][\b[l\bl]\b]U\bU  The number of CPU seconds spent in user mode.
1248               %\b%[\b[_\bp]\b][\b[l\bl]\b]S\bS  The number of CPU seconds spent in system mode.
1249               %\b%P\bP        The CPU percentage, computed as (%U + %S) / %R.
1250
1251               The optional _\bp is a digit specifying the _\bp_\br_\be_\bc_\bi_\bs_\bi_\bo_\bn,  the  number
1252               of fractional digits after a decimal point.  A value of 0 causes
1253               no decimal point or fraction to be output.  At most three places
1254               after  the  decimal  point may be specified; values of _\bp greater
1255               than 3 are changed to 3.  If _\bp is not specified, the value 3  is
1256               used.
1257
1258               The  optional l\bl specifies a longer format, including minutes, of
1259               the form _\bM_\bMm_\bS_\bS._\bF_\bFs.  The value of _\bp determines  whether  or  not
1260               the fraction is included.
1261
1262               If  this  variable  is not set, b\bba\bas\bsh\bh acts as if it had the value
1263               $\b$'\b'\\b\n\bnr\bre\bea\bal\bl\\b\t\bt%\b%3\b3l\blR\bR\\b\n\bnu\bus\bse\ber\br\\b\t\bt%\b%3\b3l\blU\bU\\b\n\bns\bsy\bys\bs\\b\t\bt%\b%3\b3l\blS\bS'\b'.  If the value  is  null,
1264               no timing information is displayed.  A trailing newline is added
1265               when the format string is displayed.
1266        T\bTM\bMO\bOU\bUT\bT  If set to a value greater than zero, T\bTM\bMO\bOU\bUT\bT  is  treated  as  the
1267               default timeout for the r\bre\bea\bad\bd builtin.  The s\bse\bel\ble\bec\bct\bt command termi-
1268               nates if input does not arrive after T\bTM\bMO\bOU\bUT\bT seconds when input is
1269               coming  from  a terminal.  In an interactive shell, the value is
1270               interpreted as the number of seconds to wait for a line of input
1271               after issuing the primary prompt.  B\bBa\bas\bsh\bh terminates after waiting
1272               for that number of seconds if a complete line of input does  not
1273               arrive.
1274        T\bTM\bMP\bPD\bDI\bIR\bR If  set, b\bba\bas\bsh\bh uses its value as the name of a directory in which
1275               b\bba\bas\bsh\bh creates temporary files for the shell's use.
1276        a\bau\but\bto\bo_\b_r\bre\bes\bsu\bum\bme\be
1277               This variable controls how the shell interacts with the user and
1278               job  control.   If this variable is set, single word simple com-
1279               mands without redirections are treated as candidates for resump-
1280               tion of an existing stopped job.  There is no ambiguity allowed;
1281               if there is more than one job beginning with the  string  typed,
1282               the  job  most  recently  accessed  is  selected.  The _\bn_\ba_\bm_\be of a
1283               stopped job, in this context, is the command line used to  start
1284               it.   If  set to the value _\be_\bx_\ba_\bc_\bt, the string supplied must match
1285               the name of a stopped job exactly;  if  set  to  _\bs_\bu_\bb_\bs_\bt_\br_\bi_\bn_\bg,  the
1286               string  supplied  needs  to  match  a substring of the name of a
1287               stopped job.  The _\bs_\bu_\bb_\bs_\bt_\br_\bi_\bn_\bg value provides functionality  analo-
1288               gous  to the %\b%?\b?  job identifier (see J\bJO\bOB\bB C\bCO\bON\bNT\bTR\bRO\bOL\bL below).  If set
1289               to any other value, the supplied string must be a  prefix  of  a
1290               stopped job's name; this provides functionality analogous to the
1291               %\b%_\bs_\bt_\br_\bi_\bn_\bg job identifier.
1292        h\bhi\bis\bst\btc\bch\bha\bar\brs\bs
1293               The two or three characters which control history expansion  and
1294               tokenization (see H\bHI\bIS\bST\bTO\bOR\bRY\bY E\bEX\bXP\bPA\bAN\bNS\bSI\bIO\bON\bN below).  The first character
1295               is the _\bh_\bi_\bs_\bt_\bo_\br_\by _\be_\bx_\bp_\ba_\bn_\bs_\bi_\bo_\bn character, the character which  signals
1296               the  start  of  a  history  expansion, normally `!\b!'.  The second
1297               character is the _\bq_\bu_\bi_\bc_\bk _\bs_\bu_\bb_\bs_\bt_\bi_\bt_\bu_\bt_\bi_\bo_\bn character, which is used  as
1298               shorthand  for  re-running the previous command entered, substi-
1299               tuting one string for another in the command.   The  default  is
1300               `^\b^'.   The optional third character is the character which indi-
1301               cates that the remainder of the line is a comment when found  as
1302               the  first  character of a word, normally `#\b#'.  The history com-
1303               ment character causes history substitution to be skipped for the
1304               remaining  words on the line.  It does not necessarily cause the
1305               shell parser to treat the rest of the line as a comment.
1306
1307    A\bAr\brr\bra\bay\bys\bs
1308        B\bBa\bas\bsh\bh provides one-dimensional indexed and associative array  variables.
1309        Any  variable may be used as an indexed array; the d\bde\bec\bcl\bla\bar\bre\be builtin will
1310        explicitly declare an array.  There is no maximum limit on the size  of
1311        an  array, nor any requirement that members be indexed or assigned con-
1312        tiguously.  Indexed arrays are  referenced  using  integers  (including
1313        arithmetic  expressions)   and  are  zero-based; associative arrays are
1314        referenced using arbitrary strings.  Unless  otherwise  noted,  indexed
1315        array indices must be non-negative integers.
1316
1317        An  indexed  array is created automatically if any variable is assigned
1318        to using the syntax _\bn_\ba_\bm_\be[_\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt]=_\bv_\ba_\bl_\bu_\be.  The _\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt is treated as
1319        an arithmetic expression that must evaluate to a number.  To explicitly
1320        declare an indexed array, use d\bde\bec\bcl\bla\bar\bre\be -\b-a\ba _\bn_\ba_\bm_\be (see S\bSH\bHE\bEL\bLL\bL  B\bBU\bUI\bIL\bLT\bTI\bIN\bN  C\bCO\bOM\bM-\b-
1321        M\bMA\bAN\bND\bDS\bS  below).   d\bde\bec\bcl\bla\bar\bre\be  -\b-a\ba _\bn_\ba_\bm_\be[\b[_\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt]\b] is also accepted; the _\bs_\bu_\bb_\b-
1322        _\bs_\bc_\br_\bi_\bp_\bt is ignored.
1323
1324        Associative arrays are created using d\bde\bec\bcl\bla\bar\bre\be -\b-A\bA _\bn_\ba_\bm_\be.
1325
1326        Attributes may be specified for an array variable using the d\bde\bec\bcl\bla\bar\bre\be and
1327        r\bre\bea\bad\bdo\bon\bnl\bly\by  builtins.  Each attribute applies to all members of an array.
1328
1329        Arrays  are  assigned  to  using  compound  assignments  of  the   form
1330        _\bn_\ba_\bm_\be=(\b(value_\b1  ...  value_\bn)\b),  where  each  _\bv_\ba_\bl_\bu_\be  is  of  the form [_\bs_\bu_\bb_\b-
1331        _\bs_\bc_\br_\bi_\bp_\bt]=_\bs_\bt_\br_\bi_\bn_\bg.  Indexed array assignments do not require anything  but
1332        _\bs_\bt_\br_\bi_\bn_\bg.  When assigning to indexed arrays, if the optional brackets and
1333        subscript are supplied, that index is assigned to; otherwise the  index
1334        of  the element assigned is the last index assigned to by the statement
1335        plus one.  Indexing starts at zero.
1336
1337        When assigning to an associative array, the subscript is required.
1338
1339        This syntax is also accepted by the d\bde\bec\bcl\bla\bar\bre\be builtin.  Individual  array
1340        elements  may  be  assigned  to  using the _\bn_\ba_\bm_\be[_\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt]=_\bv_\ba_\bl_\bu_\be syntax
1341        introduced above.  When assigning to an indexed array, if _\bn_\ba_\bm_\be is  sub-
1342        scripted  by  a negative number, that number is interpreted as relative
1343        to one greater than the maximum index  of  _\bn_\ba_\bm_\be,  so  negative  indices
1344        count back from the end of the array, and an index of -1 references the
1345        last element.
1346
1347        Any element of an array may  be  referenced  using  ${_\bn_\ba_\bm_\be[_\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt]}.
1348        The braces are required to avoid conflicts with pathname expansion.  If
1349        _\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt is @\b@ or *\b*, the word expands to all members  of  _\bn_\ba_\bm_\be.   These
1350        subscripts  differ only when the word appears within double quotes.  If
1351        the word is double-quoted, ${_\bn_\ba_\bm_\be[*]} expands to a single word with the
1352        value  of each array member separated by the first character of the I\bIF\bFS\bS
1353        special variable, and ${_\bn_\ba_\bm_\be[@]} expands each element of _\bn_\ba_\bm_\be to a sep-
1354        arate  word.   When  there  are no array members, ${_\bn_\ba_\bm_\be[@]} expands to
1355        nothing.  If the double-quoted expansion  occurs  within  a  word,  the
1356        expansion  of  the first parameter is joined with the beginning part of
1357        the original word, and the expansion of the last  parameter  is  joined
1358        with  the  last  part  of  the original word.  This is analogous to the
1359        expansion of the special parameters *\b* and  @\b@  (see  S\bSp\bpe\bec\bci\bia\bal\bl  P\bPa\bar\bra\bam\bme\bet\bte\ber\brs\bs
1360        above).   ${#_\bn_\ba_\bm_\be[_\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt]}  expands  to  the  length  of ${_\bn_\ba_\bm_\be[_\bs_\bu_\bb_\b-
1361        _\bs_\bc_\br_\bi_\bp_\bt]}.  If _\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt is *\b* or @\b@, the expansion is the number of  ele-
1362        ments  in the array.  Referencing an array variable without a subscript
1363        is equivalent to referencing the array with a subscript of 0.   If  the
1364        _\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt used to reference an element of an indexed array evaluates to
1365        a number less than zero, it is interpreted as relative to  one  greater
1366        than  the  maximum  index  of the array, so negative indices count back
1367        from the end of the array, and an index of -1 references the last  ele-
1368        ment.
1369
1370        An  array variable is considered set if a subscript has been assigned a
1371        value.  The null string is a valid value.
1372
1373        It is possible to obtain the keys (indices) of an array as well as  the
1374        values.   ${!\b!_\bn_\ba_\bm_\be[_\b@]} and ${!\b!_\bn_\ba_\bm_\be[_\b*]} expand to the indices assigned in
1375        array variable _\bn_\ba_\bm_\be.  The treatment when in double quotes is similar to
1376        the expansion of the special parameters _\b@ and _\b* within double quotes.
1377
1378        The  u\bun\bns\bse\bet\bt  builtin  is  used to destroy arrays.  u\bun\bns\bse\bet\bt _\bn_\ba_\bm_\be[_\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt]
1379        destroys the array element at index _\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt.  Negative subscripts  to
1380        indexed  arrays are interpreted as described above.  Care must be taken
1381        to avoid unwanted side effects caused  by  pathname  expansion.   u\bun\bns\bse\bet\bt
1382        _\bn_\ba_\bm_\be, where _\bn_\ba_\bm_\be is an array, or u\bun\bns\bse\bet\bt _\bn_\ba_\bm_\be[_\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt], where _\bs_\bu_\bb_\bs_\bc_\br_\bi_\bp_\bt
1383        is *\b* or @\b@, removes the entire array.
1384
1385        The d\bde\bec\bcl\bla\bar\bre\be, l\blo\boc\bca\bal\bl, and r\bre\bea\bad\bdo\bon\bnl\bly\by builtins each accept a  -\b-a\ba  option  to
1386        specify  an  indexed  array  and  a -\b-A\bA option to specify an associative
1387        array.  If both options are supplied, -\b-A\bA takes  precedence.   The  r\bre\bea\bad\bd
1388        builtin  accepts  a  -\b-a\ba  option to assign a list of words read from the
1389        standard input to an array.  The s\bse\bet\bt and d\bde\bec\bcl\bla\bar\bre\be builtins display array
1390        values in a way that allows them to be reused as assignments.
1391
1392 E\bEX\bXP\bPA\bAN\bNS\bSI\bIO\bON\bN
1393        Expansion is performed on the command line after it has been split into
1394        words.  There are seven kinds of expansion performed: _\bb_\br_\ba_\bc_\be  _\be_\bx_\bp_\ba_\bn_\bs_\bi_\bo_\bn,
1395        _\bt_\bi_\bl_\bd_\be  _\be_\bx_\bp_\ba_\bn_\bs_\bi_\bo_\bn,  _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br  _\ba_\bn_\bd _\bv_\ba_\br_\bi_\ba_\bb_\bl_\be _\be_\bx_\bp_\ba_\bn_\bs_\bi_\bo_\bn, _\bc_\bo_\bm_\bm_\ba_\bn_\bd _\bs_\bu_\bb_\bs_\bt_\bi_\bt_\bu_\b-
1396        _\bt_\bi_\bo_\bn, _\ba_\br_\bi_\bt_\bh_\bm_\be_\bt_\bi_\bc _\be_\bx_\bp_\ba_\bn_\bs_\bi_\bo_\bn, _\bw_\bo_\br_\bd _\bs_\bp_\bl_\bi_\bt_\bt_\bi_\bn_\bg, and _\bp_\ba_\bt_\bh_\bn_\ba_\bm_\be _\be_\bx_\bp_\ba_\bn_\bs_\bi_\bo_\bn.
1397
1398        The order of expansions is: brace expansion; tilde expansion, parameter
1399        and  variable expansion, arithmetic expansion, and command substitution
1400        (done in a left-to-right fashion); word splitting; and pathname  expan-
1401        sion.
1402
1403        On systems that can support it, there is an additional expansion avail-
1404        able: _\bp_\br_\bo_\bc_\be_\bs_\bs _\bs_\bu_\bb_\bs_\bt_\bi_\bt_\bu_\bt_\bi_\bo_\bn.  This is performed  at  the  same  time  as
1405        tilde,  parameter,  variable, and arithmetic expansion and command sub-
1406        stitution.
1407
1408        Only brace expansion, word splitting, and pathname expansion can change
1409        the  number of words of the expansion; other expansions expand a single
1410        word to a single word.  The only exceptions to this are the  expansions
1411        of "$\b$@\b@" and "$\b${\b{_\bn_\ba_\bm_\be[\b[@\b@]\b]}\b}" as explained above (see P\bPA\bAR\bRA\bAM\bME\bET\bTE\bER\bRS\bS).
1412
1413    B\bBr\bra\bac\bce\be E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn
1414        _\bB_\br_\ba_\bc_\be _\be_\bx_\bp_\ba_\bn_\bs_\bi_\bo_\bn is a mechanism by which arbitrary strings may be gener-
1415        ated.  This mechanism is similar to _\bp_\ba_\bt_\bh_\bn_\ba_\bm_\be _\be_\bx_\bp_\ba_\bn_\bs_\bi_\bo_\bn, but  the  file-
1416        names generated need not exist.  Patterns to be brace expanded take the
1417        form of an optional _\bp_\br_\be_\ba_\bm_\bb_\bl_\be, followed by either a series of comma-sep-
1418        arated  strings or a sequence expression between a pair of braces, fol-
1419        lowed by an optional _\bp_\bo_\bs_\bt_\bs_\bc_\br_\bi_\bp_\bt.  The  preamble  is  prefixed  to  each
1420        string contained within the braces, and the postscript is then appended
1421        to each resulting string, expanding left to right.
1422
1423        Brace expansions may be nested.  The results of  each  expanded  string
1424        are  not  sorted;  left  to  right  order  is  preserved.  For example,
1425        a{\b{d,c,b}\b}e expands into `ade ace abe'.
1426
1427        A sequence expression takes the form {\b{_\bx.\b..\b._\by[\b[.\b..\b._\bi_\bn_\bc_\br]\b]}\b}, where _\bx and _\by  are
1428        either  integers or single characters, and _\bi_\bn_\bc_\br, an optional increment,
1429        is an integer.  When integers are supplied, the expression  expands  to
1430        each  number between _\bx and _\by, inclusive.  Supplied integers may be pre-
1431        fixed with _\b0 to force each term to have the same width.  When either  _\bx
1432        or  _\by  begins  with  a  zero, the shell attempts to force all generated
1433        terms to contain the same number of digits, zero-padding  where  neces-
1434        sary.   When  characters  are  supplied, the expression expands to each
1435        character lexicographically between  _\bx  and  _\by,  inclusive,  using  the
1436        default  C  locale.   Note  that both _\bx and _\by must be of the same type.
1437        When the increment is supplied, it is used as  the  difference  between
1438        each term.  The default increment is 1 or -1 as appropriate.
1439
1440        Brace expansion is performed before any other expansions, and any char-
1441        acters special to other expansions are preserved in the result.  It  is
1442        strictly  textual.  B\bBa\bas\bsh\bh does not apply any syntactic interpretation to
1443        the context of the expansion or the text between the braces.
1444
1445        A correctly-formed brace expansion must contain  unquoted  opening  and
1446        closing  braces,  and  at  least one unquoted comma or a valid sequence
1447        expression.  Any incorrectly formed brace expansion is left  unchanged.
1448        A {\b{ or ,\b, may be quoted with a backslash to prevent its being considered
1449        part of a brace expression.  To avoid conflicts with  parameter  expan-
1450        sion, the string $\b${\b{ is not considered eligible for brace expansion.
1451
1452        This construct is typically used as shorthand when the common prefix of
1453        the strings to be generated is longer than in the above example:
1454
1455               mkdir /usr/local/src/bash/{old,new,dist,bugs}
1456        or
1457               chown root /usr/{ucb/{ex,edit},lib/{ex?.?*,how_ex}}
1458
1459        Brace expansion introduces a  slight  incompatibility  with  historical
1460        versions  of s\bsh\bh.  s\bsh\bh does not treat opening or closing braces specially
1461        when they appear as part of a word, and preserves them in  the  output.
1462        B\bBa\bas\bsh\bh  removes  braces  from  words as a consequence of brace expansion.
1463        For example, a word entered to s\bsh\bh as _\bf_\bi_\bl_\be_\b{_\b1_\b,_\b2_\b} appears  identically  in
1464        the  output.  The same word is output as _\bf_\bi_\bl_\be_\b1 _\bf_\bi_\bl_\be_\b2 after expansion by
1465        b\bba\bas\bsh\bh.  If strict compatibility with s\bsh\bh is desired, start b\bba\bas\bsh\bh with  the
1466        +\b+B\bB option or disable brace expansion with the +\b+B\bB option to the s\bse\bet\bt com-
1467        mand (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below).
1468
1469    T\bTi\bil\bld\bde\be E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn
1470        If a word begins with an unquoted tilde character  (`~\b~'),  all  of  the
1471        characters  preceding  the  first unquoted slash (or all characters, if
1472        there is no unquoted slash) are considered a _\bt_\bi_\bl_\bd_\be_\b-_\bp_\br_\be_\bf_\bi_\bx.  If none  of
1473        the  characters  in  the tilde-prefix are quoted, the characters in the
1474        tilde-prefix following the tilde are treated as a possible _\bl_\bo_\bg_\bi_\bn  _\bn_\ba_\bm_\be.
1475        If  this  login name is the null string, the tilde is replaced with the
1476        value of the shell parameter H\bHO\bOM\bME\bE.  If H\bHO\bOM\bME\bE is unset, the  home  direc-
1477        tory  of  the  user executing the shell is substituted instead.  Other-
1478        wise, the tilde-prefix is replaced with the home  directory  associated
1479        with the specified login name.
1480
1481        If  the  tilde-prefix  is  a  `~+', the value of the shell variable P\bPW\bWD\bD
1482        replaces the tilde-prefix.  If the tilde-prefix is a `~-', the value of
1483        the  shell variable O\bOL\bLD\bDP\bPW\bWD\bD, if it is set, is substituted.  If the char-
1484        acters following the tilde in the tilde-prefix consist of a  number  _\bN,
1485        optionally  prefixed  by  a  `+' or a `-', the tilde-prefix is replaced
1486        with the corresponding element from the directory stack, as it would be
1487        displayed by the d\bdi\bir\brs\bs builtin invoked with the tilde-prefix as an argu-
1488        ment.  If the characters following the tilde in the  tilde-prefix  con-
1489        sist of a number without a leading `+' or `-', `+' is assumed.
1490
1491        If the login name is invalid, or the tilde expansion fails, the word is
1492        unchanged.
1493
1494        Each variable assignment is checked for unquoted tilde-prefixes immedi-
1495        ately following a :\b: or the first =\b=.  In these cases, tilde expansion is
1496        also performed.  Consequently, one may use  filenames  with  tildes  in
1497        assignments  to  P\bPA\bAT\bTH\bH,  M\bMA\bAI\bIL\bLP\bPA\bAT\bTH\bH, and C\bCD\bDP\bPA\bAT\bTH\bH, and the shell assigns the
1498        expanded value.
1499
1500    P\bPa\bar\bra\bam\bme\bet\bte\ber\br E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn
1501        The `$\b$' character introduces parameter expansion, command substitution,
1502        or  arithmetic  expansion.  The parameter name or symbol to be expanded
1503        may be enclosed in braces, which are optional but serve to protect  the
1504        variable  to be expanded from characters immediately following it which
1505        could be interpreted as part of the name.
1506
1507        When braces are used, the matching ending brace is the  first  `}\b}'  not
1508        escaped  by  a  backslash  or within a quoted string, and not within an
1509        embedded  arithmetic  expansion,  command  substitution,  or  parameter
1510        expansion.
1511
1512        ${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br}
1513               The  value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is substituted.  The braces are required
1514               when _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is a positional  parameter  with  more  than  one
1515               digit, or when _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is followed by a character which is not
1516               to be interpreted as part of its name.  The _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is a shell
1517               parameter  as  described above P\bPA\bAR\bRA\bAM\bME\bET\bTE\bER\bRS\bS) or an array reference
1518               (A\bAr\brr\bra\bay\bys\bs).
1519
1520        If the first character of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is an  exclamation  point  (!\b!),  it
1521        introduces a level of variable indirection.  B\bBa\bas\bsh\bh uses the value of the
1522        variable formed from the rest of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br as the name of the variable;
1523        this  variable  is  then expanded and that value is used in the rest of
1524        the substitution, rather than the value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br itself.   This  is
1525        known as _\bi_\bn_\bd_\bi_\br_\be_\bc_\bt _\be_\bx_\bp_\ba_\bn_\bs_\bi_\bo_\bn.  The exceptions to this are the expansions
1526        of ${!\b!_\bp_\br_\be_\bf_\bi_\bx*\b*} and ${!\b!_\bn_\ba_\bm_\be[_\b@]} described below.  The exclamation  point
1527        must  immediately  follow the left brace in order to introduce indirec-
1528        tion.
1529
1530        In each of the cases below, _\bw_\bo_\br_\bd is subject to tilde expansion, parame-
1531        ter expansion, command substitution, and arithmetic expansion.
1532
1533        When  not  performing  substring  expansion, using the forms documented
1534        below (e.g., :\b:-\b-), b\bba\bas\bsh\bh tests for a parameter that  is  unset  or  null.
1535        Omitting  the  colon  results  in  a  test only for a parameter that is
1536        unset.
1537
1538        ${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br:\b:-\b-_\bw_\bo_\br_\bd}
1539               U\bUs\bse\be D\bDe\bef\bfa\bau\bul\blt\bt V\bVa\bal\blu\bue\bes\bs.  If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is unset or null,  the  expan-
1540               sion  of _\bw_\bo_\br_\bd is substituted.  Otherwise, the value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br
1541               is substituted.
1542        ${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br:\b:=\b=_\bw_\bo_\br_\bd}
1543               A\bAs\bss\bsi\big\bgn\bn D\bDe\bef\bfa\bau\bul\blt\bt V\bVa\bal\blu\bue\bes\bs.  If  _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br  is  unset  or  null,  the
1544               expansion of _\bw_\bo_\br_\bd is assigned to _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br.  The value of _\bp_\ba_\br_\ba_\bm_\b-
1545               _\be_\bt_\be_\br is then substituted.   Positional  parameters  and  special
1546               parameters may not be assigned to in this way.
1547        ${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br:\b:?\b?_\bw_\bo_\br_\bd}
1548               D\bDi\bis\bsp\bpl\bla\bay\by  E\bEr\brr\bro\bor\br i\bif\bf N\bNu\bul\bll\bl o\bor\br U\bUn\bns\bse\bet\bt.  If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is null or unset,
1549               the expansion of _\bw_\bo_\br_\bd (or a message to that effect  if  _\bw_\bo_\br_\bd  is
1550               not  present) is written to the standard error and the shell, if
1551               it is not interactive, exits.  Otherwise, the value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br
1552               is substituted.
1553        ${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br:\b:+\b+_\bw_\bo_\br_\bd}
1554               U\bUs\bse\be  A\bAl\blt\bte\ber\brn\bna\bat\bte\be V\bVa\bal\blu\bue\be.  If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is null or unset, nothing is
1555               substituted, otherwise the expansion of _\bw_\bo_\br_\bd is substituted.
1556        ${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br:\b:_\bo_\bf_\bf_\bs_\be_\bt}
1557        ${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br:\b:_\bo_\bf_\bf_\bs_\be_\bt:\b:_\bl_\be_\bn_\bg_\bt_\bh}
1558               S\bSu\bub\bbs\bst\btr\bri\bin\bng\bg E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn.  Expands to up to _\bl_\be_\bn_\bg_\bt_\bh characters of  the
1559               value  of  _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br starting at the character specified by _\bo_\bf_\bf_\b-
1560               _\bs_\be_\bt.  If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is @\b@, an indexed array subscripted by @\b@ or *\b*,
1561               or  an  associative  array name, the results differ as described
1562               below.  If _\bl_\be_\bn_\bg_\bt_\bh is omitted, expands to the  substring  of  the
1563               value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br starting at the character specified by _\bo_\bf_\bf_\bs_\be_\bt
1564               and extending to the end of the value.  _\bl_\be_\bn_\bg_\bt_\bh  and  _\bo_\bf_\bf_\bs_\be_\bt  are
1565               arithmetic expressions (see A\bAR\bRI\bIT\bTH\bHM\bME\bET\bTI\bIC\bC E\bEV\bVA\bAL\bLU\bUA\bAT\bTI\bIO\bON\bN below).
1566
1567               If  _\bo_\bf_\bf_\bs_\be_\bt  evaluates  to  a number less than zero, the value is
1568               used as an offset in characters from the end  of  the  value  of
1569               _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br.   If  _\bl_\be_\bn_\bg_\bt_\bh evaluates to a number less than zero, it
1570               is interpreted as an offset in characters from the  end  of  the
1571               value  of  _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br rather than a number of characters, and the
1572               expansion is the characters  between  _\bo_\bf_\bf_\bs_\be_\bt  and  that  result.
1573               Note  that a negative offset must be separated from the colon by
1574               at least one space to avoid being confused with  the  :\b:-\b-  expan-
1575               sion.
1576
1577               If  _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br  is  @\b@, the result is _\bl_\be_\bn_\bg_\bt_\bh positional parameters
1578               beginning at _\bo_\bf_\bf_\bs_\be_\bt.  A negative _\bo_\bf_\bf_\bs_\be_\bt is taken relative to one
1579               greater  than the greatest positional parameter, so an offset of
1580               -1 evaluates to the last positional parameter.  It is an  expan-
1581               sion error if _\bl_\be_\bn_\bg_\bt_\bh evaluates to a number less than zero.
1582
1583               If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is an indexed array name subscripted by @ or *, the
1584               result is  the  _\bl_\be_\bn_\bg_\bt_\bh  members  of  the  array  beginning  with
1585               ${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br[_\bo_\bf_\bf_\bs_\be_\bt]}.   A  negative  _\bo_\bf_\bf_\bs_\be_\bt is taken relative to
1586               one greater than the maximum index of the specified  array.   It
1587               is  an expansion error if _\bl_\be_\bn_\bg_\bt_\bh evaluates to a number less than
1588               zero.
1589
1590               Substring expansion applied to  an  associative  array  produces
1591               undefined results.
1592
1593               Substring  indexing  is zero-based unless the positional parame-
1594               ters are used, in  which  case  the  indexing  starts  at  1  by
1595               default.   If  _\bo_\bf_\bf_\bs_\be_\bt  is  0,  and the positional parameters are
1596               used, $\b$0\b0 is prefixed to the list.
1597
1598        ${!\b!_\bp_\br_\be_\bf_\bi_\bx*\b*}
1599        ${!\b!_\bp_\br_\be_\bf_\bi_\bx@\b@}
1600               N\bNa\bam\bme\bes\bs m\bma\bat\btc\bch\bhi\bin\bng\bg p\bpr\bre\bef\bfi\bix\bx.  Expands to the names of variables  whose
1601               names begin with _\bp_\br_\be_\bf_\bi_\bx, separated by the first character of the
1602               I\bIF\bFS\bS special variable.  When _\b@ is used and the expansion  appears
1603               within  double  quotes, each variable name expands to a separate
1604               word.
1605
1606        ${!\b!_\bn_\ba_\bm_\be[_\b@]}
1607        ${!\b!_\bn_\ba_\bm_\be[_\b*]}
1608               L\bLi\bis\bst\bt o\bof\bf a\bar\brr\bra\bay\by k\bke\bey\bys\bs.  If _\bn_\ba_\bm_\be is an array  variable,  expands  to
1609               the  list  of array indices (keys) assigned in _\bn_\ba_\bm_\be.  If _\bn_\ba_\bm_\be is
1610               not an array, expands to 0 if _\bn_\ba_\bm_\be is set  and  null  otherwise.
1611               When  _\b@  is used and the expansion appears within double quotes,
1612               each key expands to a separate word.
1613
1614        ${#\b#_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br}
1615               P\bPa\bar\bra\bam\bme\bet\bte\ber\br l\ble\ben\bng\bgt\bth\bh.  The length in  characters  of  the  value  of
1616               _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br  is  substituted.   If  _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is *\b* or @\b@, the value
1617               substituted is the number of positional parameters.  If  _\bp_\ba_\br_\ba_\bm_\be_\b-
1618               _\bt_\be_\br  is  an  array name subscripted by *\b* or @\b@, the value substi-
1619               tuted is the number of elements in the array.  If  _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br  is
1620               an  indexed  array  name  subscripted by a negative number, that
1621               number is interpreted as relative to one greater than the  maxi-
1622               mum  index of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br, so negative indices count back from the
1623               end of the array, and an index of -1 references  the  last  ele-
1624               ment.
1625
1626        ${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br#\b#_\bw_\bo_\br_\bd}
1627        ${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br#\b##\b#_\bw_\bo_\br_\bd}
1628               R\bRe\bem\bmo\bov\bve\be m\bma\bat\btc\bch\bhi\bin\bng\bg p\bpr\bre\bef\bfi\bix\bx p\bpa\bat\btt\bte\ber\brn\bn.  The _\bw_\bo_\br_\bd is expanded to produce
1629               a pattern just as in pathname expansion.  If the pattern matches
1630               the  beginning of the value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br, then the result of the
1631               expansion is the expanded value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br with  the  shortest
1632               matching  pattern  (the ``#\b#'' case) or the longest matching pat-
1633               tern (the ``#\b##\b#'' case) deleted.  If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is  @\b@  or  *\b*,  the
1634               pattern  removal operation is applied to each positional parame-
1635               ter in turn, and the expansion is the resultant list.  If _\bp_\ba_\br_\ba_\bm_\b-
1636               _\be_\bt_\be_\br  is  an array variable subscripted with @\b@ or *\b*, the pattern
1637               removal operation is applied to each  member  of  the  array  in
1638               turn, and the expansion is the resultant list.
1639
1640        ${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br%\b%_\bw_\bo_\br_\bd}
1641        ${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br%\b%%\b%_\bw_\bo_\br_\bd}
1642               R\bRe\bem\bmo\bov\bve\be m\bma\bat\btc\bch\bhi\bin\bng\bg s\bsu\buf\bff\bfi\bix\bx p\bpa\bat\btt\bte\ber\brn\bn.  The _\bw_\bo_\br_\bd is expanded to produce
1643               a pattern just as in pathname expansion.  If the pattern matches
1644               a  trailing portion of the expanded value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br, then the
1645               result of the expansion is the expanded value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br  with
1646               the  shortest  matching  pattern (the ``%\b%'' case) or the longest
1647               matching pattern (the ``%\b%%\b%'' case) deleted.  If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br  is  @\b@
1648               or  *\b*,  the  pattern  removal operation is applied to each posi-
1649               tional parameter in turn, and the  expansion  is  the  resultant
1650               list.   If  _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is an array variable subscripted with @\b@ or
1651               *\b*, the pattern removal operation is applied to  each  member  of
1652               the array in turn, and the expansion is the resultant list.
1653
1654        ${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br/\b/_\bp_\ba_\bt_\bt_\be_\br_\bn/\b/_\bs_\bt_\br_\bi_\bn_\bg}
1655               P\bPa\bat\btt\bte\ber\brn\bn s\bsu\bub\bbs\bst\bti\bit\btu\but\bti\bio\bon\bn.  The _\bp_\ba_\bt_\bt_\be_\br_\bn is expanded to produce a pat-
1656               tern just as in pathname expansion.  _\bP_\ba_\br_\ba_\bm_\be_\bt_\be_\br is  expanded  and
1657               the  longest match of _\bp_\ba_\bt_\bt_\be_\br_\bn against its value is replaced with
1658               _\bs_\bt_\br_\bi_\bn_\bg.  If _\bp_\ba_\bt_\bt_\be_\br_\bn begins with /\b/, all matches  of  _\bp_\ba_\bt_\bt_\be_\br_\bn  are
1659               replaced   with  _\bs_\bt_\br_\bi_\bn_\bg.   Normally  only  the  first  match  is
1660               replaced.  If _\bp_\ba_\bt_\bt_\be_\br_\bn begins with #\b#, it must match at the begin-
1661               ning of the expanded value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br.  If _\bp_\ba_\bt_\bt_\be_\br_\bn begins with
1662               %\b%, it must match at the end of the expanded value of  _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br.
1663               If _\bs_\bt_\br_\bi_\bn_\bg is null, matches of _\bp_\ba_\bt_\bt_\be_\br_\bn are deleted and the /\b/ fol-
1664               lowing _\bp_\ba_\bt_\bt_\be_\br_\bn may be omitted.  If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is @\b@ or *\b*, the sub-
1665               stitution  operation  is applied to each positional parameter in
1666               turn, and the expansion is the resultant list.  If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br  is
1667               an  array  variable  subscripted  with  @\b@ or *\b*, the substitution
1668               operation is applied to each member of the array  in  turn,  and
1669               the expansion is the resultant list.
1670
1671        ${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br^\b^_\bp_\ba_\bt_\bt_\be_\br_\bn}
1672        ${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br^\b^^\b^_\bp_\ba_\bt_\bt_\be_\br_\bn}
1673        ${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br,\b,_\bp_\ba_\bt_\bt_\be_\br_\bn}
1674        ${_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br,\b,,\b,_\bp_\ba_\bt_\bt_\be_\br_\bn}
1675               C\bCa\bas\bse\be  m\bmo\bod\bdi\bif\bfi\bic\bca\bat\bti\bio\bon\bn.   This expansion modifies the case of alpha-
1676               betic characters in _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br.  The _\bp_\ba_\bt_\bt_\be_\br_\bn is expanded to  pro-
1677               duce a pattern just as in pathname expansion.  Each character in
1678               the expanded value of _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is tested against _\bp_\ba_\bt_\bt_\be_\br_\bn,  and,
1679               if  it  matches the pattern, its case is converted.  The pattern
1680               should not attempt to match more  than  one  character.   The  ^\b^
1681               operator  converts  lowercase letters matching _\bp_\ba_\bt_\bt_\be_\br_\bn to upper-
1682               case; the ,\b, operator converts matching uppercase letters to low-
1683               ercase.  The ^\b^^\b^ and ,\b,,\b, expansions convert each matched character
1684               in the expanded value; the ^\b^ and ,\b, expansions match and  convert
1685               only  the  first character in the expanded value.  If _\bp_\ba_\bt_\bt_\be_\br_\bn is
1686               omitted, it is treated like a ?\b?, which matches every  character.
1687               If  _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br  is  @\b@  or  *\b*,  the case modification operation is
1688               applied to each positional parameter in turn, and the  expansion
1689               is  the  resultant list.  If _\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br is an array variable sub-
1690               scripted with @\b@ or *\b*, the case modification operation is applied
1691               to  each  member  of the array in turn, and the expansion is the
1692               resultant list.
1693
1694    C\bCo\bom\bmm\bma\ban\bnd\bd S\bSu\bub\bbs\bst\bti\bit\btu\but\bti\bio\bon\bn
1695        _\bC_\bo_\bm_\bm_\ba_\bn_\bd _\bs_\bu_\bb_\bs_\bt_\bi_\bt_\bu_\bt_\bi_\bo_\bn allows the output of a command to replace the com-
1696        mand name.  There are two forms:
1697
1698               $\b$(\b(_\bc_\bo_\bm_\bm_\ba_\bn_\bd)\b)
1699        or
1700               `\b`_\bc_\bo_\bm_\bm_\ba_\bn_\bd`\b`
1701
1702        B\bBa\bas\bsh\bh performs the expansion by executing _\bc_\bo_\bm_\bm_\ba_\bn_\bd and replacing the com-
1703        mand substitution with the standard output of  the  command,  with  any
1704        trailing newlines deleted.  Embedded newlines are not deleted, but they
1705        may be removed during word splitting.  The command  substitution  $\b$(\b(c\bca\bat\bt
1706        _\bf_\bi_\bl_\be)\b) can be replaced by the equivalent but faster $\b$(\b(<\b< _\bf_\bi_\bl_\be)\b).
1707
1708        When  the  old-style  backquote form of substitution is used, backslash
1709        retains its literal meaning except when followed by $\b$, `\b`,  or  \\b\.   The
1710        first backquote not preceded by a backslash terminates the command sub-
1711        stitution.  When using the $(_\bc_\bo_\bm_\bm_\ba_\bn_\bd) form, all characters between  the
1712        parentheses make up the command; none are treated specially.
1713
1714        Command substitutions may be nested.  To nest when using the backquoted
1715        form, escape the inner backquotes with backslashes.
1716
1717        If the substitution appears within double quotes,  word  splitting  and
1718        pathname expansion are not performed on the results.
1719
1720    A\bAr\bri\bit\bth\bhm\bme\bet\bti\bic\bc E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn
1721        Arithmetic  expansion allows the evaluation of an arithmetic expression
1722        and the substitution of the result.  The format for  arithmetic  expan-
1723        sion is:
1724
1725               $\b$(\b((\b(_\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn)\b))\b)
1726
1727        The  _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn  is  treated  as if it were within double quotes, but a
1728        double quote inside the parentheses  is  not  treated  specially.   All
1729        tokens in the expression undergo parameter and variable expansion, com-
1730        mand substitution, and quote removal.  The result  is  treated  as  the
1731        arithmetic  expression  to  be evaluated.  Arithmetic expansions may be
1732        nested.
1733
1734        The evaluation is performed according to the rules listed  below  under
1735        A\bAR\bRI\bIT\bTH\bHM\bME\bET\bTI\bIC\bC E\bEV\bVA\bAL\bLU\bUA\bAT\bTI\bIO\bON\bN.  If _\be_\bx_\bp_\br_\be_\bs_\bs_\bi_\bo_\bn is invalid, b\bba\bas\bsh\bh prints a message
1736        indicating failure and no substitution occurs.
1737
1738    P\bPr\bro\boc\bce\bes\bss\bs S\bSu\bub\bbs\bst\bti\bit\btu\but\bti\bio\bon\bn
1739        _\bP_\br_\bo_\bc_\be_\bs_\bs _\bs_\bu_\bb_\bs_\bt_\bi_\bt_\bu_\bt_\bi_\bo_\bn is supported on systems that support  named  pipes
1740        (_\bF_\bI_\bF_\bO_\bs)  or the /\b/d\bde\bev\bv/\b/f\bfd\bd method of naming open files.  It takes the form
1741        of <\b<(\b(_\bl_\bi_\bs_\bt)\b) or >\b>(\b(_\bl_\bi_\bs_\bt)\b).  The process _\bl_\bi_\bs_\bt is run with its input or  out-
1742        put connected to a _\bF_\bI_\bF_\bO or some file in /\b/d\bde\bev\bv/\b/f\bfd\bd.  The name of this file
1743        is passed as an argument to the current command as the  result  of  the
1744        expansion.   If the >\b>(\b(_\bl_\bi_\bs_\bt)\b) form is used, writing to the file will pro-
1745        vide input for _\bl_\bi_\bs_\bt.  If the <\b<(\b(_\bl_\bi_\bs_\bt)\b) form is used, the file  passed  as
1746        an argument should be read to obtain the output of _\bl_\bi_\bs_\bt.
1747
1748        When  available,  process substitution is performed simultaneously with
1749        parameter and variable expansion, command substitution, and  arithmetic
1750        expansion.
1751
1752    W\bWo\bor\brd\bd S\bSp\bpl\bli\bit\btt\bti\bin\bng\bg
1753        The  shell  scans the results of parameter expansion, command substitu-
1754        tion, and arithmetic expansion that did not occur within double  quotes
1755        for _\bw_\bo_\br_\bd _\bs_\bp_\bl_\bi_\bt_\bt_\bi_\bn_\bg.
1756
1757        The  shell  treats each character of I\bIF\bFS\bS as a delimiter, and splits the
1758        results of the other expansions into words using  these  characters  as
1759        field   terminators.   If  I\bIF\bFS\bS  is  unset,  or  its  value  is  exactly
1760        <\b<s\bsp\bpa\bac\bce\be>\b><\b<t\bta\bab\bb>\b><\b<n\bne\bew\bwl\bli\bin\bne\be>\b>, the default, then sequences of  <\b<s\bsp\bpa\bac\bce\be>\b>,  <\b<t\bta\bab\bb>\b>,
1761        and  <\b<n\bne\bew\bwl\bli\bin\bne\be>\b>  at the beginning and end of the results of the previous
1762        expansions are ignored, and any sequence of I\bIF\bFS\bS characters not  at  the
1763        beginning  or  end  serves  to delimit words.  If I\bIF\bFS\bS has a value other
1764        than the default, then sequences of the whitespace characters s\bsp\bpa\bac\bce\be and
1765        t\bta\bab\bb  are  ignored  at the beginning and end of the word, as long as the
1766        whitespace character is in the value of I\bIF\bFS\bS (an I\bIF\bFS\bS whitespace  charac-
1767        ter).   Any character in I\bIF\bFS\bS that is not I\bIF\bFS\bS whitespace, along with any
1768        adjacent I\bIF\bFS\bS whitespace characters, delimits a field.   A  sequence  of
1769        I\bIF\bFS\bS whitespace characters is also treated as a delimiter.  If the value
1770        of I\bIF\bFS\bS is null, no word splitting occurs.
1771
1772        Explicit null arguments ("\b""\b" or '\b''\b')  are  retained.   Unquoted  implicit
1773        null arguments, resulting from the expansion of parameters that have no
1774        values, are removed.  If a parameter with no value is  expanded  within
1775        double quotes, a null argument results and is retained.
1776
1777        Note that if no expansion occurs, no splitting is performed.
1778
1779    P\bPa\bat\bth\bhn\bna\bam\bme\be E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn
1780        After  word  splitting,  unless  the -\b-f\bf option has been set, b\bba\bas\bsh\bh scans
1781        each word for the characters *\b*, ?\b?, and [\b[.  If one of  these  characters
1782        appears,  then  the word is regarded as a _\bp_\ba_\bt_\bt_\be_\br_\bn, and replaced with an
1783        alphabetically sorted list of filenames matching the pattern (see  P\bPa\bat\bt-\b-
1784        t\bte\ber\brn\bn  M\bMa\bat\btc\bch\bhi\bin\bng\bg  below).   If  no  matching filenames are found, and the
1785        shell option n\bnu\bul\bll\blg\bgl\blo\bob\bb is not enabled, the word is left  unchanged.   If
1786        the  n\bnu\bul\bll\blg\bgl\blo\bob\bb  option  is  set,  and  no matches are found, the word is
1787        removed.  If the f\bfa\bai\bil\blg\bgl\blo\bob\bb shell option  is  set,  and  no  matches  are
1788        found, an error message is printed and the command is not executed.  If
1789        the shell option n\bno\boc\bca\bas\bse\beg\bgl\blo\bob\bb is enabled, the match is performed  without
1790        regard  to  the  case of alphabetic characters.  When a pattern is used
1791        for pathname expansion, the character `\b``\b`.\b.'\b''\b'  at the start of a name  or
1792        immediately  following  a  slash must be matched explicitly, unless the
1793        shell option d\bdo\bot\btg\bgl\blo\bob\bb is set.  When matching a pathname, the slash char-
1794        acter  must  always  be  matched explicitly.  In other cases, the `\b``\b`.\b.'\b''\b'
1795        character is not treated specially.  See the description of s\bsh\bho\bop\bpt\bt below
1796        under S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS for a description of the n\bno\boc\bca\bas\bse\beg\bgl\blo\bob\bb, n\bnu\bul\bll\bl-\b-
1797        g\bgl\blo\bob\bb, f\bfa\bai\bil\blg\bgl\blo\bob\bb, and d\bdo\bot\btg\bgl\blo\bob\bb shell options.
1798
1799        The G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE shell variable may be used to restrict the set of  file-
1800        names matching a _\bp_\ba_\bt_\bt_\be_\br_\bn.  If G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE is set, each matching filename
1801        that also matches one of the patterns in G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE is removed from the
1802        list  of  matches.  The filenames `\b``\b`.\b.'\b''\b'  and `\b``\b`.\b..\b.'\b''\b'  are always ignored
1803        when G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE is set and not null.  However, setting G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE to  a
1804        non-null  value has the effect of enabling the d\bdo\bot\btg\bgl\blo\bob\bb shell option, so
1805        all other filenames beginning with a `\b``\b`.\b.'\b''\b'  will match.  To get the old
1806        behavior of ignoring filenames beginning with a `\b``\b`.\b.'\b''\b', make `\b``\b`.\b.*\b*'\b''\b'  one
1807        of the patterns in G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE.  The d\bdo\bot\btg\bgl\blo\bob\bb  option  is  disabled  when
1808        G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE is unset.
1809
1810        P\bPa\bat\btt\bte\ber\brn\bn M\bMa\bat\btc\bch\bhi\bin\bng\bg
1811
1812        Any character that appears in a pattern, other than the special pattern
1813        characters described below, matches itself.  The NUL character may  not
1814        occur  in  a pattern.  A backslash escapes the following character; the
1815        escaping backslash is discarded when  matching.   The  special  pattern
1816        characters must be quoted if they are to be matched literally.
1817
1818        The special pattern characters have the following meanings:
1819
1820               *\b*      Matches  any string, including the null string.  When the
1821                      g\bgl\blo\bob\bbs\bst\bta\bar\br shell option is enabled, and  *\b*  is  used  in  a
1822                      pathname  expansion  context,  two  adjacent *\b*s used as a
1823                      single pattern will match all  files  and  zero  or  more
1824                      directories  and subdirectories.  If followed by a /\b/, two
1825                      adjacent *\b*s will match only directories  and  subdirecto-
1826                      ries.
1827               ?\b?      Matches any single character.
1828               [\b[.\b..\b..\b.]\b]  Matches  any  one  of the enclosed characters.  A pair of
1829                      characters separated by a hyphen denotes a _\br_\ba_\bn_\bg_\be  _\be_\bx_\bp_\br_\be_\bs_\b-
1830                      _\bs_\bi_\bo_\bn;  any character that falls between those two charac-
1831                      ters, inclusive, using  the  current  locale's  collating
1832                      sequence  and  character  set,  is matched.  If the first
1833                      character following the [\b[ is a !\b!  or a ^\b^ then any charac-
1834                      ter  not enclosed is matched.  The sorting order of char-
1835                      acters in range expressions is determined by the  current
1836                      locale  and  the values of the L\bLC\bC_\b_C\bCO\bOL\bLL\bLA\bAT\bTE\bE or L\bLC\bC_\b_A\bAL\bLL\bL shell
1837                      variables, if set.  To obtain the traditional interpreta-
1838                      tion  of  range expressions, where [\b[a\ba-\b-d\bd]\b] is equivalent to
1839                      [\b[a\bab\bbc\bcd\bd]\b], set value of the L\bLC\bC_\b_A\bAL\bLL\bL shell variable to  C\bC,  or
1840                      enable  the  g\bgl\blo\bob\bba\bas\bsc\bci\bii\bir\bra\ban\bng\bge\bes\bs  shell  option.   A -\b- may be
1841                      matched by including it as the first or last character in
1842                      the set.  A ]\b] may be matched by including it as the first
1843                      character in the set.
1844
1845                      Within [\b[ and ]\b], _\bc_\bh_\ba_\br_\ba_\bc_\bt_\be_\br _\bc_\bl_\ba_\bs_\bs_\be_\bs can be specified  using
1846                      the syntax [\b[:\b:_\bc_\bl_\ba_\bs_\bs:\b:]\b], where _\bc_\bl_\ba_\bs_\bs is one of the following
1847                      classes defined in the POSIX standard:
1848                      a\bal\bln\bnu\bum\bm a\bal\blp\bph\bha\ba a\bas\bsc\bci\bii\bi b\bbl\bla\ban\bnk\bk c\bcn\bnt\btr\brl\bl  d\bdi\big\bgi\bit\bt  g\bgr\bra\bap\bph\bh  l\blo\bow\bwe\ber\br  p\bpr\bri\bin\bnt\bt
1849                      p\bpu\bun\bnc\bct\bt s\bsp\bpa\bac\bce\be u\bup\bpp\bpe\ber\br w\bwo\bor\brd\bd x\bxd\bdi\big\bgi\bit\bt
1850                      A character class matches any character belonging to that
1851                      class.  The w\bwo\bor\brd\bd character class matches letters, digits,
1852                      and the character _.
1853
1854                      Within  [\b[  and  ]\b],  an _\be_\bq_\bu_\bi_\bv_\ba_\bl_\be_\bn_\bc_\be _\bc_\bl_\ba_\bs_\bs can be specified
1855                      using the syntax [\b[=\b=_\bc=\b=]\b], which matches all characters with
1856                      the  same  collation  weight  (as  defined by the current
1857                      locale) as the character _\bc.
1858
1859                      Within [\b[ and ]\b], the syntax [\b[.\b._\bs_\by_\bm_\bb_\bo_\bl.\b.]\b] matches the collat-
1860                      ing symbol _\bs_\by_\bm_\bb_\bo_\bl.
1861
1862        If the e\bex\bxt\btg\bgl\blo\bob\bb shell option is enabled using the s\bsh\bho\bop\bpt\bt builtin, several
1863        extended pattern matching operators are recognized.  In  the  following
1864        description, a _\bp_\ba_\bt_\bt_\be_\br_\bn_\b-_\bl_\bi_\bs_\bt is a list of one or more patterns separated
1865        by a |\b|.  Composite patterns may be formed using one or more of the fol-
1866        lowing sub-patterns:
1867
1868               ?\b?(\b(_\bp_\ba_\bt_\bt_\be_\br_\bn_\b-_\bl_\bi_\bs_\bt)\b)
1869                      Matches zero or one occurrence of the given patterns
1870               *\b*(\b(_\bp_\ba_\bt_\bt_\be_\br_\bn_\b-_\bl_\bi_\bs_\bt)\b)
1871                      Matches zero or more occurrences of the given patterns
1872               +\b+(\b(_\bp_\ba_\bt_\bt_\be_\br_\bn_\b-_\bl_\bi_\bs_\bt)\b)
1873                      Matches one or more occurrences of the given patterns
1874               @\b@(\b(_\bp_\ba_\bt_\bt_\be_\br_\bn_\b-_\bl_\bi_\bs_\bt)\b)
1875                      Matches one of the given patterns
1876               !\b!(\b(_\bp_\ba_\bt_\bt_\be_\br_\bn_\b-_\bl_\bi_\bs_\bt)\b)
1877                      Matches anything except one of the given patterns
1878
1879    Q\bQu\buo\bot\bte\be R\bRe\bem\bmo\bov\bva\bal\bl
1880        After the preceding expansions, all unquoted occurrences of the charac-
1881        ters \\b\, '\b', and "\b" that did not result from one of the  above  expansions
1882        are removed.
1883
1884 R\bRE\bED\bDI\bIR\bRE\bEC\bCT\bTI\bIO\bON\bN
1885        Before  a  command  is executed, its input and output may be _\br_\be_\bd_\bi_\br_\be_\bc_\bt_\be_\bd
1886        using a special notation interpreted by the shell.  Redirection  allows
1887        commands'  file handles to be duplicated, opened, closed, made to refer
1888        to different files, and can change the files the command reads from and
1889        writes  to.  Redirection may also be used to modify file handles in the
1890        current shell execution environment.  The following redirection  opera-
1891        tors may precede or appear anywhere within a _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd or may fol-
1892        low a _\bc_\bo_\bm_\bm_\ba_\bn_\bd.  Redirections are processed in the  order  they  appear,
1893        from left to right.
1894
1895        Each  redirection  that may be preceded by a file descriptor number may
1896        instead be preceded by a word of the form {_\bv_\ba_\br_\bn_\ba_\bm_\be}.  In this case, for
1897        each redirection operator except >&- and <&-, the shell will allocate a
1898        file descriptor greater than or equal to 10 and assign it  to  _\bv_\ba_\br_\bn_\ba_\bm_\be.
1899        If  >&-  or  <&- is preceded by {_\bv_\ba_\br_\bn_\ba_\bm_\be}, the value of _\bv_\ba_\br_\bn_\ba_\bm_\be defines
1900        the file descriptor to close.
1901
1902        In the following descriptions, if the file descriptor number  is  omit-
1903        ted,  and the first character of the redirection operator is <\b<, the re-
1904        direction refers to the standard input (file  descriptor  0).   If  the
1905        first  character  of  the  redirection  operator  is >\b>, the redirection
1906        refers to the standard output (file descriptor 1).
1907
1908        The word following the redirection operator in the  following  descrip-
1909        tions,  unless  otherwise noted, is subjected to brace expansion, tilde
1910        expansion, parameter  and  variable  expansion,  command  substitution,
1911        arithmetic  expansion,  quote  removal,  pathname  expansion,  and word
1912        splitting.  If it expands to more than one word, b\bba\bas\bsh\bh reports an error.
1913
1914        Note  that  the order of redirections is significant.  For example, the
1915        command
1916
1917               ls >\b> dirlist 2>\b>&\b&1
1918
1919        directs both standard output and standard error to  the  file  _\bd_\bi_\br_\bl_\bi_\bs_\bt,
1920        while the command
1921
1922               ls 2>\b>&\b&1 >\b> dirlist
1923
1924        directs  only the standard output to file _\bd_\bi_\br_\bl_\bi_\bs_\bt, because the standard
1925        error was duplicated from the standard output before the standard  out-
1926        put was redirected to _\bd_\bi_\br_\bl_\bi_\bs_\bt.
1927
1928        B\bBa\bas\bsh\bh handles several filenames specially when they are used in redirec-
1929        tions, as described in the following table:
1930
1931               /\b/d\bde\bev\bv/\b/f\bfd\bd/\b/_\bf_\bd
1932                      If _\bf_\bd is a valid integer, file descriptor  _\bf_\bd  is  dupli-
1933                      cated.
1934               /\b/d\bde\bev\bv/\b/s\bst\btd\bdi\bin\bn
1935                      File descriptor 0 is duplicated.
1936               /\b/d\bde\bev\bv/\b/s\bst\btd\bdo\bou\but\bt
1937                      File descriptor 1 is duplicated.
1938               /\b/d\bde\bev\bv/\b/s\bst\btd\bde\ber\brr\br
1939                      File descriptor 2 is duplicated.
1940               /\b/d\bde\bev\bv/\b/t\btc\bcp\bp/\b/_\bh_\bo_\bs_\bt/\b/_\bp_\bo_\br_\bt
1941                      If _\bh_\bo_\bs_\bt is a valid hostname or Internet address, and _\bp_\bo_\br_\bt
1942                      is an integer port number or service name, b\bba\bas\bsh\bh  attempts
1943                      to open the corresponding TCP socket.
1944               /\b/d\bde\bev\bv/\b/u\bud\bdp\bp/\b/_\bh_\bo_\bs_\bt/\b/_\bp_\bo_\br_\bt
1945                      If _\bh_\bo_\bs_\bt is a valid hostname or Internet address, and _\bp_\bo_\br_\bt
1946                      is an integer port number or service name, b\bba\bas\bsh\bh  attempts
1947                      to open the corresponding UDP socket.
1948
1949        A failure to open or create a file causes the redirection to fail.
1950
1951        Redirections  using file descriptors greater than 9 should be used with
1952        care, as they may conflict with file descriptors the shell uses  inter-
1953        nally.
1954
1955    R\bRe\bed\bdi\bir\bre\bec\bct\bti\bin\bng\bg I\bIn\bnp\bpu\but\bt
1956        Redirection of input causes the file whose name results from the expan-
1957        sion of _\bw_\bo_\br_\bd to be opened for reading on  file  descriptor  _\bn,  or  the
1958        standard input (file descriptor 0) if _\bn is not specified.
1959
1960        The general format for redirecting input is:
1961
1962               [_\bn]<\b<_\bw_\bo_\br_\bd
1963
1964    R\bRe\bed\bdi\bir\bre\bec\bct\bti\bin\bng\bg O\bOu\but\btp\bpu\but\bt
1965        Redirection  of  output  causes  the  file  whose name results from the
1966        expansion of _\bw_\bo_\br_\bd to be opened for writing on file descriptor _\bn, or the
1967        standard output (file descriptor 1) if _\bn is not specified.  If the file
1968        does not exist it is created; if it does exist it is truncated to  zero
1969        size.
1970
1971        The general format for redirecting output is:
1972
1973               [_\bn]>\b>_\bw_\bo_\br_\bd
1974
1975        If  the  redirection operator is >\b>, and the n\bno\boc\bcl\blo\bob\bbb\bbe\ber\br option to the s\bse\bet\bt
1976        builtin has been enabled, the redirection will fail if the  file  whose
1977        name  results  from the expansion of _\bw_\bo_\br_\bd exists and is a regular file.
1978        If the redirection operator is >\b>|\b|, or the redirection operator is >\b> and
1979        the n\bno\boc\bcl\blo\bob\bbb\bbe\ber\br option to the s\bse\bet\bt builtin command is not enabled, the re-
1980        direction is attempted even if the file named by _\bw_\bo_\br_\bd exists.
1981
1982    A\bAp\bpp\bpe\ben\bnd\bdi\bin\bng\bg R\bRe\bed\bdi\bir\bre\bec\bct\bte\bed\bd O\bOu\but\btp\bpu\but\bt
1983        Redirection of output in  this  fashion  causes  the  file  whose  name
1984        results  from  the expansion of _\bw_\bo_\br_\bd to be opened for appending on file
1985        descriptor _\bn, or the standard output (file descriptor 1) if  _\bn  is  not
1986        specified.  If the file does not exist it is created.
1987
1988        The general format for appending output is:
1989
1990               [_\bn]>\b>>\b>_\bw_\bo_\br_\bd
1991
1992
1993    R\bRe\bed\bdi\bir\bre\bec\bct\bti\bin\bng\bg S\bSt\bta\ban\bnd\bda\bar\brd\bd O\bOu\but\btp\bpu\but\bt a\ban\bnd\bd S\bSt\bta\ban\bnd\bda\bar\brd\bd E\bEr\brr\bro\bor\br
1994        This  construct allows both the standard output (file descriptor 1) and
1995        the standard error output (file descriptor 2) to be redirected  to  the
1996        file whose name is the expansion of _\bw_\bo_\br_\bd.
1997
1998        There  are  two  formats  for  redirecting standard output and standard
1999        error:
2000
2001               &\b&>\b>_\bw_\bo_\br_\bd
2002        and
2003               >\b>&\b&_\bw_\bo_\br_\bd
2004
2005        Of the two forms, the first is preferred.  This is semantically equiva-
2006        lent to
2007
2008               >\b>_\bw_\bo_\br_\bd 2>\b>&\b&1
2009
2010        When  using  the second form, _\bw_\bo_\br_\bd may not expand to a number or -\b-.  If
2011        it does,  other  redirection  operators  apply  (see  D\bDu\bup\bpl\bli\bic\bca\bat\bti\bin\bng\bg  F\bFi\bil\ble\be
2012        D\bDe\bes\bsc\bcr\bri\bip\bpt\bto\bor\brs\bs below) for compatibility reasons.
2013
2014    A\bAp\bpp\bpe\ben\bnd\bdi\bin\bng\bg S\bSt\bta\ban\bnd\bda\bar\brd\bd O\bOu\but\btp\bpu\but\bt a\ban\bnd\bd S\bSt\bta\ban\bnd\bda\bar\brd\bd E\bEr\brr\bro\bor\br
2015        This  construct allows both the standard output (file descriptor 1) and
2016        the standard error output (file descriptor 2) to  be  appended  to  the
2017        file whose name is the expansion of _\bw_\bo_\br_\bd.
2018
2019        The format for appending standard output and standard error is:
2020
2021               &\b&>\b>>\b>_\bw_\bo_\br_\bd
2022
2023        This is semantically equivalent to
2024
2025               >\b>>\b>_\bw_\bo_\br_\bd 2>\b>&\b&1
2026
2027        (see D\bDu\bup\bpl\bli\bic\bca\bat\bti\bin\bng\bg F\bFi\bil\ble\be D\bDe\bes\bsc\bcr\bri\bip\bpt\bto\bor\brs\bs below).
2028
2029    H\bHe\ber\bre\be D\bDo\boc\bcu\bum\bme\ben\bnt\bts\bs
2030        This  type  of  redirection  instructs the shell to read input from the
2031        current source until a line containing only _\bd_\be_\bl_\bi_\bm_\bi_\bt_\be_\br (with no trailing
2032        blanks)  is seen.  All of the lines read up to that point are then used
2033        as the standard input for a command.
2034
2035        The format of here-documents is:
2036
2037               <\b<<\b<[-\b-]_\bw_\bo_\br_\bd
2038                       _\bh_\be_\br_\be_\b-_\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt
2039               _\bd_\be_\bl_\bi_\bm_\bi_\bt_\be_\br
2040
2041        No parameter and variable expansion, command  substitution,  arithmetic
2042        expansion,  or pathname expansion is performed on _\bw_\bo_\br_\bd.  If any charac-
2043        ters in _\bw_\bo_\br_\bd are quoted, the _\bd_\be_\bl_\bi_\bm_\bi_\bt_\be_\br is the result of  quote  removal
2044        on  _\bw_\bo_\br_\bd, and the lines in the here-document are not expanded.  If _\bw_\bo_\br_\bd
2045        is unquoted, all lines of the here-document are subjected to  parameter
2046        expansion,  command substitution, and arithmetic expansion, the charac-
2047        ter sequence \\b\<\b<n\bne\bew\bwl\bli\bin\bne\be>\b> is ignored, and \\b\ must be  used  to  quote  the
2048        characters \\b\, $\b$, and `\b`.
2049
2050        If the redirection operator is <\b<<\b<-\b-, then all leading tab characters are
2051        stripped from input lines and  the  line  containing  _\bd_\be_\bl_\bi_\bm_\bi_\bt_\be_\br.   This
2052        allows  here-documents within shell scripts to be indented in a natural
2053        fashion.
2054
2055    H\bHe\ber\bre\be S\bSt\btr\bri\bin\bng\bgs\bs
2056        A variant of here documents, the format is:
2057
2058               <\b<<\b<<\b<_\bw_\bo_\br_\bd
2059
2060        The _\bw_\bo_\br_\bd undergoes brace  expansion,  tilde  expansion,  parameter  and
2061        variable  expansion,  command  substitution,  arithmetic expansion, and
2062        quote removal.  Pathname expansion and  word  splitting  are  not  per-
2063        formed.   The  result  is supplied as a single string to the command on
2064        its standard input.
2065
2066    D\bDu\bup\bpl\bli\bic\bca\bat\bti\bin\bng\bg F\bFi\bil\ble\be D\bDe\bes\bsc\bcr\bri\bip\bpt\bto\bor\brs\bs
2067        The redirection operator
2068
2069               [_\bn]<\b<&\b&_\bw_\bo_\br_\bd
2070
2071        is used to duplicate input file descriptors.  If _\bw_\bo_\br_\bd expands to one or
2072        more  digits,  the file descriptor denoted by _\bn is made to be a copy of
2073        that file descriptor.  If the digits in _\bw_\bo_\br_\bd  do  not  specify  a  file
2074        descriptor  open for input, a redirection error occurs.  If _\bw_\bo_\br_\bd evalu-
2075        ates to -\b-, file descriptor _\bn is closed.  If _\bn  is  not  specified,  the
2076        standard input (file descriptor 0) is used.
2077
2078        The operator
2079
2080               [_\bn]>\b>&\b&_\bw_\bo_\br_\bd
2081
2082        is  used  similarly  to duplicate output file descriptors.  If _\bn is not
2083        specified, the standard output (file descriptor 1)  is  used.   If  the
2084        digits  in _\bw_\bo_\br_\bd do not specify a file descriptor open for output, a re-
2085        direction error occurs.  If _\bw_\bo_\br_\bd evaluates to -\b-, file descriptor  _\bn  is
2086        closed.   As  a special case, if _\bn is omitted, and _\bw_\bo_\br_\bd does not expand
2087        to one or more digits or -\b-, the standard output and standard error  are
2088        redirected as described previously.
2089
2090    M\bMo\bov\bvi\bin\bng\bg F\bFi\bil\ble\be D\bDe\bes\bsc\bcr\bri\bip\bpt\bto\bor\brs\bs
2091        The redirection operator
2092
2093               [_\bn]<\b<&\b&_\bd_\bi_\bg_\bi_\bt-\b-
2094
2095        moves  the  file descriptor _\bd_\bi_\bg_\bi_\bt to file descriptor _\bn, or the standard
2096        input (file descriptor 0) if _\bn is not specified.  _\bd_\bi_\bg_\bi_\bt is closed after
2097        being duplicated to _\bn.
2098
2099        Similarly, the redirection operator
2100
2101               [_\bn]>\b>&\b&_\bd_\bi_\bg_\bi_\bt-\b-
2102
2103        moves  the  file descriptor _\bd_\bi_\bg_\bi_\bt to file descriptor _\bn, or the standard
2104        output (file descriptor 1) if _\bn is not specified.
2105
2106    O\bOp\bpe\ben\bni\bin\bng\bg F\bFi\bil\ble\be D\bDe\bes\bsc\bcr\bri\bip\bpt\bto\bor\brs\bs f\bfo\bor\br R\bRe\bea\bad\bdi\bin\bng\bg a\ban\bnd\bd W\bWr\bri\bit\bti\bin\bng\bg
2107        The redirection operator
2108
2109               [_\bn]<\b<>\b>_\bw_\bo_\br_\bd
2110
2111        causes the file whose name is the expansion of _\bw_\bo_\br_\bd to  be  opened  for
2112        both  reading and writing on file descriptor _\bn, or on file descriptor 0
2113        if _\bn is not specified.  If the file does not exist, it is created.
2114
2115 A\bAL\bLI\bIA\bAS\bSE\bES\bS
2116        _\bA_\bl_\bi_\ba_\bs_\be_\bs allow a string to be substituted for a word when it is used  as
2117        the  first  word  of  a  simple command.  The shell maintains a list of
2118        aliases that may be set and unset with the a\bal\bli\bia\bas\bs  and  u\bun\bna\bal\bli\bia\bas\bs  builtin
2119        commands  (see  S\bSH\bHE\bEL\bLL\bL  B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below).  The first word of each
2120        simple command, if unquoted, is checked to see if it has an alias.   If
2121        so,  that word is replaced by the text of the alias.  The characters /\b/,
2122        $\b$, `\b`, and =\b= and any of the shell _\bm_\be_\bt_\ba_\bc_\bh_\ba_\br_\ba_\bc_\bt_\be_\br_\bs or  quoting  characters
2123        listed above may not appear in an alias name.  The replacement text may
2124        contain any valid shell input,  including  shell  metacharacters.   The
2125        first  word  of  the replacement text is tested for aliases, but a word
2126        that is identical to an alias being expanded is not expanded  a  second
2127        time.   This  means  that  one may alias l\bls\bs to l\bls\bs -\b-F\bF, for instance, and
2128        b\bba\bas\bsh\bh does not try to recursively expand the replacement text.   If  the
2129        last  character  of  the  alias value is a _\bb_\bl_\ba_\bn_\bk, then the next command
2130        word following the alias is also checked for alias expansion.
2131
2132        Aliases are created and listed with the a\bal\bli\bia\bas\bs command, and removed with
2133        the u\bun\bna\bal\bli\bia\bas\bs command.
2134
2135        There  is no mechanism for using arguments in the replacement text.  If
2136        arguments are needed, a shell function should be  used  (see  F\bFU\bUN\bNC\bCT\bTI\bIO\bON\bNS\bS
2137        below).
2138
2139        Aliases  are not expanded when the shell is not interactive, unless the
2140        e\bex\bxp\bpa\ban\bnd\bd_\b_a\bal\bli\bia\bas\bse\bes\bs shell option is set using s\bsh\bho\bop\bpt\bt (see the description  of
2141        s\bsh\bho\bop\bpt\bt under S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below).
2142
2143        The  rules  concerning  the  definition and use of aliases are somewhat
2144        confusing.  B\bBa\bas\bsh\bh always reads at  least  one  complete  line  of  input
2145        before  executing  any  of  the  commands  on  that  line.  Aliases are
2146        expanded when a command is read, not when it is  executed.   Therefore,
2147        an  alias definition appearing on the same line as another command does
2148        not take effect until the next line of input  is  read.   The  commands
2149        following the alias definition on that line are not affected by the new
2150        alias.  This behavior is also an issue  when  functions  are  executed.
2151        Aliases  are  expanded when a function definition is read, not when the
2152        function is executed, because a function definition is  itself  a  com-
2153        pound command.  As a consequence, aliases defined in a function are not
2154        available until after that function is executed.  To  be  safe,  always
2155        put  alias definitions on a separate line, and do not use a\bal\bli\bia\bas\bs in com-
2156        pound commands.
2157
2158        For almost every purpose, aliases are superseded by shell functions.
2159
2160 F\bFU\bUN\bNC\bCT\bTI\bIO\bON\bNS\bS
2161        A shell function, defined  as  described  above  under  S\bSH\bHE\bEL\bLL\bL  G\bGR\bRA\bAM\bMM\bMA\bAR\bR,
2162        stores  a  series  of commands for later execution.  When the name of a
2163        shell function is used as a simple command name, the list  of  commands
2164        associated with that function name is executed.  Functions are executed
2165        in the context of the current shell;  no  new  process  is  created  to
2166        interpret  them  (contrast  this with the execution of a shell script).
2167        When a function is executed, the arguments to the function  become  the
2168        positional parameters during its execution.  The special parameter #\b# is
2169        updated to reflect the change.  Special parameter 0\b0 is unchanged.   The
2170        first  element of the F\bFU\bUN\bNC\bCN\bNA\bAM\bME\bE variable is set to the name of the func-
2171        tion while the function is executing.
2172
2173        All other aspects of the  shell  execution  environment  are  identical
2174        between a function and its caller with these exceptions:  the D\bDE\bEB\bBU\bUG\bG and
2175        R\bRE\bET\bTU\bUR\bRN\bN traps (see the description  of  the  t\btr\bra\bap\bp  builtin  under  S\bSH\bHE\bEL\bLL\bL
2176        B\bBU\bUI\bIL\bLT\bTI\bIN\bN  C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below) are not inherited unless the function has been
2177        given the t\btr\bra\bac\bce\be attribute (see the description of the  d\bde\bec\bcl\bla\bar\bre\be  builtin
2178        below)  or  the -\b-o\bo f\bfu\bun\bnc\bct\btr\bra\bac\bce\be shell option has been enabled with the s\bse\bet\bt
2179        builtin (in which case all  functions  inherit  the  D\bDE\bEB\bBU\bUG\bG  and  R\bRE\bET\bTU\bUR\bRN\bN
2180        traps),  and the E\bER\bRR\bR trap is not inherited unless the -\b-o\bo e\ber\brr\brt\btr\bra\bac\bce\be shell
2181        option has been enabled.
2182
2183        Variables local to the function may be declared with the l\blo\boc\bca\bal\bl  builtin
2184        command.  Ordinarily, variables and their values are shared between the
2185        function and its caller.
2186
2187        The F\bFU\bUN\bNC\bCN\bNE\bES\bST\bT variable, if set  to  a  numeric  value  greater  than  0,
2188        defines  a  maximum  function nesting level.  Function invocations that
2189        exceed the limit cause the entire command to abort.
2190
2191        If the builtin command r\bre\bet\btu\bur\brn\bn is executed in a function,  the  function
2192        completes  and  execution resumes with the next command after the func-
2193        tion call.  Any command associated with the  R\bRE\bET\bTU\bUR\bRN\bN  trap  is  executed
2194        before execution resumes.  When a function completes, the values of the
2195        positional parameters and the special parameter #\b# are restored  to  the
2196        values they had prior to the function's execution.
2197
2198        Function  names and definitions may be listed with the -\b-f\bf option to the
2199        d\bde\bec\bcl\bla\bar\bre\be or t\bty\byp\bpe\bes\bse\bet\bt builtin commands.  The -\b-F\bF option to d\bde\bec\bcl\bla\bar\bre\be or t\bty\byp\bpe\be-\b-
2200        s\bse\bet\bt  will  list the function names only (and optionally the source file
2201        and line number, if the e\bex\bxt\btd\bde\beb\bbu\bug\bg shell option is  enabled).   Functions
2202        may  be exported so that subshells automatically have them defined with
2203        the -\b-f\bf option to the e\bex\bxp\bpo\bor\brt\bt builtin.   A  function  definition  may  be
2204        deleted  using  the  -\b-f\bf  option  to the u\bun\bns\bse\bet\bt builtin.  Note that shell
2205        functions and variables with the same name may result in multiple iden-
2206        tically-named  entries  in  the environment passed to the shell's chil-
2207        dren.  Care should be taken in cases where this may cause a problem.
2208
2209        Functions may be recursive.  The F\bFU\bUN\bNC\bCN\bNE\bES\bST\bT variable may be used to limit
2210        the  depth  of the function call stack and restrict the number of func-
2211        tion invocations.  By default, no limit is imposed  on  the  number  of
2212        recursive calls.
2213
2214 A\bAR\bRI\bIT\bTH\bHM\bME\bET\bTI\bIC\bC E\bEV\bVA\bAL\bLU\bUA\bAT\bTI\bIO\bON\bN
2215        The  shell allows arithmetic expressions to be evaluated, under certain
2216        circumstances (see the l\ble\bet\bt and d\bde\bec\bcl\bla\bar\bre\be builtin commands and  A\bAr\bri\bit\bth\bhm\bme\bet\bti\bic\bc
2217        E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn).   Evaluation  is done in fixed-width integers with no check
2218        for overflow, though division by 0 is trapped and flagged as an  error.
2219        The  operators  and their precedence, associativity, and values are the
2220        same as in the C language.  The following list of operators is  grouped
2221        into  levels  of  equal-precedence operators.  The levels are listed in
2222        order of decreasing precedence.
2223
2224        _\bi_\bd+\b++\b+ _\bi_\bd-\b--\b-
2225               variable post-increment and post-decrement
2226        +\b++\b+_\bi_\bd -\b--\b-_\bi_\bd
2227               variable pre-increment and pre-decrement
2228        -\b- +\b+    unary minus and plus
2229        !\b! ~\b~    logical and bitwise negation
2230        *\b**\b*     exponentiation
2231        *\b* /\b/ %\b%  multiplication, division, remainder
2232        +\b+ -\b-    addition, subtraction
2233        <\b<<\b< >\b>>\b>  left and right bitwise shifts
2234        <\b<=\b= >\b>=\b= <\b< >\b>
2235               comparison
2236        =\b==\b= !\b!=\b=  equality and inequality
2237        &\b&      bitwise AND
2238        ^\b^      bitwise exclusive OR
2239        |\b|      bitwise OR
2240        &\b&&\b&     logical AND
2241        |\b||\b|     logical OR
2242        _\be_\bx_\bp_\br?\b?_\be_\bx_\bp_\br:\b:_\be_\bx_\bp_\br
2243               conditional operator
2244        =\b= *\b*=\b= /\b/=\b= %\b%=\b= +\b+=\b= -\b-=\b= <\b<<\b<=\b= >\b>>\b>=\b= &\b&=\b= ^\b^=\b= |\b|=\b=
2245               assignment
2246        _\be_\bx_\bp_\br_\b1 ,\b, _\be_\bx_\bp_\br_\b2
2247               comma
2248
2249        Shell variables are allowed as operands; parameter  expansion  is  per-
2250        formed before the expression is evaluated.  Within an expression, shell
2251        variables may also be referenced by name without  using  the  parameter
2252        expansion  syntax.  A shell variable that is null or unset evaluates to
2253        0 when referenced by name without using the parameter expansion syntax.
2254        The  value  of a variable is evaluated as an arithmetic expression when
2255        it is referenced, or when a variable which has been given  the  _\bi_\bn_\bt_\be_\bg_\be_\br
2256        attribute using d\bde\bec\bcl\bla\bar\bre\be -\b-i\bi is assigned a value.  A null value evaluates
2257        to 0.  A shell variable need not have its _\bi_\bn_\bt_\be_\bg_\be_\br attribute  turned  on
2258        to be used in an expression.
2259
2260        Constants with a leading 0 are interpreted as octal numbers.  A leading
2261        0x or  0X  denotes  hexadecimal.   Otherwise,  numbers  take  the  form
2262        [_\bb_\ba_\bs_\be_\b#]n,  where the optional _\bb_\ba_\bs_\be is a decimal number between 2 and 64
2263        representing the arithmetic base, and _\bn is a number in that  base.   If
2264        _\bb_\ba_\bs_\be_\b#  is omitted, then base 10 is used.  When specifying _\bn, the digits
2265        greater< than 9 are represented by the lowercase letters, the uppercase
2266        letters, @, and _, in that order.  If _\bb_\ba_\bs_\be is less than or equal to 36,
2267        lowercase and uppercase letters may be used interchangeably  to  repre-
2268        sent numbers between 10 and 35.
2269
2270        Operators  are  evaluated  in  order of precedence.  Sub-expressions in
2271        parentheses are evaluated first and may override the  precedence  rules
2272        above.
2273
2274 C\bCO\bON\bND\bDI\bIT\bTI\bIO\bON\bNA\bAL\bL E\bEX\bXP\bPR\bRE\bES\bSS\bSI\bIO\bON\bNS\bS
2275        Conditional  expressions  are  used  by the [\b[[\b[ compound command and the
2276        t\bte\bes\bst\bt and [\b[ builtin commands to test file attributes and perform  string
2277        and  arithmetic comparisons.  Expressions are formed from the following
2278        unary or binary primaries.  If any _\bf_\bi_\bl_\be argument to  one  of  the  pri-
2279        maries is of the form _\b/_\bd_\be_\bv_\b/_\bf_\bd_\b/_\bn, then file descriptor _\bn is checked.  If
2280        the _\bf_\bi_\bl_\be argument to  one  of  the  primaries  is  one  of  _\b/_\bd_\be_\bv_\b/_\bs_\bt_\bd_\bi_\bn,
2281        _\b/_\bd_\be_\bv_\b/_\bs_\bt_\bd_\bo_\bu_\bt,  or _\b/_\bd_\be_\bv_\b/_\bs_\bt_\bd_\be_\br_\br, file descriptor 0, 1, or 2, respectively,
2282        is checked.
2283
2284        Unless otherwise specified, primaries that operate on files follow sym-
2285        bolic links and operate on the target of the link, rather than the link
2286        itself.
2287
2288        When used with [\b[[\b[, the <\b< and >\b> operators sort  lexicographically  using
2289        the current locale.  The t\bte\bes\bst\bt command sorts using ASCII ordering.
2290
2291        -\b-a\ba _\bf_\bi_\bl_\be
2292               True if _\bf_\bi_\bl_\be exists.
2293        -\b-b\bb _\bf_\bi_\bl_\be
2294               True if _\bf_\bi_\bl_\be exists and is a block special file.
2295        -\b-c\bc _\bf_\bi_\bl_\be
2296               True if _\bf_\bi_\bl_\be exists and is a character special file.
2297        -\b-d\bd _\bf_\bi_\bl_\be
2298               True if _\bf_\bi_\bl_\be exists and is a directory.
2299        -\b-e\be _\bf_\bi_\bl_\be
2300               True if _\bf_\bi_\bl_\be exists.
2301        -\b-f\bf _\bf_\bi_\bl_\be
2302               True if _\bf_\bi_\bl_\be exists and is a regular file.
2303        -\b-g\bg _\bf_\bi_\bl_\be
2304               True if _\bf_\bi_\bl_\be exists and is set-group-id.
2305        -\b-h\bh _\bf_\bi_\bl_\be
2306               True if _\bf_\bi_\bl_\be exists and is a symbolic link.
2307        -\b-k\bk _\bf_\bi_\bl_\be
2308               True if _\bf_\bi_\bl_\be exists and its ``sticky'' bit is set.
2309        -\b-p\bp _\bf_\bi_\bl_\be
2310               True if _\bf_\bi_\bl_\be exists and is a named pipe (FIFO).
2311        -\b-r\br _\bf_\bi_\bl_\be
2312               True if _\bf_\bi_\bl_\be exists and is readable.
2313        -\b-s\bs _\bf_\bi_\bl_\be
2314               True if _\bf_\bi_\bl_\be exists and has a size greater than zero.
2315        -\b-t\bt _\bf_\bd  True if file descriptor _\bf_\bd is open and refers to a terminal.
2316        -\b-u\bu _\bf_\bi_\bl_\be
2317               True if _\bf_\bi_\bl_\be exists and its set-user-id bit is set.
2318        -\b-w\bw _\bf_\bi_\bl_\be
2319               True if _\bf_\bi_\bl_\be exists and is writable.
2320        -\b-x\bx _\bf_\bi_\bl_\be
2321               True if _\bf_\bi_\bl_\be exists and is executable.
2322        -\b-G\bG _\bf_\bi_\bl_\be
2323               True if _\bf_\bi_\bl_\be exists and is owned by the effective group id.
2324        -\b-L\bL _\bf_\bi_\bl_\be
2325               True if _\bf_\bi_\bl_\be exists and is a symbolic link.
2326        -\b-N\bN _\bf_\bi_\bl_\be
2327               True  if  _\bf_\bi_\bl_\be  exists  and  has been modified since it was last
2328               read.
2329        -\b-O\bO _\bf_\bi_\bl_\be
2330               True if _\bf_\bi_\bl_\be exists and is owned by the effective user id.
2331        -\b-S\bS _\bf_\bi_\bl_\be
2332               True if _\bf_\bi_\bl_\be exists and is a socket.
2333        _\bf_\bi_\bl_\be_\b1 -\b-e\bef\bf _\bf_\bi_\bl_\be_\b2
2334               True if _\bf_\bi_\bl_\be_\b1 and _\bf_\bi_\bl_\be_\b2 refer to the same device and inode  num-
2335               bers.
2336        _\bf_\bi_\bl_\be_\b1 -n\bnt\bt _\bf_\bi_\bl_\be_\b2
2337               True  if  _\bf_\bi_\bl_\be_\b1  is  newer (according to modification date) than
2338               _\bf_\bi_\bl_\be_\b2, or if _\bf_\bi_\bl_\be_\b1 exists and _\bf_\bi_\bl_\be_\b2 does not.
2339        _\bf_\bi_\bl_\be_\b1 -o\bot\bt _\bf_\bi_\bl_\be_\b2
2340               True if _\bf_\bi_\bl_\be_\b1 is older than _\bf_\bi_\bl_\be_\b2, or if _\bf_\bi_\bl_\be_\b2 exists and  _\bf_\bi_\bl_\be_\b1
2341               does not.
2342        -\b-o\bo _\bo_\bp_\bt_\bn_\ba_\bm_\be
2343               True  if  the  shell option _\bo_\bp_\bt_\bn_\ba_\bm_\be is enabled.  See the list of
2344               options under the description  of  the  -\b-o\bo  option  to  the  s\bse\bet\bt
2345               builtin below.
2346        -\b-v\bv _\bv_\ba_\br_\bn_\ba_\bm_\be
2347               True  if  the shell variable _\bv_\ba_\br_\bn_\ba_\bm_\be is set (has been assigned a
2348               value).
2349        -\b-R\bR _\bv_\ba_\br_\bn_\ba_\bm_\be
2350               True if the shell variable _\bv_\ba_\br_\bn_\ba_\bm_\be is set and is a  name  refer-
2351               ence.
2352        -\b-z\bz _\bs_\bt_\br_\bi_\bn_\bg
2353               True if the length of _\bs_\bt_\br_\bi_\bn_\bg is zero.
2354        _\bs_\bt_\br_\bi_\bn_\bg
2355        -\b-n\bn _\bs_\bt_\br_\bi_\bn_\bg
2356               True if the length of _\bs_\bt_\br_\bi_\bn_\bg is non-zero.
2357
2358        _\bs_\bt_\br_\bi_\bn_\bg_\b1 =\b==\b= _\bs_\bt_\br_\bi_\bn_\bg_\b2
2359        _\bs_\bt_\br_\bi_\bn_\bg_\b1 =\b= _\bs_\bt_\br_\bi_\bn_\bg_\b2
2360               True  if  the strings are equal.  =\b= should be used with the t\bte\bes\bst\bt
2361               command for POSIX conformance.  When used with the  [\b[[\b[  command,
2362               this performs pattern matching as described above (C\bCo\bom\bmp\bpo\bou\bun\bnd\bd C\bCo\bom\bm-\b-
2363               m\bma\ban\bnd\bds\bs).
2364
2365        _\bs_\bt_\br_\bi_\bn_\bg_\b1 !\b!=\b= _\bs_\bt_\br_\bi_\bn_\bg_\b2
2366               True if the strings are not equal.
2367
2368        _\bs_\bt_\br_\bi_\bn_\bg_\b1 <\b< _\bs_\bt_\br_\bi_\bn_\bg_\b2
2369               True if _\bs_\bt_\br_\bi_\bn_\bg_\b1 sorts before _\bs_\bt_\br_\bi_\bn_\bg_\b2 lexicographically.
2370
2371        _\bs_\bt_\br_\bi_\bn_\bg_\b1 >\b> _\bs_\bt_\br_\bi_\bn_\bg_\b2
2372               True if _\bs_\bt_\br_\bi_\bn_\bg_\b1 sorts after _\bs_\bt_\br_\bi_\bn_\bg_\b2 lexicographically.
2373
2374        _\ba_\br_\bg_\b1 O\bOP\bP _\ba_\br_\bg_\b2
2375               O\bOP\bP is one of -\b-e\beq\bq, -\b-n\bne\be, -\b-l\blt\bt, -\b-l\ble\be, -\b-g\bgt\bt, or -\b-g\bge\be.  These  arithmetic
2376               binary  operators return true if _\ba_\br_\bg_\b1 is equal to, not equal to,
2377               less than, less than or equal to, greater than, or greater  than
2378               or  equal  to _\ba_\br_\bg_\b2, respectively.  _\bA_\br_\bg_\b1 and _\ba_\br_\bg_\b2 may be positive
2379               or negative integers.
2380
2381 S\bSI\bIM\bMP\bPL\bLE\bE C\bCO\bOM\bMM\bMA\bAN\bND\bD E\bEX\bXP\bPA\bAN\bNS\bSI\bIO\bON\bN
2382        When a simple command is executed, the  shell  performs  the  following
2383        expansions, assignments, and redirections, from left to right.
2384
2385        1.     The  words  that  the  parser has marked as variable assignments
2386               (those preceding the command name) and  redirections  are  saved
2387               for later processing.
2388
2389        2.     The  words that are not variable assignments or redirections are
2390               expanded.  If any words remain after expansion, the  first  word
2391               is  taken  to be the name of the command and the remaining words
2392               are the arguments.
2393
2394        3.     Redirections are performed as described above under R\bRE\bED\bDI\bIR\bRE\bEC\bCT\bTI\bIO\bON\bN.
2395
2396        4.     The text after the =\b= in each variable assignment undergoes tilde
2397               expansion, parameter expansion, command substitution, arithmetic
2398               expansion,  and quote removal before being assigned to the vari-
2399               able.
2400
2401        If no command name results, the variable assignments affect the current
2402        shell  environment.  Otherwise, the variables are added to the environ-
2403        ment of the executed command and do not affect the current shell  envi-
2404        ronment.   If  any  of  the assignments attempts to assign a value to a
2405        readonly variable, an error occurs, and the command exits with  a  non-
2406        zero status.
2407
2408        If  no  command  name  results,  redirections are performed, but do not
2409        affect the current shell environment.  A redirection error  causes  the
2410        command to exit with a non-zero status.
2411
2412        If  there is a command name left after expansion, execution proceeds as
2413        described below.  Otherwise, the command exits.  If one of  the  expan-
2414        sions  contained a command substitution, the exit status of the command
2415        is the exit status of the  last  command  substitution  performed.   If
2416        there were no command substitutions, the command exits with a status of
2417        zero.
2418
2419 C\bCO\bOM\bMM\bMA\bAN\bND\bD E\bEX\bXE\bEC\bCU\bUT\bTI\bIO\bON\bN
2420        After a command has been split into words, if it results  in  a  simple
2421        command  and  an  optional list of arguments, the following actions are
2422        taken.
2423
2424        If the command name contains no slashes, the shell attempts  to  locate
2425        it.   If  there  exists a shell function by that name, that function is
2426        invoked as described above in F\bFU\bUN\bNC\bCT\bTI\bIO\bON\bNS\bS.  If the name does not match  a
2427        function,  the shell searches for it in the list of shell builtins.  If
2428        a match is found, that builtin is invoked.
2429
2430        If the name is neither a shell function nor a builtin, and contains  no
2431        slashes,  b\bba\bas\bsh\bh  searches  each element of the P\bPA\bAT\bTH\bH for a directory con-
2432        taining an executable file by that name.  B\bBa\bas\bsh\bh uses  a  hash  table  to
2433        remember  the  full pathnames of executable files (see h\bha\bas\bsh\bh under S\bSH\bHE\bEL\bLL\bL
2434        B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below).  A full search of the directories in  P\bPA\bAT\bTH\bH  is
2435        performed  only  if the command is not found in the hash table.  If the
2436        search is unsuccessful, the shell searches for a defined shell function
2437        named c\bco\bom\bmm\bma\ban\bnd\bd_\b_n\bno\bot\bt_\b_f\bfo\bou\bun\bnd\bd_\b_h\bha\ban\bnd\bdl\ble\be.  If that function exists, it is invoked
2438        with the original command and the original command's arguments  as  its
2439        arguments,  and  the  function's exit status becomes the exit status of
2440        the shell.  If that function is not defined, the shell prints an  error
2441        message and returns an exit status of 127.
2442
2443        If  the  search  is  successful, or if the command name contains one or
2444        more slashes, the shell executes the named program in a separate execu-
2445        tion environment.  Argument 0 is set to the name given, and the remain-
2446        ing arguments to the command are set to the arguments given, if any.
2447
2448        If this execution fails because the file is not in  executable  format,
2449        and  the file is not a directory, it is assumed to be a _\bs_\bh_\be_\bl_\bl _\bs_\bc_\br_\bi_\bp_\bt, a
2450        file containing shell commands.  A subshell is spawned to  execute  it.
2451        This  subshell  reinitializes itself, so that the effect is as if a new
2452        shell had been invoked to handle the script, with  the  exception  that
2453        the  locations  of  commands  remembered  by the parent (see h\bha\bas\bsh\bh below
2454        under S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS) are retained by the child.
2455
2456        If the program is a file beginning with #\b#!\b!, the remainder of the  first
2457        line  specifies an interpreter for the program.  The shell executes the
2458        specified interpreter on operating systems that do not handle this exe-
2459        cutable format themselves.  The arguments to the interpreter consist of
2460        a single optional argument following the interpreter name on the  first
2461        line  of  the program, followed by the name of the program, followed by
2462        the command arguments, if any.
2463
2464 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
2465        The shell has an _\be_\bx_\be_\bc_\bu_\bt_\bi_\bo_\bn _\be_\bn_\bv_\bi_\br_\bo_\bn_\bm_\be_\bn_\bt, which consists of  the  follow-
2466        ing:
2467
2468        +\bo      open  files inherited by the shell at invocation, as modified by
2469               redirections supplied to the e\bex\bxe\bec\bc builtin
2470
2471        +\bo      the current working directory as set by c\bcd\bd, p\bpu\bus\bsh\bhd\bd, or  p\bpo\bop\bpd\bd,  or
2472               inherited by the shell at invocation
2473
2474        +\bo      the  file  creation  mode mask as set by u\bum\bma\bas\bsk\bk or inherited from
2475               the shell's parent
2476
2477        +\bo      current traps set by t\btr\bra\bap\bp
2478
2479        +\bo      shell parameters that are set by variable assignment or with s\bse\bet\bt
2480               or inherited from the shell's parent in the environment
2481
2482        +\bo      shell  functions  defined during execution or inherited from the
2483               shell's parent in the environment
2484
2485        +\bo      options enabled at invocation (either by default  or  with  com-
2486               mand-line arguments) or by s\bse\bet\bt
2487
2488        +\bo      options enabled by s\bsh\bho\bop\bpt\bt
2489
2490        +\bo      shell aliases defined with a\bal\bli\bia\bas\bs
2491
2492        +\bo      various  process  IDs,  including  those of background jobs, the
2493               value of $\b$$\b$, and the value of P\bPP\bPI\bID\bD
2494
2495        When a simple command other than a builtin or shell function is  to  be
2496        executed,  it  is invoked in a separate execution environment that con-
2497        sists of the following.  Unless otherwise noted, the values are  inher-
2498        ited from the shell.
2499
2500
2501        +\bo      the  shell's  open  files,  plus any modifications and additions
2502               specified by redirections to the command
2503
2504        +\bo      the current working directory
2505
2506        +\bo      the file creation mode mask
2507
2508        +\bo      shell variables and functions  marked  for  export,  along  with
2509               variables exported for the command, passed in the environment
2510
2511        +\bo      traps caught by the shell are reset to the values inherited from
2512               the shell's parent, and traps ignored by the shell are ignored
2513
2514        A command invoked  in  this  separate  environment  cannot  affect  the
2515        shell's execution environment.
2516
2517        Command  substitution, commands grouped with parentheses, and asynchro-
2518        nous commands are invoked in a subshell environment that is a duplicate
2519        of  the  shell  environment,  except that traps caught by the shell are
2520        reset to the values that the shell inherited from its parent at invoca-
2521        tion.  Builtin commands that are invoked as part of a pipeline are also
2522        executed in a subshell environment.  Changes made to the subshell envi-
2523        ronment cannot affect the shell's execution environment.
2524
2525        Subshells spawned to execute command substitutions inherit the value of
2526        the -\b-e\be option from the parent shell.  When  not  in  _\bp_\bo_\bs_\bi_\bx  mode,  b\bba\bas\bsh\bh
2527        clears the -\b-e\be option in such subshells.
2528
2529        If  a  command  is  followed  by a &\b& and job control is not active, the
2530        default standard input for the command is  the  empty  file  _\b/_\bd_\be_\bv_\b/_\bn_\bu_\bl_\bl.
2531        Otherwise,  the  invoked  command  inherits the file descriptors of the
2532        calling shell as modified by redirections.
2533
2534 E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT
2535        When a program is invoked it is given an array of  strings  called  the
2536        _\be_\bn_\bv_\bi_\br_\bo_\bn_\bm_\be_\bn_\bt.   This  is  a  list  of  _\bn_\ba_\bm_\be-_\bv_\ba_\bl_\bu_\be  pairs,  of  the  form
2537        _\bn_\ba_\bm_\be=_\bv_\ba_\bl_\bu_\be.
2538
2539        The shell provides several ways  to  manipulate  the  environment.   On
2540        invocation, the shell scans its own environment and creates a parameter
2541        for each name found, automatically marking it for _\be_\bx_\bp_\bo_\br_\bt to child  pro-
2542        cesses.   Executed  commands  inherit  the environment.  The e\bex\bxp\bpo\bor\brt\bt and
2543        d\bde\bec\bcl\bla\bar\bre\be -\b-x\bx commands allow parameters and functions to be added  to  and
2544        deleted from the environment.  If the value of a parameter in the envi-
2545        ronment is modified, the new value becomes  part  of  the  environment,
2546        replacing  the  old.  The environment inherited by any executed command
2547        consists of the shell's initial environment, whose values may be  modi-
2548        fied  in  the  shell, less any pairs removed by the u\bun\bns\bse\bet\bt command, plus
2549        any additions via the e\bex\bxp\bpo\bor\brt\bt and d\bde\bec\bcl\bla\bar\bre\be -\b-x\bx commands.
2550
2551        The environment for any _\bs_\bi_\bm_\bp_\bl_\be _\bc_\bo_\bm_\bm_\ba_\bn_\bd or  function  may  be  augmented
2552        temporarily  by  prefixing  it with parameter assignments, as described
2553        above in P\bPA\bAR\bRA\bAM\bME\bET\bTE\bER\bRS\bS.  These assignment statements affect only the envi-
2554        ronment seen by that command.
2555
2556        If  the  -\b-k\bk option is set (see the s\bse\bet\bt builtin command below), then _\ba_\bl_\bl
2557        parameter assignments are placed in the environment for a command,  not
2558        just those that precede the command name.
2559
2560        When  b\bba\bas\bsh\bh  invokes  an  external command, the variable _\b_ is set to the
2561        full filename of the command and passed to that command in its environ-
2562        ment.
2563
2564 E\bEX\bXI\bIT\bT S\bST\bTA\bAT\bTU\bUS\bS
2565        The  exit  status  of  an executed command is the value returned by the
2566        _\bw_\ba_\bi_\bt_\bp_\bi_\bd system call or equivalent function.  Exit statuses fall between
2567        0  and  255, though, as explained below, the shell may use values above
2568        125 specially.  Exit statuses from shell builtins and compound commands
2569        are  also limited to this range. Under certain circumstances, the shell
2570        will use special values to indicate specific failure modes.
2571
2572        For the shell's purposes, a command which exits with a zero exit status
2573        has  succeeded.   An exit status of zero indicates success.  A non-zero
2574        exit status indicates failure.  When a command terminates  on  a  fatal
2575        signal _\bN, b\bba\bas\bsh\bh uses the value of 128+_\bN as the exit status.
2576
2577        If  a  command  is  not  found, the child process created to execute it
2578        returns a status of 127.  If a command is found but is not  executable,
2579        the return status is 126.
2580
2581        If a command fails because of an error during expansion or redirection,
2582        the exit status is greater than zero.
2583
2584        Shell builtin commands return a status of 0 (_\bt_\br_\bu_\be) if  successful,  and
2585        non-zero  (_\bf_\ba_\bl_\bs_\be)  if an error occurs while they execute.  All builtins
2586        return an exit status of 2 to indicate incorrect usage.
2587
2588        B\bBa\bas\bsh\bh itself returns the exit  status  of  the  last  command  executed,
2589        unless  a  syntax  error occurs, in which case it exits with a non-zero
2590        value.  See also the e\bex\bxi\bit\bt builtin command below.
2591
2592 S\bSI\bIG\bGN\bNA\bAL\bLS\bS
2593        When b\bba\bas\bsh\bh is interactive, in the  absence  of  any  traps,  it  ignores
2594        S\bSI\bIG\bGT\bTE\bER\bRM\bM (so that k\bki\bil\bll\bl 0\b0 does not kill an interactive shell), and S\bSI\bIG\bGI\bIN\bNT\bT
2595        is caught and handled (so that the w\bwa\bai\bit\bt builtin is interruptible).   In
2596        all  cases,  b\bba\bas\bsh\bh  ignores  S\bSI\bIG\bGQ\bQU\bUI\bIT\bT.  If job control is in effect, b\bba\bas\bsh\bh
2597        ignores S\bSI\bIG\bGT\bTT\bTI\bIN\bN, S\bSI\bIG\bGT\bTT\bTO\bOU\bU, and S\bSI\bIG\bGT\bTS\bST\bTP\bP.
2598
2599        Non-builtin commands run by b\bba\bas\bsh\bh have signal handlers set to the values
2600        inherited  by  the  shell  from its parent.  When job control is not in
2601        effect, asynchronous commands ignore S\bSI\bIG\bGI\bIN\bNT\bT and S\bSI\bIG\bGQ\bQU\bUI\bIT\bT in addition  to
2602        these  inherited handlers.  Commands run as a result of command substi-
2603        tution ignore the keyboard-generated job control signals S\bSI\bIG\bGT\bTT\bTI\bIN\bN, S\bSI\bIG\bGT\bT-\b-
2604        T\bTO\bOU\bU, and S\bSI\bIG\bGT\bTS\bST\bTP\bP.
2605
2606        The  shell  exits by default upon receipt of a S\bSI\bIG\bGH\bHU\bUP\bP.  Before exiting,
2607        an interactive shell  resends  the  S\bSI\bIG\bGH\bHU\bUP\bP  to  all  jobs,  running  or
2608        stopped.  Stopped jobs are sent S\bSI\bIG\bGC\bCO\bON\bNT\bT to ensure that they receive the
2609        S\bSI\bIG\bGH\bHU\bUP\bP.  To prevent the shell from sending the signal to  a  particular
2610        job,  it  should be removed from the jobs table with the d\bdi\bis\bso\bow\bwn\bn builtin
2611        (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below) or  marked  to  not  receive  S\bSI\bIG\bGH\bHU\bUP\bP
2612        using d\bdi\bis\bso\bow\bwn\bn -\b-h\bh.
2613
2614        If  the  h\bhu\bup\bpo\bon\bne\bex\bxi\bit\bt  shell  option has been set with s\bsh\bho\bop\bpt\bt, b\bba\bas\bsh\bh sends a
2615        S\bSI\bIG\bGH\bHU\bUP\bP to all jobs when an interactive login shell exits.
2616
2617        If b\bba\bas\bsh\bh is waiting for a command to complete and receives a signal  for
2618        which a trap has been set, the trap will not be executed until the com-
2619        mand completes.  When b\bba\bas\bsh\bh is waiting for an asynchronous  command  via
2620        the  w\bwa\bai\bit\bt  builtin, the reception of a signal for which a trap has been
2621        set will cause the w\bwa\bai\bit\bt builtin to return immediately with an exit sta-
2622        tus greater than 128, immediately after which the trap is executed.
2623
2624 J\bJO\bOB\bB C\bCO\bON\bNT\bTR\bRO\bOL\bL
2625        _\bJ_\bo_\bb  _\bc_\bo_\bn_\bt_\br_\bo_\bl  refers  to  the ability to selectively stop (_\bs_\bu_\bs_\bp_\be_\bn_\bd) the
2626        execution of processes and continue (_\br_\be_\bs_\bu_\bm_\be) their execution at a later
2627        point.   A  user  typically  employs  this  facility via an interactive
2628        interface supplied jointly by the operating  system  kernel's  terminal
2629        driver and b\bba\bas\bsh\bh.
2630
2631        The  shell  associates  a  _\bj_\bo_\bb with each pipeline.  It keeps a table of
2632        currently executing jobs, which may be listed with  the  j\bjo\bob\bbs\bs  command.
2633        When  b\bba\bas\bsh\bh starts a job asynchronously (in the _\bb_\ba_\bc_\bk_\bg_\br_\bo_\bu_\bn_\bd), it prints a
2634        line that looks like:
2635
2636               [1] 25647
2637
2638        indicating that this job is job number 1 and that the process ID of the
2639        last process in the pipeline associated with this job is 25647.  All of
2640        the processes in a single pipeline are members of the same  job.   B\bBa\bas\bsh\bh
2641        uses the _\bj_\bo_\bb abstraction as the basis for job control.
2642
2643        To  facilitate the implementation of the user interface to job control,
2644        the operating system maintains the notion of a _\bc_\bu_\br_\br_\be_\bn_\bt _\bt_\be_\br_\bm_\bi_\bn_\ba_\bl _\bp_\br_\bo_\bc_\be_\bs_\bs
2645        _\bg_\br_\bo_\bu_\bp _\bI_\bD.  Members of this process group (processes whose process group
2646        ID is equal to the current terminal process group ID) receive keyboard-
2647        generated  signals  such  as S\bSI\bIG\bGI\bIN\bNT\bT.  These processes are said to be in
2648        the _\bf_\bo_\br_\be_\bg_\br_\bo_\bu_\bn_\bd.  _\bB_\ba_\bc_\bk_\bg_\br_\bo_\bu_\bn_\bd processes are those whose process group  ID
2649        differs from the terminal's; such processes are immune to keyboard-gen-
2650        erated signals.  Only foreground processes are allowed to read from or,
2651        if  the  user  so  specifies  with  stty tostop, write to the terminal.
2652        Background processes which attempt to read from  (write  to  when  stty
2653        tostop  is  in effect) the terminal are sent a S\bSI\bIG\bGT\bTT\bTI\bIN\bN (\b(S\bSI\bIG\bGT\bTT\bTO\bOU\bU)\b) signal
2654        by the kernel's terminal driver, which,  unless  caught,  suspends  the
2655        process.
2656
2657        If  the operating system on which b\bba\bas\bsh\bh is running supports job control,
2658        b\bba\bas\bsh\bh contains facilities to use it.  Typing the _\bs_\bu_\bs_\bp_\be_\bn_\bd character (typ-
2659        ically ^\b^Z\bZ, Control-Z) while a process is running causes that process to
2660        be stopped and returns control to b\bba\bas\bsh\bh.   Typing  the  _\bd_\be_\bl_\ba_\by_\be_\bd  _\bs_\bu_\bs_\bp_\be_\bn_\bd
2661        character  (typically  ^\b^Y\bY,  Control-Y) causes the process to be stopped
2662        when it attempts to read input from the terminal,  and  control  to  be
2663        returned  to b\bba\bas\bsh\bh.  The user may then manipulate the state of this job,
2664        using the b\bbg\bg command to continue it in the background, the  f\bfg\bg  command
2665        to continue it in the foreground, or the k\bki\bil\bll\bl command to kill it.  A ^\b^Z\bZ
2666        takes effect immediately, and has the additional side effect of causing
2667        pending output and typeahead to be discarded.
2668
2669        There are a number of ways to refer to a job in the shell.  The charac-
2670        ter %\b% introduces a job specification (_\bj_\bo_\bb_\bs_\bp_\be_\bc).  Job number  _\bn  may  be
2671        referred to as %\b%n\bn.  A job may also be referred to using a prefix of the
2672        name used to start it, or using a substring that appears in its command
2673        line.   For  example,  %\b%c\bce\be  refers  to  a  stopped c\bce\be job.  If a prefix
2674        matches more than one job, b\bba\bas\bsh\bh reports an error.  Using %\b%?\b?c\bce\be,  on  the
2675        other  hand,  refers to any job containing the string c\bce\be in its command
2676        line.  If the substring matches more than  one  job,  b\bba\bas\bsh\bh  reports  an
2677        error.   The  symbols %\b%%\b% and %\b%+\b+ refer to the shell's notion of the _\bc_\bu_\br_\b-
2678        _\br_\be_\bn_\bt _\bj_\bo_\bb, which is the last job stopped while it was in the  foreground
2679        or started in the background.  The _\bp_\br_\be_\bv_\bi_\bo_\bu_\bs _\bj_\bo_\bb may be referenced using
2680        %\b%-\b-.  If there is only a single job, %\b%+\b+ and %\b%-\b- can both be used to refer
2681        to  that  job.   In  output pertaining to jobs (e.g., the output of the
2682        j\bjo\bob\bbs\bs command), the current job is always flagged with a +\b+, and the pre-
2683        vious  job  with  a -\b-.  A single % (with no accompanying job specifica-
2684        tion) also refers to the current job.
2685
2686        Simply naming a job can be used to bring it into the foreground: %\b%1\b1  is
2687        a  synonym  for  `\b``\b`f\bfg\bg %\b%1\b1'\b''\b', bringing job 1 from the background into the
2688        foreground.  Similarly, `\b``\b`%\b%1\b1 &\b&'\b''\b'  resumes  job  1  in  the  background,
2689        equivalent to `\b``\b`b\bbg\bg %\b%1\b1'\b''\b'.
2690
2691        The  shell  learns immediately whenever a job changes state.  Normally,
2692        b\bba\bas\bsh\bh waits until it is about to print a prompt before reporting changes
2693        in  a  job's status so as to not interrupt any other output.  If the -\b-b\bb
2694        option to the s\bse\bet\bt builtin command is enabled, b\bba\bas\bsh\bh reports such changes
2695        immediately.   Any  trap  on  S\bSI\bIG\bGC\bCH\bHL\bLD\bD  is  executed for each child that
2696        exits.
2697
2698        If an attempt to exit b\bba\bas\bsh\bh is made while jobs are stopped (or,  if  the
2699        c\bch\bhe\bec\bck\bkj\bjo\bob\bbs\bs  shell  option has been enabled using the s\bsh\bho\bop\bpt\bt builtin, run-
2700        ning), the shell prints a warning message, and, if the c\bch\bhe\bec\bck\bkj\bjo\bob\bbs\bs option
2701        is  enabled,  lists  the jobs and their statuses.  The j\bjo\bob\bbs\bs command may
2702        then be used to inspect their status.  If a second attempt to  exit  is
2703        made  without  an intervening command, the shell does not print another
2704        warning, and any stopped jobs are terminated.
2705
2706 P\bPR\bRO\bOM\bMP\bPT\bTI\bIN\bNG\bG
2707        When executing interactively, b\bba\bas\bsh\bh displays the primary prompt P\bPS\bS1\b1 when
2708        it  is  ready  to  read a command, and the secondary prompt P\bPS\bS2\b2 when it
2709        needs more input to complete  a  command.   B\bBa\bas\bsh\bh  allows  these  prompt
2710        strings  to  be  customized  by inserting a number of backslash-escaped
2711        special characters that are decoded as follows:
2712               \\b\a\ba     an ASCII bell character (07)
2713               \\b\d\bd     the date in "Weekday Month Date" format (e.g.,  "Tue  May
2714                      26")
2715               \\b\D\bD{\b{_\bf_\bo_\br_\bm_\ba_\bt}\b}
2716                      the  _\bf_\bo_\br_\bm_\ba_\bt  is  passed  to _\bs_\bt_\br_\bf_\bt_\bi_\bm_\be(3) and the result is
2717                      inserted into the prompt string; an empty _\bf_\bo_\br_\bm_\ba_\bt  results
2718                      in a locale-specific time representation.  The braces are
2719                      required
2720               \\b\e\be     an ASCII escape character (033)
2721               \\b\h\bh     the hostname up to the first `.'
2722               \\b\H\bH     the hostname
2723               \\b\j\bj     the number of jobs currently managed by the shell
2724               \\b\l\bl     the basename of the shell's terminal device name
2725               \\b\n\bn     newline
2726               \\b\r\br     carriage return
2727               \\b\s\bs     the name of the shell, the basename of  $\b$0\b0  (the  portion
2728                      following the final slash)
2729               \\b\t\bt     the current time in 24-hour HH:MM:SS format
2730               \\b\T\bT     the current time in 12-hour HH:MM:SS format
2731               \\b\@\b@     the current time in 12-hour am/pm format
2732               \\b\A\bA     the current time in 24-hour HH:MM format
2733               \\b\u\bu     the username of the current user
2734               \\b\v\bv     the version of b\bba\bas\bsh\bh (e.g., 2.00)
2735               \\b\V\bV     the release of b\bba\bas\bsh\bh, version + patch level (e.g., 2.00.0)
2736               \\b\w\bw     the current working  directory,  with  $\b$H\bHO\bOM\bME\bE  abbreviated
2737                      with  a tilde (uses the value of the P\bPR\bRO\bOM\bMP\bPT\bT_\b_D\bDI\bIR\bRT\bTR\bRI\bIM\bM vari-
2738                      able)
2739               \\b\W\bW     the basename of the current working directory, with $\b$H\bHO\bOM\bME\bE
2740                      abbreviated with a tilde
2741               \\b\!\b!     the history number of this command
2742               \\b\#\b#     the command number of this command
2743               \\b\$\b$     if the effective UID is 0, a #\b#, otherwise a $\b$
2744               \\b\_\bn_\bn_\bn   the character corresponding to the octal number _\bn_\bn_\bn
2745               \\b\\\b\     a backslash
2746               \\b\[\b[     begin  a sequence of non-printing characters, which could
2747                      be used to embed a terminal  control  sequence  into  the
2748                      prompt
2749               \\b\]\b]     end a sequence of non-printing characters
2750
2751        The  command  number  and the history number are usually different: the
2752        history number of a command is its position in the history list,  which
2753        may  include  commands  restored  from  the  history  file (see H\bHI\bIS\bST\bTO\bOR\bRY\bY
2754        below), while the command number is the position  in  the  sequence  of
2755        commands  executed  during the current shell session.  After the string
2756        is decoded, it is expanded via parameter expansion,  command  substitu-
2757        tion,  arithmetic expansion, and quote removal, subject to the value of
2758        the p\bpr\bro\bom\bmp\bpt\btv\bva\bar\brs\bs shell option (see the description of the  s\bsh\bho\bop\bpt\bt  command
2759        under S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below).
2760
2761 R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE
2762        This  is  the library that handles reading input when using an interac-
2763        tive shell, unless the -\b--\b-n\bno\boe\bed\bdi\bit\bti\bin\bng\bg option is given at shell invocation.
2764        Line editing is also used when using the -\b-e\be option to the r\bre\bea\bad\bd builtin.
2765        By default, the line editing commands are similar to those of Emacs.  A
2766        vi-style line editing interface is also available.  Line editing can be
2767        enabled at any time using the -\b-o\bo e\bem\bma\bac\bcs\bs or -\b-o\bo  v\bvi\bi  options  to  the  s\bse\bet\bt
2768        builtin  (see  S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below).  To turn off line editing
2769        after the shell is running, use the +\b+o\bo e\bem\bma\bac\bcs\bs or +\b+o\bo v\bvi\bi  options  to  the
2770        s\bse\bet\bt builtin.
2771
2772    R\bRe\bea\bad\bdl\bli\bin\bne\be N\bNo\bot\bta\bat\bti\bio\bon\bn
2773        In this section, the Emacs-style notation is used to denote keystrokes.
2774        Control keys are denoted by C-_\bk_\be_\by, e.g., C-n  means  Control-N.   Simi-
2775        larly,  _\bm_\be_\bt_\ba  keys are denoted by M-_\bk_\be_\by, so M-x means Meta-X.  (On key-
2776        boards without a _\bm_\be_\bt_\ba key, M-_\bx means ESC _\bx, i.e., press the Escape  key
2777        then the _\bx key.  This makes ESC the _\bm_\be_\bt_\ba _\bp_\br_\be_\bf_\bi_\bx.  The combination M-C-_\bx
2778        means ESC-Control-_\bx, or press the Escape key then hold the Control  key
2779        while pressing the _\bx key.)
2780
2781        Readline commands may be given numeric _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs, which normally act as
2782        a repeat count.  Sometimes, however, it is the  sign  of  the  argument
2783        that  is  significant.   Passing  a negative argument to a command that
2784        acts in the forward direction (e.g., k\bki\bil\bll\bl-\b-l\bli\bin\bne\be) causes that command  to
2785        act  in  a  backward direction.  Commands whose behavior with arguments
2786        deviates from this are noted below.
2787
2788        When a command is described as _\bk_\bi_\bl_\bl_\bi_\bn_\bg text, the text deleted is  saved
2789        for possible future retrieval (_\by_\ba_\bn_\bk_\bi_\bn_\bg).  The killed text is saved in a
2790        _\bk_\bi_\bl_\bl _\br_\bi_\bn_\bg.  Consecutive kills cause the text to be accumulated into one
2791        unit, which can be yanked all at once.  Commands which do not kill text
2792        separate the chunks of text on the kill ring.
2793
2794    R\bRe\bea\bad\bdl\bli\bin\bne\be I\bIn\bni\bit\bti\bia\bal\bli\biz\bza\bat\bti\bio\bon\bn
2795        Readline is customized by putting commands in  an  initialization  file
2796        (the  _\bi_\bn_\bp_\bu_\bt_\br_\bc  file).  The name of this file is taken from the value of
2797        the I\bIN\bNP\bPU\bUT\bTR\bRC\bC variable.  If  that  variable  is  unset,  the  default  is
2798        _\b~_\b/_\b._\bi_\bn_\bp_\bu_\bt_\br_\bc.   When a program which uses the readline library starts up,
2799        the initialization file is read, and the key bindings and variables are
2800        set.   There  are  only  a few basic constructs allowed in the readline
2801        initialization file.  Blank lines are ignored.  Lines beginning with  a
2802        #\b#  are  comments.   Lines  beginning with a $\b$ indicate conditional con-
2803        structs.  Other lines denote key bindings and variable settings.
2804
2805        The default key-bindings may be changed with an  _\bi_\bn_\bp_\bu_\bt_\br_\bc  file.   Other
2806        programs that use this library may add their own commands and bindings.
2807
2808        For example, placing
2809
2810               M-Control-u: universal-argument
2811        or
2812               C-Meta-u: universal-argument
2813        into the _\bi_\bn_\bp_\bu_\bt_\br_\bc would make M-C-u execute the readline command  _\bu_\bn_\bi_\bv_\be_\br_\b-
2814        _\bs_\ba_\bl_\b-_\ba_\br_\bg_\bu_\bm_\be_\bn_\bt.
2815
2816        The  following  symbolic  character  names are recognized: _\bR_\bU_\bB_\bO_\bU_\bT, _\bD_\bE_\bL,
2817        _\bE_\bS_\bC, _\bL_\bF_\bD, _\bN_\bE_\bW_\bL_\bI_\bN_\bE, _\bR_\bE_\bT, _\bR_\bE_\bT_\bU_\bR_\bN, _\bS_\bP_\bC, _\bS_\bP_\bA_\bC_\bE, and _\bT_\bA_\bB.
2818
2819        In addition to command names, readline allows keys to  be  bound  to  a
2820        string that is inserted when the key is pressed (a _\bm_\ba_\bc_\br_\bo).
2821
2822    R\bRe\bea\bad\bdl\bli\bin\bne\be K\bKe\bey\by B\bBi\bin\bnd\bdi\bin\bng\bgs\bs
2823        The  syntax for controlling key bindings in the _\bi_\bn_\bp_\bu_\bt_\br_\bc file is simple.
2824        All that is required is the name of the command or the text of a  macro
2825        and  a key sequence to which it should be bound. The name may be speci-
2826        fied in one of two ways: as a symbolic key name, possibly with _\bM_\be_\bt_\ba_\b- or
2827        _\bC_\bo_\bn_\bt_\br_\bo_\bl_\b- prefixes, or as a key sequence.
2828
2829        When using the form k\bke\bey\byn\bna\bam\bme\be:_\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be or _\bm_\ba_\bc_\br_\bo, _\bk_\be_\by_\bn_\ba_\bm_\be is the name
2830        of a key spelled out in English.  For example:
2831
2832               Control-u: universal-argument
2833               Meta-Rubout: backward-kill-word
2834               Control-o: "> output"
2835
2836        In the above example, _\bC_\b-_\bu is bound to the function  u\bun\bni\biv\bve\ber\brs\bsa\bal\bl-\b-a\bar\brg\bgu\bum\bme\ben\bnt\bt,
2837        _\bM_\b-_\bD_\bE_\bL  is bound to the function b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-k\bki\bil\bll\bl-\b-w\bwo\bor\brd\bd, and _\bC_\b-_\bo is bound to
2838        run the macro expressed on the right hand side (that is, to insert  the
2839        text ``> output'' into the line).
2840
2841        In  the  second  form,  "\b"k\bke\bey\bys\bse\beq\bq"\b":_\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be or _\bm_\ba_\bc_\br_\bo, k\bke\bey\bys\bse\beq\bq differs
2842        from k\bke\bey\byn\bna\bam\bme\be above in that strings denoting an entire key sequence  may
2843        be  specified  by  placing the sequence within double quotes.  Some GNU
2844        Emacs style key escapes can be used, as in the following  example,  but
2845        the symbolic character names are not recognized.
2846
2847               "\C-u": universal-argument
2848               "\C-x\C-r": re-read-init-file
2849               "\e[11~": "Function Key 1"
2850
2851        In this example, _\bC_\b-_\bu is again bound to the function u\bun\bni\biv\bve\ber\brs\bsa\bal\bl-\b-a\bar\brg\bgu\bum\bme\ben\bnt\bt.
2852        _\bC_\b-_\bx _\bC_\b-_\br is bound to the function r\bre\be-\b-r\bre\bea\bad\bd-\b-i\bin\bni\bit\bt-\b-f\bfi\bil\ble\be, and _\bE_\bS_\bC _\b[ _\b1 _\b1 _\b~  is
2853        bound to insert the text ``Function Key 1''.
2854
2855        The full set of GNU Emacs style escape sequences is
2856               \\b\C\bC-\b-    control prefix
2857               \\b\M\bM-\b-    meta prefix
2858               \\b\e\be     an escape character
2859               \\b\\\b\     backslash
2860               \\b\"\b"     literal "
2861               \\b\'\b'     literal '
2862
2863        In  addition  to  the GNU Emacs style escape sequences, a second set of
2864        backslash escapes is available:
2865               \\b\a\ba     alert (bell)
2866               \\b\b\bb     backspace
2867               \\b\d\bd     delete
2868               \\b\f\bf     form feed
2869               \\b\n\bn     newline
2870               \\b\r\br     carriage return
2871               \\b\t\bt     horizontal tab
2872               \\b\v\bv     vertical tab
2873               \\b\_\bn_\bn_\bn   the eight-bit character whose value is  the  octal  value
2874                      _\bn_\bn_\bn (one to three digits)
2875               \\b\x\bx_\bH_\bH   the  eight-bit  character  whose value is the hexadecimal
2876                      value _\bH_\bH (one or two hex digits)
2877
2878        When entering the text of a macro, single or double quotes must be used
2879        to indicate a macro definition.  Unquoted text is assumed to be a func-
2880        tion name.  In the macro body, the backslash  escapes  described  above
2881        are  expanded.   Backslash  will quote any other character in the macro
2882        text, including " and '.
2883
2884        B\bBa\bas\bsh\bh allows the current readline key bindings to be displayed or  modi-
2885        fied  with  the b\bbi\bin\bnd\bd builtin command.  The editing mode may be switched
2886        during interactive use by using the -\b-o\bo option to the s\bse\bet\bt  builtin  com-
2887        mand (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below).
2888
2889    R\bRe\bea\bad\bdl\bli\bin\bne\be V\bVa\bar\bri\bia\bab\bbl\ble\bes\bs
2890        Readline has variables that can be used to further customize its behav-
2891        ior.  A variable may be set in the _\bi_\bn_\bp_\bu_\bt_\br_\bc file with a statement of the
2892        form
2893
2894               s\bse\bet\bt _\bv_\ba_\br_\bi_\ba_\bb_\bl_\be_\b-_\bn_\ba_\bm_\be _\bv_\ba_\bl_\bu_\be
2895
2896        Except  where  noted,  readline variables can take the values O\bOn\bn or O\bOf\bff\bf
2897        (without regard to case).  Unrecognized  variable  names  are  ignored.
2898        When  a variable value is read, empty or null values, "on" (case-insen-
2899        sitive), and "1" are equivalent to O\bOn\bn.  All other values are equivalent
2900        to O\bOf\bff\bf.  The variables and their default values are:
2901
2902        b\bbe\bel\bll\bl-\b-s\bst\bty\byl\ble\be (\b(a\bau\bud\bdi\bib\bbl\ble\be)\b)
2903               Controls  what  happens when readline wants to ring the terminal
2904               bell.  If set to n\bno\bon\bne\be, readline never rings the bell.  If set to
2905               v\bvi\bis\bsi\bib\bbl\ble\be,  readline  uses a visible bell if one is available.  If
2906               set to a\bau\bud\bdi\bib\bbl\ble\be, readline attempts to ring the terminal's bell.
2907        b\bbi\bin\bnd\bd-\b-t\btt\bty\by-\b-s\bsp\bpe\bec\bci\bia\bal\bl-\b-c\bch\bha\bar\brs\bs (\b(O\bOn\bn)\b)
2908               If set to O\bOn\bn, readline attempts to bind the  control  characters
2909               treated specially by the kernel's terminal driver to their read-
2910               line equivalents.
2911        c\bco\bol\blo\bor\bre\bed\bd-\b-s\bst\bta\bat\bts\bs (\b(O\bOf\bff\bf)\b)
2912               If set to O\bOn\bn, readline displays possible completions using  dif-
2913               ferent  colors  to  indicate their file type.  The color defini-
2914               tions are taken from the  value  of  the  L\bLS\bS_\b_C\bCO\bOL\bLO\bOR\bRS\bS  environment
2915               variable.
2916        c\bco\bom\bmm\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bn (\b(`\b``\b`#\b#'\b''\b')\b)
2917               The  string  that  is  inserted when the readline i\bin\bns\bse\ber\brt\bt-\b-c\bco\bom\bmm\bme\ben\bnt\bt
2918               command is executed.  This command is bound to M\bM-\b-#\b# in emacs mode
2919               and to #\b# in vi command mode.
2920        c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn-\b-i\big\bgn\bno\bor\bre\be-\b-c\bca\bas\bse\be (\b(O\bOf\bff\bf)\b)
2921               If set to O\bOn\bn, readline performs filename matching and completion
2922               in a case-insensitive fashion.
2923        c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn-\b-p\bpr\bre\bef\bfi\bix\bx-\b-d\bdi\bis\bsp\bpl\bla\bay\by-\b-l\ble\ben\bng\bgt\bth\bh (\b(0\b0)\b)
2924               The length in characters of the common prefix of a list of  pos-
2925               sible  completions that is displayed without modification.  When
2926               set to a value greater than zero, common  prefixes  longer  than
2927               this  value are replaced with an ellipsis when displaying possi-
2928               ble completions.
2929        c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn-\b-q\bqu\bue\ber\bry\by-\b-i\bit\bte\bem\bms\bs (\b(1\b10\b00\b0)\b)
2930               This determines when the user is queried about viewing the  num-
2931               ber  of  possible  completions generated by the p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-c\bco\bom\bmp\bpl\ble\be-\b-
2932               t\bti\bio\bon\bns\bs command.  It may be set to any integer value greater  than
2933               or  equal  to  zero.   If  the number of possible completions is
2934               greater than or equal to the value of this variable, the user is
2935               asked  whether or not he wishes to view them; otherwise they are
2936               simply listed on the terminal.
2937        c\bco\bon\bnv\bve\ber\brt\bt-\b-m\bme\bet\bta\ba (\b(O\bOn\bn)\b)
2938               If set to O\bOn\bn, readline will convert characters with  the  eighth
2939               bit set to an ASCII key sequence by stripping the eighth bit and
2940               prefixing an escape character (in effect, using  escape  as  the
2941               _\bm_\be_\bt_\ba _\bp_\br_\be_\bf_\bi_\bx).
2942        d\bdi\bis\bsa\bab\bbl\ble\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn (\b(O\bOf\bff\bf)\b)
2943               If set to O\bOn\bn, readline will inhibit word completion.  Completion
2944               characters will be inserted into the line as if  they  had  been
2945               mapped to s\bse\bel\blf\bf-\b-i\bin\bns\bse\ber\brt\bt.
2946        e\bed\bdi\bit\bti\bin\bng\bg-\b-m\bmo\bod\bde\be (\b(e\bem\bma\bac\bcs\bs)\b)
2947               Controls whether readline begins with a set of key bindings sim-
2948               ilar to _\bE_\bm_\ba_\bc_\bs or _\bv_\bi.  e\bed\bdi\bit\bti\bin\bng\bg-\b-m\bmo\bod\bde\be can be set to either e\bem\bma\bac\bcs\bs or
2949               v\bvi\bi.
2950        e\bec\bch\bho\bo-\b-c\bco\bon\bnt\btr\bro\bol\bl-\b-c\bch\bha\bar\bra\bac\bct\bte\ber\brs\bs (\b(O\bOn\bn)\b)
2951               When  set to O\bOn\bn, on operating systems that indicate they support
2952               it, readline echoes a character corresponding to a signal gener-
2953               ated from the keyboard.
2954        e\ben\bna\bab\bbl\ble\be-\b-k\bke\bey\byp\bpa\bad\bd (\b(O\bOf\bff\bf)\b)
2955               When set to O\bOn\bn, readline will try to enable the application key-
2956               pad when it is called.  Some systems need  this  to  enable  the
2957               arrow keys.
2958        e\ben\bna\bab\bbl\ble\be-\b-m\bme\bet\bta\ba-\b-k\bke\bey\by (\b(O\bOn\bn)\b)
2959               When  set  to  O\bOn\bn, readline will try to enable any meta modifier
2960               key the terminal claims to support when it is called.   On  many
2961               terminals, the meta key is used to send eight-bit characters.
2962        e\bex\bxp\bpa\ban\bnd\bd-\b-t\bti\bil\bld\bde\be (\b(O\bOf\bff\bf)\b)
2963               If  set  to  O\bOn\bn,  tilde  expansion  is  performed  when readline
2964               attempts word completion.
2965        h\bhi\bis\bst\bto\bor\bry\by-\b-p\bpr\bre\bes\bse\ber\brv\bve\be-\b-p\bpo\boi\bin\bnt\bt (\b(O\bOf\bff\bf)\b)
2966               If set to O\bOn\bn, the history code attempts to place  point  at  the
2967               same  location on each history line retrieved with p\bpr\bre\bev\bvi\bio\bou\bus\bs-\b-h\bhi\bis\bs-\b-
2968               t\bto\bor\bry\by or n\bne\bex\bxt\bt-\b-h\bhi\bis\bst\bto\bor\bry\by.
2969        h\bhi\bis\bst\bto\bor\bry\by-\b-s\bsi\biz\bze\be (\b(0\b0)\b)
2970               Set the maximum number of history entries saved in  the  history
2971               list.   If set to zero, any existing history entries are deleted
2972               and no new entries are saved.  If set to a value less than zero,
2973               the  number  of history entries is not limited.  By default, the
2974               number of history entries is not limited.
2975        h\bho\bor\bri\biz\bzo\bon\bnt\bta\bal\bl-\b-s\bsc\bcr\bro\bol\bll\bl-\b-m\bmo\bod\bde\be (\b(O\bOf\bff\bf)\b)
2976               When set to O\bOn\bn, makes readline use a single  line  for  display,
2977               scrolling the input horizontally on a single screen line when it
2978               becomes longer than the screen width rather than wrapping  to  a
2979               new line.
2980        i\bin\bnp\bpu\but\bt-\b-m\bme\bet\bta\ba (\b(O\bOf\bff\bf)\b)
2981               If  set to O\bOn\bn, readline will enable eight-bit input (that is, it
2982               will not strip the high  bit  from  the  characters  it  reads),
2983               regardless of what the terminal claims it can support.  The name
2984               m\bme\bet\bta\ba-\b-f\bfl\bla\bag\bg is a synonym for this variable.
2985        i\bis\bse\bea\bar\brc\bch\bh-\b-t\bte\ber\brm\bmi\bin\bna\bat\bto\bor\brs\bs (\b(`\b``\b`C\bC-\b-[\b[C\bC-\b-J\bJ'\b''\b')\b)
2986               The string of characters that should  terminate  an  incremental
2987               search  without  subsequently  executing the character as a com-
2988               mand.  If this variable has not been given a value, the  charac-
2989               ters _\bE_\bS_\bC and _\bC_\b-_\bJ will terminate an incremental search.
2990        k\bke\bey\bym\bma\bap\bp (\b(e\bem\bma\bac\bcs\bs)\b)
2991               Set  the current readline keymap.  The set of valid keymap names
2992               is _\be_\bm_\ba_\bc_\bs_\b, _\be_\bm_\ba_\bc_\bs_\b-_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd_\b, _\be_\bm_\ba_\bc_\bs_\b-_\bm_\be_\bt_\ba_\b,  _\be_\bm_\ba_\bc_\bs_\b-_\bc_\bt_\bl_\bx_\b,  _\bv_\bi_\b,  _\bv_\bi_\b-_\bc_\bo_\bm_\b-
2993               _\bm_\ba_\bn_\bd,  and  _\bv_\bi_\b-_\bi_\bn_\bs_\be_\br_\bt.  _\bv_\bi is equivalent to _\bv_\bi_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd; _\be_\bm_\ba_\bc_\bs is
2994               equivalent to _\be_\bm_\ba_\bc_\bs_\b-_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd.  The default value is  _\be_\bm_\ba_\bc_\bs;  the
2995               value of e\bed\bdi\bit\bti\bin\bng\bg-\b-m\bmo\bod\bde\be also affects the default keymap.
2996        k\bke\bey\bys\bse\beq\bq-\b-t\bti\bim\bme\beo\bou\but\bt (\b(5\b50\b00\b0)\b)
2997               Specifies  the  duration _\br_\be_\ba_\bd_\bl_\bi_\bn_\be will wait for a character when
2998               reading an ambiguous key sequence (one that can form a  complete
2999               key sequence using the input read so far, or can take additional
3000               input to complete a  longer  key  sequence).   If  no  input  is
3001               received  within  the timeout, _\br_\be_\ba_\bd_\bl_\bi_\bn_\be will use the shorter but
3002               complete key sequence.  The value is specified in  milliseconds,
3003               so  a value of 1000 means that _\br_\be_\ba_\bd_\bl_\bi_\bn_\be will wait one second for
3004               additional input.  If this variable is set to a value less  than
3005               or  equal to zero, or to a non-numeric value, _\br_\be_\ba_\bd_\bl_\bi_\bn_\be will wait
3006               until another key is pressed to decide  which  key  sequence  to
3007               complete.
3008        m\bma\bar\brk\bk-\b-d\bdi\bir\bre\bec\bct\bto\bor\bri\bie\bes\bs (\b(O\bOn\bn)\b)
3009               If set to O\bOn\bn, completed directory names have a slash appended.
3010        m\bma\bar\brk\bk-\b-m\bmo\bod\bdi\bif\bfi\bie\bed\bd-\b-l\bli\bin\bne\bes\bs (\b(O\bOf\bff\bf)\b)
3011               If  set  to  O\bOn\bn,  history lines that have been modified are dis-
3012               played with a preceding asterisk (*\b*).
3013        m\bma\bar\brk\bk-\b-s\bsy\bym\bml\bli\bin\bnk\bke\bed\bd-\b-d\bdi\bir\bre\bec\bct\bto\bor\bri\bie\bes\bs (\b(O\bOf\bff\bf)\b)
3014               If set to O\bOn\bn, completed names which are symbolic links to direc-
3015               tories   have   a  slash  appended  (subject  to  the  value  of
3016               m\bma\bar\brk\bk-\b-d\bdi\bir\bre\bec\bct\bto\bor\bri\bie\bes\bs).
3017        m\bma\bat\btc\bch\bh-\b-h\bhi\bid\bdd\bde\ben\bn-\b-f\bfi\bil\ble\bes\bs (\b(O\bOn\bn)\b)
3018               This variable, when set to O\bOn\bn, causes readline  to  match  files
3019               whose  names  begin  with  a  `.' (hidden files) when performing
3020               filename completion.  If set to O\bOf\bff\bf, the  leading  `.'  must  be
3021               supplied by the user in the filename to be completed.
3022        m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-d\bdi\bis\bsp\bpl\bla\bay\by-\b-p\bpr\bre\bef\bfi\bix\bx (\b(O\bOf\bff\bf)\b)
3023               If  set to O\bOn\bn, menu completion displays the common prefix of the
3024               list of possible completions (which may be empty) before cycling
3025               through the list.
3026        o\bou\but\btp\bpu\but\bt-\b-m\bme\bet\bta\ba (\b(O\bOf\bff\bf)\b)
3027               If  set  to O\bOn\bn, readline will display characters with the eighth
3028               bit set directly rather than as a meta-prefixed escape sequence.
3029        p\bpa\bag\bge\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs (\b(O\bOn\bn)\b)
3030               If  set to O\bOn\bn, readline uses an internal _\bm_\bo_\br_\be-like pager to dis-
3031               play a screenful of possible completions at a time.
3032        p\bpr\bri\bin\bnt\bt-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs-\b-h\bho\bor\bri\biz\bzo\bon\bnt\bta\bal\bll\bly\by (\b(O\bOf\bff\bf)\b)
3033               If set to O\bOn\bn, readline will  display  completions  with  matches
3034               sorted  horizontally in alphabetical order, rather than down the
3035               screen.
3036        r\bre\bev\bve\ber\brt\bt-\b-a\bal\bll\bl-\b-a\bat\bt-\b-n\bne\bew\bwl\bli\bin\bne\be (\b(O\bOf\bff\bf)\b)
3037               If set to O\bOn\bn, readline will undo all changes  to  history  lines
3038               before returning when a\bac\bcc\bce\bep\bpt\bt-\b-l\bli\bin\bne\be is executed.  By default, his-
3039               tory lines may be modified  and  retain  individual  undo  lists
3040               across calls to r\bre\bea\bad\bdl\bli\bin\bne\be.
3041        s\bsh\bho\bow\bw-\b-a\bal\bll\bl-\b-i\bif\bf-\b-a\bam\bmb\bbi\big\bgu\buo\bou\bus\bs (\b(O\bOf\bff\bf)\b)
3042               This  alters  the  default behavior of the completion functions.
3043               If set to O\bOn\bn, words which have more than one possible completion
3044               cause  the  matches  to be listed immediately instead of ringing
3045               the bell.
3046        s\bsh\bho\bow\bw-\b-a\bal\bll\bl-\b-i\bif\bf-\b-u\bun\bnm\bmo\bod\bdi\bif\bfi\bie\bed\bd (\b(O\bOf\bff\bf)\b)
3047               This alters the default behavior of the completion functions  in
3048               a fashion similar to s\bsh\bho\bow\bw-\b-a\bal\bll\bl-\b-i\bif\bf-\b-a\bam\bmb\bbi\big\bgu\buo\bou\bus\bs.  If set to O\bOn\bn, words
3049               which have more than one possible completion without any  possi-
3050               ble  partial  completion (the possible completions don't share a
3051               common prefix)  cause  the  matches  to  be  listed  immediately
3052               instead of ringing the bell.
3053        s\bsh\bho\bow\bw-\b-m\bmo\bod\bde\be-\b-i\bin\bn-\b-p\bpr\bro\bom\bmp\bpt\bt (\b(O\bOf\bff\bf)\b)
3054               If  set  to  O\bOn\bn,  add a character to the beginning of the prompt
3055               indicating the editing mode: emacs (@), vi  command  (:)  or  vi
3056               insertion (+).
3057        s\bsk\bki\bip\bp-\b-c\bco\bom\bmp\bpl\ble\bet\bte\bed\bd-\b-t\bte\bex\bxt\bt (\b(O\bOf\bff\bf)\b)
3058               If  set  to O\bOn\bn, this alters the default completion behavior when
3059               inserting a single match into the line.  It's only  active  when
3060               performing  completion  in  the  middle  of a word.  If enabled,
3061               readline does not insert characters  from  the  completion  that
3062               match  characters  after  point  in the word being completed, so
3063               portions of the word following the cursor are not duplicated.
3064        v\bvi\bis\bsi\bib\bbl\ble\be-\b-s\bst\bta\bat\bts\bs (\b(O\bOf\bff\bf)\b)
3065               If set to O\bOn\bn, a character denoting a file's type as reported  by
3066               _\bs_\bt_\ba_\bt(2)  is  appended to the filename when listing possible com-
3067               pletions.
3068
3069    R\bRe\bea\bad\bdl\bli\bin\bne\be C\bCo\bon\bnd\bdi\bit\bti\bio\bon\bna\bal\bl C\bCo\bon\bns\bst\btr\bru\buc\bct\bts\bs
3070        Readline implements a facility similar in  spirit  to  the  conditional
3071        compilation  features  of  the C preprocessor which allows key bindings
3072        and variable settings to be performed as the result  of  tests.   There
3073        are four parser directives used.
3074
3075        $\b$i\bif\bf    The  $\b$i\bif\bf construct allows bindings to be made based on the edit-
3076               ing mode, the terminal being  used,  or  the  application  using
3077               readline.   The text of the test extends to the end of the line;
3078               no characters are required to isolate it.
3079
3080               m\bmo\bod\bde\be   The m\bmo\bod\bde\be=\b= form of the  $\b$i\bif\bf  directive  is  used  to  test
3081                      whether  readline  is  in  emacs or vi mode.  This may be
3082                      used in conjunction with  the  s\bse\bet\bt  k\bke\bey\bym\bma\bap\bp  command,  for
3083                      instance,  to  set  bindings  in  the  _\be_\bm_\ba_\bc_\bs_\b-_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd and
3084                      _\be_\bm_\ba_\bc_\bs_\b-_\bc_\bt_\bl_\bx keymaps only if readline is  starting  out  in
3085                      emacs mode.
3086
3087               t\bte\ber\brm\bm   The  t\bte\ber\brm\bm=\b=  form may be used to include terminal-specific
3088                      key bindings, perhaps to bind the key sequences output by
3089                      the terminal's function keys.  The word on the right side
3090                      of the =\b= is tested against the both full name of the ter-
3091                      minal  and  the  portion  of the terminal name before the
3092                      first -\b-.  This allows _\bs_\bu_\bn to match both _\bs_\bu_\bn and  _\bs_\bu_\bn_\b-_\bc_\bm_\bd,
3093                      for instance.
3094
3095               a\bap\bpp\bpl\bli\bic\bca\bat\bti\bio\bon\bn
3096                      The a\bap\bpp\bpl\bli\bic\bca\bat\bti\bio\bon\bn construct is used to include application-
3097                      specific  settings.   Each  program  using  the  readline
3098                      library  sets the _\ba_\bp_\bp_\bl_\bi_\bc_\ba_\bt_\bi_\bo_\bn _\bn_\ba_\bm_\be, and an initialization
3099                      file can test for a particular value.  This could be used
3100                      to  bind key sequences to functions useful for a specific
3101                      program.  For instance, the following command adds a  key
3102                      sequence  that  quotes  the  current  or previous word in
3103                      b\bba\bas\bsh\bh:
3104
3105                      $\b$i\bif\bf Bash
3106                      # Quote the current or previous word
3107                      "\C-xq": "\eb\"\ef\""
3108                      $\b$e\ben\bnd\bdi\bif\bf
3109
3110        $\b$e\ben\bnd\bdi\bif\bf This command, as seen in the previous example, terminates an $\b$i\bif\bf
3111               command.
3112
3113        $\b$e\bel\bls\bse\be  Commands in this branch of the $\b$i\bif\bf directive are executed if the
3114               test fails.
3115
3116        $\b$i\bin\bnc\bcl\blu\bud\bde\be
3117               This directive takes a single filename as an argument and  reads
3118               commands  and bindings from that file.  For example, the follow-
3119               ing directive would read _\b/_\be_\bt_\bc_\b/_\bi_\bn_\bp_\bu_\bt_\br_\bc:
3120
3121               $\b$i\bin\bnc\bcl\blu\bud\bde\be  _\b/_\be_\bt_\bc_\b/_\bi_\bn_\bp_\bu_\bt_\br_\bc
3122
3123    S\bSe\bea\bar\brc\bch\bhi\bin\bng\bg
3124        Readline provides commands for searching through  the  command  history
3125        (see H\bHI\bIS\bST\bTO\bOR\bRY\bY below) for lines containing a specified string.  There are
3126        two search modes: _\bi_\bn_\bc_\br_\be_\bm_\be_\bn_\bt_\ba_\bl and _\bn_\bo_\bn_\b-_\bi_\bn_\bc_\br_\be_\bm_\be_\bn_\bt_\ba_\bl.
3127
3128        Incremental searches begin before the  user  has  finished  typing  the
3129        search  string.  As each character of the search string is typed, read-
3130        line displays the next entry from the history matching the string typed
3131        so  far.   An  incremental  search  requires only as many characters as
3132        needed to find the desired history entry.  The  characters  present  in
3133        the  value of the i\bis\bse\bea\bar\brc\bch\bh-\b-t\bte\ber\brm\bmi\bin\bna\bat\bto\bor\brs\bs variable are used to terminate an
3134        incremental search.  If that variable has not been assigned a value the
3135        Escape  and  Control-J characters will terminate an incremental search.
3136        Control-G will abort an incremental search  and  restore  the  original
3137        line.   When the search is terminated, the history entry containing the
3138        search string becomes the current line.
3139
3140        To find other matching entries in the history list, type  Control-S  or
3141        Control-R  as appropriate.  This will search backward or forward in the
3142        history for the next entry matching the search  string  typed  so  far.
3143        Any  other  key sequence bound to a readline command will terminate the
3144        search and execute that command.  For instance, a _\bn_\be_\bw_\bl_\bi_\bn_\be  will  termi-
3145        nate the search and accept the line, thereby executing the command from
3146        the history list.
3147
3148        Readline remembers the last incremental search string.  If two Control-
3149        Rs  are  typed without any intervening characters defining a new search
3150        string, any remembered search string is used.
3151
3152        Non-incremental searches read the entire search string before  starting
3153        to  search  for matching history lines.  The search string may be typed
3154        by the user or be part of the contents of the current line.
3155
3156    R\bRe\bea\bad\bdl\bli\bin\bne\be C\bCo\bom\bmm\bma\ban\bnd\bd N\bNa\bam\bme\bes\bs
3157        The following is a list of the names of the commands  and  the  default
3158        key sequences to which they are bound.  Command names without an accom-
3159        panying key sequence are unbound by default.  In the following descrip-
3160        tions,  _\bp_\bo_\bi_\bn_\bt refers to the current cursor position, and _\bm_\ba_\br_\bk refers to
3161        a cursor position saved by the s\bse\bet\bt-\b-m\bma\bar\brk\bk command.  The text between  the
3162        point and mark is referred to as the _\br_\be_\bg_\bi_\bo_\bn.
3163
3164    C\bCo\bom\bmm\bma\ban\bnd\bds\bs f\bfo\bor\br M\bMo\bov\bvi\bin\bng\bg
3165        b\bbe\beg\bgi\bin\bnn\bni\bin\bng\bg-\b-o\bof\bf-\b-l\bli\bin\bne\be (\b(C\bC-\b-a\ba)\b)
3166               Move to the start of the current line.
3167        e\ben\bnd\bd-\b-o\bof\bf-\b-l\bli\bin\bne\be (\b(C\bC-\b-e\be)\b)
3168               Move to the end of the line.
3169        f\bfo\bor\brw\bwa\bar\brd\bd-\b-c\bch\bha\bar\br (\b(C\bC-\b-f\bf)\b)
3170               Move forward a character.
3171        b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-c\bch\bha\bar\br (\b(C\bC-\b-b\bb)\b)
3172               Move back a character.
3173        f\bfo\bor\brw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-f\bf)\b)
3174               Move forward to the end of the next word.  Words are composed of
3175               alphanumeric characters (letters and digits).
3176        b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-b\bb)\b)
3177               Move back to the start of the current or previous  word.   Words
3178               are composed of alphanumeric characters (letters and digits).
3179        s\bsh\bhe\bel\bll\bl-\b-f\bfo\bor\brw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd
3180               Move  forward  to the end of the next word.  Words are delimited
3181               by non-quoted shell metacharacters.
3182        s\bsh\bhe\bel\bll\bl-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd
3183               Move back to the start of the current or previous  word.   Words
3184               are delimited by non-quoted shell metacharacters.
3185        c\bcl\ble\bea\bar\br-\b-s\bsc\bcr\bre\bee\ben\bn (\b(C\bC-\b-l\bl)\b)
3186               Clear  the  screen  leaving  the  current line at the top of the
3187               screen.  With an argument,  refresh  the  current  line  without
3188               clearing the screen.
3189        r\bre\bed\bdr\bra\baw\bw-\b-c\bcu\bur\brr\bre\ben\bnt\bt-\b-l\bli\bin\bne\be
3190               Refresh the current line.
3191
3192    C\bCo\bom\bmm\bma\ban\bnd\bds\bs f\bfo\bor\br M\bMa\ban\bni\bip\bpu\bul\bla\bat\bti\bin\bng\bg t\bth\bhe\be H\bHi\bis\bst\bto\bor\bry\by
3193        a\bac\bcc\bce\bep\bpt\bt-\b-l\bli\bin\bne\be (\b(N\bNe\bew\bwl\bli\bin\bne\be,\b, R\bRe\bet\btu\bur\brn\bn)\b)
3194               Accept the line regardless of where the cursor is.  If this line
3195               is non-empty, add it to the history list according to the  state
3196               of  the H\bHI\bIS\bST\bTC\bCO\bON\bNT\bTR\bRO\bOL\bL variable.  If the line is a modified history
3197               line, then restore the history line to its original state.
3198        p\bpr\bre\bev\bvi\bio\bou\bus\bs-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(C\bC-\b-p\bp)\b)
3199               Fetch the previous command from the history list, moving back in
3200               the list.
3201        n\bne\bex\bxt\bt-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(C\bC-\b-n\bn)\b)
3202               Fetch  the next command from the history list, moving forward in
3203               the list.
3204        b\bbe\beg\bgi\bin\bnn\bni\bin\bng\bg-\b-o\bof\bf-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(M\bM-\b-<\b<)\b)
3205               Move to the first line in the history.
3206        e\ben\bnd\bd-\b-o\bof\bf-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(M\bM-\b->\b>)\b)
3207               Move to the end of the input history, i.e., the  line  currently
3208               being entered.
3209        r\bre\bev\bve\ber\brs\bse\be-\b-s\bse\bea\bar\brc\bch\bh-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(C\bC-\b-r\br)\b)
3210               Search  backward  starting  at  the current line and moving `up'
3211               through the  history  as  necessary.   This  is  an  incremental
3212               search.
3213        f\bfo\bor\brw\bwa\bar\brd\bd-\b-s\bse\bea\bar\brc\bch\bh-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(C\bC-\b-s\bs)\b)
3214               Search  forward  starting  at the current line and moving `down'
3215               through the  history  as  necessary.   This  is  an  incremental
3216               search.
3217        n\bno\bon\bn-\b-i\bin\bnc\bcr\bre\bem\bme\ben\bnt\bta\bal\bl-\b-r\bre\bev\bve\ber\brs\bse\be-\b-s\bse\bea\bar\brc\bch\bh-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(M\bM-\b-p\bp)\b)
3218               Search backward through the history starting at the current line
3219               using a non-incremental search for  a  string  supplied  by  the
3220               user.
3221        n\bno\bon\bn-\b-i\bin\bnc\bcr\bre\bem\bme\ben\bnt\bta\bal\bl-\b-f\bfo\bor\brw\bwa\bar\brd\bd-\b-s\bse\bea\bar\brc\bch\bh-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(M\bM-\b-n\bn)\b)
3222               Search  forward  through  the  history  using  a non-incremental
3223               search for a string supplied by the user.
3224        h\bhi\bis\bst\bto\bor\bry\by-\b-s\bse\bea\bar\brc\bch\bh-\b-f\bfo\bor\brw\bwa\bar\brd\bd
3225               Search forward through the history for the string of  characters
3226               between  the start of the current line and the point.  This is a
3227               non-incremental search.
3228        h\bhi\bis\bst\bto\bor\bry\by-\b-s\bse\bea\bar\brc\bch\bh-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd
3229               Search backward through the history for the string of characters
3230               between  the start of the current line and the point.  This is a
3231               non-incremental search.
3232        y\bya\ban\bnk\bk-\b-n\bnt\bth\bh-\b-a\bar\brg\bg (\b(M\bM-\b-C\bC-\b-y\by)\b)
3233               Insert the first argument to the previous command  (usually  the
3234               second word on the previous line) at point.  With an argument _\bn,
3235               insert the _\bnth word from the previous command (the words in  the
3236               previous  command  begin  with  word  0).   A  negative argument
3237               inserts the _\bnth word from the end of the previous command.  Once
3238               the  argument _\bn is computed, the argument is extracted as if the
3239               "!_\bn" history expansion had been specified.
3240        y\bya\ban\bnk\bk-\b-l\bla\bas\bst\bt-\b-a\bar\brg\bg (\b(M\bM-\b-.\b.,\b, M\bM-\b-_\b_)\b)
3241               Insert the last argument to the previous command (the last  word
3242               of the previous history entry).  With a numeric argument, behave
3243               exactly like y\bya\ban\bnk\bk-\b-n\bnt\bth\bh-\b-a\bar\brg\bg.  Successive  calls  to  y\bya\ban\bnk\bk-\b-l\bla\bas\bst\bt-\b-a\bar\brg\bg
3244               move  back through the history list, inserting the last word (or
3245               the word specified by the argument to the first  call)  of  each
3246               line in turn.  Any numeric argument supplied to these successive
3247               calls determines the direction to move through the  history.   A
3248               negative  argument  switches  the  direction through the history
3249               (back or forward).  The history expansion facilities are used to
3250               extract the last word, as if the "!$" history expansion had been
3251               specified.
3252        s\bsh\bhe\bel\bll\bl-\b-e\bex\bxp\bpa\ban\bnd\bd-\b-l\bli\bin\bne\be (\b(M\bM-\b-C\bC-\b-e\be)\b)
3253               Expand the line as the shell does.  This performs alias and his-
3254               tory expansion as well as all of the shell word expansions.  See
3255               H\bHI\bIS\bST\bTO\bOR\bRY\bY E\bEX\bXP\bPA\bAN\bNS\bSI\bIO\bON\bN below for a description of history  expansion.
3256        h\bhi\bis\bst\bto\bor\bry\by-\b-e\bex\bxp\bpa\ban\bnd\bd-\b-l\bli\bin\bne\be (\b(M\bM-\b-^\b^)\b)
3257               Perform  history  expansion  on  the  current line.  See H\bHI\bIS\bST\bTO\bOR\bRY\bY
3258               E\bEX\bXP\bPA\bAN\bNS\bSI\bIO\bON\bN below for a description of history expansion.
3259        m\bma\bag\bgi\bic\bc-\b-s\bsp\bpa\bac\bce\be
3260               Perform history expansion on  the  current  line  and  insert  a
3261               space.  See H\bHI\bIS\bST\bTO\bOR\bRY\bY E\bEX\bXP\bPA\bAN\bNS\bSI\bIO\bON\bN below for a description of history
3262               expansion.
3263        a\bal\bli\bia\bas\bs-\b-e\bex\bxp\bpa\ban\bnd\bd-\b-l\bli\bin\bne\be
3264               Perform alias expansion on the current line.  See A\bAL\bLI\bIA\bAS\bSE\bES\bS  above
3265               for a description of alias expansion.
3266        h\bhi\bis\bst\bto\bor\bry\by-\b-a\ban\bnd\bd-\b-a\bal\bli\bia\bas\bs-\b-e\bex\bxp\bpa\ban\bnd\bd-\b-l\bli\bin\bne\be
3267               Perform history and alias expansion on the current line.
3268        i\bin\bns\bse\ber\brt\bt-\b-l\bla\bas\bst\bt-\b-a\bar\brg\bgu\bum\bme\ben\bnt\bt (\b(M\bM-\b-.\b.,\b, M\bM-\b-_\b_)\b)
3269               A synonym for y\bya\ban\bnk\bk-\b-l\bla\bas\bst\bt-\b-a\bar\brg\bg.
3270        o\bop\bpe\ber\bra\bat\bte\be-\b-a\ban\bnd\bd-\b-g\bge\bet\bt-\b-n\bne\bex\bxt\bt (\b(C\bC-\b-o\bo)\b)
3271               Accept  the  current  line for execution and fetch the next line
3272               relative to the current line from the history for editing.   Any
3273               argument is ignored.
3274        e\bed\bdi\bit\bt-\b-a\ban\bnd\bd-\b-e\bex\bxe\bec\bcu\but\bte\be-\b-c\bco\bom\bmm\bma\ban\bnd\bd (\b(C\bC-\b-x\bxC\bC-\b-e\be)\b)
3275               Invoke  an  editor  on the current command line, and execute the
3276               result as shell commands.   B\bBa\bas\bsh\bh  attempts  to  invoke  $\b$V\bVI\bIS\bSU\bUA\bAL\bL,
3277               $\b$E\bED\bDI\bIT\bTO\bOR\bR, and _\be_\bm_\ba_\bc_\bs as the editor, in that order.
3278
3279    C\bCo\bom\bmm\bma\ban\bnd\bds\bs f\bfo\bor\br C\bCh\bha\ban\bng\bgi\bin\bng\bg T\bTe\bex\bxt\bt
3280        _\be_\bn_\bd_\b-_\bo_\bf_\b-_\bf_\bi_\bl_\be (\b(u\bus\bsu\bua\bal\bll\bly\by C\bC-\b-d\bd)\b)
3281               The  character  indicating  end-of-file  as set, for example, by
3282               ``stty''.  If this character is read when there are  no  charac-
3283               ters  on  the  line,  and point is at the beginning of the line,
3284               Readline interprets it as the end of input and returns E\bEO\bOF\bF.
3285        d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br (\b(C\bC-\b-d\bd)\b)
3286               Delete the character at point.  If this function is bound to the
3287               same character as the tty E\bEO\bOF\bF character, as C\bC-\b-d\bd commonly is, see
3288               above for the effects.
3289        b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br (\b(R\bRu\bub\bbo\bou\but\bt)\b)
3290               Delete the character behind the cursor.  When  given  a  numeric
3291               argument, save the deleted text on the kill ring.
3292        f\bfo\bor\brw\bwa\bar\brd\bd-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br
3293               Delete  the  character under the cursor, unless the cursor is at
3294               the end of the line, in which case the character behind the cur-
3295               sor is deleted.
3296        q\bqu\buo\bot\bte\bed\bd-\b-i\bin\bns\bse\ber\brt\bt (\b(C\bC-\b-q\bq,\b, C\bC-\b-v\bv)\b)
3297               Add  the next character typed to the line verbatim.  This is how
3298               to insert characters like C\bC-\b-q\bq, for example.
3299        t\bta\bab\bb-\b-i\bin\bns\bse\ber\brt\bt (\b(C\bC-\b-v\bv T\bTA\bAB\bB)\b)
3300               Insert a tab character.
3301        s\bse\bel\blf\bf-\b-i\bin\bns\bse\ber\brt\bt (\b(a\ba,\b, b\bb,\b, A\bA,\b, 1\b1,\b, !\b!,\b, .\b..\b..\b.)\b)
3302               Insert the character typed.
3303        t\btr\bra\ban\bns\bsp\bpo\bos\bse\be-\b-c\bch\bha\bar\brs\bs (\b(C\bC-\b-t\bt)\b)
3304               Drag the character before point forward over  the  character  at
3305               point,  moving point forward as well.  If point is at the end of
3306               the line, then this transposes the two characters before  point.
3307               Negative arguments have no effect.
3308        t\btr\bra\ban\bns\bsp\bpo\bos\bse\be-\b-w\bwo\bor\brd\bds\bs (\b(M\bM-\b-t\bt)\b)
3309               Drag  the  word  before  point past the word after point, moving
3310               point over that word as well.  If point is at  the  end  of  the
3311               line, this transposes the last two words on the line.
3312        u\bup\bpc\bca\bas\bse\be-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-u\bu)\b)
3313               Uppercase  the  current  (or  following)  word.  With a negative
3314               argument, uppercase the previous word, but do not move point.
3315        d\bdo\bow\bwn\bnc\bca\bas\bse\be-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-l\bl)\b)
3316               Lowercase the current (or  following)  word.   With  a  negative
3317               argument, lowercase the previous word, but do not move point.
3318        c\bca\bap\bpi\bit\bta\bal\bli\biz\bze\be-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-c\bc)\b)
3319               Capitalize  the  current  (or  following) word.  With a negative
3320               argument, capitalize the previous word, but do not move point.
3321        o\bov\bve\ber\brw\bwr\bri\bit\bte\be-\b-m\bmo\bod\bde\be
3322               Toggle overwrite mode.  With an explicit positive numeric  argu-
3323               ment, switches to overwrite mode.  With an explicit non-positive
3324               numeric argument, switches to insert mode.  This command affects
3325               only  e\bem\bma\bac\bcs\bs mode; v\bvi\bi mode does overwrite differently.  Each call
3326               to _\br_\be_\ba_\bd_\bl_\bi_\bn_\be_\b(_\b) starts in insert mode.  In overwrite mode, charac-
3327               ters  bound to s\bse\bel\blf\bf-\b-i\bin\bns\bse\ber\brt\bt replace the text at point rather than
3328               pushing the text  to  the  right.   Characters  bound  to  b\bba\bac\bck\bk-\b-
3329               w\bwa\bar\brd\bd-\b-d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br  replace  the  character  before  point  with a
3330               space.  By default, this command is unbound.
3331
3332    K\bKi\bil\bll\bli\bin\bng\bg a\ban\bnd\bd Y\bYa\ban\bnk\bki\bin\bng\bg
3333        k\bki\bil\bll\bl-\b-l\bli\bin\bne\be (\b(C\bC-\b-k\bk)\b)
3334               Kill the text from point to the end of the line.
3335        b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-k\bki\bil\bll\bl-\b-l\bli\bin\bne\be (\b(C\bC-\b-x\bx R\bRu\bub\bbo\bou\but\bt)\b)
3336               Kill backward to the beginning of the line.
3337        u\bun\bni\bix\bx-\b-l\bli\bin\bne\be-\b-d\bdi\bis\bsc\bca\bar\brd\bd (\b(C\bC-\b-u\bu)\b)
3338               Kill backward from point to the  beginning  of  the  line.   The
3339               killed text is saved on the kill-ring.
3340        k\bki\bil\bll\bl-\b-w\bwh\bho\bol\ble\be-\b-l\bli\bin\bne\be
3341               Kill  all  characters on the current line, no matter where point
3342               is.
3343        k\bki\bil\bll\bl-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-d\bd)\b)
3344               Kill from point to the end of the current word,  or  if  between
3345               words,  to  the  end  of the next word.  Word boundaries are the
3346               same as those used by f\bfo\bor\brw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
3347        b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-k\bki\bil\bll\bl-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-R\bRu\bub\bbo\bou\but\bt)\b)
3348               Kill the word behind point.  Word boundaries  are  the  same  as
3349               those used by b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
3350        s\bsh\bhe\bel\bll\bl-\b-k\bki\bil\bll\bl-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-d\bd)\b)
3351               Kill  from  point  to the end of the current word, or if between
3352               words, to the end of the next word.   Word  boundaries  are  the
3353               same as those used by s\bsh\bhe\bel\bll\bl-\b-f\bfo\bor\brw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
3354        s\bsh\bhe\bel\bll\bl-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-k\bki\bil\bll\bl-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-R\bRu\bub\bbo\bou\but\bt)\b)
3355               Kill  the  word  behind  point.  Word boundaries are the same as
3356               those used by s\bsh\bhe\bel\bll\bl-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
3357        u\bun\bni\bix\bx-\b-w\bwo\bor\brd\bd-\b-r\bru\bub\bbo\bou\but\bt (\b(C\bC-\b-w\bw)\b)
3358               Kill the word behind point, using white space as a  word  bound-
3359               ary.  The killed text is saved on the kill-ring.
3360        u\bun\bni\bix\bx-\b-f\bfi\bil\ble\ben\bna\bam\bme\be-\b-r\bru\bub\bbo\bou\but\bt
3361               Kill  the  word  behind  point,  using white space and the slash
3362               character as the word boundaries.  The killed text is  saved  on
3363               the kill-ring.
3364        d\bde\bel\ble\bet\bte\be-\b-h\bho\bor\bri\biz\bzo\bon\bnt\bta\bal\bl-\b-s\bsp\bpa\bac\bce\be (\b(M\bM-\b-\\b\)\b)
3365               Delete all spaces and tabs around point.
3366        k\bki\bil\bll\bl-\b-r\bre\beg\bgi\bio\bon\bn
3367               Kill the text in the current region.
3368        c\bco\bop\bpy\by-\b-r\bre\beg\bgi\bio\bon\bn-\b-a\bas\bs-\b-k\bki\bil\bll\bl
3369               Copy the text in the region to the kill buffer.
3370        c\bco\bop\bpy\by-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd
3371               Copy  the word before point to the kill buffer.  The word bound-
3372               aries are the same as b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
3373        c\bco\bop\bpy\by-\b-f\bfo\bor\brw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd
3374               Copy the word following point to  the  kill  buffer.   The  word
3375               boundaries are the same as f\bfo\bor\brw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
3376        y\bya\ban\bnk\bk (\b(C\bC-\b-y\by)\b)
3377               Yank the top of the kill ring into the buffer at point.
3378        y\bya\ban\bnk\bk-\b-p\bpo\bop\bp (\b(M\bM-\b-y\by)\b)
3379               Rotate  the kill ring, and yank the new top.  Only works follow-
3380               ing y\bya\ban\bnk\bk or y\bya\ban\bnk\bk-\b-p\bpo\bop\bp.
3381
3382    N\bNu\bum\bme\ber\bri\bic\bc A\bAr\brg\bgu\bum\bme\ben\bnt\bts\bs
3383        d\bdi\big\bgi\bit\bt-\b-a\bar\brg\bgu\bum\bme\ben\bnt\bt (\b(M\bM-\b-0\b0,\b, M\bM-\b-1\b1,\b, .\b..\b..\b.,\b, M\bM-\b--\b-)\b)
3384               Add this digit to the argument already accumulating, or start  a
3385               new argument.  M-- starts a negative argument.
3386        u\bun\bni\biv\bve\ber\brs\bsa\bal\bl-\b-a\bar\brg\bgu\bum\bme\ben\bnt\bt
3387               This  is another way to specify an argument.  If this command is
3388               followed by one or more digits, optionally with a leading  minus
3389               sign,  those digits define the argument.  If the command is fol-
3390               lowed by digits, executing  u\bun\bni\biv\bve\ber\brs\bsa\bal\bl-\b-a\bar\brg\bgu\bum\bme\ben\bnt\bt  again  ends  the
3391               numeric  argument, but is otherwise ignored.  As a special case,
3392               if this command is immediately followed by a character  that  is
3393               neither  a  digit or minus sign, the argument count for the next
3394               command is multiplied by four.  The argument count is  initially
3395               one,  so  executing this function the first time makes the argu-
3396               ment count four, a second time makes the argument count sixteen,
3397               and so on.
3398
3399    C\bCo\bom\bmp\bpl\ble\bet\bti\bin\bng\bg
3400        c\bco\bom\bmp\bpl\ble\bet\bte\be (\b(T\bTA\bAB\bB)\b)
3401               Attempt  to  perform  completion on the text before point.  B\bBa\bas\bsh\bh
3402               attempts completion treating the text as a variable (if the text
3403               begins  with  $\b$), username (if the text begins with ~\b~), hostname
3404               (if the text begins with @\b@), or command (including  aliases  and
3405               functions) in turn.  If none of these produces a match, filename
3406               completion is attempted.
3407        p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs (\b(M\bM-\b-?\b?)\b)
3408               List the possible completions of the text before point.
3409        i\bin\bns\bse\ber\brt\bt-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs (\b(M\bM-\b-*\b*)\b)
3410               Insert all completions of the text before point that would  have
3411               been generated by p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs.
3412        m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be
3413               Similar  to c\bco\bom\bmp\bpl\ble\bet\bte\be, but replaces the word to be completed with
3414               a single match from the list of possible completions.   Repeated
3415               execution  of  m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be  steps through the list of possible
3416               completions, inserting each match in turn.  At the  end  of  the
3417               list of completions, the bell is rung (subject to the setting of
3418               b\bbe\bel\bll\bl-\b-s\bst\bty\byl\ble\be) and the original text is restored.  An argument of _\bn
3419               moves  _\bn  positions  forward  in the list of matches; a negative
3420               argument may be used to move backward through  the  list.   This
3421               command  is  intended  to  be  bound  to  T\bTA\bAB\bB, but is unbound by
3422               default.
3423        m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd
3424               Identical to m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be, but moves backward through the  list
3425               of  possible  completions,  as if m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be had been given a
3426               negative argument.  This command is unbound by default.
3427        d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br-\b-o\bor\br-\b-l\bli\bis\bst\bt
3428               Deletes the character under the cursor if not at  the  beginning
3429               or  end  of  the  line (like d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br).  If at the end of the
3430               line, behaves identically to p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs.  This command
3431               is unbound by default.
3432        c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-f\bfi\bil\ble\ben\bna\bam\bme\be (\b(M\bM-\b-/\b/)\b)
3433               Attempt filename completion on the text before point.
3434        p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-f\bfi\bil\ble\ben\bna\bam\bme\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs (\b(C\bC-\b-x\bx /\b/)\b)
3435               List the possible completions of the text before point, treating
3436               it as a filename.
3437        c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-u\bus\bse\ber\brn\bna\bam\bme\be (\b(M\bM-\b-~\b~)\b)
3438               Attempt completion on the text before point, treating  it  as  a
3439               username.
3440        p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-u\bus\bse\ber\brn\bna\bam\bme\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs (\b(C\bC-\b-x\bx ~\b~)\b)
3441               List the possible completions of the text before point, treating
3442               it as a username.
3443        c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-v\bva\bar\bri\bia\bab\bbl\ble\be (\b(M\bM-\b-$\b$)\b)
3444               Attempt completion on the text before point, treating  it  as  a
3445               shell variable.
3446        p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-v\bva\bar\bri\bia\bab\bbl\ble\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs (\b(C\bC-\b-x\bx $\b$)\b)
3447               List the possible completions of the text before point, treating
3448               it as a shell variable.
3449        c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-h\bho\bos\bst\btn\bna\bam\bme\be (\b(M\bM-\b-@\b@)\b)
3450               Attempt completion on the text before point, treating  it  as  a
3451               hostname.
3452        p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-h\bho\bos\bst\btn\bna\bam\bme\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs (\b(C\bC-\b-x\bx @\b@)\b)
3453               List the possible completions of the text before point, treating
3454               it as a hostname.
3455        c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-c\bco\bom\bmm\bma\ban\bnd\bd (\b(M\bM-\b-!\b!)\b)
3456               Attempt completion on the text before point, treating  it  as  a
3457               command  name.   Command  completion  attempts to match the text
3458               against  aliases,  reserved  words,   shell   functions,   shell
3459               builtins, and finally executable filenames, in that order.
3460        p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-c\bco\bom\bmm\bma\ban\bnd\bd-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs (\b(C\bC-\b-x\bx !\b!)\b)
3461               List the possible completions of the text before point, treating
3462               it as a command name.
3463        d\bdy\byn\bna\bam\bmi\bic\bc-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(M\bM-\b-T\bTA\bAB\bB)\b)
3464               Attempt completion on the text before point, comparing the  text
3465               against  lines  from  the  history  list for possible completion
3466               matches.
3467        d\bda\bab\bbb\bbr\bre\bev\bv-\b-e\bex\bxp\bpa\ban\bnd\bd
3468               Attempt menu completion on the text before point, comparing  the
3469               text against lines from the history list for possible completion
3470               matches.
3471        c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-i\bin\bnt\bto\bo-\b-b\bbr\bra\bac\bce\bes\bs (\b(M\bM-\b-{\b{)\b)
3472               Perform filename completion and insert the list of possible com-
3473               pletions  enclosed within braces so the list is available to the
3474               shell (see B\bBr\bra\bac\bce\be E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn above).
3475
3476    K\bKe\bey\byb\bbo\boa\bar\brd\bd M\bMa\bac\bcr\bro\bos\bs
3477        s\bst\bta\bar\brt\bt-\b-k\bkb\bbd\bd-\b-m\bma\bac\bcr\bro\bo (\b(C\bC-\b-x\bx (\b()\b)
3478               Begin saving the characters  typed  into  the  current  keyboard
3479               macro.
3480        e\ben\bnd\bd-\b-k\bkb\bbd\bd-\b-m\bma\bac\bcr\bro\bo (\b(C\bC-\b-x\bx )\b))\b)
3481               Stop saving the characters typed into the current keyboard macro
3482               and store the definition.
3483        c\bca\bal\bll\bl-\b-l\bla\bas\bst\bt-\b-k\bkb\bbd\bd-\b-m\bma\bac\bcr\bro\bo (\b(C\bC-\b-x\bx e\be)\b)
3484               Re-execute the last keyboard macro defined, by making the  char-
3485               acters in the macro appear as if typed at the keyboard.
3486        p\bpr\bri\bin\bnt\bt-\b-l\bla\bas\bst\bt-\b-k\bkb\bbd\bd-\b-m\bma\bac\bcr\bro\bo (\b()\b)
3487               Print  the  last keyboard macro defined in a format suitable for
3488               the _\bi_\bn_\bp_\bu_\bt_\br_\bc file.
3489
3490    M\bMi\bis\bsc\bce\bel\bll\bla\ban\bne\beo\bou\bus\bs
3491        r\bre\be-\b-r\bre\bea\bad\bd-\b-i\bin\bni\bit\bt-\b-f\bfi\bil\ble\be (\b(C\bC-\b-x\bx C\bC-\b-r\br)\b)
3492               Read in the contents of the _\bi_\bn_\bp_\bu_\bt_\br_\bc file,  and  incorporate  any
3493               bindings or variable assignments found there.
3494        a\bab\bbo\bor\brt\bt (\b(C\bC-\b-g\bg)\b)
3495               Abort  the  current editing command and ring the terminal's bell
3496               (subject to the setting of b\bbe\bel\bll\bl-\b-s\bst\bty\byl\ble\be).
3497        d\bdo\bo-\b-u\bup\bpp\bpe\ber\brc\bca\bas\bse\be-\b-v\bve\ber\brs\bsi\bio\bon\bn (\b(M\bM-\b-a\ba,\b, M\bM-\b-b\bb,\b, M\bM-\b-_\bx,\b, .\b..\b..\b.)\b)
3498               If the metafied character _\bx is lowercase, run the  command  that
3499               is bound to the corresponding uppercase character.
3500        p\bpr\bre\bef\bfi\bix\bx-\b-m\bme\bet\bta\ba (\b(E\bES\bSC\bC)\b)
3501               Metafy the next character typed.  E\bES\bSC\bC f\bf is equivalent to M\bMe\bet\bta\ba-\b-f\bf.
3502        u\bun\bnd\bdo\bo (\b(C\bC-\b-_\b_,\b, C\bC-\b-x\bx C\bC-\b-u\bu)\b)
3503               Incremental undo, separately remembered for each line.
3504        r\bre\bev\bve\ber\brt\bt-\b-l\bli\bin\bne\be (\b(M\bM-\b-r\br)\b)
3505               Undo all changes made to this line.  This is like executing  the
3506               u\bun\bnd\bdo\bo  command  enough  times  to  return the line to its initial
3507               state.
3508        t\bti\bil\bld\bde\be-\b-e\bex\bxp\bpa\ban\bnd\bd (\b(M\bM-\b-&\b&)\b)
3509               Perform tilde expansion on the current word.
3510        s\bse\bet\bt-\b-m\bma\bar\brk\bk (\b(C\bC-\b-@\b@,\b, M\bM-\b-<\b<s\bsp\bpa\bac\bce\be>\b>)\b)
3511               Set the mark to the point.  If a numeric argument  is  supplied,
3512               the mark is set to that position.
3513        e\bex\bxc\bch\bha\ban\bng\bge\be-\b-p\bpo\boi\bin\bnt\bt-\b-a\ban\bnd\bd-\b-m\bma\bar\brk\bk (\b(C\bC-\b-x\bx C\bC-\b-x\bx)\b)
3514               Swap  the  point  with the mark.  The current cursor position is
3515               set to the saved position, and the old cursor position is  saved
3516               as the mark.
3517        c\bch\bha\bar\bra\bac\bct\bte\ber\br-\b-s\bse\bea\bar\brc\bch\bh (\b(C\bC-\b-]\b])\b)
3518               A character is read and point is moved to the next occurrence of
3519               that character.  A negative count searches for  previous  occur-
3520               rences.
3521        c\bch\bha\bar\bra\bac\bct\bte\ber\br-\b-s\bse\bea\bar\brc\bch\bh-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd (\b(M\bM-\b-C\bC-\b-]\b])\b)
3522               A  character  is  read and point is moved to the previous occur-
3523               rence of that character.  A negative count searches  for  subse-
3524               quent occurrences.
3525        s\bsk\bki\bip\bp-\b-c\bcs\bsi\bi-\b-s\bse\beq\bqu\bue\ben\bnc\bce\be
3526               Read  enough  characters to consume a multi-key sequence such as
3527               those defined for keys like Home and End.  Such sequences  begin
3528               with a Control Sequence Indicator (CSI), usually ESC-[.  If this
3529               sequence is bound to "\[", keys producing  such  sequences  will
3530               have  no  effect  unless explicitly bound to a readline command,
3531               instead of inserting stray characters into the  editing  buffer.
3532               This is unbound by default, but usually bound to ESC-[.
3533        i\bin\bns\bse\ber\brt\bt-\b-c\bco\bom\bmm\bme\ben\bnt\bt (\b(M\bM-\b-#\b#)\b)
3534               Without  a  numeric  argument,  the  value  of the readline c\bco\bom\bm-\b-
3535               m\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bn variable is inserted at the beginning of the  current
3536               line.  If a numeric argument is supplied, this command acts as a
3537               toggle:  if the characters at the beginning of the line  do  not
3538               match  the value of c\bco\bom\bmm\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bn, the value is inserted, other-
3539               wise the characters in c\bco\bom\bmm\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bn are deleted from the begin-
3540               ning  of the line.  In either case, the line is accepted as if a
3541               newline had been typed.   The  default  value  of  c\bco\bom\bmm\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bn
3542               causes  this  command  to make the current line a shell comment.
3543               If a  numeric  argument  causes  the  comment  character  to  be
3544               removed, the line will be executed by the shell.
3545        g\bgl\blo\bob\bb-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-g\bg)\b)
3546               The  word  before  point  is  treated  as a pattern for pathname
3547               expansion, with an asterisk implicitly appended.   This  pattern
3548               is  used  to  generate a list of matching filenames for possible
3549               completions.
3550        g\bgl\blo\bob\bb-\b-e\bex\bxp\bpa\ban\bnd\bd-\b-w\bwo\bor\brd\bd (\b(C\bC-\b-x\bx *\b*)\b)
3551               The word before point is  treated  as  a  pattern  for  pathname
3552               expansion,  and  the  list  of  matching  filenames is inserted,
3553               replacing the word.  If  a  numeric  argument  is  supplied,  an
3554               asterisk is appended before pathname expansion.
3555        g\bgl\blo\bob\bb-\b-l\bli\bis\bst\bt-\b-e\bex\bxp\bpa\ban\bns\bsi\bio\bon\bns\bs (\b(C\bC-\b-x\bx g\bg)\b)
3556               The  list  of  expansions  that  would  have  been  generated by
3557               g\bgl\blo\bob\bb-\b-e\bex\bxp\bpa\ban\bnd\bd-\b-w\bwo\bor\brd\bd is displayed, and the line is  redrawn.   If  a
3558               numeric  argument  is  supplied,  an asterisk is appended before
3559               pathname expansion.
3560        d\bdu\bum\bmp\bp-\b-f\bfu\bun\bnc\bct\bti\bio\bon\bns\bs
3561               Print all of the functions and their key bindings to  the  read-
3562               line output stream.  If a numeric argument is supplied, the out-
3563               put is formatted in such a way that it can be made  part  of  an
3564               _\bi_\bn_\bp_\bu_\bt_\br_\bc file.
3565        d\bdu\bum\bmp\bp-\b-v\bva\bar\bri\bia\bab\bbl\ble\bes\bs
3566               Print all of the settable readline variables and their values to
3567               the readline output stream.  If a numeric argument is  supplied,
3568               the  output  is formatted in such a way that it can be made part
3569               of an _\bi_\bn_\bp_\bu_\bt_\br_\bc file.
3570        d\bdu\bum\bmp\bp-\b-m\bma\bac\bcr\bro\bos\bs
3571               Print all of the readline key sequences bound to macros and  the
3572               strings  they  output.   If  a numeric argument is supplied, the
3573               output is formatted in such a way that it can be made part of an
3574               _\bi_\bn_\bp_\bu_\bt_\br_\bc file.
3575        d\bdi\bis\bsp\bpl\bla\bay\by-\b-s\bsh\bhe\bel\bll\bl-\b-v\bve\ber\brs\bsi\bio\bon\bn (\b(C\bC-\b-x\bx C\bC-\b-v\bv)\b)
3576               Display  version information about the current instance of b\bba\bas\bsh\bh.
3577
3578    P\bPr\bro\bog\bgr\bra\bam\bmm\bma\bab\bbl\ble\be C\bCo\bom\bmp\bpl\ble\bet\bti\bio\bon\bn
3579        When word completion is attempted for an  argument  to  a  command  for
3580        which  a  completion  specification (a _\bc_\bo_\bm_\bp_\bs_\bp_\be_\bc) has been defined using
3581        the c\bco\bom\bmp\bpl\ble\bet\bte\be builtin (see  S\bSH\bHE\bEL\bLL\bL  B\bBU\bUI\bIL\bLT\bTI\bIN\bN  C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS  below),  the  pro-
3582        grammable completion facilities are invoked.
3583
3584        First,  the  command  name  is  identified.  If the command word is the
3585        empty string (completion attempted at the beginning of an empty  line),
3586        any  compspec  defined  with  the  -\b-E\bE option to c\bco\bom\bmp\bpl\ble\bet\bte\be is used.  If a
3587        compspec has been defined for that command, the  compspec  is  used  to
3588        generate the list of possible completions for the word.  If the command
3589        word is a full pathname, a compspec for the full pathname  is  searched
3590        for  first.   If no compspec is found for the full pathname, an attempt
3591        is made to find a compspec for the portion following the  final  slash.
3592        If  those  searches  do  not result in a compspec, any compspec defined
3593        with the -\b-D\bD option to c\bco\bom\bmp\bpl\ble\bet\bte\be is used as the default.
3594
3595        Once a compspec has been found, it is used  to  generate  the  list  of
3596        matching  words.   If a compspec is not found, the default b\bba\bas\bsh\bh comple-
3597        tion as described above under C\bCo\bom\bmp\bpl\ble\bet\bti\bin\bng\bg is performed.
3598
3599        First, the actions specified by the compspec are  used.   Only  matches
3600        which  are prefixed by the word being completed are returned.  When the
3601        -\b-f\bf or -\b-d\bd option is used for filename or directory name completion,  the
3602        shell variable F\bFI\bIG\bGN\bNO\bOR\bRE\bE is used to filter the matches.
3603
3604        Any  completions  specified  by  a pathname expansion pattern to the -\b-G\bG
3605        option are generated next.  The words generated by the pattern need not
3606        match  the  word being completed.  The G\bGL\bLO\bOB\bBI\bIG\bGN\bNO\bOR\bRE\bE shell variable is not
3607        used to filter the matches, but the F\bFI\bIG\bGN\bNO\bOR\bRE\bE variable is used.
3608
3609        Next, the string specified as the argument to the -\b-W\bW option is  consid-
3610        ered.   The  string is first split using the characters in the I\bIF\bFS\bS spe-
3611        cial variable as delimiters.  Shell quoting is honored.  Each  word  is
3612        then  expanded  using  brace  expansion, tilde expansion, parameter and
3613        variable expansion, command substitution, and arithmetic expansion,  as
3614        described above under E\bEX\bXP\bPA\bAN\bNS\bSI\bIO\bON\bN.  The results are split using the rules
3615        described above under W\bWo\bor\brd\bd S\bSp\bpl\bli\bit\btt\bti\bin\bng\bg.  The results of the expansion are
3616        prefix-matched against the word being completed, and the matching words
3617        become the possible completions.
3618
3619        After these matches have been generated, any shell function or  command
3620        specified  with  the -\b-F\bF and -\b-C\bC options is invoked.  When the command or
3621        function is invoked, the C\bCO\bOM\bMP\bP_\b_L\bLI\bIN\bNE\bE, C\bCO\bOM\bMP\bP_\b_P\bPO\bOI\bIN\bNT\bT, C\bCO\bOM\bMP\bP_\b_K\bKE\bEY\bY, and C\bCO\bOM\bMP\bP_\b_T\bTY\bYP\bPE\bE
3622        variables are assigned values as described above under S\bSh\bhe\bel\bll\bl V\bVa\bar\bri\bia\bab\bbl\ble\bes\bs.
3623        If a shell function is being invoked,  the  C\bCO\bOM\bMP\bP_\b_W\bWO\bOR\bRD\bDS\bS  and  C\bCO\bOM\bMP\bP_\b_C\bCW\bWO\bOR\bRD\bD
3624        variables  are  also set.  When the function or command is invoked, the
3625        first argument ($\b$1\b1) is the name of  the  command  whose  arguments  are
3626        being  completed, the second argument ($\b$2\b2) is the word being completed,
3627        and the third argument ($\b$3\b3) is the word preceding the word  being  com-
3628        pleted on the current command line.  No filtering of the generated com-
3629        pletions against the word being completed is performed; the function or
3630        command has complete freedom in generating the matches.
3631
3632        Any  function specified with -\b-F\bF is invoked first.  The function may use
3633        any of the shell facilities, including the  c\bco\bom\bmp\bpg\bge\ben\bn  builtin  described
3634        below,  to  generate the matches.  It must put the possible completions
3635        in the C\bCO\bOM\bMP\bPR\bRE\bEP\bPL\bLY\bY array variable, one per array element.
3636
3637        Next, any command specified with the -\b-C\bC option is invoked in  an  envi-
3638        ronment  equivalent to command substitution.  It should print a list of
3639        completions, one per line, to the standard output.   Backslash  may  be
3640        used to escape a newline, if necessary.
3641
3642        After  all of the possible completions are generated, any filter speci-
3643        fied with the -\b-X\bX option is applied to the list.  The filter is  a  pat-
3644        tern  as  used  for  pathname expansion; a &\b& in the pattern is replaced
3645        with the text of the word being completed.  A literal &\b& may be  escaped
3646        with  a  backslash; the backslash is removed before attempting a match.
3647        Any completion that matches the pattern will be removed from the  list.
3648        A leading !\b! negates the pattern; in this case any completion not match-
3649        ing the pattern will be removed.
3650
3651        Finally, any prefix and suffix specified with the -\b-P\bP and -\b-S\bS options are
3652        added to each member of the completion list, and the result is returned
3653        to the readline completion code as the list of possible completions.
3654
3655        If the previously-applied actions do not generate any matches, and  the
3656        -\b-o\bo  d\bdi\bir\brn\bna\bam\bme\bes\bs  option  was  supplied  to  c\bco\bom\bmp\bpl\ble\bet\bte\be when the compspec was
3657        defined, directory name completion is attempted.
3658
3659        If the -\b-o\bo p\bpl\blu\bus\bsd\bdi\bir\brs\bs option was supplied to c\bco\bom\bmp\bpl\ble\bet\bte\be  when  the  compspec
3660        was defined, directory name completion is attempted and any matches are
3661        added to the results of the other actions.
3662
3663        By default, if a compspec is found, whatever it generates  is  returned
3664        to  the  completion  code as the full set of possible completions.  The
3665        default b\bba\bas\bsh\bh completions are not attempted, and the readline default of
3666        filename completion is disabled.  If the -\b-o\bo b\bba\bas\bsh\bhd\bde\bef\bfa\bau\bul\blt\bt option was sup-
3667        plied to c\bco\bom\bmp\bpl\ble\bet\bte\be when the compspec was defined, the b\bba\bas\bsh\bh default  com-
3668        pletions are attempted if the compspec generates no matches.  If the -\b-o\bo
3669        d\bde\bef\bfa\bau\bul\blt\bt option was supplied to c\bco\bom\bmp\bpl\ble\bet\bte\be when the compspec was  defined,
3670        readline's  default  completion will be performed if the compspec (and,
3671        if attempted, the default b\bba\bas\bsh\bh completions) generate no matches.
3672
3673        When a compspec indicates that directory name  completion  is  desired,
3674        the  programmable completion functions force readline to append a slash
3675        to completed names which are symbolic links to directories, subject  to
3676        the  value of the m\bma\bar\brk\bk-\b-d\bdi\bir\bre\bec\bct\bto\bor\bri\bie\bes\bs readline variable, regardless of the
3677        setting of the m\bma\bar\brk\bk-\b-s\bsy\bym\bml\bli\bin\bnk\bke\bed\bd-\b-d\bdi\bir\bre\bec\bct\bto\bor\bri\bie\bes\bs readline variable.
3678
3679        There is some support for dynamically modifying completions.   This  is
3680        most  useful  when used in combination with a default completion speci-
3681        fied with c\bco\bom\bmp\bpl\ble\bet\bte\be -\b-D\bD.  It's possible for shell functions  executed  as
3682        completion  handlers  to  indicate that completion should be retried by
3683        returning an exit status of 124.  If a shell function returns 124,  and
3684        changes the compspec associated with the command on which completion is
3685        being attempted (supplied as the first argument when  the  function  is
3686        executed), programmable completion restarts from the beginning, with an
3687        attempt to find a new compspec for that command.  This allows a set  of
3688        completions  to be built dynamically as completion is attempted, rather
3689        than being loaded all at once.
3690
3691        For instance, assuming that there is a library of compspecs, each  kept
3692        in  a  file  corresponding  to  the  name of the command, the following
3693        default completion function would load completions dynamically:
3694
3695        _completion_loader()
3696        {
3697             . "/etc/bash_completion.d/$1.sh" >/dev/null 2>&1 && return 124
3698        }
3699        complete -D -F _completion_loader -o bashdefault -o default
3700
3701
3702 H\bHI\bIS\bST\bTO\bOR\bRY\bY
3703        When the -\b-o\bo h\bhi\bis\bst\bto\bor\bry\by option to the s\bse\bet\bt builtin  is  enabled,  the  shell
3704        provides access to the _\bc_\bo_\bm_\bm_\ba_\bn_\bd _\bh_\bi_\bs_\bt_\bo_\br_\by, the list of commands previously
3705        typed.  The value of the H\bHI\bIS\bST\bTS\bSI\bIZ\bZE\bE variable is used  as  the  number  of
3706        commands to save in a history list.  The text of the last H\bHI\bIS\bST\bTS\bSI\bIZ\bZE\bE com-
3707        mands (default 500) is saved.  The shell stores  each  command  in  the
3708        history  list  prior to parameter and variable expansion (see E\bEX\bXP\bPA\bAN\bNS\bSI\bIO\bON\bN
3709        above) but after history expansion is performed, subject to the  values
3710        of the shell variables H\bHI\bIS\bST\bTI\bIG\bGN\bNO\bOR\bRE\bE and H\bHI\bIS\bST\bTC\bCO\bON\bNT\bTR\bRO\bOL\bL.
3711
3712        On startup, the history is initialized from the file named by the vari-
3713        able H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE (default _\b~_\b/_\b._\bb_\ba_\bs_\bh_\b__\bh_\bi_\bs_\bt_\bo_\br_\by).  The file named by  the  value
3714        of  H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE  is  truncated,  if necessary, to contain no more than the
3715        number of lines specified by the value of H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bES\bSI\bIZ\bZE\bE.   If  H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE-\b-
3716        S\bSI\bIZ\bZE\bE  is unset, or set to null, a non-numeric value, or a numeric value
3717        less than zero, the history file is not truncated.   When  the  history
3718        file  is  read, lines beginning with the history comment character fol-
3719        lowed immediately by a digit are interpreted as timestamps for the pre-
3720        ceding history line.  These timestamps are optionally displayed depend-
3721        ing on the value of the H\bHI\bIS\bST\bTT\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT variable.   When  a  shell  with
3722        history  enabled  exits,  the  last $\b$H\bHI\bIS\bST\bTS\bSI\bIZ\bZE\bE lines are copied from the
3723        history list to $\b$H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE.  If the h\bhi\bis\bst\bta\bap\bpp\bpe\ben\bnd\bd shell option  is  enabled
3724        (see  the description of s\bsh\bho\bop\bpt\bt under S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below), the
3725        lines are appended to the history file, otherwise the history  file  is
3726        overwritten.   If  H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE  is  unset,  or  if  the  history  file  is
3727        unwritable, the history is not saved.  If the  H\bHI\bIS\bST\bTT\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT  variable
3728        is  set,  time  stamps are written to the history file, marked with the
3729        history comment character, so they may be preserved across  shell  ses-
3730        sions.   This  uses  the history comment character to distinguish time-
3731        stamps from other history lines.  After saving the history, the history
3732        file is truncated to contain no more than H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bES\bSI\bIZ\bZE\bE lines.  If H\bHI\bIS\bST\bT-\b-
3733        F\bFI\bIL\bLE\bES\bSI\bIZ\bZE\bE is unset, or set to null, a non-numeric value,  or  a  numeric
3734        value less than zero, the history file is not truncated.
3735
3736        The  builtin  command f\bfc\bc (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below) may be used
3737        to list or edit and re-execute a portion of the history list.  The h\bhi\bis\bs-\b-
3738        t\bto\bor\bry\by  builtin  may  be  used  to display or modify the history list and
3739        manipulate the history file.  When using command-line  editing,  search
3740        commands  are available in each editing mode that provide access to the
3741        history list.
3742
3743        The shell allows control over which commands are saved on  the  history
3744        list.  The H\bHI\bIS\bST\bTC\bCO\bON\bNT\bTR\bRO\bOL\bL and H\bHI\bIS\bST\bTI\bIG\bGN\bNO\bOR\bRE\bE variables may be set to cause the
3745        shell to save only a subset of the commands entered.  The c\bcm\bmd\bdh\bhi\bis\bst\bt shell
3746        option,  if enabled, causes the shell to attempt to save each line of a
3747        multi-line command in the same history entry, adding  semicolons  where
3748        necessary  to preserve syntactic correctness.  The l\bli\bit\bth\bhi\bis\bst\bt shell option
3749        causes the shell to save the command with embedded newlines instead  of
3750        semicolons.  See the description of the s\bsh\bho\bop\bpt\bt builtin below under S\bSH\bHE\bEL\bLL\bL
3751        B\bBU\bUI\bIL\bLT\bTI\bIN\bN  C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS  for  information  on  setting  and  unsetting  shell
3752        options.
3753
3754 H\bHI\bIS\bST\bTO\bOR\bRY\bY E\bEX\bXP\bPA\bAN\bNS\bSI\bIO\bON\bN
3755        The  shell  supports a history expansion feature that is similar to the
3756        history expansion in c\bcs\bsh\bh.\b.  This section describes what syntax  features
3757        are  available.   This  feature  is  enabled by default for interactive
3758        shells, and can be disabled using the +\b+H\bH option to the s\bse\bet\bt builtin com-
3759        mand (see S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS below).  Non-interactive shells do not
3760        perform history expansion by default.
3761
3762        History expansions introduce words from the history list into the input
3763        stream,  making  it  easy to repeat commands, insert the arguments to a
3764        previous command into the current input line, or fix errors in previous
3765        commands quickly.
3766
3767        History  expansion  is  performed  immediately after a complete line is
3768        read, before the shell breaks it into words.  It  takes  place  in  two
3769        parts.   The  first is to determine which line from the history list to
3770        use during substitution.  The second is to select portions of that line
3771        for inclusion into the current one.  The line selected from the history
3772        is the _\be_\bv_\be_\bn_\bt, and the portions of that line that  are  acted  upon  are
3773        _\bw_\bo_\br_\bd_\bs.   Various  _\bm_\bo_\bd_\bi_\bf_\bi_\be_\br_\bs  are  available  to manipulate the selected
3774        words.  The line is broken into words in the same fashion as when read-
3775        ing  input, so that several _\bm_\be_\bt_\ba_\bc_\bh_\ba_\br_\ba_\bc_\bt_\be_\br-separated words surrounded by
3776        quotes are considered one word.  History expansions are  introduced  by
3777        the  appearance  of  the  history  expansion  character,  which is !\b! by
3778        default.  Only backslash (\\b\) and single quotes can  quote  the  history
3779        expansion character.
3780
3781        Several  characters inhibit history expansion if found immediately fol-
3782        lowing the history expansion character, even if it is unquoted:  space,
3783        tab,  newline,  carriage return, and =\b=.  If the e\bex\bxt\btg\bgl\blo\bob\bb shell option is
3784        enabled, (\b( will also inhibit expansion.
3785
3786        Several shell options settable with the s\bsh\bho\bop\bpt\bt builtin may  be  used  to
3787        tailor  the  behavior  of  history  expansion.  If the h\bhi\bis\bst\btv\bve\ber\bri\bif\bfy\by shell
3788        option is enabled (see the description of the s\bsh\bho\bop\bpt\bt builtin below), and
3789        r\bre\bea\bad\bdl\bli\bin\bne\be  is  being  used,  history  substitutions  are not immediately
3790        passed to the shell parser.  Instead, the  expanded  line  is  reloaded
3791        into the r\bre\bea\bad\bdl\bli\bin\bne\be editing buffer for further modification.  If r\bre\bea\bad\bdl\bli\bin\bne\be
3792        is being used, and the h\bhi\bis\bst\btr\bre\bee\bed\bdi\bit\bt shell option  is  enabled,  a  failed
3793        history  substitution will be reloaded into the r\bre\bea\bad\bdl\bli\bin\bne\be editing buffer
3794        for correction.  The -\b-p\bp option to the h\bhi\bis\bst\bto\bor\bry\by builtin  command  may  be
3795        used  to  see what a history expansion will do before using it.  The -\b-s\bs
3796        option to the h\bhi\bis\bst\bto\bor\bry\by builtin may be used to add commands to the end of
3797        the  history  list  without  actually  executing them, so that they are
3798        available for subsequent recall.
3799
3800        The shell allows control of the various characters used by the  history
3801        expansion mechanism (see the description of h\bhi\bis\bst\btc\bch\bha\bar\brs\bs above under S\bSh\bhe\bel\bll\bl
3802        V\bVa\bar\bri\bia\bab\bbl\ble\bes\bs).  The shell uses the history comment character to mark  his-
3803        tory timestamps when writing the history file.
3804
3805    E\bEv\bve\ben\bnt\bt D\bDe\bes\bsi\big\bgn\bna\bat\bto\bor\brs\bs
3806        An  event designator is a reference to a command line entry in the his-
3807        tory list.  Unless the reference is absolute, events  are  relative  to
3808        the current position in the history list.
3809
3810        !\b!      Start  a  history substitution, except when followed by a b\bbl\bla\ban\bnk\bk,
3811               newline, carriage return, = or ( (when the e\bex\bxt\btg\bgl\blo\bob\bb shell  option
3812               is enabled using the s\bsh\bho\bop\bpt\bt builtin).
3813        !\b!_\bn     Refer to command line _\bn.
3814        !\b!-\b-_\bn    Refer to the current command minus _\bn.
3815        !\b!!\b!     Refer to the previous command.  This is a synonym for `!-1'.
3816        !\b!_\bs_\bt_\br_\bi_\bn_\bg
3817               Refer  to the most recent command preceding the current position
3818               in the history list starting with _\bs_\bt_\br_\bi_\bn_\bg.
3819        !\b!?\b?_\bs_\bt_\br_\bi_\bn_\bg[\b[?\b?]\b]
3820               Refer to the most recent command preceding the current  position
3821               in  the  history  list containing _\bs_\bt_\br_\bi_\bn_\bg.  The trailing ?\b? may be
3822               omitted if _\bs_\bt_\br_\bi_\bn_\bg is followed immediately by a newline.
3823        ^\b^_\bs_\bt_\br_\bi_\bn_\bg_\b1^\b^_\bs_\bt_\br_\bi_\bn_\bg_\b2^\b^
3824               Quick substitution.   Repeat  the  previous  command,  replacing
3825               _\bs_\bt_\br_\bi_\bn_\bg_\b1  with  _\bs_\bt_\br_\bi_\bn_\bg_\b2.  Equivalent to ``!!:s/_\bs_\bt_\br_\bi_\bn_\bg_\b1/_\bs_\bt_\br_\bi_\bn_\bg_\b2/''
3826               (see M\bMo\bod\bdi\bif\bfi\bie\ber\brs\bs below).
3827        !\b!#\b#     The entire command line typed so far.
3828
3829    W\bWo\bor\brd\bd D\bDe\bes\bsi\big\bgn\bna\bat\bto\bor\brs\bs
3830        Word designators are used to select desired words from the event.  A  :\b:
3831        separates  the event specification from the word designator.  It may be
3832        omitted if the word designator begins with a ^\b^, $\b$, *\b*, -\b-, or  %\b%.   Words
3833        are  numbered from the beginning of the line, with the first word being
3834        denoted by 0 (zero).  Words are inserted into the  current  line  sepa-
3835        rated by single spaces.
3836
3837        0\b0 (\b(z\bze\ber\bro\bo)\b)
3838               The zeroth word.  For the shell, this is the command word.
3839        _\bn      The _\bnth word.
3840        ^\b^      The first argument.  That is, word 1.
3841        $\b$      The  last  word.   This  is  usually the last argument, but will
3842               expand to the zeroth word if there is only one word in the line.
3843        %\b%      The word matched by the most recent `?_\bs_\bt_\br_\bi_\bn_\bg?' search.
3844        _\bx-\b-_\by    A range of words; `-_\by' abbreviates `0-_\by'.
3845        *\b*      All  of  the words but the zeroth.  This is a synonym for `_\b1_\b-_\b$'.
3846               It is not an error to use *\b* if there is just  one  word  in  the
3847               event; the empty string is returned in that case.
3848        x\bx*\b*     Abbreviates _\bx_\b-_\b$.
3849        x\bx-\b-     Abbreviates _\bx_\b-_\b$ like x\bx*\b*, but omits the last word.
3850
3851        If  a  word  designator is supplied without an event specification, the
3852        previous command is used as the event.
3853
3854    M\bMo\bod\bdi\bif\bfi\bie\ber\brs\bs
3855        After the optional word designator, there may appear a sequence of  one
3856        or more of the following modifiers, each preceded by a `:'.
3857
3858        h\bh      Remove a trailing filename component, leaving only the head.
3859        t\bt      Remove all leading filename components, leaving the tail.
3860        r\br      Remove a trailing suffix of the form _\b._\bx_\bx_\bx, leaving the basename.
3861        e\be      Remove all but the trailing suffix.
3862        p\bp      Print the new command but do not execute it.
3863        q\bq      Quote the substituted words, escaping further substitutions.
3864        x\bx      Quote the substituted words as with q\bq, but break into  words  at
3865               b\bbl\bla\ban\bnk\bks\bs and newlines.
3866        s\bs/\b/_\bo_\bl_\bd/\b/_\bn_\be_\bw/\b/
3867               Substitute  _\bn_\be_\bw  for  the  first  occurrence of _\bo_\bl_\bd in the event
3868               line.  Any delimiter can be used  in  place  of  /.   The  final
3869               delimiter  is  optional if it is the last character of the event
3870               line.  The delimiter may be quoted in _\bo_\bl_\bd and _\bn_\be_\bw with a  single
3871               backslash.   If & appears in _\bn_\be_\bw, it is replaced by _\bo_\bl_\bd.  A sin-
3872               gle backslash will quote the &.  If _\bo_\bl_\bd is null, it  is  set  to
3873               the  last  _\bo_\bl_\bd substituted, or, if no previous history substitu-
3874               tions took place, the last _\bs_\bt_\br_\bi_\bn_\bg in a !\b!?\b?_\bs_\bt_\br_\bi_\bn_\bg[\b[?\b?]\b]  search.
3875        &\b&      Repeat the previous substitution.
3876        g\bg      Cause changes to be applied over the entire event line.  This is
3877               used  in  conjunction  with `:\b:s\bs' (e.g., `:\b:g\bgs\bs/\b/_\bo_\bl_\bd/\b/_\bn_\be_\bw/\b/') or `:\b:&\b&'.
3878               If used with `:\b:s\bs', any delimiter can be used in place of /,  and
3879               the  final  delimiter is optional if it is the last character of
3880               the event line.  An a\ba may be used as a synonym for g\bg.
3881        G\bG      Apply the following `s\bs' modifier once to each word in the  event
3882               line.
3883
3884 S\bSH\bHE\bEL\bLL\bL B\bBU\bUI\bIL\bLT\bTI\bIN\bN C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS
3885        Unless otherwise noted, each builtin command documented in this section
3886        as accepting options preceded by -\b- accepts -\b--\b- to signify the end of the
3887        options.   The  :\b:, t\btr\bru\bue\be, f\bfa\bal\bls\bse\be, and t\bte\bes\bst\bt builtins do not accept options
3888        and do not treat -\b--\b- specially.  The e\bex\bxi\bit\bt, l\blo\bog\bgo\bou\but\bt, b\bbr\bre\bea\bak\bk, c\bco\bon\bnt\bti\bin\bnu\bue\be, l\ble\bet\bt,
3889        and  s\bsh\bhi\bif\bft\bt builtins accept and process arguments beginning with -\b- with-
3890        out requiring -\b--\b-.  Other builtins that accept  arguments  but  are  not
3891        specified  as accepting options interpret arguments beginning with -\b- as
3892        invalid options and require -\b--\b- to prevent this interpretation.
3893        :\b: [_\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs]
3894               No effect; the command does nothing beyond  expanding  _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs
3895               and  performing any specified redirections.  A zero exit code is
3896               returned.
3897
3898         .\b.  _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be [_\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs]
3899        s\bso\bou\bur\brc\bce\be _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be [_\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs]
3900               Read and execute commands from _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be  in  the  current  shell
3901               environment  and return the exit status of the last command exe-
3902               cuted from _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be.  If _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be  does  not  contain  a  slash,
3903               filenames  in  P\bPA\bAT\bTH\bH  are  used  to find the directory containing
3904               _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be.  The file searched for in P\bPA\bAT\bTH\bH need not be executable.
3905               When  b\bba\bas\bsh\bh  is  not  in  _\bp_\bo_\bs_\bi_\bx  _\bm_\bo_\bd_\be,  the  current directory is
3906               searched if no file is found in P\bPA\bAT\bTH\bH.  If the s\bso\bou\bur\brc\bce\bep\bpa\bat\bth\bh  option
3907               to  the  s\bsh\bho\bop\bpt\bt  builtin  command  is turned off, the P\bPA\bAT\bTH\bH is not
3908               searched.  If any _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs are supplied, they become the  posi-
3909               tional  parameters  when  _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be  is  executed.  Otherwise the
3910               positional parameters are unchanged.  The return status  is  the
3911               status  of  the  last  command exited within the script (0 if no
3912               commands are executed), and false if _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be is  not  found  or
3913               cannot be read.
3914
3915        a\bal\bli\bia\bas\bs [-\b-p\bp] [_\bn_\ba_\bm_\be[=_\bv_\ba_\bl_\bu_\be] ...]
3916               A\bAl\bli\bia\bas\bs with no arguments or with the -\b-p\bp option prints the list of
3917               aliases in the form a\bal\bli\bia\bas\bs _\bn_\ba_\bm_\be=_\bv_\ba_\bl_\bu_\be on standard  output.   When
3918               arguments  are supplied, an alias is defined for each _\bn_\ba_\bm_\be whose
3919               _\bv_\ba_\bl_\bu_\be is given.  A trailing space in  _\bv_\ba_\bl_\bu_\be causes the next word
3920               to be checked for alias substitution when the alias is expanded.
3921               For each _\bn_\ba_\bm_\be in the argument list for which no  _\bv_\ba_\bl_\bu_\be  is  sup-
3922               plied,  the  name  and  value  of  the  alias is printed.  A\bAl\bli\bia\bas\bs
3923               returns true unless a _\bn_\ba_\bm_\be is given for which no alias has  been
3924               defined.
3925
3926        b\bbg\bg [_\bj_\bo_\bb_\bs_\bp_\be_\bc ...]
3927               Resume  each  suspended  job _\bj_\bo_\bb_\bs_\bp_\be_\bc in the background, as if it
3928               had been started with &\b&.  If _\bj_\bo_\bb_\bs_\bp_\be_\bc is not present, the shell's
3929               notion  of the _\bc_\bu_\br_\br_\be_\bn_\bt _\bj_\bo_\bb is used.  b\bbg\bg _\bj_\bo_\bb_\bs_\bp_\be_\bc returns 0 unless
3930               run when job control is disabled or, when run with  job  control
3931               enabled,  any  specified  _\bj_\bo_\bb_\bs_\bp_\be_\bc  was  not found or was started
3932               without job control.
3933
3934        b\bbi\bin\bnd\bd [-\b-m\bm _\bk_\be_\by_\bm_\ba_\bp] [-\b-l\blp\bps\bsv\bvP\bPS\bSV\bVX\bX]
3935        b\bbi\bin\bnd\bd [-\b-m\bm _\bk_\be_\by_\bm_\ba_\bp] [-\b-q\bq _\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn] [-\b-u\bu _\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn] [-\b-r\br _\bk_\be_\by_\bs_\be_\bq]
3936        b\bbi\bin\bnd\bd [-\b-m\bm _\bk_\be_\by_\bm_\ba_\bp] -\b-f\bf _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
3937        b\bbi\bin\bnd\bd [-\b-m\bm _\bk_\be_\by_\bm_\ba_\bp] -\b-x\bx _\bk_\be_\by_\bs_\be_\bq:_\bs_\bh_\be_\bl_\bl_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd
3938        b\bbi\bin\bnd\bd [-\b-m\bm _\bk_\be_\by_\bm_\ba_\bp] _\bk_\be_\by_\bs_\be_\bq:_\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be
3939        b\bbi\bin\bnd\bd _\br_\be_\ba_\bd_\bl_\bi_\bn_\be_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd
3940               Display current r\bre\bea\bad\bdl\bli\bin\bne\be key and function bindings, bind  a  key
3941               sequence  to  a  r\bre\bea\bad\bdl\bli\bin\bne\be  function  or macro, or set a r\bre\bea\bad\bdl\bli\bin\bne\be
3942               variable.  Each non-option argument is a  command  as  it  would
3943               appear  in  _\b._\bi_\bn_\bp_\bu_\bt_\br_\bc, but each binding or command must be passed
3944               as a separate argument; e.g.,  '"\C-x\C-r":  re-read-init-file'.
3945               Options, if supplied, have the following meanings:
3946               -\b-m\bm _\bk_\be_\by_\bm_\ba_\bp
3947                      Use _\bk_\be_\by_\bm_\ba_\bp as the keymap to be affected by the subsequent
3948                      bindings.  Acceptable _\bk_\be_\by_\bm_\ba_\bp names are _\be_\bm_\ba_\bc_\bs_\b, _\be_\bm_\ba_\bc_\bs_\b-_\bs_\bt_\ba_\bn_\b-
3949                      _\bd_\ba_\br_\bd_\b,  _\be_\bm_\ba_\bc_\bs_\b-_\bm_\be_\bt_\ba_\b,  _\be_\bm_\ba_\bc_\bs_\b-_\bc_\bt_\bl_\bx_\b,  _\bv_\bi_\b, _\bv_\bi_\b-_\bm_\bo_\bv_\be_\b, _\bv_\bi_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd,
3950                      and _\bv_\bi_\b-_\bi_\bn_\bs_\be_\br_\bt.  _\bv_\bi is equivalent to _\bv_\bi_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd; _\be_\bm_\ba_\bc_\bs  is
3951                      equivalent to _\be_\bm_\ba_\bc_\bs_\b-_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd.
3952               -\b-l\bl     List the names of all r\bre\bea\bad\bdl\bli\bin\bne\be functions.
3953               -\b-p\bp     Display  r\bre\bea\bad\bdl\bli\bin\bne\be  function  names and bindings in such a
3954                      way that they can be re-read.
3955               -\b-P\bP     List current r\bre\bea\bad\bdl\bli\bin\bne\be function names and bindings.
3956               -\b-s\bs     Display r\bre\bea\bad\bdl\bli\bin\bne\be key sequences bound to  macros  and  the
3957                      strings  they  output  in such a way that they can be re-
3958                      read.
3959               -\b-S\bS     Display r\bre\bea\bad\bdl\bli\bin\bne\be key sequences bound to  macros  and  the
3960                      strings they output.
3961               -\b-v\bv     Display  r\bre\bea\bad\bdl\bli\bin\bne\be variable names and values in such a way
3962                      that they can be re-read.
3963               -\b-V\bV     List current r\bre\bea\bad\bdl\bli\bin\bne\be variable names and values.
3964               -\b-f\bf _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
3965                      Read key bindings from _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be.
3966               -\b-q\bq _\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn
3967                      Query about which keys invoke the named _\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn.
3968               -\b-u\bu _\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn
3969                      Unbind all keys bound to the named _\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn.
3970               -\b-r\br _\bk_\be_\by_\bs_\be_\bq
3971                      Remove any current binding for _\bk_\be_\by_\bs_\be_\bq.
3972               -\b-x\bx _\bk_\be_\by_\bs_\be_\bq:\b:_\bs_\bh_\be_\bl_\bl_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd
3973                      Cause _\bs_\bh_\be_\bl_\bl_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd to be  executed  whenever  _\bk_\be_\by_\bs_\be_\bq  is
3974                      entered.   When _\bs_\bh_\be_\bl_\bl_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd is executed, the shell sets
3975                      the R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE_\b_L\bLI\bIN\bNE\bE variable to the contents of  the  r\bre\bea\bad\bd-\b-
3976                      l\bli\bin\bne\be  line  buffer and the R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE_\b_P\bPO\bOI\bIN\bNT\bT variable to the
3977                      current location of the insertion point.  If the executed
3978                      command  changes  the  value  of  R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE_\b_L\bLI\bIN\bNE\bE  or R\bRE\bEA\bAD\bD-\b-
3979                      L\bLI\bIN\bNE\bE_\b_P\bPO\bOI\bIN\bNT\bT, those new values will  be  reflected  in  the
3980                      editing state.
3981               -\b-X\bX     List  all  key  sequences bound to shell commands and the
3982                      associated commands in a format that  can  be  reused  as
3983                      input.
3984
3985               The  return value is 0 unless an unrecognized option is given or
3986               an error occurred.
3987
3988        b\bbr\bre\bea\bak\bk [_\bn]
3989               Exit from within a f\bfo\bor\br, w\bwh\bhi\bil\ble\be, u\bun\bnt\bti\bil\bl, or s\bse\bel\ble\bec\bct\bt loop.  If  _\bn  is
3990               specified,  break  _\bn  levels.   _\bn must be >= 1.  If _\bn is greater
3991               than the number of enclosing  loops,  all  enclosing  loops  are
3992               exited.   The  return value is 0 unless _\bn is not greater than or
3993               equal to 1.
3994
3995        b\bbu\bui\bil\blt\bti\bin\bn _\bs_\bh_\be_\bl_\bl_\b-_\bb_\bu_\bi_\bl_\bt_\bi_\bn [_\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs]
3996               Execute the specified shell builtin, passing it  _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs,  and
3997               return its exit status.  This is useful when defining a function
3998               whose name is the same as a shell builtin, retaining  the  func-
3999               tionality of the builtin within the function.  The c\bcd\bd builtin is
4000               commonly redefined this way.  The  return  status  is  false  if
4001               _\bs_\bh_\be_\bl_\bl_\b-_\bb_\bu_\bi_\bl_\bt_\bi_\bn is not a shell builtin command.
4002
4003        c\bca\bal\bll\ble\ber\br [_\be_\bx_\bp_\br]
4004               Returns the context of any active subroutine call (a shell func-
4005               tion or a script executed with the .\b. or s\bso\bou\bur\brc\bce\be builtins).  With-
4006               out _\be_\bx_\bp_\br, c\bca\bal\bll\ble\ber\br displays the line number and source filename of
4007               the current subroutine call.  If a non-negative integer is  sup-
4008               plied as _\be_\bx_\bp_\br, c\bca\bal\bll\ble\ber\br displays the line number, subroutine name,
4009               and source file corresponding to that position  in  the  current
4010               execution  call  stack.  This extra information may be used, for
4011               example, to print a stack trace.  The current frame is frame  0.
4012               The  return  value is 0 unless the shell is not executing a sub-
4013               routine call or _\be_\bx_\bp_\br does not correspond to a valid position  in
4014               the call stack.
4015
4016        c\bcd\bd [-\b-L\bL|[-\b-P\bP [-\b-e\be]] [-@]] [_\bd_\bi_\br]
4017               Change  the  current  directory to _\bd_\bi_\br.  if _\bd_\bi_\br is not supplied,
4018               the value of the H\bHO\bOM\bME\bE shell variable is the default.  Any  addi-
4019               tional arguments following _\bd_\bi_\br are ignored.  The variable C\bCD\bDP\bPA\bAT\bTH\bH
4020               defines the search path for the directory containing  _\bd_\bi_\br:  each
4021               directory  name  in  C\bCD\bDP\bPA\bAT\bTH\bH  is  searched  for _\bd_\bi_\br.  Alternative
4022               directory names in C\bCD\bDP\bPA\bAT\bTH\bH are separated by a colon (:).  A  null
4023               directory  name  in C\bCD\bDP\bPA\bAT\bTH\bH is the same as the current directory,
4024               i.e., ``.\b.''.  If _\bd_\bi_\br begins with a slash (/), then C\bCD\bDP\bPA\bAT\bTH\bH is not
4025               used.  The  -\b-P\bP  option  causes  c\bcd\bd to use the physical directory
4026               structure by resolving symbolic links while traversing  _\bd_\bi_\br  and
4027               before processing instances of _\b._\b. in _\bd_\bi_\br (see also the -\b-P\bP option
4028               to the s\bse\bet\bt builtin command); the -\b-L\bL option forces symbolic links
4029               to  be followed by resolving the link after processing instances
4030               of _\b._\b. in _\bd_\bi_\br.  If _\b._\b. appears in _\bd_\bi_\br, it is processed by removing
4031               the  immediately previous pathname component from _\bd_\bi_\br, back to a
4032               slash or the beginning of _\bd_\bi_\br.  If the  -\b-e\be  option  is  supplied
4033               with  -\b-P\bP,  and  the current working directory cannot be success-
4034               fully determined after a successful directory  change,  c\bcd\bd  will
4035               return  an unsuccessful status.  On systems that support it, the
4036               -\b-@\b@ option presents the extended  attributes  associated  with  a
4037               file  as  a directory.  An argument of -\b- is converted to $\b$O\bOL\bLD\bDP\bPW\bWD\bD
4038               before the directory change is attempted.  If a non-empty direc-
4039               tory  name  from  C\bCD\bDP\bPA\bAT\bTH\bH is used, or if -\b- is the first argument,
4040               and the directory change is successful, the absolute pathname of
4041               the  new  working  directory  is written to the standard output.
4042               The return value is  true  if  the  directory  was  successfully
4043               changed; false otherwise.
4044
4045        c\bco\bom\bmm\bma\ban\bnd\bd [-\b-p\bpV\bVv\bv] _\bc_\bo_\bm_\bm_\ba_\bn_\bd [_\ba_\br_\bg ...]
4046               Run  _\bc_\bo_\bm_\bm_\ba_\bn_\bd  with  _\ba_\br_\bg_\bs  suppressing  the normal shell function
4047               lookup. Only builtin commands or commands found in the P\bPA\bAT\bTH\bH  are
4048               executed.   If the -\b-p\bp option is given, the search for _\bc_\bo_\bm_\bm_\ba_\bn_\bd is
4049               performed using a default value for P\bPA\bAT\bTH\bH that is  guaranteed  to
4050               find  all  of  the  standard  utilities.  If either the -\b-V\bV or -\b-v\bv
4051               option is supplied, a description of _\bc_\bo_\bm_\bm_\ba_\bn_\bd is printed.  The -\b-v\bv
4052               option  causes  a single word indicating the command or filename
4053               used to invoke _\bc_\bo_\bm_\bm_\ba_\bn_\bd to be displayed; the -\b-V\bV option produces a
4054               more  verbose  description.  If the -\b-V\bV or -\b-v\bv option is supplied,
4055               the exit status is 0 if _\bc_\bo_\bm_\bm_\ba_\bn_\bd was found, and  1  if  not.   If
4056               neither option is supplied and an error occurred or _\bc_\bo_\bm_\bm_\ba_\bn_\bd can-
4057               not be found, the exit status is 127.  Otherwise, the exit  sta-
4058               tus of the c\bco\bom\bmm\bma\ban\bnd\bd builtin is the exit status of _\bc_\bo_\bm_\bm_\ba_\bn_\bd.
4059
4060        c\bco\bom\bmp\bpg\bge\ben\bn [_\bo_\bp_\bt_\bi_\bo_\bn] [_\bw_\bo_\br_\bd]
4061               Generate  possible  completion matches for _\bw_\bo_\br_\bd according to the
4062               _\bo_\bp_\bt_\bi_\bo_\bns, which may  be  any  option  accepted  by  the  c\bco\bom\bmp\bpl\ble\bet\bte\be
4063               builtin  with  the exception of -\b-p\bp and -\b-r\br, and write the matches
4064               to the standard output.  When using the -\b-F\bF or  -\b-C\bC  options,  the
4065               various  shell  variables  set  by  the  programmable completion
4066               facilities, while available, will not have useful values.
4067
4068               The matches will be generated in the same way  as  if  the  pro-
4069               grammable  completion  code  had  generated them directly from a
4070               completion specification with the same flags.  If _\bw_\bo_\br_\bd is speci-
4071               fied, only those completions matching _\bw_\bo_\br_\bd will be displayed.
4072
4073               The  return  value is true unless an invalid option is supplied,
4074               or no matches were generated.
4075
4076        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-
4077        _\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]
4078               [-\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.]
4079        c\bco\bom\bmp\bpl\ble\bet\bte\be -\b-p\bpr\br [-\b-D\bDE\bE] [_\bn_\ba_\bm_\be ...]
4080               Specify how arguments to each _\bn_\ba_\bm_\be should be completed.  If  the
4081               -\b-p\bp  option  is supplied, or if no options are supplied, existing
4082               completion specifications are printed in a way that allows  them
4083               to be reused as input.  The -\b-r\br option removes a completion spec-
4084               ification for each _\bn_\ba_\bm_\be, or, if no _\bn_\ba_\bm_\bes are supplied, all  com-
4085               pletion  specifications.   The  -\b-D\bD  option  indicates  that  the
4086               remaining options and actions should apply  to  the  ``default''
4087               command  completion;  that is, completion attempted on a command
4088               for which no completion has previously  been  defined.   The  -\b-E\bE
4089               option  indicates  that the remaining options and actions should
4090               apply to  ``empty''  command  completion;  that  is,  completion
4091               attempted on a blank line.
4092
4093               The  process  of  applying  these completion specifications when
4094               word completion is  attempted  is  described  above  under  P\bPr\bro\bo-\b-
4095               g\bgr\bra\bam\bmm\bma\bab\bbl\ble\be C\bCo\bom\bmp\bpl\ble\bet\bti\bio\bon\bn.
4096
4097               Other  options,  if specified, have the following meanings.  The
4098               arguments to the -\b-G\bG, -\b-W\bW, and -\b-X\bX options (and, if necessary,  the
4099               -\b-P\bP  and -\b-S\bS options) should be quoted to protect them from expan-
4100               sion before the c\bco\bom\bmp\bpl\ble\bet\bte\be builtin is invoked.
4101               -\b-o\bo _\bc_\bo_\bm_\bp_\b-_\bo_\bp_\bt_\bi_\bo_\bn
4102                       The _\bc_\bo_\bm_\bp_\b-_\bo_\bp_\bt_\bi_\bo_\bn controls several aspects  of  the  comp-
4103                       spec's  behavior beyond the simple generation of comple-
4104                       tions.  _\bc_\bo_\bm_\bp_\b-_\bo_\bp_\bt_\bi_\bo_\bn may be one of:
4105                       b\bba\bas\bsh\bhd\bde\bef\bfa\bau\bul\blt\bt
4106                               Perform the rest of the default b\bba\bas\bsh\bh completions
4107                               if the compspec generates no matches.
4108                       d\bde\bef\bfa\bau\bul\blt\bt Use  readline's  default  filename completion if
4109                               the compspec generates no matches.
4110                       d\bdi\bir\brn\bna\bam\bme\bes\bs
4111                               Perform directory name completion if  the  comp-
4112                               spec generates no matches.
4113                       f\bfi\bil\ble\ben\bna\bam\bme\bes\bs
4114                               Tell  readline that the compspec generates file-
4115                               names, so it can perform  any  filename-specific
4116                               processing  (like  adding  a  slash to directory
4117                               names, quoting special characters, or  suppress-
4118                               ing  trailing spaces).  Intended to be used with
4119                               shell functions.
4120                       n\bno\boq\bqu\buo\bot\bte\be Tell readline not to quote the  completed  words
4121                               if  they are filenames (quoting filenames is the
4122                               default).
4123                       n\bno\bos\bsp\bpa\bac\bce\be Tell  readline  not  to  append  a  space   (the
4124                               default)  to  words  completed at the end of the
4125                               line.
4126                       p\bpl\blu\bus\bsd\bdi\bir\brs\bs
4127                               After any matches defined by  the  compspec  are
4128                               generated,    directory   name   completion   is
4129                               attempted and  any  matches  are  added  to  the
4130                               results of the other actions.
4131               -\b-A\bA _\ba_\bc_\bt_\bi_\bo_\bn
4132                       The  _\ba_\bc_\bt_\bi_\bo_\bn  may  be  one of the following to generate a
4133                       list of possible completions:
4134                       a\bal\bli\bia\bas\bs   Alias names.  May also be specified as -\b-a\ba.
4135                       a\bar\brr\bra\bay\byv\bva\bar\br
4136                               Array variable names.
4137                       b\bbi\bin\bnd\bdi\bin\bng\bg R\bRe\bea\bad\bdl\bli\bin\bne\be key binding names.
4138                       b\bbu\bui\bil\blt\bti\bin\bn Names of shell builtin commands.   May  also  be
4139                               specified as -\b-b\bb.
4140                       c\bco\bom\bmm\bma\ban\bnd\bd Command names.  May also be specified as -\b-c\bc.
4141                       d\bdi\bir\bre\bec\bct\bto\bor\bry\by
4142                               Directory names.  May also be specified as -\b-d\bd.
4143                       d\bdi\bis\bsa\bab\bbl\ble\bed\bd
4144                               Names of disabled shell builtins.
4145                       e\ben\bna\bab\bbl\ble\bed\bd Names of enabled shell builtins.
4146                       e\bex\bxp\bpo\bor\brt\bt  Names  of exported shell variables.  May also be
4147                               specified as -\b-e\be.
4148                       f\bfi\bil\ble\be    File names.  May also be specified as -\b-f\bf.
4149                       f\bfu\bun\bnc\bct\bti\bio\bon\bn
4150                               Names of shell functions.
4151                       g\bgr\bro\bou\bup\bp   Group names.  May also be specified as -\b-g\bg.
4152                       h\bhe\bel\blp\bpt\bto\bop\bpi\bic\bc
4153                               Help topics as accepted by the h\bhe\bel\blp\bp builtin.
4154                       h\bho\bos\bst\btn\bna\bam\bme\be
4155                               Hostnames, as taken from the file  specified  by
4156                               the H\bHO\bOS\bST\bTF\bFI\bIL\bLE\bE shell variable.
4157                       j\bjo\bob\bb     Job  names,  if job control is active.  May also
4158                               be specified as -\b-j\bj.
4159                       k\bke\bey\byw\bwo\bor\brd\bd Shell reserved words.  May also be specified  as
4160                               -\b-k\bk.
4161                       r\bru\bun\bnn\bni\bin\bng\bg Names of running jobs, if job control is active.
4162                       s\bse\ber\brv\bvi\bic\bce\be Service names.  May also be specified as -\b-s\bs.
4163                       s\bse\bet\bto\bop\bpt\bt  Valid arguments for the -\b-o\bo  option  to  the  s\bse\bet\bt
4164                               builtin.
4165                       s\bsh\bho\bop\bpt\bt   Shell  option  names  as  accepted  by the s\bsh\bho\bop\bpt\bt
4166                               builtin.
4167                       s\bsi\big\bgn\bna\bal\bl  Signal names.
4168                       s\bst\bto\bop\bpp\bpe\bed\bd Names of stopped jobs, if job control is active.
4169                       u\bus\bse\ber\br    User names.  May also be specified as -\b-u\bu.
4170                       v\bva\bar\bri\bia\bab\bbl\ble\be
4171                               Names of all shell variables.  May also be spec-
4172                               ified as -\b-v\bv.
4173               -\b-C\bC _\bc_\bo_\bm_\bm_\ba_\bn_\bd
4174                       _\bc_\bo_\bm_\bm_\ba_\bn_\bd is executed in a subshell environment,  and  its
4175                       output is used as the possible completions.
4176               -\b-F\bF _\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn
4177                       The  shell  function _\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn is executed in the current
4178                       shell environment.  When the function is  executed,  the
4179                       first  argument  ($\b$1\b1)  is  the name of the command whose
4180                       arguments are being completed, the second argument  ($\b$2\b2)
4181                       is the word being completed, and the third argument ($\b$3\b3)
4182                       is the word preceding the word being  completed  on  the
4183                       current  command  line.   When it finishes, the possible
4184                       completions are retrieved from the value of the  C\bCO\bOM\bMP\bPR\bRE\bE-\b-
4185                       P\bPL\bLY\bY array variable.
4186               -\b-G\bG _\bg_\bl_\bo_\bb_\bp_\ba_\bt
4187                       The  pathname  expansion  pattern _\bg_\bl_\bo_\bb_\bp_\ba_\bt is expanded to
4188                       generate the possible completions.
4189               -\b-P\bP _\bp_\br_\be_\bf_\bi_\bx
4190                       _\bp_\br_\be_\bf_\bi_\bx is added at the beginning of each  possible  com-
4191                       pletion after all other options have been applied.
4192               -\b-S\bS _\bs_\bu_\bf_\bf_\bi_\bx
4193                       _\bs_\bu_\bf_\bf_\bi_\bx is appended to each possible completion after all
4194                       other options have been applied.
4195               -\b-W\bW _\bw_\bo_\br_\bd_\bl_\bi_\bs_\bt
4196                       The _\bw_\bo_\br_\bd_\bl_\bi_\bs_\bt is split using the characters  in  the  I\bIF\bFS\bS
4197                       special  variable as delimiters, and each resultant word
4198                       is expanded.  The possible completions are  the  members
4199                       of  the  resultant  list which match the word being com-
4200                       pleted.
4201               -\b-X\bX _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt
4202                       _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt is a pattern as used for  pathname  expansion.
4203                       It is applied to the list of possible completions gener-
4204                       ated by the preceding options and  arguments,  and  each
4205                       completion  matching _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt is removed from the list.
4206                       A leading !\b! in _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt negates the  pattern;  in  this
4207                       case,  any completion not matching _\bf_\bi_\bl_\bt_\be_\br_\bp_\ba_\bt is removed.
4208
4209               The return value is true unless an invalid option  is  supplied,
4210               an  option  other than -\b-p\bp or -\b-r\br is supplied without a _\bn_\ba_\bm_\be argu-
4211               ment, an attempt is made to remove  a  completion  specification
4212               for a _\bn_\ba_\bm_\be for which no specification exists, or an error occurs
4213               adding a completion specification.
4214
4215        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]
4216               Modify  completion  options  for  each  _\bn_\ba_\bm_\be  according  to  the
4217               _\bo_\bp_\bt_\bi_\bo_\bns,  or  for the currently-executing completion if no _\bn_\ba_\bm_\bes
4218               are supplied.  If no _\bo_\bp_\bt_\bi_\bo_\bns are given, display  the  completion
4219               options  for  each _\bn_\ba_\bm_\be or the current completion.  The possible
4220               values of _\bo_\bp_\bt_\bi_\bo_\bn  are  those  valid  for  the  c\bco\bom\bmp\bpl\ble\bet\bte\be  builtin
4221               described  above.   The  -\b-D\bD  option indicates that the remaining
4222               options should apply to the ``default'' command completion; that
4223               is,  completion  attempted  on a command for which no completion
4224               has previously been defined.  The -\b-E\bE option indicates  that  the
4225               remaining  options should apply to ``empty'' command completion;
4226               that is, completion attempted on a blank line.
4227
4228               The return value is true unless an invalid option  is  supplied,
4229               an attempt is made to modify the options for a _\bn_\ba_\bm_\be for which no
4230               completion specification exists, or an output error occurs.
4231
4232        c\bco\bon\bnt\bti\bin\bnu\bue\be [_\bn]
4233               Resume the next iteration of the enclosing f\bfo\bor\br, w\bwh\bhi\bil\ble\be, u\bun\bnt\bti\bil\bl, or
4234               s\bse\bel\ble\bec\bct\bt  loop.   If  _\bn  is specified, resume at the _\bnth enclosing
4235               loop.  _\bn must be >= 1.  If _\bn  is  greater  than  the  number  of
4236               enclosing  loops,  the  last  enclosing  loop (the ``top-level''
4237               loop) is resumed.  The return value is 0 unless _\bn is not greater
4238               than or equal to 1.
4239
4240        d\bde\bec\bcl\bla\bar\bre\be [-\b-a\baA\bAf\bfF\bFg\bgi\bil\bln\bnr\brt\btu\bux\bx] [-\b-p\bp] [_\bn_\ba_\bm_\be[=_\bv_\ba_\bl_\bu_\be] ...]
4241        t\bty\byp\bpe\bes\bse\bet\bt [-\b-a\baA\bAf\bfF\bFg\bgi\bil\bln\bnr\brt\btu\bux\bx] [-\b-p\bp] [_\bn_\ba_\bm_\be[=_\bv_\ba_\bl_\bu_\be] ...]
4242               Declare  variables and/or give them attributes.  If no _\bn_\ba_\bm_\bes are
4243               given then display the values of variables.  The -\b-p\bp option  will
4244               display the attributes and values of each _\bn_\ba_\bm_\be.  When -\b-p\bp is used
4245               with _\bn_\ba_\bm_\be arguments, additional options, other than -\b-f\bf  and  -\b-F\bF,
4246               are  ignored.   When  -\b-p\bp  is supplied without _\bn_\ba_\bm_\be arguments, it
4247               will display the attributes and values of all  variables  having
4248               the attributes specified by the additional options.  If no other
4249               options  are  supplied  with  -\b-p\bp,  d\bde\bec\bcl\bla\bar\bre\be  will   display   the
4250               attributes  and  values  of  all shell variables.  The -\b-f\bf option
4251               will restrict the display to shell  functions.   The  -\b-F\bF  option
4252               inhibits  the display of function definitions; only the function
4253               name and attributes are printed.  If the e\bex\bxt\btd\bde\beb\bbu\bug\bg  shell  option
4254               is  enabled  using  s\bsh\bho\bop\bpt\bt,  the source file name and line number
4255               where the function is defined are displayed  as  well.   The  -\b-F\bF
4256               option implies -\b-f\bf.  The -\b-g\bg option forces variables to be created
4257               or modified at the global scope, even when d\bde\bec\bcl\bla\bar\bre\be  is  executed
4258               in  a  shell  function.   It is ignored in all other cases.  The
4259               following options can be used to restrict  output  to  variables
4260               with the specified attribute or to give variables attributes:
4261               -\b-a\ba     Each  _\bn_\ba_\bm_\be  is  an  indexed  array  variable  (see A\bAr\brr\bra\bay\bys\bs
4262                      above).
4263               -\b-A\bA     Each _\bn_\ba_\bm_\be is an associative array  variable  (see  A\bAr\brr\bra\bay\bys\bs
4264                      above).
4265               -\b-f\bf     Use function names only.
4266               -\b-i\bi     The variable is treated as an integer; arithmetic evalua-
4267                      tion (see A\bAR\bRI\bIT\bTH\bHM\bME\bET\bTI\bIC\bC E\bEV\bVA\bAL\bLU\bUA\bAT\bTI\bIO\bON\bN above) is performed  when
4268                      the variable is assigned a value.
4269               -\b-l\bl     When  the  variable  is  assigned a value, all upper-case
4270                      characters are converted to lower-case.   The  upper-case
4271                      attribute is disabled.
4272               -\b-n\bn     Give  each  _\bn_\ba_\bm_\be  the _\bn_\ba_\bm_\be_\br_\be_\bf attribute, making it a name
4273                      reference to another variable.  That  other  variable  is
4274                      defined by the value of _\bn_\ba_\bm_\be.  All references and assign-
4275                      ments to _\bn_\ba_\bm_\be,  except  for  changing  the  -\b-n\bn  attribute
4276                      itself,  are  performed  on  the  variable  referenced by
4277                      _\bn_\ba_\bm_\be's value.  The -\b-n\bn  attribute  cannot  be  applied  to
4278                      array variables.
4279               -\b-r\br     Make _\bn_\ba_\bm_\bes readonly.  These names cannot then be assigned
4280                      values by subsequent assignment statements or unset.
4281               -\b-t\bt     Give each _\bn_\ba_\bm_\be the  _\bt_\br_\ba_\bc_\be  attribute.   Traced  functions
4282                      inherit  the  D\bDE\bEB\bBU\bUG\bG  and  R\bRE\bET\bTU\bUR\bRN\bN  traps  from the calling
4283                      shell.  The trace attribute has no  special  meaning  for
4284                      variables.
4285               -\b-u\bu     When  the  variable  is  assigned a value, all lower-case
4286                      characters are converted to upper-case.   The  lower-case
4287                      attribute is disabled.
4288               -\b-x\bx     Mark  _\bn_\ba_\bm_\bes  for  export  to  subsequent commands via the
4289                      environment.
4290
4291               Using `+' instead of `-' turns off the attribute  instead,  with
4292               the exceptions that +\b+a\ba may not be used to destroy an array vari-
4293               able and +\b+r\br will not remove the readonly attribute.   When  used
4294               in a function, d\bde\bec\bcl\bla\bar\bre\be and t\bty\byp\bpe\bes\bse\bet\bt make each _\bn_\ba_\bm_\be local, as with
4295               the l\blo\boc\bca\bal\bl command, unless the -\b-g\bg option is supplied.  If a vari-
4296               able  name  is  followed by =_\bv_\ba_\bl_\bu_\be, the value of the variable is
4297               set to _\bv_\ba_\bl_\bu_\be.  When using -\b-a\ba or -\b-A\bA and the  compound  assignment
4298               syntax  to  create array variables, additional attributes do not
4299               take effect until subsequent assignments.  The return value is 0
4300               unless  an  invalid option is encountered, an attempt is made to
4301               define a function using ``-f foo=bar'', an attempt  is  made  to
4302               assign  a  value  to  a readonly variable, an attempt is made to
4303               assign a value to an array variable without using  the  compound
4304               assignment  syntax (see A\bAr\brr\bra\bay\bys\bs above), one of the _\bn_\ba_\bm_\be_\bs is not a
4305               valid shell variable name, an attempt is made to turn off  read-
4306               only  status for a readonly variable, an attempt is made to turn
4307               off array status for an array variable, or an attempt is made to
4308               display a non-existent function with -\b-f\bf.
4309
4310        d\bdi\bir\brs\bs [\b[-\b-c\bcl\blp\bpv\bv]\b] [\b[+\b+_\bn]\b] [\b[-\b-_\bn]\b]
4311               Without  options,  displays  the  list  of  currently remembered
4312               directories.  The default display  is  on  a  single  line  with
4313               directory  names  separated by spaces.  Directories are added to
4314               the list with  the  p\bpu\bus\bsh\bhd\bd  command;  the  p\bpo\bop\bpd\bd  command  removes
4315               entries from the list.
4316               -\b-c\bc     Clears  the  directory  stack  by  deleting  all  of  the
4317                      entries.
4318               -\b-l\bl     Produces a listing  using  full  pathnames;  the  default
4319                      listing format uses a tilde to denote the home directory.
4320               -\b-p\bp     Print the directory stack with one entry per line.
4321               -\b-v\bv     Print the directory stack with one entry per  line,  pre-
4322                      fixing each entry with its index in the stack.
4323               +\b+_\bn     Displays the _\bnth entry counting from the left of the list
4324                      shown by d\bdi\bir\brs\bs when invoked without options, starting with
4325                      zero.
4326               -\b-_\bn     Displays  the  _\bnth  entry  counting from the right of the
4327                      list shown by d\bdi\bir\brs\bs when invoked without options, starting
4328                      with zero.
4329
4330               The  return value is 0 unless an invalid option is supplied or _\bn
4331               indexes beyond the end of the directory stack.
4332
4333        d\bdi\bis\bso\bow\bwn\bn [-\b-a\bar\br] [-\b-h\bh] [_\bj_\bo_\bb_\bs_\bp_\be_\bc ...]
4334               Without options, remove each _\bj_\bo_\bb_\bs_\bp_\be_\bc from the  table  of  active
4335               jobs.   If _\bj_\bo_\bb_\bs_\bp_\be_\bc is not present, and neither the -\b-a\ba nor the -\b-r\br
4336               option is supplied, the _\bc_\bu_\br_\br_\be_\bn_\bt _\bj_\bo_\bb is used.  If the  -\b-h\bh  option
4337               is  given,  each  _\bj_\bo_\bb_\bs_\bp_\be_\bc  is not removed from the table, but is
4338               marked so that S\bSI\bIG\bGH\bHU\bUP\bP is not  sent  to  the  job  if  the  shell
4339               receives  a  S\bSI\bIG\bGH\bHU\bUP\bP.   If  no _\bj_\bo_\bb_\bs_\bp_\be_\bc is supplied, the -\b-a\ba option
4340               means to remove or mark all jobs; the -\b-r\br option without  a  _\bj_\bo_\bb_\b-
4341               _\bs_\bp_\be_\bc  argument  restricts operation to running jobs.  The return
4342               value is 0 unless a _\bj_\bo_\bb_\bs_\bp_\be_\bc does not specify a valid job.
4343
4344        e\bec\bch\bho\bo [-\b-n\bne\beE\bE] [_\ba_\br_\bg ...]
4345               Output the _\ba_\br_\bgs, separated by spaces,  followed  by  a  newline.
4346               The  return  status  is 0 unless a write error occurs.  If -\b-n\bn is
4347               specified, the trailing newline is suppressed.  If the -\b-e\be option
4348               is  given,  interpretation  of  the  following backslash-escaped
4349               characters is enabled.  The -\b-E\bE option disables  the  interpreta-
4350               tion  of these escape characters, even on systems where they are
4351               interpreted by default.  The x\bxp\bpg\bg_\b_e\bec\bch\bho\bo shell option may  be  used
4352               to  dynamically  determine  whether  or  not  e\bec\bch\bho\bo expands these
4353               escape characters by default.  e\bec\bch\bho\bo does  not  interpret  -\b--\b-  to
4354               mean  the  end of options.  e\bec\bch\bho\bo interprets the following escape
4355               sequences:
4356               \\b\a\ba     alert (bell)
4357               \\b\b\bb     backspace
4358               \\b\c\bc     suppress further output
4359               \\b\e\be
4360               \\b\E\bE     an escape character
4361               \\b\f\bf     form feed
4362               \\b\n\bn     new line
4363               \\b\r\br     carriage return
4364               \\b\t\bt     horizontal tab
4365               \\b\v\bv     vertical tab
4366               \\b\\\b\     backslash
4367               \\b\0\b0_\bn_\bn_\bn  the eight-bit character whose value is  the  octal  value
4368                      _\bn_\bn_\bn (zero to three octal digits)
4369               \\b\x\bx_\bH_\bH   the  eight-bit  character  whose value is the hexadecimal
4370                      value _\bH_\bH (one or two hex digits)
4371               \\b\u\bu_\bH_\bH_\bH_\bH the Unicode (ISO/IEC 10646) character whose value is  the
4372                      hexadecimal value _\bH_\bH_\bH_\bH (one to four hex digits)
4373               \\b\U\bU_\bH_\bH_\bH_\bH_\bH_\bH_\bH_\bH
4374                      the  Unicode (ISO/IEC 10646) character whose value is the
4375                      hexadecimal value _\bH_\bH_\bH_\bH_\bH_\bH_\bH_\bH (one to eight hex digits)
4376
4377        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 ...]
4378               Enable and disable builtin shell commands.  Disabling a  builtin
4379               allows a disk command which has the same name as a shell builtin
4380               to be executed without specifying a full pathname,  even  though
4381               the  shell  normally searches for builtins before disk commands.
4382               If -\b-n\bn is used, each  _\bn_\ba_\bm_\be  is  disabled;  otherwise,  _\bn_\ba_\bm_\be_\bs  are
4383               enabled.  For example, to use the t\bte\bes\bst\bt binary found via the P\bPA\bAT\bTH\bH
4384               instead of the shell builtin version, run  ``enable  -n  test''.
4385               The  -\b-f\bf  option  means to load the new builtin command _\bn_\ba_\bm_\be from
4386               shared object _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be, on systems that support dynamic loading.
4387               The  -\b-d\bd  option will delete a builtin previously loaded with -\b-f\bf.
4388               If no _\bn_\ba_\bm_\be arguments are given, or if the -\b-p\bp option is supplied,
4389               a list of shell builtins is printed.  With no other option argu-
4390               ments, the list consists of all enabled shell builtins.   If  -\b-n\bn
4391               is  supplied, only disabled builtins are printed.  If -\b-a\ba is sup-
4392               plied, the list printed includes all builtins, with  an  indica-
4393               tion  of whether or not each is enabled.  If -\b-s\bs is supplied, the
4394               output is restricted to the POSIX _\bs_\bp_\be_\bc_\bi_\ba_\bl builtins.  The  return
4395               value  is  0 unless a _\bn_\ba_\bm_\be is not a shell builtin or there is an
4396               error loading a new builtin from a shared object.
4397
4398        e\bev\bva\bal\bl [_\ba_\br_\bg ...]
4399               The _\ba_\br_\bgs are read and concatenated together into a  single  com-
4400               mand.   This command is then read and executed by the shell, and
4401               its exit status is returned as the value of e\bev\bva\bal\bl.  If there  are
4402               no _\ba_\br_\bg_\bs, or only null arguments, e\bev\bva\bal\bl returns 0.
4403
4404        e\bex\bxe\bec\bc [-\b-c\bcl\bl] [-\b-a\ba _\bn_\ba_\bm_\be] [_\bc_\bo_\bm_\bm_\ba_\bn_\bd [_\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs]]
4405               If  _\bc_\bo_\bm_\bm_\ba_\bn_\bd is specified, it replaces the shell.  No new process
4406               is created.  The _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs become the arguments to _\bc_\bo_\bm_\bm_\ba_\bn_\bd.   If
4407               the -\b-l\bl option is supplied, the shell places a dash at the begin-
4408               ning of the zeroth argument passed to  _\bc_\bo_\bm_\bm_\ba_\bn_\bd.   This  is  what
4409               _\bl_\bo_\bg_\bi_\bn(1) does.  The -\b-c\bc option causes _\bc_\bo_\bm_\bm_\ba_\bn_\bd to be executed with
4410               an empty environment.  If -\b-a\ba is supplied, the shell passes  _\bn_\ba_\bm_\be
4411               as the zeroth argument to the executed command.  If _\bc_\bo_\bm_\bm_\ba_\bn_\bd can-
4412               not be executed for some reason, a non-interactive shell  exits,
4413               unless  the  e\bex\bxe\bec\bcf\bfa\bai\bil\bl shell option is enabled.  In that case, it
4414               returns failure.  An interactive shell returns  failure  if  the
4415               file cannot be executed.  If _\bc_\bo_\bm_\bm_\ba_\bn_\bd is not specified, any redi-
4416               rections take effect in the current shell, and the return status
4417               is  0.  If there is a redirection error, the return status is 1.
4418
4419        e\bex\bxi\bit\bt [_\bn]
4420               Cause the shell to exit with a status of _\bn.  If  _\bn  is  omitted,
4421               the exit status is that of the last command executed.  A trap on
4422               E\bEX\bXI\bIT\bT is executed before the shell terminates.
4423
4424        e\bex\bxp\bpo\bor\brt\bt [-\b-f\bfn\bn] [_\bn_\ba_\bm_\be[=_\bw_\bo_\br_\bd]] ...
4425        e\bex\bxp\bpo\bor\brt\bt -\b-p\bp
4426               The supplied _\bn_\ba_\bm_\be_\bs are marked for automatic export to the  envi-
4427               ronment  of subsequently executed commands.  If the -\b-f\bf option is
4428               given, the _\bn_\ba_\bm_\be_\bs refer to functions.  If no _\bn_\ba_\bm_\be_\bs are given,  or
4429               if  the  -\b-p\bp  option is supplied, a list of names of all exported
4430               variables is printed.  The -\b-n\bn option causes the export  property
4431               to be removed from each _\bn_\ba_\bm_\be.  If a variable name is followed by
4432               =_\bw_\bo_\br_\bd, the value of the variable is set to _\bw_\bo_\br_\bd.  e\bex\bxp\bpo\bor\brt\bt returns
4433               an exit status of 0 unless an invalid option is encountered, one
4434               of the _\bn_\ba_\bm_\be_\bs is not a valid shell variable name, or -\b-f\bf  is  sup-
4435               plied with a _\bn_\ba_\bm_\be that is not a function.
4436
4437        f\bfc\bc [-\b-e\be _\be_\bn_\ba_\bm_\be] [-\b-l\bln\bnr\br] [_\bf_\bi_\br_\bs_\bt] [_\bl_\ba_\bs_\bt]
4438        f\bfc\bc -\b-s\bs [_\bp_\ba_\bt=_\br_\be_\bp] [_\bc_\bm_\bd]
4439               The  first  form  selects a range of commands from _\bf_\bi_\br_\bs_\bt to _\bl_\ba_\bs_\bt
4440               from the history list and  displays  or  edits  and  re-executes
4441               them.   _\bF_\bi_\br_\bs_\bt  and  _\bl_\ba_\bs_\bt may be specified as a string (to locate
4442               the last command beginning with that string) or as a number  (an
4443               index  into the history list, where a negative number is used as
4444               an offset from the current command  number).   If  _\bl_\ba_\bs_\bt  is  not
4445               specified  it is set to the current command for listing (so that
4446               ``fc -l -10'' prints the last 10 commands) and to  _\bf_\bi_\br_\bs_\bt  other-
4447               wise.   If _\bf_\bi_\br_\bs_\bt is not specified it is set to the previous com-
4448               mand for editing and -16 for listing.
4449
4450               The -\b-n\bn option suppresses the command numbers when listing.   The
4451               -\b-r\br  option reverses the order of the commands.  If the -\b-l\bl option
4452               is given, the commands are listed on  standard  output.   Other-
4453               wise,  the editor given by _\be_\bn_\ba_\bm_\be is invoked on a file containing
4454               those commands.  If _\be_\bn_\ba_\bm_\be is not given, the value of the  F\bFC\bCE\bED\bDI\bIT\bT
4455               variable  is used, and the value of E\bED\bDI\bIT\bTO\bOR\bR if F\bFC\bCE\bED\bDI\bIT\bT is not set.
4456               If neither variable is set, _\bv_\bi is used.  When  editing  is  com-
4457               plete, the edited commands are echoed and executed.
4458
4459               In  the  second form, _\bc_\bo_\bm_\bm_\ba_\bn_\bd is re-executed after each instance
4460               of _\bp_\ba_\bt is replaced by _\br_\be_\bp.  _\bC_\bo_\bm_\bm_\ba_\bn_\bd is intepreted  the  same  as
4461               _\bf_\bi_\br_\bs_\bt  above.  A useful alias to use with this is ``r="fc -s"'',
4462               so that typing ``r cc'' runs the  last  command  beginning  with
4463               ``cc'' and typing ``r'' re-executes the last command.
4464
4465               If  the  first  form  is  used,  the return value is 0 unless an
4466               invalid option is encountered or _\bf_\bi_\br_\bs_\bt or _\bl_\ba_\bs_\bt  specify  history
4467               lines  out  of  range.  If the -\b-e\be option is supplied, the return
4468               value is the value of the last command executed or failure if an
4469               error occurs with the temporary file of commands.  If the second
4470               form is used, the return status is that of the  command  re-exe-
4471               cuted,  unless  _\bc_\bm_\bd  does  not  specify a valid history line, in
4472               which case f\bfc\bc returns failure.
4473
4474        f\bfg\bg [_\bj_\bo_\bb_\bs_\bp_\be_\bc]
4475               Resume _\bj_\bo_\bb_\bs_\bp_\be_\bc in the foreground, and make it the  current  job.
4476               If _\bj_\bo_\bb_\bs_\bp_\be_\bc is not present, the shell's notion of the _\bc_\bu_\br_\br_\be_\bn_\bt _\bj_\bo_\bb
4477               is used.  The return value is that of the  command  placed  into
4478               the  foreground,  or failure if run when job control is disabled
4479               or, when run with job control enabled, if _\bj_\bo_\bb_\bs_\bp_\be_\bc does not spec-
4480               ify  a  valid  job  or  _\bj_\bo_\bb_\bs_\bp_\be_\bc specifies a job that was started
4481               without job control.
4482
4483        g\bge\bet\bto\bop\bpt\bts\bs _\bo_\bp_\bt_\bs_\bt_\br_\bi_\bn_\bg _\bn_\ba_\bm_\be [_\ba_\br_\bg_\bs]
4484               g\bge\bet\bto\bop\bpt\bts\bs is used by shell procedures to parse positional  parame-
4485               ters.   _\bo_\bp_\bt_\bs_\bt_\br_\bi_\bn_\bg  contains  the  option characters to be recog-
4486               nized; if a character is followed by  a  colon,  the  option  is
4487               expected  to have an argument, which should be separated from it
4488               by white space.  The colon and question mark characters may  not
4489               be  used as option characters.  Each time it is invoked, g\bge\bet\bto\bop\bpt\bts\bs
4490               places the next option in the shell variable _\bn_\ba_\bm_\be,  initializing
4491               _\bn_\ba_\bm_\be if it does not exist, and the index of the next argument to
4492               be processed into the variable O\bOP\bPT\bTI\bIN\bND\bD.  O\bOP\bPT\bTI\bIN\bND\bD is initialized to
4493               1  each  time  the  shell or a shell script is invoked.  When an
4494               option requires an argument, g\bge\bet\bto\bop\bpt\bts\bs places that  argument  into
4495               the  variable O\bOP\bPT\bTA\bAR\bRG\bG.  The shell does not reset O\bOP\bPT\bTI\bIN\bND\bD automati-
4496               cally; it must be  manually  reset  between  multiple  calls  to
4497               g\bge\bet\bto\bop\bpt\bts\bs within the same shell invocation if a new set of parame-
4498               ters is to be used.
4499
4500               When the end of options is encountered,  g\bge\bet\bto\bop\bpt\bts\bs  exits  with  a
4501               return  value  greater than zero.  O\bOP\bPT\bTI\bIN\bND\bD is set to the index of
4502               the first non-option argument, and _\bn_\ba_\bm_\be is set to ?.
4503
4504               g\bge\bet\bto\bop\bpt\bts\bs normally parses the positional parameters, but  if  more
4505               arguments are given in _\ba_\br_\bg_\bs, g\bge\bet\bto\bop\bpt\bts\bs parses those instead.
4506
4507               g\bge\bet\bto\bop\bpt\bts\bs  can  report errors in two ways.  If the first character
4508               of _\bo_\bp_\bt_\bs_\bt_\br_\bi_\bn_\bg is a colon, _\bs_\bi_\bl_\be_\bn_\bt error  reporting  is  used.   In
4509               normal  operation,  diagnostic messages are printed when invalid
4510               options or missing option arguments  are  encountered.   If  the
4511               variable  O\bOP\bPT\bTE\bER\bRR\bR  is  set  to  0, no error messages will be dis-
4512               played, even if the first character of _\bo_\bp_\bt_\bs_\bt_\br_\bi_\bn_\bg is not a colon.
4513
4514               If an invalid option is seen, g\bge\bet\bto\bop\bpt\bts\bs places ? into _\bn_\ba_\bm_\be and, if
4515               not silent, prints an  error  message  and  unsets  O\bOP\bPT\bTA\bAR\bRG\bG.   If
4516               g\bge\bet\bto\bop\bpt\bts\bs  is  silent,  the  option  character  found is placed in
4517               O\bOP\bPT\bTA\bAR\bRG\bG and no diagnostic message is printed.
4518
4519               If a required argument is not found, and g\bge\bet\bto\bop\bpt\bts\bs is not  silent,
4520               a  question  mark  (?\b?) is placed in _\bn_\ba_\bm_\be, O\bOP\bPT\bTA\bAR\bRG\bG is unset, and a
4521               diagnostic message is printed.  If g\bge\bet\bto\bop\bpt\bts\bs  is  silent,  then  a
4522               colon  (:\b:)  is  placed  in  _\bn_\ba_\bm_\be and O\bOP\bPT\bTA\bAR\bRG\bG is set to the option
4523               character found.
4524
4525               g\bge\bet\bto\bop\bpt\bts\bs returns true if an option, specified or unspecified,  is
4526               found.  It returns false if the end of options is encountered or
4527               an error occurs.
4528
4529        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]
4530               Each time h\bha\bas\bsh\bh is invoked, the full pathname of the command _\bn_\ba_\bm_\be
4531               is  determined  by searching the directories in $\b$P\bPA\bAT\bTH\bH and remem-
4532               bered.  Any previously-remembered pathname is discarded.  If the
4533               -\b-p\bp option is supplied, no path search is performed, and _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
4534               is used as the full filename of  the  command.   The  -\b-r\br  option
4535               causes  the  shell  to  forget all remembered locations.  The -\b-d\bd
4536               option causes the shell to forget  the  remembered  location  of
4537               each  _\bn_\ba_\bm_\be.   If the -\b-t\bt option is supplied, the full pathname to
4538               which each _\bn_\ba_\bm_\be corresponds is printed.  If multiple _\bn_\ba_\bm_\be  argu-
4539               ments  are  supplied  with  -\b-t\bt,  the  _\bn_\ba_\bm_\be is printed before the
4540               hashed full pathname.  The -\b-l\bl option causes output  to  be  dis-
4541               played in a format that may be reused as input.  If no arguments
4542               are given, or if only -\b-l\bl is supplied, information  about  remem-
4543               bered  commands  is printed.  The return status is true unless a
4544               _\bn_\ba_\bm_\be is not found or an invalid option is supplied.
4545
4546        h\bhe\bel\blp\bp [-\b-d\bdm\bms\bs] [_\bp_\ba_\bt_\bt_\be_\br_\bn]
4547               Display helpful information about builtin commands.  If  _\bp_\ba_\bt_\bt_\be_\br_\bn
4548               is  specified, h\bhe\bel\blp\bp gives detailed help on all commands matching
4549               _\bp_\ba_\bt_\bt_\be_\br_\bn; otherwise help for all the builtins and  shell  control
4550               structures is printed.
4551               -\b-d\bd     Display a short description of each _\bp_\ba_\bt_\bt_\be_\br_\bn
4552               -\b-m\bm     Display the description of each _\bp_\ba_\bt_\bt_\be_\br_\bn in a manpage-like
4553                      format
4554               -\b-s\bs     Display only a short usage synopsis for each _\bp_\ba_\bt_\bt_\be_\br_\bn
4555
4556               The return status is 0 unless no command matches _\bp_\ba_\bt_\bt_\be_\br_\bn.
4557
4558        h\bhi\bis\bst\bto\bor\bry\by [\b[_\bn]\b]
4559        h\bhi\bis\bst\bto\bor\bry\by -\b-c\bc
4560        h\bhi\bis\bst\bto\bor\bry\by -\b-d\bd _\bo_\bf_\bf_\bs_\be_\bt
4561        h\bhi\bis\bst\bto\bor\bry\by -\b-a\ban\bnr\brw\bw [_\bf_\bi_\bl_\be_\bn_\ba_\bm_\be]
4562        h\bhi\bis\bst\bto\bor\bry\by -\b-p\bp _\ba_\br_\bg [_\ba_\br_\bg _\b._\b._\b.]
4563        h\bhi\bis\bst\bto\bor\bry\by -\b-s\bs _\ba_\br_\bg [_\ba_\br_\bg _\b._\b._\b.]
4564               With no options, display the command history list with line num-
4565               bers.  Lines listed with a *\b* have been modified.  An argument of
4566               _\bn lists only the last _\bn lines.  If the shell variable  H\bHI\bIS\bST\bTT\bTI\bIM\bME\bE-\b-
4567               F\bFO\bOR\bRM\bMA\bAT\bT  is  set  and not null, it is used as a format string for
4568               _\bs_\bt_\br_\bf_\bt_\bi_\bm_\be(3) to display the time stamp associated with each  dis-
4569               played  history  entry.  No intervening blank is printed between
4570               the formatted time stamp and the history line.  If  _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be  is
4571               supplied,  it  is  used as the name of the history file; if not,
4572               the value of H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE is used.  Options, if supplied,  have  the
4573               following meanings:
4574               -\b-c\bc     Clear the history list by deleting all the entries.
4575               -\b-d\bd _\bo_\bf_\bf_\bs_\be_\bt
4576                      Delete the history entry at position _\bo_\bf_\bf_\bs_\be_\bt.
4577               -\b-a\ba     Append  the  ``new'' history lines (history lines entered
4578                      since the beginning of the current b\bba\bas\bsh\bh session)  to  the
4579                      history file.
4580               -\b-n\bn     Read  the history lines not already read from the history
4581                      file into the current  history  list.   These  are  lines
4582                      appended  to  the history file since the beginning of the
4583                      current b\bba\bas\bsh\bh session.
4584               -\b-r\br     Read the contents of the history file and append them  to
4585                      the current history list.
4586               -\b-w\bw     Write the current history list to the history file, over-
4587                      writing the history file's contents.
4588               -\b-p\bp     Perform history substitution on the  following  _\ba_\br_\bg_\bs  and
4589                      display  the  result  on  the  standard output.  Does not
4590                      store the results in the history list.  Each _\ba_\br_\bg must  be
4591                      quoted to disable normal history expansion.
4592               -\b-s\bs     Store  the  _\ba_\br_\bg_\bs  in  the history list as a single entry.
4593                      The last command in the history list  is  removed  before
4594                      the _\ba_\br_\bg_\bs are added.
4595
4596               If  the  H\bHI\bIS\bST\bTT\bTI\bIM\bME\bEF\bFO\bOR\bRM\bMA\bAT\bT variable is set, the time stamp informa-
4597               tion associated with each history entry is written to  the  his-
4598               tory  file, marked with the history comment character.  When the
4599               history file is read, lines beginning with the  history  comment
4600               character  followed  immediately  by  a digit are interpreted as
4601               timestamps for the previous history line.  The return value is 0
4602               unless  an  invalid option is encountered, an error occurs while
4603               reading or writing the history file, an invalid _\bo_\bf_\bf_\bs_\be_\bt  is  sup-
4604               plied as an argument to -\b-d\bd, or the history expansion supplied as
4605               an argument to -\b-p\bp fails.
4606
4607        j\bjo\bob\bbs\bs [-\b-l\bln\bnp\bpr\brs\bs] [ _\bj_\bo_\bb_\bs_\bp_\be_\bc ... ]
4608        j\bjo\bob\bbs\bs -\b-x\bx _\bc_\bo_\bm_\bm_\ba_\bn_\bd [ _\ba_\br_\bg_\bs ... ]
4609               The first form lists the active jobs.  The options have the fol-
4610               lowing meanings:
4611               -\b-l\bl     List process IDs in addition to the normal information.
4612               -\b-n\bn     Display  information  only  about  jobs that have changed
4613                      status since the user was last notified of their  status.
4614               -\b-p\bp     List  only  the  process  ID  of  the job's process group
4615                      leader.
4616               -\b-r\br     Display only running jobs.
4617               -\b-s\bs     Display only stopped jobs.
4618
4619               If _\bj_\bo_\bb_\bs_\bp_\be_\bc is given, output is restricted to  information  about
4620               that  job.   The  return status is 0 unless an invalid option is
4621               encountered or an invalid _\bj_\bo_\bb_\bs_\bp_\be_\bc is supplied.
4622
4623               If the -\b-x\bx option is supplied, j\bjo\bob\bbs\bs replaces any _\bj_\bo_\bb_\bs_\bp_\be_\bc found in
4624               _\bc_\bo_\bm_\bm_\ba_\bn_\bd  or  _\ba_\br_\bg_\bs  with  the corresponding process group ID, and
4625               executes _\bc_\bo_\bm_\bm_\ba_\bn_\bd passing it _\ba_\br_\bg_\bs, returning its exit status.
4626
4627        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] ...
4628        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]
4629               Send the signal named by _\bs_\bi_\bg_\bs_\bp_\be_\bc  or  _\bs_\bi_\bg_\bn_\bu_\bm  to  the  processes
4630               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
4631               signal name such as S\bSI\bIG\bGK\bKI\bIL\bLL\bL (with or without the S\bSI\bIG\bG prefix)  or
4632               a  signal  number; _\bs_\bi_\bg_\bn_\bu_\bm is a signal number.  If _\bs_\bi_\bg_\bs_\bp_\be_\bc is not
4633               present, then S\bSI\bIG\bGT\bTE\bER\bRM\bM is assumed.  An argument of -\b-l\bl  lists  the
4634               signal  names.   If any arguments are supplied when -\b-l\bl is given,
4635               the names of the signals  corresponding  to  the  arguments  are
4636               listed, and the return status is 0.  The _\be_\bx_\bi_\bt_\b__\bs_\bt_\ba_\bt_\bu_\bs argument to
4637               -\b-l\bl is a number specifying either a signal  number  or  the  exit
4638               status  of  a process terminated by a signal.  k\bki\bil\bll\bl returns true
4639               if at least one signal was successfully sent,  or  false  if  an
4640               error occurs or an invalid option is encountered.
4641
4642        l\ble\bet\bt _\ba_\br_\bg [_\ba_\br_\bg ...]
4643               Each _\ba_\br_\bg is an arithmetic expression to be evaluated (see A\bAR\bRI\bIT\bTH\bH-\b-
4644               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
4645               returns 1; 0 is returned otherwise.
4646
4647        l\blo\boc\bca\bal\bl [_\bo_\bp_\bt_\bi_\bo_\bn] [_\bn_\ba_\bm_\be[=_\bv_\ba_\bl_\bu_\be] ...]
4648               For  each  argument, a local variable named _\bn_\ba_\bm_\be is created, and
4649               assigned _\bv_\ba_\bl_\bu_\be.  The _\bo_\bp_\bt_\bi_\bo_\bn can be any of the  options  accepted
4650               by d\bde\bec\bcl\bla\bar\bre\be.  When l\blo\boc\bca\bal\bl is used within a function, it causes the
4651               variable _\bn_\ba_\bm_\be to have a visible scope restricted to  that  func-
4652               tion and its children.  With no operands, l\blo\boc\bca\bal\bl writes a list of
4653               local variables to the standard output.  It is an error  to  use
4654               l\blo\boc\bca\bal\bl when not within a function.  The return status is 0 unless
4655               l\blo\boc\bca\bal\bl is used outside a function, an invalid _\bn_\ba_\bm_\be  is  supplied,
4656               or _\bn_\ba_\bm_\be is a readonly variable.
4657
4658        l\blo\bog\bgo\bou\but\bt Exit a login shell.
4659
4660        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]
4661        [-\b-c\bc _\bq_\bu_\ba_\bn_\bt_\bu_\bm] [_\ba_\br_\br_\ba_\by]
4662        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]
4663        [-\b-c\bc _\bq_\bu_\ba_\bn_\bt_\bu_\bm] [_\ba_\br_\br_\ba_\by]
4664               Read  lines from the standard input into the indexed array vari-
4665               able _\ba_\br_\br_\ba_\by, or from file descriptor _\bf_\bd if the -\b-u\bu option is  sup-
4666               plied.   The variable M\bMA\bAP\bPF\bFI\bIL\bLE\bE is the default _\ba_\br_\br_\ba_\by.  Options, if
4667               supplied, have the following meanings:
4668               -\b-n\bn     Copy at most _\bc_\bo_\bu_\bn_\bt lines.  If _\bc_\bo_\bu_\bn_\bt is 0, all  lines  are
4669                      copied.
4670               -\b-O\bO     Begin  assigning  to  _\ba_\br_\br_\ba_\by at index _\bo_\br_\bi_\bg_\bi_\bn.  The default
4671                      index is 0.
4672               -\b-s\bs     Discard the first _\bc_\bo_\bu_\bn_\bt lines read.
4673               -\b-t\bt     Remove a trailing newline from each line read.
4674               -\b-u\bu     Read lines from file descriptor _\bf_\bd instead of  the  stan-
4675                      dard input.
4676               -\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
4677                      -\b-c\bc option specifies _\bq_\bu_\ba_\bn_\bt_\bu_\bm.
4678               -\b-c\bc     Specify the number of lines read  between  each  call  to
4679                      _\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk.
4680
4681               If  -\b-C\bC  is  specified  without  -\b-c\bc, the default quantum is 5000.
4682               When _\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk is evaluated, it is supplied the index of the next
4683               array element to be assigned and the line to be assigned to that
4684               element as additional arguments.  _\bc_\ba_\bl_\bl_\bb_\ba_\bc_\bk  is  evaluated  after
4685               the line is read but before the array element is assigned.
4686
4687               If  not  supplied  with  an  explicit origin, m\bma\bap\bpf\bfi\bil\ble\be will clear
4688               _\ba_\br_\br_\ba_\by before assigning to it.
4689
4690               m\bma\bap\bpf\bfi\bil\ble\be returns successfully unless an invalid option or  option
4691               argument  is  supplied,  _\ba_\br_\br_\ba_\by is invalid or unassignable, or if
4692               _\ba_\br_\br_\ba_\by is not an indexed array.
4693
4694        p\bpo\bop\bpd\bd [-n\bn] [+_\bn] [-_\bn]
4695               Removes entries from the directory stack.   With  no  arguments,
4696               removes  the  top directory from the stack, and performs a c\bcd\bd to
4697               the new top directory.  Arguments, if supplied, have the follow-
4698               ing meanings:
4699               -\b-n\bn     Suppresses  the  normal change of directory when removing
4700                      directories from the stack, so that  only  the  stack  is
4701                      manipulated.
4702               +\b+_\bn     Removes  the _\bnth entry counting from the left of the list
4703                      shown by d\bdi\bir\brs\bs, starting with zero.  For  example:  ``popd
4704                      +0'' removes the first directory, ``popd +1'' the second.
4705               -\b-_\bn     Removes the _\bnth entry counting from the right of the list
4706                      shown  by  d\bdi\bir\brs\bs, starting with zero.  For example: ``popd
4707                      -0'' removes the last directory, ``popd -1'' the next  to
4708                      last.
4709
4710               If  the p\bpo\bop\bpd\bd command is successful, a d\bdi\bir\brs\bs is performed as well,
4711               and the return status is 0.  p\bpo\bop\bpd\bd returns false  if  an  invalid
4712               option is encountered, the directory stack is empty, a non-exis-
4713               tent directory stack entry is specified, or the directory change
4714               fails.
4715
4716        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]
4717               Write  the  formatted _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs to the standard output under the
4718               control of the _\bf_\bo_\br_\bm_\ba_\bt.  The -\b-v\bv option causes the  output  to  be
4719               assigned  to  the  variable _\bv_\ba_\br rather than being printed to the
4720               standard output.
4721
4722               The _\bf_\bo_\br_\bm_\ba_\bt is a character string which contains three  types  of
4723               objects:  plain  characters, which are simply copied to standard
4724               output, character escape  sequences,  which  are  converted  and
4725               copied  to  the standard output, and format specifications, each
4726               of which causes printing of the next  successive  _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt.   In
4727               addition to the standard _\bp_\br_\bi_\bn_\bt_\bf(1) format specifications, p\bpr\bri\bin\bnt\btf\bf
4728               interprets the following extensions:
4729               %\b%b\bb     causes p\bpr\bri\bin\bnt\btf\bf to expand backslash escape sequences in the
4730                      corresponding _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt (except that \\b\c\bc terminates output,
4731                      backslashes in \\b\'\b', \\b\"\b", and \\b\?\b? are not removed, and  octal
4732                      escapes beginning with \\b\0\b0 may contain up to four digits).
4733               %\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
4734                      format that can be reused as shell input.
4735               %\b%(\b(_\bd_\ba_\bt_\be_\bf_\bm_\bt)\b)T\bT
4736                      causes  p\bpr\bri\bin\bnt\btf\bf  to  output the date-time string resulting
4737                      from using _\bd_\ba_\bt_\be_\bf_\bm_\bt as a format  string  for  _\bs_\bt_\br_\bf_\bt_\bi_\bm_\be(3).
4738                      The corresponding _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt is an integer representing the
4739                      number of seconds since the epoch.  Two special  argument
4740                      values  may  be used: -1 represents the current time, and
4741                      -2 represents the time the  shell  was  invoked.   If  no
4742                      argument  is  specified,  conversion behaves as if -1 had
4743                      been given.  This is an exception  to  the  usual  p\bpr\bri\bin\bnt\btf\bf
4744                      behavior.
4745
4746               Arguments  to non-string format specifiers are treated as C con-
4747               stants, except that a leading plus or minus sign is allowed, and
4748               if  the leading character is a single or double quote, the value
4749               is the ASCII value of the following character.
4750
4751               The _\bf_\bo_\br_\bm_\ba_\bt is reused as necessary to consume all  of  the  _\ba_\br_\bg_\bu_\b-
4752               _\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,
4753               the extra format specifications behave as if  a  zero  value  or
4754               null  string,  as  appropriate,  had  been supplied.  The return
4755               value is zero on success, non-zero on failure.
4756
4757        p\bpu\bus\bsh\bhd\bd [-\b-n\bn] [+_\bn] [-_\bn]
4758        p\bpu\bus\bsh\bhd\bd [-\b-n\bn] [_\bd_\bi_\br]
4759               Adds a directory to the top of the directory stack,  or  rotates
4760               the  stack,  making the new top of the stack the current working
4761               directory.  With no arguments, exchanges the top two directories
4762               and  returns 0, unless the directory stack is empty.  Arguments,
4763               if supplied, have the following meanings:
4764               -\b-n\bn     Suppresses the normal change  of  directory  when  adding
4765                      directories  to  the  stack,  so  that  only the stack is
4766                      manipulated.
4767               +\b+_\bn     Rotates the stack so that  the  _\bnth  directory  (counting
4768                      from  the  left  of the list shown by d\bdi\bir\brs\bs, starting with
4769                      zero) is at the top.
4770               -\b-_\bn     Rotates the stack so that  the  _\bnth  directory  (counting
4771                      from  the  right of the list shown by d\bdi\bir\brs\bs, starting with
4772                      zero) is at the top.
4773               _\bd_\bi_\br    Adds _\bd_\bi_\br to the directory stack at the top, making it the
4774                      new  current working directory as if it had been supplied
4775                      as the argument to the c\bcd\bd builtin.
4776
4777               If the p\bpu\bus\bsh\bhd\bd command is successful, a d\bdi\bir\brs\bs is performed as well.
4778               If  the first form is used, p\bpu\bus\bsh\bhd\bd returns 0 unless the cd to _\bd_\bi_\br
4779               fails.  With the second form, p\bpu\bus\bsh\bhd\bd returns 0 unless the  direc-
4780               tory  stack  is empty, a non-existent directory stack element is
4781               specified, or the directory change to the specified new  current
4782               directory fails.
4783
4784        p\bpw\bwd\bd [-\b-L\bLP\bP]
4785               Print  the  absolute  pathname of the current working directory.
4786               The pathname printed contains no symbolic links if the -\b-P\bP option
4787               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
4788               is enabled.  If the -\b-L\bL option is used, the pathname printed  may
4789               contain  symbolic links.  The return status is 0 unless an error
4790               occurs while reading the name of the  current  directory  or  an
4791               invalid option is supplied.
4792
4793        r\bre\bea\bad\bd [-\b-e\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
4794        _\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 ...]
4795               One  line  is  read  from  the  standard input, or from the file
4796               descriptor _\bf_\bd supplied as an argument to the -\b-u\bu option, and  the
4797               first word is assigned to the first _\bn_\ba_\bm_\be, the second word to the
4798               second _\bn_\ba_\bm_\be, and so on, with leftover words and their  interven-
4799               ing  separators  assigned  to the last _\bn_\ba_\bm_\be.  If there are fewer
4800               words read from the input stream than names, the remaining names
4801               are  assigned  empty  values.  The characters in I\bIF\bFS\bS are used to
4802               split the line into words using the same rules  the  shell  uses
4803               for expansion (described above under W\bWo\bor\brd\bd S\bSp\bpl\bli\bit\btt\bti\bin\bng\bg).  The back-
4804               slash character (\\b\) may be used to remove  any  special  meaning
4805               for the next character read and for line continuation.  Options,
4806               if supplied, have the following meanings:
4807               -\b-a\ba _\ba_\bn_\ba_\bm_\be
4808                      The words are assigned to sequential indices of the array
4809                      variable _\ba_\bn_\ba_\bm_\be, starting at 0.  _\ba_\bn_\ba_\bm_\be is unset before any
4810                      new  values  are  assigned.   Other  _\bn_\ba_\bm_\be  arguments  are
4811                      ignored.
4812               -\b-d\bd _\bd_\be_\bl_\bi_\bm
4813                      The  first  character  of  _\bd_\be_\bl_\bi_\bm is used to terminate the
4814                      input line, rather than newline.
4815               -\b-e\be     If the standard input is coming from a terminal, r\bre\bea\bad\bdl\bli\bin\bne\be
4816                      (see  R\bRE\bEA\bAD\bDL\bLI\bIN\bNE\bE  above) is used to obtain the line.  Read-
4817                      line uses the current (or default, if  line  editing  was
4818                      not previously active) editing settings.
4819               -\b-i\bi _\bt_\be_\bx_\bt
4820                      If  r\bre\bea\bad\bdl\bli\bin\bne\be  is  being  used  to  read the line, _\bt_\be_\bx_\bt is
4821                      placed into the editing buffer before editing begins.
4822               -\b-n\bn _\bn_\bc_\bh_\ba_\br_\bs
4823                      r\bre\bea\bad\bd returns after reading _\bn_\bc_\bh_\ba_\br_\bs characters rather  than
4824                      waiting  for a complete line of input, but honor a delim-
4825                      iter if fewer than _\bn_\bc_\bh_\ba_\br_\bs characters are read before  the
4826                      delimiter.
4827               -\b-N\bN _\bn_\bc_\bh_\ba_\br_\bs
4828                      r\bre\bea\bad\bd  returns  after  reading  exactly  _\bn_\bc_\bh_\ba_\br_\bs characters
4829                      rather than waiting for a complete line of input,  unless
4830                      EOF  is encountered or r\bre\bea\bad\bd times out.  Delimiter charac-
4831                      ters encountered in the input are not  treated  specially
4832                      and  do  not cause r\bre\bea\bad\bd to return until _\bn_\bc_\bh_\ba_\br_\bs characters
4833                      are read.
4834               -\b-p\bp _\bp_\br_\bo_\bm_\bp_\bt
4835                      Display _\bp_\br_\bo_\bm_\bp_\bt on standard error, without a trailing new-
4836                      line, before attempting to read any input.  The prompt is
4837                      displayed only if input is coming from a terminal.
4838               -\b-r\br     Backslash does not act as an escape character.  The back-
4839                      slash  is considered to be part of the line.  In particu-
4840                      lar, a backslash-newline pair may not be used as  a  line
4841                      continuation.
4842               -\b-s\bs     Silent mode.  If input is coming from a terminal, charac-
4843                      ters are not echoed.
4844               -\b-t\bt _\bt_\bi_\bm_\be_\bo_\bu_\bt
4845                      Cause r\bre\bea\bad\bd to time out and return failure if  a  complete
4846                      line  of  input  (or a specified number of characters) is
4847                      not read within _\bt_\bi_\bm_\be_\bo_\bu_\bt seconds.  _\bt_\bi_\bm_\be_\bo_\bu_\bt may be a  deci-
4848                      mal  number with a fractional portion following the deci-
4849                      mal point.  This option is  only  effective  if  r\bre\bea\bad\bd  is
4850                      reading  input  from  a  terminal, pipe, or other special
4851                      file; it has no effect when reading from  regular  files.
4852                      If r\bre\bea\bad\bd times out, r\bre\bea\bad\bd saves any partial input read into
4853                      the specified variable  _\bn_\ba_\bm_\be.   If  _\bt_\bi_\bm_\be_\bo_\bu_\bt  is  0,  r\bre\bea\bad\bd
4854                      returns  immediately,  without  trying  to read any data.
4855                      The exit status is 0 if input is available on the  speci-
4856                      fied  file descriptor, non-zero otherwise.  The exit sta-
4857                      tus is greater than 128 if the timeout is exceeded.
4858               -\b-u\bu _\bf_\bd  Read input from file descriptor _\bf_\bd.
4859
4860               If no _\bn_\ba_\bm_\be_\bs are supplied, the line read is assigned to the vari-
4861               able  R\bRE\bEP\bPL\bLY\bY.   The  return  code  is zero, unless end-of-file is
4862               encountered, r\bre\bea\bad\bd times out (in which case the  return  code  is
4863               greater  than 128), a variable assignment error (such as assign-
4864               ing to a readonly variable) occurs, or an invalid file  descrip-
4865               tor is supplied as the argument to -\b-u\bu.
4866
4867        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] ...]
4868               The  given  _\bn_\ba_\bm_\be_\bs are marked readonly; the values of these _\bn_\ba_\bm_\be_\bs
4869               may not be changed by subsequent assignment.  If the  -\b-f\bf  option
4870               is  supplied,  the  functions  corresponding to the _\bn_\ba_\bm_\be_\bs are so
4871               marked.  The  -\b-a\ba  option  restricts  the  variables  to  indexed
4872               arrays;  the  -\b-A\bA  option  restricts the variables to associative
4873               arrays.  If both options are supplied, -\b-A\bA takes precedence.   If
4874               no  _\bn_\ba_\bm_\be arguments are given, or if the -\b-p\bp option is supplied, a
4875               list of all readonly names is printed.  The other options may be
4876               used  to  restrict the output to a subset of the set of readonly
4877               names.  The -\b-p\bp option causes output to be displayed in a  format
4878               that  may be reused as input.  If a variable name is followed by
4879               =_\bw_\bo_\br_\bd, the value of the variable is set  to  _\bw_\bo_\br_\bd.   The  return
4880               status  is 0 unless an invalid option is encountered, one of the
4881               _\bn_\ba_\bm_\be_\bs is not a valid shell variable name, or -\b-f\bf is supplied with
4882               a _\bn_\ba_\bm_\be that is not a function.
4883
4884        r\bre\bet\btu\bur\brn\bn [_\bn]
4885               Causes  a function to stop executing and return the value speci-
4886               fied by _\bn to its caller.  If _\bn is omitted, the return status  is
4887               that  of  the  last  command  executed in the function body.  If
4888               r\bre\bet\btu\bur\brn\bn is used outside a function, but  during  execution  of  a
4889               script  by  the .\b.  (s\bso\bou\bur\brc\bce\be) command, it causes the shell to stop
4890               executing that script and return either _\bn or the exit status  of
4891               the  last  command executed within the script as the exit status
4892               of the script.  If _\bn is supplied, the return value is its  least
4893               significant  8 bits.  The return status is non-zero if r\bre\bet\btu\bur\brn\bn is
4894               supplied a non-numeric argument, or is used outside  a  function
4895               and  not  during execution of a script by .\b. or s\bso\bou\bur\brc\bce\be.  Any com-
4896               mand associated with the R\bRE\bET\bTU\bUR\bRN\bN trap is executed  before  execu-
4897               tion resumes after the function or script.
4898
4899        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 ...]
4900        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 ...]
4901               Without  options,  the name and value of each shell variable are
4902               displayed in a format that can be reused as input for setting or
4903               resetting the currently-set variables.  Read-only variables can-
4904               not be reset.  In _\bp_\bo_\bs_\bi_\bx mode, only shell variables  are  listed.
4905               The  output  is  sorted  according  to the current locale.  When
4906               options are specified, they set or unset shell attributes.   Any
4907               arguments  remaining after option processing are treated as val-
4908               ues for the positional parameters and are assigned, in order, to
4909               $\b$1\b1,  $\b$2\b2,  .\b..\b..\b.   $\b$_\bn.   Options,  if specified, have the following
4910               meanings:
4911               -\b-a\ba      Automatically mark variables  and  functions  which  are
4912                       modified  or  created  for  export to the environment of
4913                       subsequent commands.
4914               -\b-b\bb      Report the status of terminated background jobs  immedi-
4915                       ately, rather than before the next primary prompt.  This
4916                       is effective only when job control is enabled.
4917               -\b-e\be      Exit immediately if a _\bp_\bi_\bp_\be_\bl_\bi_\bn_\be (which may consist  of  a
4918                       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
4919                       (see S\bSH\bHE\bEL\bLL\bL G\bGR\bRA\bAM\bMM\bMA\bAR\bR above),  exits with a  non-zero  sta-
4920                       tus.   The shell does not exit if the command that fails
4921                       is part of the  command  list  immediately  following  a
4922                       w\bwh\bhi\bil\ble\be  or  u\bun\bnt\bti\bil\bl keyword, part of the test following the
4923                       i\bif\bf or e\bel\bli\bif\bf reserved words, part of any command  executed
4924                       in  a  &\b&&\b&  or  |\b||\b|  list except the command following the
4925                       final &\b&&\b& or |\b||\b|, any command in a pipeline but the  last,
4926                       or  if the command's return value is being inverted with
4927                       !\b!.  If a compound command other than a subshell  returns
4928                       a  non-zero status because a command failed while -\b-e\be was
4929                       being ignored, the shell does not exit.  A trap on  E\bER\bRR\bR,
4930                       if set, is executed before the shell exits.  This option
4931                       applies to the shell environment and each subshell envi-
4932                       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
4933                       above), and may cause subshells to exit before executing
4934                       all the commands in the subshell.
4935
4936                       If  a  compound  command or shell function executes in a
4937                       context where -\b-e\be is being ignored, none of the  commands
4938                       executed  within  the  compound command or function body
4939                       will be affected by the -\b-e\be setting, even if  -\b-e\be  is  set
4940                       and  a  command returns a failure status.  If a compound
4941                       command or shell function sets -\b-e\be while executing  in  a
4942                       context  where -\b-e\be is ignored, that setting will not have
4943                       any effect until the compound  command  or  the  command
4944                       containing the function call completes.
4945               -\b-f\bf      Disable pathname expansion.
4946               -\b-h\bh      Remember  the location of commands as they are looked up
4947                       for execution.  This is enabled by default.
4948               -\b-k\bk      All arguments in the form of assignment  statements  are
4949                       placed  in the environment for a command, not just those
4950                       that precede the command name.
4951               -\b-m\bm      Monitor mode.  Job control is enabled.  This  option  is
4952                       on  by  default  for  interactive shells on systems that
4953                       support it (see J\bJO\bOB\bB C\bCO\bON\bNT\bTR\bRO\bOL\bL above).  All  processes  run
4954                       in a separate process group.  When a background job com-
4955                       pletes, the shell prints a line containing its exit sta-
4956                       tus.
4957               -\b-n\bn      Read commands but do not execute them.  This may be used
4958                       to check a shell script  for  syntax  errors.   This  is
4959                       ignored by interactive shells.
4960               -\b-o\bo _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be
4961                       The _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be can be one of the following:
4962                       a\bal\bll\ble\bex\bxp\bpo\bor\brt\bt
4963                               Same as -\b-a\ba.
4964                       b\bbr\bra\bac\bce\bee\bex\bxp\bpa\ban\bnd\bd
4965                               Same as -\b-B\bB.
4966                       e\bem\bma\bac\bcs\bs   Use  an  emacs-style command line editing inter-
4967                               face.  This is enabled by default when the shell
4968                               is interactive, unless the shell is started with
4969                               the -\b--\b-n\bno\boe\bed\bdi\bit\bti\bin\bng\bg option.  This also  affects  the
4970                               editing interface used for r\bre\bea\bad\bd -\b-e\be.
4971                       e\ber\brr\bre\bex\bxi\bit\bt Same as -\b-e\be.
4972                       e\ber\brr\brt\btr\bra\bac\bce\be
4973                               Same as -\b-E\bE.
4974                       f\bfu\bun\bnc\bct\btr\bra\bac\bce\be
4975                               Same as -\b-T\bT.
4976                       h\bha\bas\bsh\bha\bal\bll\bl Same as -\b-h\bh.
4977                       h\bhi\bis\bst\bte\bex\bxp\bpa\ban\bnd\bd
4978                               Same as -\b-H\bH.
4979                       h\bhi\bis\bst\bto\bor\bry\by Enable command history, as described above under
4980                               H\bHI\bIS\bST\bTO\bOR\bRY\bY.  This option is on by default in inter-
4981                               active shells.
4982                       i\big\bgn\bno\bor\bre\bee\beo\bof\bf
4983                               The   effect   is   as   if  the  shell  command
4984                               ``IGNOREEOF=10'' had been  executed  (see  S\bSh\bhe\bel\bll\bl
4985                               V\bVa\bar\bri\bia\bab\bbl\ble\bes\bs above).
4986                       k\bke\bey\byw\bwo\bor\brd\bd Same as -\b-k\bk.
4987                       m\bmo\bon\bni\bit\bto\bor\br Same as -\b-m\bm.
4988                       n\bno\boc\bcl\blo\bob\bbb\bbe\ber\br
4989                               Same as -\b-C\bC.
4990                       n\bno\boe\bex\bxe\bec\bc  Same as -\b-n\bn.
4991                       n\bno\bog\bgl\blo\bob\bb  Same as -\b-f\bf.
4992                       n\bno\bol\blo\bog\bg   Currently ignored.
4993                       n\bno\bot\bti\bif\bfy\by  Same as -\b-b\bb.
4994                       n\bno\bou\bun\bns\bse\bet\bt Same as -\b-u\bu.
4995                       o\bon\bne\bec\bcm\bmd\bd  Same as -\b-t\bt.
4996                       p\bph\bhy\bys\bsi\bic\bca\bal\bl
4997                               Same as -\b-P\bP.
4998                       p\bpi\bip\bpe\bef\bfa\bai\bil\bl
4999                               If  set,  the  return value of a pipeline is the
5000                               value of the last (rightmost)  command  to  exit
5001                               with  a non-zero status, or zero if all commands
5002                               in the pipeline exit successfully.  This  option
5003                               is disabled by default.
5004                       p\bpo\bos\bsi\bix\bx   Change  the  behavior  of b\bba\bas\bsh\bh where the default
5005                               operation differs from  the  POSIX  standard  to
5006                               match  the  standard (_\bp_\bo_\bs_\bi_\bx _\bm_\bo_\bd_\be).  See S\bSE\bEE\bE A\bAL\bLS\bSO\bO
5007                               below for a reference to a document that details
5008                               how posix mode affects bash's behavior.
5009                       p\bpr\bri\biv\bvi\bil\ble\beg\bge\bed\bd
5010                               Same as -\b-p\bp.
5011                       v\bve\ber\brb\bbo\bos\bse\be Same as -\b-v\bv.
5012                       v\bvi\bi      Use  a  vi-style command line editing interface.
5013                               This also affects the editing interface used for
5014                               r\bre\bea\bad\bd -\b-e\be.
5015                       x\bxt\btr\bra\bac\bce\be  Same as -\b-x\bx.
5016                       If -\b-o\bo is supplied with no _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be, the values of the
5017                       current options are printed.  If +\b+o\bo is supplied with  no
5018                       _\bo_\bp_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be,  a  series  of s\bse\bet\bt commands to recreate the
5019                       current option settings is  displayed  on  the  standard
5020                       output.
5021               -\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
5022                       $\b$B\bBA\bAS\bSH\bH_\b_E\bEN\bNV\bV files are not processed, shell  functions  are
5023                       not  inherited  from the environment, and the S\bSH\bHE\bEL\bLL\bLO\bOP\bPT\bTS\bS,
5024                       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
5025                       appear in the environment, are ignored.  If the shell is
5026                       started with the effective user (group) id not equal  to
5027                       the  real user (group) id, and the -\b-p\bp option is not sup-
5028                       plied, these actions are taken and the effective user id
5029                       is  set  to  the real user id.  If the -\b-p\bp option is sup-
5030                       plied at startup, the effective user id  is  not  reset.
5031                       Turning  this  option  off causes the effective user and
5032                       group ids to be set to the real user and group ids.
5033               -\b-t\bt      Exit after reading and executing one command.
5034               -\b-u\bu      Treat unset variables and parameters other than the spe-
5035                       cial  parameters "@" and "*" as an error when performing
5036                       parameter expansion.  If expansion is  attempted  on  an
5037                       unset  variable  or parameter, the shell prints an error
5038                       message, and, if not interactive, exits with a  non-zero
5039                       status.
5040               -\b-v\bv      Print shell input lines as they are read.
5041               -\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
5042                       command, s\bse\bel\ble\bec\bct\bt command, or arithmetic f\bfo\bor\br command, dis-
5043                       play  the expanded value of P\bPS\bS4\b4, followed by the command
5044                       and its expanded arguments or associated word list.
5045               -\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
5046                       above).  This is on by default.
5047               -\b-C\bC      If  set,  b\bba\bas\bsh\bh  does not overwrite an existing file with
5048                       the >\b>, >\b>&\b&, and <\b<>\b> redirection operators.   This  may  be
5049                       overridden when creating output files by using the redi-
5050                       rection operator >\b>|\b| instead of >\b>.
5051               -\b-E\bE      If set, any trap on E\bER\bRR\bR is inherited by shell functions,
5052                       command  substitutions,  and commands executed in a sub-
5053                       shell environment.  The E\bER\bRR\bR trap is normally not  inher-
5054                       ited in such cases.
5055               -\b-H\bH      Enable !\b!  style history substitution.  This option is on
5056                       by default when the shell is interactive.
5057               -\b-P\bP      If set, the shell does not resolve symbolic  links  when
5058                       executing  commands  such  as c\bcd\bd that change the current
5059                       working  directory.   It  uses  the  physical  directory
5060                       structure instead.  By default, b\bba\bas\bsh\bh follows the logical
5061                       chain of  directories  when  performing  commands  which
5062                       change the current directory.
5063               -\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
5064                       shell functions,  command  substitutions,  and  commands
5065                       executed  in  a  subshell  environment.   The  D\bDE\bEB\bBU\bUG\bG and
5066                       R\bRE\bET\bTU\bUR\bRN\bN traps are normally not inherited in such cases.
5067               -\b--\b-      If no arguments follow this option, then the  positional
5068                       parameters are unset.  Otherwise, the positional parame-
5069                       ters are set to the _\ba_\br_\bgs, even if  some  of  them  begin
5070                       with a -\b-.
5071               -\b-       Signal  the  end of options, cause all remaining _\ba_\br_\bgs to
5072                       be assigned to the positional parameters.  The -\b-x\bx and -\b-v\bv
5073                       options are turned off.  If there are no _\ba_\br_\bgs, the posi-
5074                       tional parameters remain unchanged.
5075
5076               The options are off by default unless otherwise noted.  Using  +
5077               rather  than  -  causes  these  options  to  be turned off.  The
5078               options can also be specified as arguments to an  invocation  of
5079               the  shell.  The current set of options may be found in $\b$-\b-.  The
5080               return status is always true unless an invalid option is encoun-
5081               tered.
5082
5083        s\bsh\bhi\bif\bft\bt [_\bn]
5084               The  positional  parameters  from _\bn+1 ... are renamed to $\b$1\b1 .\b..\b..\b..\b.
5085               Parameters represented by the numbers  $\b$#\b#  down  to  $\b$#\b#-_\bn+1  are
5086               unset.   _\bn  must  be a non-negative number less than or equal to
5087               $\b$#\b#.  If _\bn is 0, no parameters are changed.  If _\bn is  not  given,
5088               it  is assumed to be 1.  If _\bn is greater than $\b$#\b#, the positional
5089               parameters are not changed.  The return status is  greater  than
5090               zero if _\bn is greater than $\b$#\b# or less than zero; otherwise 0.
5091
5092        s\bsh\bho\bop\bpt\bt [-\b-p\bpq\bqs\bsu\bu] [-\b-o\bo] [_\bo_\bp_\bt_\bn_\ba_\bm_\be ...]
5093               Toggle  the values of settings controlling optional shell behav-
5094               ior.  The settings can be either those listed below, or, if  the
5095               -\b-o\bo option is used, those available with the -\b-o\bo option to the s\bse\bet\bt
5096               builtin command.  With no options, or with the -\b-p\bp option, a list
5097               of  all  settable  options  is  displayed, with an indication of
5098               whether or not each is set.  The -\b-p\bp option causes output  to  be
5099               displayed  in a form that may be reused as input.  Other options
5100               have the following meanings:
5101               -\b-s\bs     Enable (set) each _\bo_\bp_\bt_\bn_\ba_\bm_\be.
5102               -\b-u\bu     Disable (unset) each _\bo_\bp_\bt_\bn_\ba_\bm_\be.
5103               -\b-q\bq     Suppresses normal output (quiet mode); the return  status
5104                      indicates whether the _\bo_\bp_\bt_\bn_\ba_\bm_\be is set or unset.  If multi-
5105                      ple _\bo_\bp_\bt_\bn_\ba_\bm_\be arguments are given with -\b-q\bq, the return  sta-
5106                      tus  is zero if all _\bo_\bp_\bt_\bn_\ba_\bm_\be_\bs are enabled; non-zero other-
5107                      wise.
5108               -\b-o\bo     Restricts the values of _\bo_\bp_\bt_\bn_\ba_\bm_\be to be those  defined  for
5109                      the -\b-o\bo option to the s\bse\bet\bt builtin.
5110
5111               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
5112               shows only those options which are set or  unset,  respectively.
5113               Unless  otherwise  noted, the s\bsh\bho\bop\bpt\bt options are disabled (unset)
5114               by default.
5115
5116               The return status when listing options is zero if  all  _\bo_\bp_\bt_\bn_\ba_\bm_\be_\bs
5117               are  enabled,  non-zero  otherwise.   When  setting or unsetting
5118               options, the return status is zero unless an _\bo_\bp_\bt_\bn_\ba_\bm_\be  is  not  a
5119               valid shell option.
5120
5121               The list of s\bsh\bho\bop\bpt\bt options is:
5122
5123               a\bau\but\bto\boc\bcd\bd  If  set,  a command name that is the name of a directory
5124                       is executed as if it were the argument to  the  c\bcd\bd  com-
5125                       mand.  This option is only used by interactive shells.
5126               c\bcd\bda\bab\bbl\ble\be_\b_v\bva\bar\brs\bs
5127                       If  set,  an  argument to the c\bcd\bd builtin command that is
5128                       not a directory is assumed to be the name of a  variable
5129                       whose value is the directory to change to.
5130               c\bcd\bds\bsp\bpe\bel\bll\bl If set, minor errors in the spelling of a directory com-
5131                       ponent in a c\bcd\bd command will be  corrected.   The  errors
5132                       checked for are transposed characters, a missing charac-
5133                       ter, and one character too many.   If  a  correction  is
5134                       found,  the  corrected filename is printed, and the com-
5135                       mand proceeds.  This option is only used by  interactive
5136                       shells.
5137               c\bch\bhe\bec\bck\bkh\bha\bas\bsh\bh
5138                       If set, b\bba\bas\bsh\bh checks that a command found in the hash ta-
5139                       ble exists before trying to execute  it.   If  a  hashed
5140                       command  no  longer exists, a normal path search is per-
5141                       formed.
5142               c\bch\bhe\bec\bck\bkj\bjo\bob\bbs\bs
5143                       If set, b\bba\bas\bsh\bh lists the status of any stopped and running
5144                       jobs  before  exiting an interactive shell.  If any jobs
5145                       are running, this causes the exit to be deferred until a
5146                       second  exit is attempted without an intervening command
5147                       (see J\bJO\bOB\bB C\bCO\bON\bNT\bTR\bRO\bOL\bL above).   The  shell  always  postpones
5148                       exiting if any jobs are stopped.
5149               c\bch\bhe\bec\bck\bkw\bwi\bin\bns\bsi\biz\bze\be
5150                       If  set,  b\bba\bas\bsh\bh checks the window size after each command
5151                       and, if necessary, updates the values of L\bLI\bIN\bNE\bES\bS and  C\bCO\bOL\bL-\b-
5152                       U\bUM\bMN\bNS\bS.
5153               c\bcm\bmd\bdh\bhi\bis\bst\bt If  set,  b\bba\bas\bsh\bh attempts to save all lines of a multiple-
5154                       line command in the same  history  entry.   This  allows
5155                       easy re-editing of multi-line commands.
5156               c\bco\bom\bmp\bpa\bat\bt3\b31\b1
5157                       If set, b\bba\bas\bsh\bh changes its behavior to that of version 3.1
5158                       with respect to quoted arguments to the  [\b[[\b[  conditional
5159                       command's =\b=~\b~ operator and locale-specific string compar-
5160                       ison when using the [\b[[\b[ conditional  command's  <\b<  and  >\b>
5161                       operators.   Bash  versions  prior to bash-4.1 use ASCII
5162                       collation and _\bs_\bt_\br_\bc_\bm_\bp(3); bash-4.1 and later use the cur-
5163                       rent locale's collation sequence and _\bs_\bt_\br_\bc_\bo_\bl_\bl(3).
5164               c\bco\bom\bmp\bpa\bat\bt3\b32\b2
5165                       If set, b\bba\bas\bsh\bh changes its behavior to that of version 3.2
5166                       with respect to locale-specific string  comparison  when
5167                       using  the  [\b[[\b[  conditional  command's <\b< and >\b> operators
5168                       (see previous item).
5169               c\bco\bom\bmp\bpa\bat\bt4\b40\b0
5170                       If set, b\bba\bas\bsh\bh changes its behavior to that of version 4.0
5171                       with  respect  to locale-specific string comparison when
5172                       using the [\b[[\b[ conditional command's  <\b<  and  >\b>  operators
5173                       (see  description  of c\bco\bom\bmp\bpa\bat\bt3\b31\b1) and the effect of inter-
5174                       rupting a command list.  Bash  versions  4.0  and  later
5175                       interrupt  the  list as if the shell received the inter-
5176                       rupt; previous versions continue with the  next  command
5177                       in the list.
5178               c\bco\bom\bmp\bpa\bat\bt4\b41\b1
5179                       If  set, b\bba\bas\bsh\bh, when in _\bp_\bo_\bs_\bi_\bx mode, treats a single quote
5180                       in a double-quoted  parameter  expansion  as  a  special
5181                       character.   The  single quotes must match (an even num-
5182                       ber) and the characters between the  single  quotes  are
5183                       considered  quoted.   This is the behavior of posix mode
5184                       through version 4.1.  The default bash behavior  remains
5185                       as in previous versions.
5186               c\bco\bom\bmp\bpa\bat\bt4\b42\b2
5187                       If  set, b\bba\bas\bsh\bh does not process the replacement string in
5188                       the pattern  substitution  word  expansion  using  quote
5189                       removal.
5190               c\bco\bom\bmp\bpl\ble\bet\bte\be_\b_f\bfu\bul\bll\blq\bqu\buo\bot\bte\be
5191                       If  set,  b\bba\bas\bsh\bh  quotes all shell metacharacters in file-
5192                       names and directory names  when  performing  completion.
5193                       If not set, b\bba\bas\bsh\bh removes metacharacters such as the dol-
5194                       lar sign from the set of characters that will be  quoted
5195                       in  completed filenames when these metacharacters appear
5196                       in shell variable references in words to  be  completed.
5197                       This  means  that  dollar  signs  in variable names that
5198                       expand to directories will not be quoted;  however,  any
5199                       dollar  signs appearing in filenames will not be quoted,
5200                       either.  This is active only when bash  is  using  back-
5201                       slashes  to quote completed filenames.  This variable is
5202                       set by default, which is the default  bash  behavior  in
5203                       versions through 4.2.
5204               d\bdi\bir\bre\bex\bxp\bpa\ban\bnd\bd
5205                       If  set,  b\bba\bas\bsh\bh replaces directory names with the results
5206                       of word expansion when performing  filename  completion.
5207                       This  changes  the  contents  of  the  readline  editing
5208                       buffer.  If not set, b\bba\bas\bsh\bh attempts to preserve what  the
5209                       user typed.
5210               d\bdi\bir\brs\bsp\bpe\bel\bll\bl
5211                       If  set,  b\bba\bas\bsh\bh attempts spelling correction on directory
5212                       names during word completion if the directory name  ini-
5213                       tially supplied does not exist.
5214               d\bdo\bot\btg\bgl\blo\bob\bb If  set, b\bba\bas\bsh\bh includes filenames beginning with a `.' in
5215                       the results of pathname expansion.
5216               e\bex\bxe\bec\bcf\bfa\bai\bil\bl
5217                       If set, a non-interactive shell will not exit if it can-
5218                       not  execute  the  file  specified as an argument to the
5219                       e\bex\bxe\bec\bc builtin command.  An  interactive  shell  does  not
5220                       exit if e\bex\bxe\bec\bc fails.
5221               e\bex\bxp\bpa\ban\bnd\bd_\b_a\bal\bli\bia\bas\bse\bes\bs
5222                       If  set,  aliases  are expanded as described above under
5223                       A\bAL\bLI\bIA\bAS\bSE\bES\bS.  This option is enabled by default for interac-
5224                       tive shells.
5225               e\bex\bxt\btd\bde\beb\bbu\bug\bg
5226                       If  set,  behavior  intended  for  use  by  debuggers is
5227                       enabled:
5228                       1\b1.\b.     The -\b-F\bF option to the d\bde\bec\bcl\bla\bar\bre\be builtin displays the
5229                              source file name and line number corresponding to
5230                              each function name supplied as an argument.
5231                       2\b2.\b.     If the command run by the D\bDE\bEB\bBU\bUG\bG  trap  returns  a
5232                              non-zero  value,  the next command is skipped and
5233                              not executed.
5234                       3\b3.\b.     If the command run by the D\bDE\bEB\bBU\bUG\bG  trap  returns  a
5235                              value  of 2, and the shell is executing in a sub-
5236                              routine (a shell function or a shell script  exe-
5237                              cuted  by  the  .\b.  or s\bso\bou\bur\brc\bce\be builtins), a call to
5238                              r\bre\bet\btu\bur\brn\bn is simulated.
5239                       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
5240                              in their descriptions above.
5241                       5\b5.\b.     Function  tracing  is enabled:  command substitu-
5242                              tion, shell functions, and subshells invoked with
5243                              (\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.
5244                       6\b6.\b.     Error  tracing is enabled:  command substitution,
5245                              shell functions, and  subshells  invoked  with  (\b(
5246                              _\bc_\bo_\bm_\bm_\ba_\bn_\bd )\b) inherit the E\bER\bRR\bR trap.
5247               e\bex\bxt\btg\bgl\blo\bob\bb If set, the extended pattern matching features described
5248                       above under P\bPa\bat\bth\bhn\bna\bam\bme\be E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn are enabled.
5249               e\bex\bxt\btq\bqu\buo\bot\bte\be
5250                       If set, $\b$'_\bs_\bt_\br_\bi_\bn_\bg' and  $\b$"_\bs_\bt_\br_\bi_\bn_\bg"  quoting  is  performed
5251                       within   $\b${\b{_\bp_\ba_\br_\ba_\bm_\be_\bt_\be_\br}\b}   expansions  enclosed  in  double
5252                       quotes.  This option is enabled by default.
5253               f\bfa\bai\bil\blg\bgl\blo\bob\bb
5254                       If set, patterns which fail to  match  filenames  during
5255                       pathname expansion result in an expansion error.
5256               f\bfo\bor\brc\bce\be_\b_f\bfi\big\bgn\bno\bor\bre\be
5257                       If  set,  the  suffixes  specified  by the F\bFI\bIG\bGN\bNO\bOR\bRE\bE shell
5258                       variable cause words to be ignored when performing  word
5259                       completion even if the ignored words are the only possi-
5260                       ble  completions.   See  S\bSH\bHE\bEL\bLL\bL  V\bVA\bAR\bRI\bIA\bAB\bBL\bLE\bES\bS  above  for  a
5261                       description  of  F\bFI\bIG\bGN\bNO\bOR\bRE\bE.   This  option  is  enabled by
5262                       default.
5263               g\bgl\blo\bob\bba\bas\bsc\bci\bii\bir\bra\ban\bng\bge\bes\bs
5264                       If set,  range  expressions  used  in  pattern  matching
5265                       bracket  expressions (see P\bPa\bat\btt\bte\ber\brn\bn M\bMa\bat\btc\bch\bhi\bin\bng\bg above) behave
5266                       as if in the traditional C locale when  performing  com-
5267                       parisons.   That  is,  the  current  locale's  collating
5268                       sequence is not taken into account, so b\bb will  not  col-
5269                       late  between  A\bA  and  B\bB,  and upper-case and lower-case
5270                       ASCII characters will collate together.
5271               g\bgl\blo\bob\bbs\bst\bta\bar\br
5272                       If set, the pattern *\b**\b* used in a pathname expansion con-
5273                       text  will  match all files and zero or more directories
5274                       and subdirectories.  If the pattern is followed by a  /\b/,
5275                       only directories and subdirectories match.
5276               g\bgn\bnu\bu_\b_e\ber\brr\brf\bfm\bmt\bt
5277                       If set, shell error messages are written in the standard
5278                       GNU error message format.
5279               h\bhi\bis\bst\bta\bap\bpp\bpe\ben\bnd\bd
5280                       If set, the history list is appended to the  file  named
5281                       by  the  value  of  the H\bHI\bIS\bST\bTF\bFI\bIL\bLE\bE variable when the shell
5282                       exits, rather than overwriting the file.
5283               h\bhi\bis\bst\btr\bre\bee\bed\bdi\bit\bt
5284                       If set, and r\bre\bea\bad\bdl\bli\bin\bne\be is being used, a user is given  the
5285                       opportunity to re-edit a failed history substitution.
5286               h\bhi\bis\bst\btv\bve\ber\bri\bif\bfy\by
5287                       If  set, and r\bre\bea\bad\bdl\bli\bin\bne\be is being used, the results of his-
5288                       tory substitution are  not  immediately  passed  to  the
5289                       shell  parser.   Instead,  the  resulting line is loaded
5290                       into the r\bre\bea\bad\bdl\bli\bin\bne\be editing buffer, allowing further modi-
5291                       fication.
5292               h\bho\bos\bst\btc\bco\bom\bmp\bpl\ble\bet\bte\be
5293                       If set, and r\bre\bea\bad\bdl\bli\bin\bne\be is being used, b\bba\bas\bsh\bh will attempt to
5294                       perform hostname completion when a word containing  a  @\b@
5295                       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
5296                       above).  This is enabled by default.
5297               h\bhu\bup\bpo\bon\bne\bex\bxi\bit\bt
5298                       If set, b\bba\bas\bsh\bh will send S\bSI\bIG\bGH\bHU\bUP\bP to all jobs when an inter-
5299                       active login shell exits.
5300               i\bin\bnt\bte\ber\bra\bac\bct\bti\biv\bve\be_\b_c\bco\bom\bmm\bme\ben\bnt\bts\bs
5301                       If set, allow a word beginning with #\b# to cause that word
5302                       and all remaining characters on that line to be  ignored
5303                       in  an  interactive  shell  (see  C\bCO\bOM\bMM\bME\bEN\bNT\bTS\bS above).  This
5304                       option is enabled by default.
5305               l\bla\bas\bst\btp\bpi\bip\bpe\be
5306                       If set, and job control is not active,  the  shell  runs
5307                       the last command of a pipeline not executed in the back-
5308                       ground in the current shell environment.
5309               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
5310                       commands are saved to the history with embedded newlines
5311                       rather than using semicolon separators where possible.
5312               l\blo\bog\bgi\bin\bn_\b_s\bsh\bhe\bel\bll\bl
5313                       The shell sets this option if it is started as  a  login
5314                       shell  (see  I\bIN\bNV\bVO\bOC\bCA\bAT\bTI\bIO\bON\bN  above).   The  value may not be
5315                       changed.
5316               m\bma\bai\bil\blw\bwa\bar\brn\bn
5317                       If set, and a file that b\bba\bas\bsh\bh is checking  for  mail  has
5318                       been  accessed  since  the last time it was checked, the
5319                       message ``The mail in _\bm_\ba_\bi_\bl_\bf_\bi_\bl_\be has been read''  is  dis-
5320                       played.
5321               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
5322                       If  set,  and  r\bre\bea\bad\bdl\bli\bin\bne\be  is  being  used,  b\bba\bas\bsh\bh will not
5323                       attempt to search the P\bPA\bAT\bTH\bH for possible completions when
5324                       completion is attempted on an empty line.
5325               n\bno\boc\bca\bas\bse\beg\bgl\blo\bob\bb
5326                       If  set,  b\bba\bas\bsh\bh  matches  filenames in a case-insensitive
5327                       fashion when performing pathname expansion (see P\bPa\bat\bth\bhn\bna\bam\bme\be
5328                       E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn above).
5329               n\bno\boc\bca\bas\bse\bem\bma\bat\btc\bch\bh
5330                       If  set,  b\bba\bas\bsh\bh  matches  patterns  in a case-insensitive
5331                       fashion when performing matching while executing c\bca\bas\bse\be or
5332                       [\b[[\b[ conditional commands.
5333               n\bnu\bul\bll\blg\bgl\blo\bob\bb
5334                       If  set,  b\bba\bas\bsh\bh allows patterns which match no files (see
5335                       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,
5336                       rather than themselves.
5337               p\bpr\bro\bog\bgc\bco\bom\bmp\bp
5338                       If set, the programmable completion facilities (see P\bPr\bro\bo-\b-
5339                       g\bgr\bra\bam\bmm\bma\bab\bbl\ble\be C\bCo\bom\bmp\bpl\ble\bet\bti\bio\bon\bn above) are enabled.  This option is
5340                       enabled by default.
5341               p\bpr\bro\bom\bmp\bpt\btv\bva\bar\brs\bs
5342                       If set, prompt strings undergo parameter expansion, com-
5343                       mand  substitution,  arithmetic  expansion,  and   quote
5344                       removal  after  being expanded as described in P\bPR\bRO\bOM\bMP\bPT\bTI\bIN\bNG\bG
5345                       above.  This option is enabled by default.
5346               r\bre\bes\bst\btr\bri\bic\bct\bte\bed\bd_\b_s\bsh\bhe\bel\bll\bl
5347                       The  shell  sets  this  option  if  it  is  started   in
5348                       restricted mode (see R\bRE\bES\bST\bTR\bRI\bIC\bCT\bTE\bED\bD S\bSH\bHE\bEL\bLL\bL below).  The value
5349                       may not be changed.  This is not reset when the  startup
5350                       files  are  executed, allowing the startup files to dis-
5351                       cover whether or not a shell is restricted.
5352               s\bsh\bhi\bif\bft\bt_\b_v\bve\ber\brb\bbo\bos\bse\be
5353                       If set, the s\bsh\bhi\bif\bft\bt builtin prints an error  message  when
5354                       the shift count exceeds the number of positional parame-
5355                       ters.
5356               s\bso\bou\bur\brc\bce\bep\bpa\bat\bth\bh
5357                       If set, the s\bso\bou\bur\brc\bce\be (.\b.) builtin uses the value of P\bPA\bAT\bTH\bH to
5358                       find  the  directory  containing the file supplied as an
5359                       argument.  This option is enabled by default.
5360               x\bxp\bpg\bg_\b_e\bec\bch\bho\bo
5361                       If  set,  the  e\bec\bch\bho\bo  builtin  expands   backslash-escape
5362                       sequences by default.
5363
5364        s\bsu\bus\bsp\bpe\ben\bnd\bd [-\b-f\bf]
5365               Suspend  the execution of this shell until it receives a S\bSI\bIG\bGC\bCO\bON\bNT\bT
5366               signal.  A login shell cannot be suspended; the -\b-f\bf option can be
5367               used to override this and force the suspension.  The return sta-
5368               tus is 0 unless the shell is a login shell and -\b-f\bf  is  not  sup-
5369               plied, or if job control is not enabled.
5370
5371        t\bte\bes\bst\bt _\be_\bx_\bp_\br
5372        [\b[ _\be_\bx_\bp_\br ]\b]
5373               Return a status of 0 (true) or 1 (false) depending on the evalu-
5374               ation of the conditional expression _\be_\bx_\bp_\br.  Each operator and op-
5375               erand  must be a separate argument.  Expressions are composed of
5376               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.
5377               t\bte\bes\bst\bt  does not accept any options, nor does it accept and ignore
5378               an argument of -\b--\b- as signifying the end of options.
5379
5380               Expressions may  be  combined  using  the  following  operators,
5381               listed  in  decreasing  order  of  precedence.   The  evaluation
5382               depends on the number of arguments; see below.  Operator  prece-
5383               dence is used when there are five or more arguments.
5384               !\b! _\be_\bx_\bp_\br True if _\be_\bx_\bp_\br is false.
5385               (\b( _\be_\bx_\bp_\br )\b)
5386                      Returns  the value of _\be_\bx_\bp_\br.  This may be used to override
5387                      the normal precedence of operators.
5388               _\be_\bx_\bp_\br_\b1 -a\ba _\be_\bx_\bp_\br_\b2
5389                      True if both _\be_\bx_\bp_\br_\b1 and _\be_\bx_\bp_\br_\b2 are true.
5390               _\be_\bx_\bp_\br_\b1 -o\bo _\be_\bx_\bp_\br_\b2
5391                      True if either _\be_\bx_\bp_\br_\b1 or _\be_\bx_\bp_\br_\b2 is true.
5392
5393               t\bte\bes\bst\bt and [\b[ evaluate conditional expressions using a set of rules
5394               based on the number of arguments.
5395
5396               0 arguments
5397                      The expression is false.
5398               1 argument
5399                      The expression is true if and only if the argument is not
5400                      null.
5401               2 arguments
5402                      If the first argument is !\b!, the expression is true if and
5403                      only  if the second argument is null.  If the first argu-
5404                      ment is one of the  unary  conditional  operators  listed
5405                      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
5406                      true if the unary test is true.  If the first argument is
5407                      not a valid unary conditional operator, the expression is
5408                      false.
5409               3 arguments
5410                      The following conditions are applied in the order listed.
5411                      If  the  second argument is one of the binary conditional
5412                      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
5413                      result of the expression is the result of the binary test
5414                      using the first and third arguments as operands.  The  -\b-a\ba
5415                      and  -\b-o\bo  operators  are  considered binary operators when
5416                      there are three arguments.  If the first argument  is  !\b!,
5417                      the  value is the negation of the two-argument test using
5418                      the second and third arguments.  If the first argument is
5419                      exactly (\b( and the third argument is exactly )\b), the result
5420                      is the one-argument test of the second argument.   Other-
5421                      wise, the expression is false.
5422               4 arguments
5423                      If the first argument is !\b!, the result is the negation of
5424                      the three-argument expression composed of  the  remaining
5425                      arguments.  Otherwise, the expression is parsed and eval-
5426                      uated according to  precedence  using  the  rules  listed
5427                      above.
5428               5 or more arguments
5429                      The  expression  is  parsed  and  evaluated  according to
5430                      precedence using the rules listed above.
5431
5432               When used with t\bte\bes\bst\bt or [\b[, the <\b< and  >\b>  operators  sort  lexico-
5433               graphically using ASCII ordering.
5434
5435        t\bti\bim\bme\bes\bs  Print  the  accumulated  user and system times for the shell and
5436               for processes run from the shell.  The return status is 0.
5437
5438        t\btr\bra\bap\bp [-\b-l\blp\bp] [[_\ba_\br_\bg] _\bs_\bi_\bg_\bs_\bp_\be_\bc ...]
5439               The command _\ba_\br_\bg is to  be  read  and  executed  when  the  shell
5440               receives  signal(s)  _\bs_\bi_\bg_\bs_\bp_\be_\bc.   If _\ba_\br_\bg is absent (and there is a
5441               single _\bs_\bi_\bg_\bs_\bp_\be_\bc) or -\b-, each specified  signal  is  reset  to  its
5442               original  disposition  (the  value  it  had upon entrance to the
5443               shell).  If _\ba_\br_\bg is the null string the signal specified by  each
5444               _\bs_\bi_\bg_\bs_\bp_\be_\bc  is ignored by the shell and by the commands it invokes.
5445               If _\ba_\br_\bg is not present and -\b-p\bp has been supplied,  then  the  trap
5446               commands  associated  with  each  _\bs_\bi_\bg_\bs_\bp_\be_\bc  are displayed.  If no
5447               arguments are supplied or if only -\b-p\bp is given, t\btr\bra\bap\bp  prints  the
5448               list  of  commands  associated  with each signal.  The -\b-l\bl option
5449               causes the shell to print a list of signal names and their  cor-
5450               responding  numbers.   Each  _\bs_\bi_\bg_\bs_\bp_\be_\bc  is  either  a  signal name
5451               defined in <_\bs_\bi_\bg_\bn_\ba_\bl_\b._\bh>, or a signal  number.   Signal  names  are
5452               case insensitive and the S\bSI\bIG\bG prefix is optional.
5453
5454               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
5455               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-
5456               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,
5457               _\bs_\be_\bl_\be_\bc_\bt command, every arithmetic _\bf_\bo_\br  command,  and  before  the
5458               first  command  executes  in a shell function (see S\bSH\bHE\bEL\bLL\bL G\bGR\bRA\bAM\bMM\bMA\bAR\bR
5459               above).  Refer to the description of the e\bex\bxt\btd\bde\beb\bbu\bug\bg option to  the
5460               s\bsh\bho\bop\bpt\bt builtin for details of its effect on the D\bDE\bEB\bBU\bUG\bG trap.  If a
5461               _\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
5462               function or a script executed with the .\b. or s\bso\bou\bur\brc\bce\be builtins fin-
5463               ishes executing.
5464
5465               If a _\bs_\bi_\bg_\bs_\bp_\be_\bc is E\bER\bRR\bR, the command _\ba_\br_\bg is executed  whenever  a  a
5466               pipeline (which may consist of a single simple command), a list,
5467               or a compound command returns a non-zero exit status, subject to
5468               the  following  conditions.  The E\bER\bRR\bR trap is not executed if the
5469               failed command is part of the command list immediately following
5470               a  w\bwh\bhi\bil\ble\be  or u\bun\bnt\bti\bil\bl keyword, part of the test in an _\bi_\bf statement,
5471               part of a command executed in a &\b&&\b& or |\b||\b| list except the command
5472               following  the final &\b&&\b& or |\b||\b|, any command in a pipeline but the
5473               last, or if the command's return value is being  inverted  using
5474               !\b!.   These  are  the  same conditions obeyed by the e\ber\brr\bre\bex\bxi\bit\bt (-\b-e\be)
5475               option.
5476
5477               Signals ignored upon entry to the shell  cannot  be  trapped  or
5478               reset.   Trapped signals that are not being ignored are reset to
5479               their original values in a subshell or subshell environment when
5480               one  is  created.   The return status is false if any _\bs_\bi_\bg_\bs_\bp_\be_\bc is
5481               invalid; otherwise t\btr\bra\bap\bp returns true.
5482
5483        t\bty\byp\bpe\be [-\b-a\baf\bft\btp\bpP\bP] _\bn_\ba_\bm_\be [_\bn_\ba_\bm_\be ...]
5484               With no options, indicate how each _\bn_\ba_\bm_\be would be interpreted  if
5485               used as a command name.  If the -\b-t\bt option is used, t\bty\byp\bpe\be prints a
5486               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
5487               _\bf_\bi_\bl_\be  if  _\bn_\ba_\bm_\be  is  an  alias,  shell  reserved  word, function,
5488               builtin, or disk file, respectively.  If the _\bn_\ba_\bm_\be is not  found,
5489               then  nothing  is  printed,  and  an  exit  status  of  false is
5490               returned.  If the -\b-p\bp option is used,  t\bty\byp\bpe\be  either  returns  the
5491               name of the disk file that would be executed if _\bn_\ba_\bm_\be were speci-
5492               fied as a command name, or nothing if ``type -t name'' would not
5493               return  _\bf_\bi_\bl_\be.  The -\b-P\bP option forces a P\bPA\bAT\bTH\bH search for each _\bn_\ba_\bm_\be,
5494               even if ``type -t name'' would not return _\bf_\bi_\bl_\be.  If a command is
5495               hashed, -\b-p\bp and -\b-P\bP print the hashed value, which is not necessar-
5496               ily the file that appears first in P\bPA\bAT\bTH\bH.  If the  -\b-a\ba  option  is
5497               used,  t\bty\byp\bpe\be  prints all of the places that contain an executable
5498               named _\bn_\ba_\bm_\be.  This includes aliases and functions, if and only if
5499               the -\b-p\bp option is not also used.  The table of hashed commands is
5500               not consulted when using -\b-a\ba.  The  -\b-f\bf  option  suppresses  shell
5501               function lookup, as with the c\bco\bom\bmm\bma\ban\bnd\bd builtin.  t\bty\byp\bpe\be returns true
5502               if all of the arguments are found, false if any are not found.
5503
5504        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]]
5505               Provides control over the resources available to the  shell  and
5506               to  processes started by it, on systems that allow such control.
5507               The -\b-H\bH and -\b-S\bS options specify that the hard or soft limit is set
5508               for  the  given resource.  A hard limit cannot be increased by a
5509               non-root user once it is set; a soft limit may be  increased  up
5510               to  the value of the hard limit.  If neither -\b-H\bH nor -\b-S\bS is speci-
5511               fied, both the soft and hard limits are set.  The value of _\bl_\bi_\bm_\bi_\bt
5512               can be a number in the unit specified for the resource or one of
5513               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
5514               current  hard  limit,  the  current  soft  limit,  and no limit,
5515               respectively.  If _\bl_\bi_\bm_\bi_\bt is omitted, the  current  value  of  the
5516               soft  limit  of the resource is printed, unless the -\b-H\bH option is
5517               given.  When more than one resource is specified, the limit name
5518               and unit are printed before the value.  Other options are inter-
5519               preted as follows:
5520               -\b-a\ba     All current limits are reported
5521               -\b-b\bb     The maximum socket buffer size
5522               -\b-c\bc     The maximum size of core files created
5523               -\b-d\bd     The maximum size of a process's data segment
5524               -\b-e\be     The maximum scheduling priority ("nice")
5525               -\b-f\bf     The maximum size of files written by the  shell  and  its
5526                      children
5527               -\b-i\bi     The maximum number of pending signals
5528               -\b-l\bl     The maximum size that may be locked into memory
5529               -\b-m\bm     The  maximum resident set size (many systems do not honor
5530                      this limit)
5531               -\b-n\bn     The maximum number of open file descriptors (most systems
5532                      do not allow this value to be set)
5533               -\b-p\bp     The pipe size in 512-byte blocks (this may not be set)
5534               -\b-q\bq     The maximum number of bytes in POSIX message queues
5535               -\b-r\br     The maximum real-time scheduling priority
5536               -\b-s\bs     The maximum stack size
5537               -\b-t\bt     The maximum amount of cpu time in seconds
5538               -\b-u\bu     The  maximum  number  of  processes available to a single
5539                      user
5540               -\b-v\bv     The maximum amount of virtual  memory  available  to  the
5541                      shell and, on some systems, to its children
5542               -\b-x\bx     The maximum number of file locks
5543               -\b-T\bT     The maximum number of threads
5544
5545               If  _\bl_\bi_\bm_\bi_\bt  is given, and the -\b-a\ba option is not used, _\bl_\bi_\bm_\bi_\bt is the
5546               new value of the specified resource.  If  no  option  is  given,
5547               then  -\b-f\bf is assumed.  Values are in 1024-byte increments, except
5548               for -\b-t\bt, which is in seconds; -\b-p\bp, which is in units  of  512-byte
5549               blocks;  and -\b-T\bT, -\b-b\bb, -\b-n\bn, and -\b-u\bu, which are unscaled values.  The
5550               return status is 0 unless an invalid option or argument is  sup-
5551               plied, or an error occurs while setting a new limit.
5552
5553        u\bum\bma\bas\bsk\bk [-\b-p\bp] [-\b-S\bS] [_\bm_\bo_\bd_\be]
5554               The user file-creation mask is set to _\bm_\bo_\bd_\be.  If _\bm_\bo_\bd_\be begins with
5555               a digit, it is interpreted as an octal number; otherwise  it  is
5556               interpreted  as a symbolic mode mask similar to that accepted by
5557               _\bc_\bh_\bm_\bo_\bd(1).  If _\bm_\bo_\bd_\be is omitted, the current value of the mask  is
5558               printed.   The  -\b-S\bS  option causes the mask to be printed in sym-
5559               bolic form; the default output is an octal number.   If  the  -\b-p\bp
5560               option is supplied, and _\bm_\bo_\bd_\be is omitted, the output is in a form
5561               that may be reused as input.  The return status is 0 if the mode
5562               was  successfully  changed  or if no _\bm_\bo_\bd_\be argument was supplied,
5563               and false otherwise.
5564
5565        u\bun\bna\bal\bli\bia\bas\bs [-a\ba] [_\bn_\ba_\bm_\be ...]
5566               Remove each _\bn_\ba_\bm_\be from the list of defined  aliases.   If  -\b-a\ba  is
5567               supplied,  all  alias definitions are removed.  The return value
5568               is true unless a supplied _\bn_\ba_\bm_\be is not a defined alias.
5569
5570        u\bun\bns\bse\bet\bt [-f\bfv\bv] [-n\bn] [_\bn_\ba_\bm_\be ...]
5571               For each _\bn_\ba_\bm_\be, remove the corresponding  variable  or  function.
5572               If the -\b-v\bv option is given, each _\bn_\ba_\bm_\be refers to a shell variable,
5573               and that variable is removed.  Read-only variables  may  not  be
5574               unset.   If  -\b-f\bf  is specified, each _\bn_\ba_\bm_\be refers to a shell func-
5575               tion, and the function definition is removed.  If the -\b-n\bn  option
5576               is  supplied, and _\bn_\ba_\bm_\be is a variable with the _\bn_\ba_\bm_\be_\br_\be_\bf attribute,
5577               _\bn_\ba_\bm_\be will be unset rather than the variable it  references.   -\b-n\bn
5578               has  no  effect if the -\b-f\bf option is supplied.  If no options are
5579               supplied, each _\bn_\ba_\bm_\be refers to a variable; if there is  no  vari-
5580               able  by  that name, any function with that name is unset.  Each
5581               unset variable or  function  is  removed  from  the  environment
5582               passed  to subsequent commands.  If any of C\bCO\bOM\bMP\bP_\b_W\bWO\bOR\bRD\bDB\bBR\bRE\bEA\bAK\bKS\bS, R\bRA\bAN\bN-\b-
5583               D\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
5584               unset, they lose their special properties, even if they are sub-
5585               sequently reset.  The exit status is true unless a _\bn_\ba_\bm_\be is read-
5586               only.
5587
5588        w\bwa\bai\bit\bt [-\b-n\bn] [_\bn _\b._\b._\b.]
5589               Wait for each specified child process and return its termination
5590               status.  Each _\bn may be a process ID or a job specification; if a
5591               job  spec  is  given,  all  processes in that job's pipeline are
5592               waited for.  If _\bn is not given, all currently active child  pro-
5593               cesses are waited for, and the return status is zero.  If the -\b-n\bn
5594               option is supplied, w\bwa\bai\bit\bt waits for  any  job  to  terminate  and
5595               returns  its exit status.  If _\bn specifies a non-existent process
5596               or job, the return status is 127.  Otherwise, the return  status
5597               is the exit status of the last process or job waited for.
5598
5599 R\bRE\bES\bST\bTR\bRI\bIC\bCT\bTE\bED\bD S\bSH\bHE\bEL\bLL\bL
5600        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
5601        invocation, the shell becomes restricted.  A restricted shell  is  used
5602        to  set  up an environment more controlled than the standard shell.  It
5603        behaves identically to b\bba\bas\bsh\bh with the exception that the  following  are
5604        disallowed or not performed:
5605
5606        +\bo      changing directories with c\bcd\bd
5607
5608        +\bo      setting or unsetting the values of S\bSH\bHE\bEL\bLL\bL, P\bPA\bAT\bTH\bH, E\bEN\bNV\bV, or B\bBA\bAS\bSH\bH_\b_E\bEN\bNV\bV
5609
5610        +\bo      specifying command names containing /\b/
5611
5612        +\bo      specifying a filename containing a /\b/ as an  argument  to  the  .\b.
5613               builtin command
5614
5615        +\bo      specifying  a  filename containing a slash as an argument to the
5616               -\b-p\bp option to the h\bha\bas\bsh\bh builtin command
5617
5618        +\bo      importing function definitions from  the  shell  environment  at
5619               startup
5620
5621        +\bo      parsing  the  value  of  S\bSH\bHE\bEL\bLL\bLO\bOP\bPT\bTS\bS from the shell environment at
5622               startup
5623
5624        +\bo      redirecting output using the >, >|, <>, >&, &>, and >> redirect-
5625               ion operators
5626
5627        +\bo      using the e\bex\bxe\bec\bc builtin command to replace the shell with another
5628               command
5629
5630        +\bo      adding or deleting builtin commands with the -\b-f\bf and  -\b-d\bd  options
5631               to the e\ben\bna\bab\bbl\ble\be builtin command
5632
5633        +\bo      using  the  e\ben\bna\bab\bbl\ble\be  builtin  command  to  enable  disabled shell
5634               builtins
5635
5636        +\bo      specifying the -\b-p\bp option to the c\bco\bom\bmm\bma\ban\bnd\bd builtin command
5637
5638        +\bo      turning off restricted mode with s\bse\bet\bt +\b+r\br or s\bse\bet\bt +\b+o\bo r\bre\bes\bst\btr\bri\bic\bct\bte\bed\bd.
5639
5640        These restrictions are enforced after any startup files are read.
5641
5642        When a command that is found to be a shell script is executed (see C\bCO\bOM\bM-\b-
5643        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
5644        spawned to execute the script.
5645
5646 S\bSE\bEE\bE A\bAL\bLS\bSO\bO
5647        _\bB_\ba_\bs_\bh _\bR_\be_\bf_\be_\br_\be_\bn_\bc_\be _\bM_\ba_\bn_\bu_\ba_\bl, Brian Fox and Chet Ramey
5648        _\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
5649        _\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
5650        _\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-
5651        _\bt_\bi_\be_\bs, IEEE --
5652               http://pubs.opengroup.org/onlinepubs/9699919799/
5653        http://tiswww.case.edu/~chet/bash/POSIX -- a description of posix mode
5654        _\bs_\bh(1), _\bk_\bs_\bh(1), _\bc_\bs_\bh(1)
5655        _\be_\bm_\ba_\bc_\bs(1), _\bv_\bi(1)
5656        _\br_\be_\ba_\bd_\bl_\bi_\bn_\be(3)
5657
5658 F\bFI\bIL\bLE\bES\bS
5659        _\b/_\bb_\bi_\bn_\b/_\bb_\ba_\bs_\bh
5660               The b\bba\bas\bsh\bh executable
5661        _\b/_\be_\bt_\bc_\b/_\bp_\br_\bo_\bf_\bi_\bl_\be
5662               The systemwide initialization file, executed for login shells
5663        _\b~_\b/_\b._\bb_\ba_\bs_\bh_\b__\bp_\br_\bo_\bf_\bi_\bl_\be
5664               The personal initialization file, executed for login shells
5665        _\b~_\b/_\b._\bb_\ba_\bs_\bh_\br_\bc
5666               The individual per-interactive-shell startup file
5667        _\b~_\b/_\b._\bb_\ba_\bs_\bh_\b__\bl_\bo_\bg_\bo_\bu_\bt
5668               The individual login shell cleanup file, executed when  a  login
5669               shell exits
5670        _\b~_\b/_\b._\bi_\bn_\bp_\bu_\bt_\br_\bc
5671               Individual _\br_\be_\ba_\bd_\bl_\bi_\bn_\be initialization file
5672
5673 A\bAU\bUT\bTH\bHO\bOR\bRS\bS
5674        Brian Fox, Free Software Foundation
5675        bfox@gnu.org
5676
5677        Chet Ramey, Case Western Reserve University
5678        chet.ramey@case.edu
5679
5680 B\bBU\bUG\bG R\bRE\bEP\bPO\bOR\bRT\bTS\bS
5681        If you find a bug in b\bba\bas\bsh\bh,\b, you should report it.  But first, you should
5682        make sure that it really is a bug, and that it appears  in  the  latest
5683        version   of  b\bba\bas\bsh\bh.   The  latest  version  is  always  available  from
5684        _\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/.
5685
5686        Once you have determined that a bug actually exists,  use  the  _\bb_\ba_\bs_\bh_\bb_\bu_\bg
5687        command  to submit a bug report.  If you have a fix, you are encouraged
5688        to mail that as well!  Suggestions and `philosophical' bug reports  may
5689        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
5690        g\bgn\bnu\bu.\b.b\bba\bas\bsh\bh.\b.b\bbu\bug\bg.
5691
5692        ALL bug reports should include:
5693
5694        The version number of b\bba\bas\bsh\bh
5695        The hardware and operating system
5696        The compiler used to compile
5697        A description of the bug behaviour
5698        A short script or `recipe' which exercises the bug
5699
5700        _\bb_\ba_\bs_\bh_\bb_\bu_\bg inserts the first three items automatically into  the  template
5701        it provides for filing a bug report.
5702
5703        Comments and bug reports concerning this manual page should be directed
5704        to _\bc_\bh_\be_\bt_\b._\br_\ba_\bm_\be_\by_\b@_\bc_\ba_\bs_\be_\b._\be_\bd_\bu.
5705
5706 B\bBU\bUG\bGS\bS
5707        It's too big and too slow.
5708
5709        There are some subtle differences between b\bba\bas\bsh\bh and traditional versions
5710        of s\bsh\bh, mostly because of the P\bPO\bOS\bSI\bIX\bX specification.
5711
5712        Aliases are confusing in some uses.
5713
5714        Shell builtin commands and functions are not stoppable/restartable.
5715
5716        Compound commands and command sequences of the form `a ; b ; c' are not
5717        handled gracefully  when  process  suspension  is  attempted.   When  a
5718        process  is stopped, the shell immediately executes the next command in
5719        the sequence.  It suffices to place the sequence  of  commands  between
5720        parentheses  to  force  it  into  a subshell, which may be stopped as a
5721        unit.
5722
5723        Array variables may not (yet) be exported.
5724
5725        There may be only one active coprocess at a time.
5726
5727
5728
5729 GNU Bash 4.3                    2014 February 2                        BASH(1)