.\" Chet Ramey
.\" Information Network Services
.\" Case Western Reserve University
-.\" chet@po.CWRU.Edu
+.\" chet@po.cwru.edu
.\"
-.\" Last Change: Sat Jun 26 14:26:44 EDT 2004
+.\" Last Change: Thu Sep 28 10:25:59 EDT 2006
.\"
.\" bash_builtins, strip all but Built-Ins section
.if \n(zZ=1 .ig zZ
.if \n(zY=1 .ig zY
-.TH BASH 1 "2004 June 26" "GNU Bash-3.0"
+.TH BASH 1 "2006 September 28" "GNU Bash-3.2"
.\"
.\" There's some problem with having a `@'
.\" in a tagged paragraph with the BSD man macros.
[options]
[file]
.SH COPYRIGHT
-.if n Bash is Copyright (C) 1989-2004 by the Free Software Foundation, Inc.
-.if t Bash is Copyright \(co 1989-2004 by the Free Software Foundation, Inc.
+.if n Bash is Copyright (C) 1989-2005 by the Free Software Foundation, Inc.
+.if t Bash is Copyright \(co 1989-2005 by the Free Software Foundation, Inc.
.SH DESCRIPTION
.B Bash
is an \fBsh\fR-compatible command language interpreter that
shells (\fBksh\fP and \fBcsh\fP).
.PP
.B Bash
-is intended to be a conformant implementation of the IEEE
-POSIX Shell and Tools specification (IEEE Working Group 1003\.2).
+is intended to be a conformant implementation of the
+Shell and Utilities portion of the IEEE POSIX specification
+(IEEE Standard 1003.1).
+.B Bash
+can be configured to be POSIX-conformant by default.
.SH OPTIONS
In addition to the single-character shell options documented in the
description of the \fBset\fR builtin command, \fBbash\fR
.TP
.B \-D
A list of all double-quoted strings preceded by \fB$\fP
-is printed on the standard ouput.
+is printed on the standard output.
These are the strings that
are subject to language translation when the current locale
is not \fBC\fP or \fBPOSIX\fP.
.TP
.B \-\-debugger
Arrange for the debugger profile to be executed before the shell
-starts. Turns on extended debugging mode (see the description of the
+starts.
+Turns on extended debugging mode (see the description of the
.B extdebug
option to the
.B shopt
-builtin below) and shell function tracing (see the description of the
+builtin below)
+and shell function tracing (see the description of the
\fB\-o functrace\fP option to the
.B set
builtin below).
.TP
.B \-\-posix
Change the behavior of \fBbash\fP where the default operation differs
-from the POSIX 1003.2 standard to match the standard (\fIposix mode\fP).
+from the POSIX standard to match the standard (\fIposix mode\fP).
.TP
.B \-\-restricted
The shell becomes restricted (see
When the \fB==\fP and \fB!=\fP operators are used, the string to the
right of the operator is considered a pattern and matched according
to the rules described below under \fBPattern Matching\fP.
-The return value is 0 if the string matches or does not match
-the pattern, respectively, and 1 otherwise.
+If the shell option
+.B nocasematch
+is enabled, the match is performed without regard to the case
+of alphabetic characters.
+The return value is 0 if the string matches (\fB==\fP) or does not match
+(\fB!=\fP) the pattern, and 1 otherwise.
Any part of the pattern may be quoted to force it to be matched as a
string.
.if t .sp 0.5
If the regular expression is syntactically incorrect, the conditional
expression's return value is 2.
If the shell option
-.B nocaseglob
+.B nocasematch
is enabled, the match is performed without regard to the case
of alphabetic characters.
Substrings matched by parenthesized subexpressions within the regular
it against each \fIpattern\fP in turn, using the same matching rules
as for pathname expansion (see
.B Pathname Expansion
-below). When a match is found, the
+below).
+The \fIword\fP is expanded using tilde
+expansion, parameter and variable expansion, arithmetic substitution,
+command substitution, process substitution and quote removal.
+Each \fIpattern\fP examined is expanded using tilde
+expansion, parameter and variable expansion, arithmetic substitution,
+command substitution, and process substitution.
+If the shell option
+.B nocasematch
+is enabled, the match is performed without regard to the case
+of alphabetic characters.
+When a match is found, the
corresponding \fIlist\fP is executed. After the first match, no
subsequent matches are attempted. The exit status is zero if no
pattern matches. Otherwise, it is the exit status of the
has special meaning to the shell and must be quoted if it is to
represent itself.
.PP
-When the command history expansion facilities are being used, the
+When the command history expansion facilities are being used
+(see
+.SM
+.B HISTORY EXPANSION
+below), the
\fIhistory expansion\fP character, usually \fB!\fP, must be quoted
to prevent history expansion.
.PP
of all characters within the quotes, with the exception of
.BR $ ,
.BR ` ,
-and
-.BR \e .
+.BR \e ,
+and, when history expansion is enabled,
+.BR ! .
The characters
.B $
and
.BR <newline> .
A double quote may be quoted within double quotes by preceding it with
a backslash.
-When command history is being used, the double quote may not be used to
-quote the history expansion character.
+If enabled, history expansion will be performed unless an
+.B !
+appearing in double quotes is escaped using a backslash.
+The backslash preceding the
+.B !
+is not removed.
.PP
The special parameters
.B *
.B PARAMETERS
below).
.PP
-Words of the form \fB$\fP'\fIstring\fP' are treated specially. The
+Words of the form \fB$\fP\(aq\fIstring\fP\(aq are treated specially. The
word expands to \fIstring\fP, with backslash-escaped characters replaced
-as specifed by the ANSI C standard. Backslash escape sequences, if
+as specified by the ANSI C standard. Backslash escape sequences, if
present, are decoded as follows:
.RS
.PD 0
.B \e\e
backslash
.TP
-.B \e'
+.B \e\(aq
single quote
.TP
.B \e\fInnn\fP
and
.B local
builtin commands.
+.PP
+In the context where an assignment statement is assigning a value
+to a shell variable or array index, the += operator can be used to
+append to or add to the variable's previous value.
+When += is applied to a variable for which the integer attribute has been
+set, \fIvalue\fP is evaluated as an arithmetic expression and added to the
+variable's current value, which is also evaluated.
+When += is applied to an array variable using compound assignment (see
+.B Arrays
+below), the
+variable's value is not unset (as it is when using =), and new values are
+appended to the array beginning at one greater than the array's maximum index.
+When applied to a string-valued variable, \fIvalue\fP is expanded and
+appended to the variable's value.
.SS Positional Parameters
.PP
A
expansion occurs within double quotes, each parameter expands to a
separate word. That is, "\fB$@\fP" is equivalent to
"\fB$1\fP" "\fB$2\fP" ...
+If the double-quoted expansion occurs within a word, the expansion of
+the first parameter is joined with the beginning part of the original
+word, and the expansion of the last parameter is joined with the last
+part of the original word.
When there are no positional parameters, "\fB$@\fP" and
.B $@
expand to nothing (i.e., they are removed).
as given by argument zero.
.TP
.B _
-At shell startup, set to the absolute file name of the shell or shell
-script being executed as passed in the argument list.
+At shell startup, set to the absolute pathname used to invoke the
+shell or shell script being executed as passed in the environment
+or argument list.
Subsequently, expands to the last argument to the previous command,
after expansion.
-Also set to the full file name of each command executed and placed in
-the environment exported to that command.
+Also set to the full pathname used to invoke each command executed
+and placed in the environment exported to that command.
When checking mail, this parameter holds the name of the mail file
currently being checked.
.PD
.TP
.B BASH_ARGC
An array variable whose values are the number of parameters in each
-frame of the current bash execution call stack. The number of
+frame of the current bash execution call stack.
+The number of
parameters to the current subroutine (shell function or script executed
-with \fB.\fP or \fBsource\fP) is at the top of the stack. When a
-subroutine is executed, the number of parameters passed is pushed onto
+with \fB.\fP or \fBsource\fP) is at the top of the stack.
+When a subroutine is executed, the number of parameters passed is pushed onto
\fBBASH_ARGC\fP.
+The shell sets \fBBASH_ARGC\fP only when in extended debugging mode
+(see the description of the
+.B extdebug
+option to the
+.B shopt
+builtin below)
.TP
.B BASH_ARGV
An array variable containing all of the parameters in the current bash
is at the top of the stack; the first parameter of the initial call is
at the bottom. When a subroutine is executed, the parameters supplied
are pushed onto \fBBASH_ARGV\fP.
+The shell sets \fBBASH_ARGV\fP only when in extended debugging mode
+(see the description of the
+.B extdebug
+option to the
+.B shopt
+builtin below)
.TP
.B BASH_COMMAND
The command currently being executed or about to be executed, unless the
.TP
.B BASH_LINENO
An array variable whose members are the line numbers in source files
-corresponding to each member of @var{FUNCNAME}.
+corresponding to each member of \fBFUNCNAME\fP.
\fB${BASH_LINENO[\fP\fI$i\fP\fB]}\fP is the line number in the source
-file where \fB${FUNCNAME[\fP\fI$i + 1\fP\fB]}\fP was called.
-The corresponding source file name is \fB${BASH_SOURCE[\fP\fI$i + 1\fP\fB]}\fB.
+file where \fB${FUNCNAME[\fP\fI$ifP\fB]}\fP was called.
+The corresponding source file name is \fB${BASH_SOURCE[\fP\fI$i\fP\fB]}\fB.
Use \fBLINENO\fP to obtain the current line number.
.TP
.B BASH_REMATCH
.B COMP_WORDS
An array variable (see \fBArrays\fP below) consisting of the individual
words in the current command line.
+The words are split on shell metacharacters as the shell parser would
+separate them.
This variable is available only in shell functions invoked by the
programmable completion facilities (see \fBProgrammable Completion\fP
below).
.B HISTFILESIZE
The maximum number of lines contained in the history file. When this
variable is assigned a value, the history file is truncated, if
-necessary, to contain no more than that number of lines. The default
+necessary, by removing the oldest entries,
+to contain no more than that number of lines. The default
value is 500. The history file is also truncated to this size after
writing it when an interactive shell exits.
.TP
Example:
.RS
.PP
-\fBMAILPATH\fP='/var/mail/bfox?"You have mail":~/shell\-mail?"$_ has mail!"'
+\fBMAILPATH\fP=\(aq/var/mail/bfox?"You have mail":~/shell\-mail?"$_ has mail!"\(aq
.PP
.B Bash
supplies a default value for this variable, but the location of the user
included.
.IP
If this variable is not set, \fBbash\fP acts as if it had the
-value \fB$'\enreal\et%3lR\enuser\et%3lU\ensys\t%3lS'\fP.
+value \fB$\(aq\enreal\et%3lR\enuser\et%3lU\ensys\t%3lS\(aq\fP.
If the value is null, no timing information is displayed.
A trailing newline is added when the format string is displayed.
.TP
terminates after waiting for that number of seconds if input does
not arrive.
.TP
+.B TMPDIR
+If set, \fBBash\fP uses its value as the name of a directory in which
+\fBBash\fP creates temporary files for the shell's use.
+.TP
.B auto_resume
This variable controls how the shell interacts with the user and
job control. If this variable is set, single word simple
.B JOB CONTROL
below). If set to any other value, the supplied string must
be a prefix of a stopped job's name; this provides functionality
-analogous to the
-.B %
-job identifier.
+analogous to the \fB%\fP\fIstring\fP job identifier.
.TP
.B histchars
The two or three characters which control history expansion
.B IFS
special variable, and ${\fIname\fP[@]} expands each element of
\fIname\fP to a separate word. When there are no array members,
-${\fIname\fP[@]} expands to nothing. This is analogous to the expansion
+${\fIname\fP[@]} expands to nothing.
+If the double-quoted expansion occurs within a word, the expansion of
+the first parameter is joined with the beginning part of the original
+word, and the expansion of the last parameter is joined with the last
+part of the original word.
+This is analogous to the expansion
of the special parameters \fB*\fP and \fB@\fP (see
.B Special Parameters
above). ${#\fIname\fP[\fIsubscript\fP]} expands to the length of
.B unset
builtin is used to destroy arrays. \fBunset\fP \fIname\fP[\fIsubscript\fP]
destroys the array element at index \fIsubscript\fP.
+Care must be taken to avoid unwanted side effects caused by filename
+generation.
\fBunset\fP \fIname\fP, where \fIname\fP is an array, or
\fBunset\fP \fIname\fP[\fIsubscript\fP], where
\fIsubscript\fP is \fB*\fP or \fB@\fP, removes the entire array.
Each variable assignment is checked for unquoted tilde-prefixes immediately
following a
.B :
-or
+or the first
.BR = .
In these cases, tilde expansion is also performed.
Consequently, one may use file names with tildes in assignments to
.PP
When braces are used, the matching ending brace is the first `\fB}\fP'
not escaped by a backslash or within a quoted string, and not within an
-embedded arithmetic expansion, command substitution, or paramter
+embedded arithmetic expansion, command substitution, or parameter
expansion.
.PP
.PD 0
If \fIparameter\fP is an array name indexed by @ or *,
the result is the \fIlength\fP
members of the array beginning with ${\fIparameter\fP[\fIoffset\fP]}.
+A negative \fIoffset\fP is taken relative to one greater than the maximum
+index of the specified array.
+Note that a negative offset must be separated from the colon by at least
+one space to avoid being confused with the :- expansion.
Substring indexing is zero-based unless the positional parameters
are used, in which case the indexing starts at 1.
.TP
array in turn, and the expansion is the resultant list.
.TP
${\fIparameter\fP\fB/\fP\fIpattern\fP\fB/\fP\fIstring\fP}
-.PD 0
-.TP
-${\fIparameter\fP\fB//\fP\fIpattern\fP\fB/\fP\fIstring\fP}
-.PD
The \fIpattern\fP is expanded to produce a pattern just as in
pathname expansion.
\fIParameter\fP is expanded and the longest match of \fIpattern\fP
against its value is replaced with \fIstring\fP.
-In the first form, only the first match is replaced.
-The second form causes all matches of \fIpattern\fP to be
-replaced with \fIstring\fP.
+If \Ipattern\fP begins with \fB/\fP, all matches of \fIpattern\fP are
+replaced with \fIstring\fP. Normally only the first match is replaced.
If \fIpattern\fP begins with \fB#\fP, it must match at the beginning
of the expanded value of \fIparameter\fP.
If \fIpattern\fP begins with \fB%\fP, it must match at the end
.B IFS
is null, no word splitting occurs.
.PP
-Explicit null arguments (\^\f3"\^"\fP or \^\f3'\^'\fP\^) are retained.
+Explicit null arguments (\^\f3"\^"\fP or \^\f3\(aq\^\(aq\fP\^) are retained.
Unquoted implicit null arguments, resulting from the expansion of
parameters that have no values, are removed.
If a parameter with no value is expanded within double quotes, a
.BR ] ,
\fIcharacter classes\fP can be specified using the syntax
\fB[:\fP\fIclass\fP\fB:]\fP, where \fIclass\fP is one of the
-following classes defined in the POSIX.2 standard:
+following classes defined in the POSIX standard:
.PP
.RS
.B
Matches one or more occurrences of the given patterns
.TP
\fB@(\fP\^\fIpattern-list\^\fP\fB)\fP
-Matches exactly one of the given patterns
+Matches one of the given patterns
.TP
\fB!(\fP\^\fIpattern-list\^\fP\fB)\fP
Matches anything except one of the given patterns
After the preceding expansions, all unquoted occurrences of the
characters
.BR \e ,
-.BR ' ,
+.BR \(aq ,
and \^\f3"\fP\^ that did not result from one of the above
expansions are removed.
.SH REDIRECTION
.RE
.PP
A failure to open or create a file causes the redirection to fail.
+.PP
+Redirections using file descriptors greater than 9 should be used with
+care, as they may conflict with file descriptors the shell uses
+internally.
.SS Redirecting Input
.PP
Redirection of input causes the file whose name results from
with the exception that the
.SM
.B DEBUG
-trap (see the description of the
+and
+.B RETURN
+traps (see the description of the
.B trap
builtin under
.SM
.B SHELL BUILTIN COMMANDS
-below) is not inherited unless the function has been given the
+below) are not inherited unless the function has been given the
\fBtrace\fP attribute (see the description of the
.SM
.B declare
builtin below) or the
\fB\-o functrace\fP shell option has been enabled with
the \fBset\fP builtin
-(in which case all functions inherit the \fBDEBUG\fP trap).
+(in which case all functions inherit the \fBDEBUG\fP and \fBRETURN\fP traps).
.PP
Variables local to the function may be declared with the
.B local
option to the
.B export
builtin.
+A function definition may be deleted using the \fB\-f\fP option to
+the
+.B unset
+builtin.
Note that shell functions and variables with the same name may result
in multiple identically-named entries in the environment passed to the
shell's children.
The digits greater than 9 are represented by the lowercase letters,
the uppercase letters, @, and _, in that order.
If \fIbase\fP is less than or equal to 36, lowercase and uppercase
-letters may be used interchangably to represent numbers between 10
+letters may be used interchangeably to represent numbers between 10
and 35.
.PP
Operators are evaluated in order of precedence. Sub-expressions in
If the \fIfile\fP argument to one of the primaries is one of
\fI/dev/stdin\fP, \fI/dev/stdout\fP, or \fI/dev/stderr\fP, file
descriptor 0, 1, or 2, respectively, is checked.
+.PP
+Unless otherwise specified, primaries that operate on files follow symbolic
+links and operate on the target of the link, rather than the link itself.
.sp 1
.PD 0
.TP
.B SIGHUP
to all jobs when an interactive login shell exits.
.PP
-If \Bbash\fP is waiting for a command to complete and receives a signal
+If \fBbash\fP is waiting for a command to complete and receives a signal
for which a trap has been set, the trap will not be executed until
the command completes.
When \fBbash\fP is waiting for an asynchronous command via the \fBwait\fP
.BR + ,
and the previous job with a
.BR \- .
+A single % (with no accompanying job specification) also refers to the
+current job.
.PP
Simply naming a job can be used to bring it into the
foreground:
.B \e"
literal "
.TP
-.B \e'
-literal '
+.B \e\(aq
+literal \(aq
.RE
.PD
.PP
Unquoted text is assumed to be a function name.
In the macro body, the backslash escapes described above are expanded.
Backslash will quote any other character in the macro text,
-including " and '.
+including " and \(aq.
.PP
.B Bash
allows the current readline key bindings to be displayed or modified
Except where noted, readline variables can take the values
.B On
or
-.BR Off .
+.B Off
+(without regard to case).
+Unrecognized variable names are ignored.
+When a variable value is read, empty or null values, "on" (case-insensitive),
+and "1" are equivalent to \fBOn\fP. All other values are equivalent to
+\fBOff\fP.
The variables and their default values are:
.PP
.PD 0
\fBvisible\fP, readline uses a visible bell if one is available.
If set to \fBaudible\fP, readline attempts to ring the terminal's bell.
.TP
+.B bind\-tty\-special\-chars (On)
+If set to \fBOn\fP, readline attempts to bind the control characters
+treated specially by the kernel's terminal driver to their readline
+equivalents.
+.TP
.B comment\-begin (``#'')
The string that is inserted when the readline
.B insert\-comment
If set to \fBon\fP, tilde expansion is performed when readline
attempts word completion.
.TP
-.B history-preserve-point
+.B history\-preserve\-point (Off)
If set to \fBon\fP, the history code attempts to place point at the
-same location on each history line retrived with \fBprevious-history\fP
+same location on each history line retrieved with \fBprevious-history\fP
or \fBnext-history\fP.
.TP
.B horizontal\-scroll\-mode (Off)
insert the \fIn\fPth word from the previous command (the words
in the previous command begin with word 0). A negative argument
inserts the \fIn\fPth word from the end of the previous command.
+Once the argument \fIn\fP is computed, the argument is extracted
+as if the "!\fIn\fP" history expansion had been specified.
.TP
.B
yank\-last\-arg (M\-.\^, M\-_\^)
behave exactly like \fByank\-nth\-arg\fP.
Successive calls to \fByank\-last\-arg\fP move back through the history
list, inserting the last argument of each line in turn.
+The history expansion facilities are used to extract the last argument,
+as if the "!$" history expansion had been specified.
.TP
.B shell\-expand\-line (M\-C\-e)
Expand the line as the shell does. This
.TP
.B dump\-macros
Print all of the readline key sequences bound to macros and the
-strings they ouput. If a numeric argument is supplied,
+strings they output. If a numeric argument is supplied,
the output is formatted in such a way that it can be made part
of an \fIinputrc\fP file.
.TP
Shell quoting is honored.
Each word is then expanded using
brace expansion, tilde expansion, parameter and variable expansion,
-command substitution, arithmetic expansion, and pathname expansion,
+command substitution, and arithmetic expansion,
as described above under
.SM
.BR EXPANSION .
accepts
.B \-\-
to signify the end of the options.
+For example, the \fB:\fP, \fBtrue\fP, \fBfalse\fP, and \fBtest\fP builtins
+do not accept options.
.sp .5
.PD 0
.TP
\fBAlias\fP returns true unless a \fIname\fP is given for which
no alias has been defined.
.TP
-\fBbg\fP [\fIjobspec\fP]
-Resume the suspended job \fIjobspec\fP in the background, as if it
+\fBbg\fP [\fIjobspec\fP ...]
+Resume each suspended job \fIjobspec\fP in the background, as if it
had been started with
.BR & .
If \fIjobspec\fP is not present, the shell's notion of the
.B bg
.I jobspec
returns 0 unless run when job control is disabled or, when run with
-job control enabled, if \fIjobspec\fP was not found or started without
-job control.
+job control enabled, any specified \fIjobspec\fP was not found
+or was started without job control.
.TP
\fBbind\fP [\fB\-m\fP \fIkeymap\fP] [\fB\-lpsvPSV\fP]
.PD 0
.B nospace
Tell readline not to append a space (the default) to words completed at
the end of the line.
+.TP 8
+.B plusdirs
+After any matches defined by the compspec are generated,
+directory name completion is attempted and any
+matches are added to the results of the other actions.
.RE
.TP 8
\fB\-A\fP \fIaction\fP
.TP
.B \-t
Give each \fIname\fP the \fItrace\fP attribute.
-Traced functions inherit the \fBDEBUG\fP trap from the calling shell.
+Traced functions inherit the \fBDEBUG\fP and \fBRETURN\fP traps from
+the calling shell.
The trace attribute has no special meaning for variables.
.TP
.B \-x
dynamically determine whether or not \fBecho\fP expands these
escape characters by default.
.B echo
-does not interpret
-.B \-\-
-to mean the end of options.
+does not interpret \fB\-\-\fP to mean the end of options.
.B echo
interprets the following escape sequences:
.RS
the eight-bit character whose value is the octal value \fInnn\fP
(zero to three octal digits)
.TP
-.B \e\fInnn\fP
-the eight-bit character whose value is the octal value \fInnn\fP
-(one to three octal digits)
-.TP
.B \ex\fIHH\fP
the eight-bit character whose value is the hexadecimal value \fIHH\fP
(one or two hex digits)
directory change fails.
.RE
.TP
-\fBprintf\fP \fIformat\fP [\fIarguments\fP]
+\fBprintf\fP [\fB\-v\fP \fIvar\fP] \fIformat\fP [\fIarguments\fP]
Write the formatted \fIarguments\fP to the standard output under the
control of the \fIformat\fP.
The \fIformat\fP is a character string which contains three types of objects:
In addition to the standard \fIprintf\fP(1) formats, \fB%b\fP causes
\fBprintf\fP to expand backslash escape sequences in the corresponding
\fIargument\fP (except that \fB\ec\fP terminates output, backslashes in
-\fB\e'\fP, \fB\e"\fP, and \fB\e?\fP are not removed, and octal escapes
+\fB\e\(aq\fP, \fB\e"\fP, and \fB\e?\fP are not removed, and octal escapes
beginning with \fB\e0\fP may contain up to four digits),
and \fB%q\fP causes \fBprintf\fP to output the corresponding
\fIargument\fP in a format that can be reused as shell input.
.sp 1
+The \fB\-v\fP option causes the output to be assigned to the variable
+\fIvar\fP rather than being printed to the standard output.
+.sp 1
The \fIformat\fP is reused as necessary to consume all of the \fIarguments\fP.
If the \fIformat\fP requires more \fIarguments\fP than are supplied, the
extra format specifications behave as if a zero value or null string, as
This option has no effect if \fBread\fP is not reading input from the
terminal or a pipe.
.TP
-.B \-u \fIfd\FP
+.B \-u \fIfd\fP
Read input from file descriptor \fIfd\fP.
.PD
.PP
.TP
\fBset\fP [\fB\-\-abefhkmnptuvxBCHP\fP] [\fB\-o\fP \fIoption\fP] [\fIarg\fP ...]
Without options, the name and value of each shell variable are displayed
-in a format that can be reused as input.
+in a format that can be reused as input
+for setting or resetting the currently-set variables.
+Read-only variables cannot be reset.
+In \fIposix mode\fP, only shell variables are listed.
The output is sorted according to the current locale.
When options are specified, they set or unset shell attributes.
Any arguments remaining after the options are processed are treated
Change the behavior of
.B bash
where the default operation differs
-from the POSIX 1003.2 standard to match the standard (\fI`posix mode\fP).
+from the POSIX standard to match the standard (\fIposix mode\fP).
.TP 8
.B privileged
Same as
which change the current directory.
.TP 8
.B \-T
-If set, any trap on \fBDEBUG\fP is inherited by shell functions, command
-substitutions, and commands executed in a subshell environment.
-The \fBDEBUG\fP trap is normally not inherited in such cases.
+If set, any traps on \fBDEBUG\fP and \fBRETURN\fP are inherited by shell
+functions, command substitutions, and commands executed in a
+subshell environment.
+The \fBDEBUG\fP and \fBRETURN\fP traps are normally not inherited
+in such cases.
.TP 8
.B \-\-
If no arguments follow this option, then the positional parameters are
command in the same history entry. This allows
easy re-editing of multi-line commands.
.TP 8
+.B compat31
+If set,
+.B bash
+changes its behavior to that of version 3.1 with respect to quoted
+arguments to the conditional command's =~ operator.
+.TP 8
.B dotglob
If set,
.B bash
shell is executing in a subroutine (a shell function or a shell script
executed by the \fB.\fP or \fBsource\fP builtins), a call to
\fBreturn\fP is simulated.
+.TP
+.B 4.
+\fBBASH_ARGC\fP and \fBBASH_ARGV\fP are updated as described in their
+descriptions above.
+.TP
+.B 5.
+Function tracing is enabled: command substitution, shell functions, and
+subshells invoked with \fB(\fP \fIcommand\fP \fB)\fP inherit the
+\fBDEBUG\fP and \fBRETURN\fP traps.
+.TP
+.B 6.
+Error tracing is enabled: command substitution, shell functions, and
+subshells invoked with \fB(\fP \fIcommand\fP \fB)\fP inherit the
+\fBERROR\fP trap.
.RE
.TP 8
.B extglob
\fBPathname Expansion\fP are enabled.
.TP 8
.B extquote
-If set, \fB$\fP'\fIstring\fP' and \fB$\fP"\fIstring\fP" quoting is
+If set, \fB$\fP\(aq\fIstring\fP\(aq and \fB$\fP"\fIstring\fP" quoting is
performed within \fB${\fP\fIparameter\fP\fB}\fP expansions
enclosed in double quotes. This option is enabled by default.
.TP 8
.B Pathname Expansion
above).
.TP 8
+.B nocasematch
+If set,
+.B bash
+matches patterns in a case\-insensitive fashion when performing matching
+while executing \fBcase\fP or \fB[[\fP conditional commands.
+.TP 8
.B nullglob
If set,
.B bash
Expressions are composed of the primaries described above under
.SM
.BR "CONDITIONAL EXPRESSIONS" .
+\fBtest\fP does not accept any options, nor does it accept and ignore
+an argument of \fB\-\-\fP as signifying the end of options.
.if t .sp 0.5
.if n .sp 1
Expressions may be combined using the following operators, listed
.SM
.B SHELL GRAMMAR
above).
-Refer to the description of the \fBextglob\fP option to the
+Refer to the description of the \fBextdebug\fP option to the
\fBshopt\fP builtin for details of its effect on the \fBDEBUG\fP trap.
If a
.I sigspec
is executed each time a shell function or a script executed with the
\fB.\fP or \fBsource\fP builtins finishes executing.
Signals ignored upon entry to the shell cannot be trapped or reset.
-Trapped signals are reset to their original values in a child
-process when it is created.
+Trapped signals that are not being ignored are reset to their original
+values in a child process when it is created.
The return status is false if any
.I sigspec
is invalid; otherwise
returns true if any of the arguments are found, false if
none are found.
.TP
-\fBulimit\fP [\fB\-SHacdflmnpstuv\fP [\fIlimit\fP]]
+\fBulimit\fP [\fB\-SHacdefilmnpqrstuvx\fP [\fIlimit\fP]]
Provides control over the resources available to the shell and to
processes started by it, on systems that allow such control.
The \fB\-H\fP and \fB\-S\fP options specify that the hard or soft limit is
.B \-d
The maximum size of a process's data segment
.TP
+.B \-e
+The maximum scheduling priority ("nice")
+.TP
.B \-f
-The maximum size of files created by the shell
+The maximum size of files written by the shell and its children
+.TP
+.B \-i
+The maximum number of pending signals
.TP
.B \-l
The maximum size that may be locked into memory
.B \-p
The pipe size in 512-byte blocks (this may not be set)
.TP
+.B \-q
+The maximum number of bytes in POSIX message queues
+.TP
+.B \-r
+The maximum real-time scheduling priority
+.TP
.B \-s
The maximum stack size
.TP
.TP
.B \-v
The maximum amount of virtual memory available to the shell
+.TP
+.B \-x
+The maximum number of file locks
.PD
.PP
If
Read-only variables may not be unset.
If
.B \-f
-is specifed,
-each
+is specified, each
.I name
refers to a shell function, and the function definition
is removed.
.I name
is readonly.
.TP
-\fBwait\fP [\fIn\fP]
-Wait for the specified process and return its termination
-status.
+\fBwait\fP [\fIn ...\fP]
+Wait for each specified process and return its termination status.
+Each
.I n
may be a process
ID or a job specification; if a job spec is given, all processes
.PP
Chet Ramey, Case Western Reserve University
.br
-chet@po.CWRU.Edu
+chet@po.cwru.edu
.SH BUG REPORTS
If you find a bug in
.B bash,
.PP
Comments and bug reports concerning
this manual page should be directed to
-.IR chet@po.CWRU.Edu .
+.IR chet@po.cwru.edu .
.SH BUGS
.PP
It's too big and too slow.